]> git.karo-electronics.de Git - linux-beck.git/commit
usb: wusbcore: clean up urb dequeue process
authorThomas Pugliese <thomas.pugliese@gmail.com>
Mon, 30 Sep 2013 20:58:24 +0000 (15:58 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Oct 2013 01:55:27 +0000 (18:55 -0700)
commit14e1d2dfe73f48bbc267b9ef0a9d5a62685f5861
tree1c69a67291de8b637c61662d9120cb57661b17ba
parentb9c84be60c07336e17c4af90e1313666189cbcbd
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>
drivers/usb/wusbcore/wa-xfer.c