diff options
author | Gerard Cauvy <g-cauvy1@ti.com> | 2012-02-10 12:21:18 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-02-10 13:11:46 +0200 |
commit | 3b637367ae40b6d3c20e30cb0cdd059e67bbf848 (patch) | |
tree | 0d74b50fafb3f1191a29b87a0dcd1660cb95d7d2 /drivers/usb/dwc3/gadget.c | |
parent | 090725431b9636a0a59516ff0fe94933cf09a82b (diff) |
usb: dwc3: ep0: fix SetFeature(TEST)
When host requests us to enter a test mode,
we cannot directly enter the test mode before
Status Phase is completed, otherwise the core
will never be able to deliver the Status ZLP
to host, because it has already entered the
requested Test Mode.
In order to fix the error, we move the actual
start of Test Mode right after we receive
Transfer Complete event of the status phase.
Signed-off-by: Gerard Cauvy <g-cauvy1@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index c30ab6da3d0e..76327005d54c 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1962,6 +1962,7 @@ static void dwc3_gadget_reset_interrupt(struct dwc3 *dwc) reg = dwc3_readl(dwc->regs, DWC3_DCTL); reg &= ~DWC3_DCTL_TSTCTRL_MASK; dwc3_writel(dwc->regs, DWC3_DCTL, reg); + dwc->test_mode = false; dwc3_stop_active_transfers(dwc); dwc3_clear_stall_all_ep(dwc); |