summaryrefslogtreecommitdiff
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.com>2015-08-24 11:10:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-04 10:45:11 +0100
commitcca26be3e68ff2950acda29a5331fe65825034ce (patch)
treea6402c48eb2c9cd1cd8623c841f7a42c7f5534eb /drivers/usb/storage
parentdb1319e166c5e872c4be54eac4e47454133708cf (diff)
UAS: also check for ESHUTDOWN in error reporting
-ESHUTDOWN means that the HC has been unplugged. Reporting an error in that case makes no sense. Signed-off-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/uas.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index f68921909552..48ca9c204354 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -257,17 +257,16 @@ static void uas_stat_cmplt(struct urb *urb)
struct uas_cmd_info *cmdinfo;
unsigned long flags;
unsigned int idx;
+ int status = urb->status;
spin_lock_irqsave(&devinfo->lock, flags);
if (devinfo->resetting)
goto out;
- if (urb->status) {
- if (urb->status != -ENOENT && urb->status != -ECONNRESET) {
- dev_err(&urb->dev->dev, "stat urb: status %d\n",
- urb->status);
- }
+ if (status) {
+ if (status != -ENOENT && status != -ECONNRESET && status != -ESHUTDOWN)
+ dev_err(&urb->dev->dev, "stat urb: status %d\n", status);
goto out;
}
@@ -348,6 +347,7 @@ static void uas_data_cmplt(struct urb *urb)
struct uas_dev_info *devinfo = (void *)cmnd->device->hostdata;
struct scsi_data_buffer *sdb = NULL;
unsigned long flags;
+ int status = urb->status;
spin_lock_irqsave(&devinfo->lock, flags);
@@ -374,9 +374,9 @@ static void uas_data_cmplt(struct urb *urb)
goto out;
}
- if (urb->status) {
- if (urb->status != -ENOENT && urb->status != -ECONNRESET)
- uas_log_cmd_state(cmnd, "data cmplt err", urb->status);
+ if (status) {
+ if (status != -ENOENT && status != -ECONNRESET && status != -ESHUTDOWN)
+ uas_log_cmd_state(cmnd, "data cmplt err", status);
/* error: no data transfered */
sdb->resid = sdb->length;
} else {