usb: wusbcore: clean up urb dequeue process
This patch updates URB dequeue handling in wusbcore to make it more
reliable when a URB has been broken up into multiple WUSB transfer
request segments.
In wa_urb_dequeue, don't mark segments in the WA_SEG_SUBMITTED,
WA_SEG_PENDING or WA_SEG_DTI_PENDING states as completed if an ABORT
TRANSFER request was sent to the HWA to clean them up. Wait for the
HWA to return a transfer result indicating that it has aborted the
request before cleaning it up. This prevents the DTI state machine
from losing track of transfers and avoids confusion in the case where a
read transfer segment is dequeued after the driver has received the
transfer result but before the data is received.
Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 file changed