diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-09-13 12:26:50 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-23 21:42:12 -0700 |
commit | ce39fe6fa115d9fea0112c907773a400b98d2463 (patch) | |
tree | 122e915a58527416f1da786c92475260200ccf2f /drivers/usb/storage/uas.c | |
parent | 1ad7ed5af3d85d0d8b3cdc5a4b823272b85c46cf (diff) | |
download | talos-obmc-linux-ce39fe6fa115d9fea0112c907773a400b98d2463.tar.gz talos-obmc-linux-ce39fe6fa115d9fea0112c907773a400b98d2463.zip |
uas: Log error codes when logging errors
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage/uas.c')
-rw-r--r-- | drivers/usb/storage/uas.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 816f56658628..dfa11912708d 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -750,7 +750,8 @@ static int uas_eh_bus_reset_handler(struct scsi_cmnd *cmnd) usb_unlock_device(udev); if (err) { - shost_printk(KERN_INFO, sdev->host, "%s FAILED\n", __func__); + shost_printk(KERN_INFO, sdev->host, "%s FAILED err %d\n", + __func__, err); return FAILED; } @@ -1024,13 +1025,16 @@ static int uas_post_reset(struct usb_interface *intf) struct Scsi_Host *shost = usb_get_intfdata(intf); struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata; unsigned long flags; + int err; if (devinfo->shutdown) return 0; - if (uas_configure_endpoints(devinfo) != 0) { + err = uas_configure_endpoints(devinfo); + if (err) { shost_printk(KERN_ERR, shost, - "%s: alloc streams error after reset", __func__); + "%s: alloc streams error %d after reset", + __func__, err); return 1; } @@ -1066,10 +1070,13 @@ static int uas_reset_resume(struct usb_interface *intf) struct Scsi_Host *shost = usb_get_intfdata(intf); struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata; unsigned long flags; + int err; - if (uas_configure_endpoints(devinfo) != 0) { + err = uas_configure_endpoints(devinfo); + if (err) { shost_printk(KERN_ERR, shost, - "%s: alloc streams error after reset", __func__); + "%s: alloc streams error %d after reset", + __func__, err); return -EIO; } |