From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Andreas Reis <andreas.reis@gmail.com>,
USB list <linux-usb@vger.kernel.org>,
SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: Deadlock in usb-storage error handling
Date: Thu, 20 Mar 2014 13:27:14 -0700 [thread overview]
Message-ID: <1395347234.2244.48.camel@dabdike.int.hansenpartnership.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1403201549550.866-100000@iolanthe.rowland.org>
On Thu, 2014-03-20 at 15:59 -0400, Alan Stern wrote:
> On Thu, 20 Mar 2014, James Bottomley wrote:
>
> > OK, so I think we have three things to do
> >
> > 1. Investigate SCSI and fix it's abort state problem that's causing
> > it not to send the abort second time around
> > 2. Fix usb-storage to fail a reset it can't do (i.e. device reset
> > with outstanding commands)
> > 3. Find out why we're sending a spurious request sense.
> >
> > I can look at 1 and 3 if you want to take 2.
>
> I wrote a patch for 2. It turned out not to help much, because I was
> wrong -- while a command is running, usb-storage won't do a bus reset
> either. The lock occurs in a separate part of the code, where I wasn't
> looking earlier. When I tested the patch, the device reset failed
> immediately (as desired) and then the attempted bus reset hung.
> Overall, not much of an improvement...
Hm, yes, sorry, after the bus reset fails, we'll just take the device
offline.
> In fact, this restriction on bus resets is important and necessary.
> USB devices can be composite, meaning they can contain several
> functions all packed into a single device. If a driver for one of the
> other functions needs to perform a bus reset, we don't want it to
> interrupt an ongoing mass-storage command. Thus, it is important for
> the reset routine to wait for an outstanding command to complete.
>
> Anyway, this looks to be a moot point. With your fix for 1, neither
> sort of reset was necessary.
Well as long as the tiny hammer works ... but there are going to be
devices that need the bigger one one day.
James
next prev parent reply other threads:[~2014-03-20 20:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <53298181.9020206@gmail.com>
[not found] ` <53298181.9020206-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-03-19 20:31 ` Deadlock in usb-storage error handling Alan Stern
[not found] ` <Pine.LNX.4.44L0.1403191449290.887-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-03-19 20:54 ` Dan Williams
2014-03-19 21:35 ` James Bottomley
[not found] ` <1395264905.2185.55.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
2014-03-20 15:36 ` Alan Stern
2014-03-20 16:09 ` James Bottomley
2014-03-20 16:34 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1403201233150.858-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-03-20 17:57 ` James Bottomley
2014-03-20 19:49 ` Alan Stern
2014-03-28 16:52 ` James Bottomley
2014-03-20 18:22 ` James Bottomley
2014-03-20 19:48 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1403201518130.863-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-03-20 20:26 ` James Bottomley
[not found] ` <1395347219.2244.47.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
2014-03-20 20:42 ` Alan Stern
[not found] ` <1395331764.2244.16.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
2014-03-20 19:59 ` Alan Stern
2014-03-20 20:27 ` James Bottomley [this message]
2014-03-20 20:43 ` Alan Stern
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=1395347234.2244.48.camel@dabdike.int.hansenpartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=andreas.reis@gmail.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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