]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00155880 USB device: Fix RNDIS Full Speed hang during initialization
authorAnish Trivedi <anish@freescale.com>
Thu, 1 Sep 2011 22:20:42 +0000 (17:20 -0500)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:33:12 +0000 (08:33 +0200)
commit094f03f3555a91007d96ac90b63ebbba8ebbb894
tree8f4171ce58717f7acaed469733e22390e3694aaa
parent4d42d617d43a43fe0ac76ffe672c285b50cf2ebb
ENGR00155880 USB device: Fix RNDIS Full Speed hang during initialization

When setup irq is received, the status phase of the transfer is primed
on ep0 before the data phase. The usb requests are added to the list
of transfer descriptors (maintained by driver) in reverse of their
expected completion order. Completion order is data followed by status,
however the list of tds contains status followed by data.

Upon completion of the data request, the irq handler proceeds to check
the 1st td in the list -- the status request. In full speed mode,
the status phase has not yet completed at this time, so the td's
ACTIVE bit is still set. This leads irq handler to ignore the completion
interrupt without checking the actual td for the data request that caused
the interrupt.

In high speed mode, this issue does not bear itself out because the status
request also completes by the time the irq handler goes to process the data
completion interrupt.

The simple fix for this issue is to prime the status request AFTER the data
request, so that the list of tds maintained by the driver contains the tds
in the order of expected completion.

Signed-off-by: Anish Trivedi <anish@freescale.com>
drivers/usb/gadget/arcotg_udc.c