From: Mike Anderson <andmike@us.ibm.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Christoph Hellwig <hch@infradead.org>,
James Bottomley <James.Bottomley@SteelEye.com>,
Hannes Reinecke <hare@suse.de>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>,
Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Subject: Re: [Patch] Fix oops on rmmod usb-storage
Date: Wed, 29 Sep 2004 11:32:14 -0700 [thread overview]
Message-ID: <20040929183214.GA5771@us.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0409291345420.1700-100000@ida.rowland.org>
Alan Stern [stern@rowland.harvard.edu] wrote:
> Mike, thanks for adding me to this thread...
>
> On Wed, 29 Sep 2004, Christoph Hellwig wrote:
>
> > > In some cases the knowledge would be in the driver would it not. When the
> > > drivers remove function is called the driver knows the state of the
> > > transport or in the case of the usb storage device it knows it will
> > > not process anymore commands.
> > >
> > > Alan / Matthew / others can correct if I have mis-read something in
> > > usb_stor_release_resources but it knows that it will not process anymore
> > > commands prior to calling scsi_remove_host so if we had a method to flag
> > > this it would help in our shutdown if we want to support both devices
> > > that can and cannot process commands.
>
> That's right; when usb-storage calls scsi_remove_host it will not process
> any more commands.
>
> > Well, we're certainly not going to change the scsi_remove_host signature,
> > but we could add a separate one.
> >
> > But I don't like that change at all as we would still have that problem
> > with all driver that don't have a way to magically find out. We should
> > really try to make scsi_remove_host foolprof.
>
> Please take a look at my questions in
>
> http://marc.theaimsgroup.com/?l=linux-scsi&m=109647697621208&w=2
>
> Part of the problem here may be that ownership of SCSI commands isn't
> clear during the host removal process. As things stand, usb-storage has
> no choice but to ignore commands queued after scsi_remove_host is called.
> This certainly will cause problems if it means we have to wait around for
> the commands to time out and be aborted.
>
Is it possible usb storage could do something else beside just ignore
the commands like return them with DID_NO_CONNECT.
In storage_disconnect it looks like you set some state, wait for the
current command, but do not set anything that queuecommand can look at
to start rejecting commands.
-andmike
--
Michael Anderson
andmike@us.ibm.com
next prev parent reply other threads:[~2004-09-29 18:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-29 7:43 [Patch] Fix oops on rmmod usb-storage Hannes Reinecke
2004-09-29 12:03 ` Christoph Hellwig
2004-09-29 12:31 ` Hannes Reinecke
2004-09-29 17:12 ` Mike Anderson
2004-09-29 17:19 ` James Bottomley
2004-09-29 17:22 ` Christoph Hellwig
2004-09-29 17:36 ` Mike Anderson
2004-09-29 17:38 ` Christoph Hellwig
2004-09-29 17:50 ` Alan Stern
2004-09-29 18:32 ` Mike Anderson [this message]
2004-09-29 18:58 ` Alan Stern
2004-09-30 8:09 ` Hannes Reinecke
2004-09-30 18:14 ` Alan Stern
2004-10-01 7:11 ` Hannes Reinecke
2004-10-01 16:07 ` Alan Stern
2004-09-29 17:52 ` Mike Anderson
2004-09-29 12:04 ` Alan Cox
2004-09-29 13:56 ` James Bottomley
2004-09-29 13:17 ` Alan Cox
2004-09-29 14:24 ` James Bottomley
2004-09-29 14:44 ` Hannes Reinecke
2004-09-29 15:15 ` James Bottomley
2004-09-29 15:15 ` James Bottomley
2004-09-29 15:28 ` Matthew Wilcox
2004-09-29 15:35 ` James Bottomley
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=20040929183214.GA5771@us.ibm.com \
--to=andmike@us.ibm.com \
--cc=James.Bottomley@SteelEye.com \
--cc=akpm@osdl.org \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mdharm-usb@one-eyed-alien.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.