Make sure we consider a command abort only if the device confirms
that.

Signed-off-by: Oliver Neukum <[email protected]>
---
 drivers/usb/storage/uas.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index acd2034..d388e78 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -472,6 +472,15 @@ static void uas_cmd_cmplt(struct urb *urb)
 
 static void uas_tmf_cmplt(struct urb *urb)
 {
+       struct scsi_cmnd *cmnd = urb->context;
+       struct uas_dev_info *devinfo = (void *)cmnd->device->hostdata;
+       int status = urb->status;
+
+       if (status < 0) {
+               devinfo->deathrow = NULL;
+               complete(&devinfo->deathknell);
+       }
+
        /*
         * Do exactly nothing
         * At this point the device has acknowledged
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to