From: yangkai Date: Tue, 13 Nov 2012 09:30:44 +0000 (+0800) Subject: support host intr transfer maxpacket more than 16 X-Git-Tag: firefly_0821_release~8229 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=47983b37c09248c1209ea34106566f766ad9f2ca;p=firefly-linux-kernel-4.4.55.git support host intr transfer maxpacket more than 16 --- diff --git a/drivers/usb/dwc_otg/dwc_otg_cil.c b/drivers/usb/dwc_otg/dwc_otg_cil.c index 3eefe676d364..8acc6b0cdacf 100755 --- a/drivers/usb/dwc_otg/dwc_otg_cil.c +++ b/drivers/usb/dwc_otg/dwc_otg_cil.c @@ -1540,7 +1540,7 @@ void dwc_otg_hc_start_transfer(dwc_otg_core_if_t *_core_if, dwc_hc_t *_hc) uint32_t max_periodic_len = _hc->multi_count * _hc->max_packet; if (_hc->xfer_len > max_periodic_len) { - _hc->xfer_len = max_periodic_len; +// _hc->xfer_len = max_periodic_len; } else { diff --git a/drivers/usb/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/dwc_otg/dwc_otg_hcd_intr.c index 175708a3079a..18ffb15d39e2 100755 --- a/drivers/usb/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/dwc_otg/dwc_otg_hcd_intr.c @@ -1134,8 +1134,12 @@ static int32_t handle_hc_xfercomp_intr(dwc_otg_hcd_t *_hcd, break; case PIPE_INTERRUPT: DWC_DEBUGPL(DBG_HCDV, " Interrupt transfer complete\n"); - update_urb_state_xfer_comp(_hc, _hc_regs, urb, _qtd); - + urb_xfer_done = update_urb_state_xfer_comp(_hc, _hc_regs, urb, _qtd); + if(!urb_xfer_done){ + save_data_toggle(_hc, _hc_regs, _qtd); + halt_channel(_hcd, _hc, _qtd, DWC_OTG_HC_XFER_NAK); + break; + } /* * Interrupt URB is done on the first transfer complete * interrupt. @@ -1297,6 +1301,8 @@ static int32_t handle_hc_nak_intr(dwc_otg_hcd_t *_hcd, break; case PIPE_INTERRUPT: _qtd->error_count = 0; + update_urb_state_xfer_intr(_hc, _hc_regs, _qtd->urb,_qtd, DWC_OTG_HC_XFER_NAK); + save_data_toggle(_hc, _hc_regs, _qtd); halt_channel(_hcd, _hc, _qtd, DWC_OTG_HC_XFER_NAK); break; case PIPE_ISOCHRONOUS: