USB: fix usb ep0 OUT setup bug.
authorwlf <wulf@rock-chips.com>
Wed, 3 Sep 2014 12:00:50 +0000 (20:00 +0800)
committerwlf <wulf@rock-chips.com>
Wed, 3 Sep 2014 12:00:50 +0000 (20:00 +0800)
In ep0_complete_request, do setup in status phase
in DMA mode for ep0-OUT. It can solve that usb RNDIS
unable to connect with win7 or win8.

drivers/usb/dwc_otg_310/dwc_otg_pcd_intr.c

index eb499643b9e80de09fad56014fe6d0b726765ffe..cdb53717a8ce667bbf9b35d4c3e603f25d54170c 100755 (executable)
@@ -2084,15 +2084,7 @@ static int32_t ep0_complete_request(dwc_otg_pcd_ep_t *ep)
                /* For older cores do setup in status phase in Slave/BDMA modes,
                 * starting from 3.00 do that only in slave, and for DMA modes
                 * just re-enable ep 0 OUT here*/
-               if (core_if->dma_enable == 0
-                   || (core_if->dma_desc_enable == 0
-                       && core_if->snpsid <= OTG_CORE_REV_2_94a)) {
-                       do_setup_in_status_phase(pcd);
-               } else if (core_if->snpsid >= OTG_CORE_REV_3_00a) {
-                       DWC_DEBUGPL(DBG_PCDV,
-                                   "Enable out ep before in status phase\n");
-                       ep0_out_start(core_if, pcd);
-               }
+               do_setup_in_status_phase(pcd);
        }
 
        /* Complete the request */