]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: gadget: fix 'endpoint always busy' bug
authorFelipe Balbi <balbi@ti.com>
Thu, 4 Oct 2012 08:58:00 +0000 (11:58 +0300)
committerFelipe Balbi <balbi@ti.com>
Mon, 15 Oct 2012 12:03:03 +0000 (15:03 +0300)
commit3f7e762c7ead49c4f54353e5d73056b8ab02dbde
treee05bc2681fea268de08c0ab9c6eb593381f5d3c3
parent0d577442d51c1c4ffe9f108f9f6058d85b2c42c9
usb: dwc3: gadget: fix 'endpoint always busy' bug

If a USB transfer has already been started, meaning
we have already issued StartTransfer command to that
particular endpoint, DWC3_EP_BUSY flag has also
already been set.

When we try to cancel this transfer which is already
in controller's cache, we will not receive XferComplete
event and we must clear DWC3_EP_BUSY in order to allow
subsequent requests to be properly started.

The best place to clear that flag is right after issuing
DWC3_DEPCMD_ENDTRANSFER.

Cc: stable@vger.kernel.org # v3.4 v3.5 v3.6
Reported-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c