OSDN Git Service

uas: keep track of command state, finish scsi cmd when really done.
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 19 Jun 2012 07:54:51 +0000 (09:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Jun 2012 18:50:59 +0000 (11:50 -0700)
commitb1d6769333496b05818fe6cec72ef7f7504ef9e4
tree3146a237abac196af8b893f55d8ab7809069a49e
parente9bd7e1a2d34de3b0991c81080d56dc408110833
uas: keep track of command state, finish scsi cmd when really done.

Set state bits after submitting data urbs & command urbs, so we know
what is in flight.  Clear data bits when the data urb is finished, clear
command bit when we see the status urb for the command.  Finish the scsi
command after running both status and data completion handlers for the
command.

Add a cmd status logging function for debugging purposes.  Hook it into
the error handler, so we see in the log what status a command is in
which the scsi layer wants cancel.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/uas.c