linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: linux-usb@vger.kernel.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	Matthew Wilcox <willy@linux.intel.com>,
	Sarah Sharp <sarah.a.sharp@linux.intel.com>,
	Matthew Dharm <mdharm-usb@one-eyed-alien.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"open list:USB ATTACHED SCSI" <linux-scsi@vger.kernel.org>,
	"open list:USB MASS STORAGE..."
	<usb-storage@lists.one-eyed-alien.net>,
	open list <linux-kernel@vger.kernel.org>
Subject: [PATCH v3 2/6] uas: properly reinitialize in uas_eh_bus_reset_handler
Date: Fri, 13 Sep 2013 13:27:11 +0200	[thread overview]
Message-ID: <1379071635-30701-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1379071635-30701-1-git-send-email-kraxel@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/usb/storage/uas.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index d966b59..fc08ee9 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) {
-- 
1.8.3.1

       reply	other threads:[~2013-09-13 11:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1379071635-30701-1-git-send-email-kraxel@redhat.com>
2013-09-13 11:27 ` Gerd Hoffmann [this message]
     [not found] ` <1379071635-30701-1-git-send-email-kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-09-13 11:27   ` [PATCH v3 3/6] uas: make work list per-device Gerd Hoffmann
2013-09-17 20:30     ` Christoph Hellwig
2013-09-18  7:33       ` Gerd Hoffmann
2013-09-24  8:52         ` Christoph Hellwig
2013-09-13 11:27 ` [PATCH v3 4/6] uas: add dead request list Gerd Hoffmann
2013-09-13 11:27 ` [PATCH v3 5/6] uas: replace BUG_ON() + WARN_ON() with WARN_ON_ONCE() Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1379071635-30701-3-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mdharm-usb@one-eyed-alien.net \
    --cc=sarah.a.sharp@linux.intel.com \
    --cc=usb-storage@lists.one-eyed-alien.net \
    --cc=willy@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).