aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/uas.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-09-13 13:27:11 +0200
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2014-03-04 15:38:05 -0800
commitd89bd835326947e6618b97469159d3266016fe0a (patch)
tree9e776faccdb9ade00f072645830ce0603e15be43 /drivers/usb/storage/uas.c
parentbcf7f6e39335af4f03da8c26a98185fd49754fcc (diff)
downloadlinux-d89bd835326947e6618b97469159d3266016fe0a.tar.gz
uas: properly reinitialize in uas_eh_bus_reset_handler
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/storage/uas.c')
-rw-r--r--drivers/usb/storage/uas.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index d966b59f7d7b26..fc08ee91943927 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -85,6 +85,8 @@ static int uas_submit_urbs(struct scsi_cmnd *cmnd,
struct uas_dev_info *devinfo, gfp_t gfp);
static void uas_do_work(struct work_struct *work);
static int uas_try_complete(struct scsi_cmnd *cmnd, const char *caller);
+static void uas_configure_endpoints(struct uas_dev_info *devinfo);
+static void uas_free_streams(struct uas_dev_info *devinfo);
static DECLARE_WORK(uas_work, uas_do_work);
static DEFINE_SPINLOCK(uas_work_lock);
@@ -800,7 +802,10 @@ static int uas_eh_bus_reset_handler(struct scsi_cmnd *cmnd)
usb_kill_anchored_urbs(&devinfo->cmd_urbs);
usb_kill_anchored_urbs(&devinfo->sense_urbs);
usb_kill_anchored_urbs(&devinfo->data_urbs);
+ uas_free_streams(devinfo);
err = usb_reset_device(udev);
+ if (!err)
+ uas_configure_endpoints(devinfo);
devinfo->resetting = 0;
if (err) {