From: lyz Date: Tue, 5 Aug 2014 01:06:13 +0000 (+0800) Subject: usb: udc: receive 1 SETUP packet in BDMA mode X-Git-Tag: firefly_0821_release~4939 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dff8dc932fd69ba084bf0959ccb6d725f059fd2a;p=firefly-linux-kernel-4.4.55.git usb: udc: receive 1 SETUP packet in BDMA mode --- diff --git a/drivers/usb/dwc_otg_310/dwc_otg_cil.c b/drivers/usb/dwc_otg_310/dwc_otg_cil.c index 0ed45a84199b..2f6aae33f8f2 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_cil.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_cil.c @@ -4686,7 +4686,7 @@ void dwc_otg_ep0_start_transfer(dwc_otg_core_if_t *core_if, dwc_ep_t *ep) deptsiz.b.xfersize = ep->maxpacket; deptsiz.b.pktcnt = 1; if (core_if->snpsid >= OTG_CORE_REV_3_00a) - deptsiz.b.supcnt = 3; + deptsiz.b.supcnt = 1; DWC_DEBUGPL(DBG_PCDV, "len=%d xfersize=%d pktcnt=%d\n", ep->xfer_len, deptsiz.b.xfersize, deptsiz.b.pktcnt); diff --git a/drivers/usb/dwc_otg_310/dwc_otg_pcd_intr.c b/drivers/usb/dwc_otg_310/dwc_otg_pcd_intr.c index fb2f8884acdb..eb499643b9e8 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_pcd_intr.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_pcd_intr.c @@ -745,7 +745,7 @@ static inline void ep0_out_start(dwc_otg_core_if_t *core_if, } } - doeptsize0.b.supcnt = 3; + doeptsize0.b.supcnt = 1; doeptsize0.b.pktcnt = 1; doeptsize0.b.xfersize = 8 * 3; @@ -1834,20 +1834,6 @@ static inline void pcd_setup(dwc_otg_pcd_t *pcd) doeptsize0.d32 = DWC_READ_REG32(&dev_if->out_ep_regs[0]->doeptsiz); - /** In BDMA more then 1 setup packet is not supported till 3.00a */ - if (core_if->dma_enable && core_if->dma_desc_enable == 0 - && (doeptsize0.b.supcnt < 2) - && (core_if->snpsid < OTG_CORE_REV_2_94a)) { - DWC_ERROR - ("\n\n----------- CANNOT handle > 1 setup packet in DMA mode\n\n"); - } - if ((core_if->snpsid >= OTG_CORE_REV_3_00a) - && (core_if->dma_enable == 1) && (core_if->dma_desc_enable == 0)) { - ctrl = - (pcd->setup_pkt + - (3 - doeptsize0.b.supcnt - 1 + - ep0->dwc_ep.stp_rollover))->req; - } #ifdef DEBUG_EP0 DWC_DEBUGPL(DBG_PCD, "SETUP %02x.%02x v%04x i%04x l%04x\n", ctrl.bmRequestType, ctrl.bRequest,