All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Luben Tuikov <luben_tuikov@adaptec.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	SCSI development list <linux-scsi@vger.kernel.org>,
	Mohammed Sameer <uniball@gmx.net>,
	USB users list <linux-usb-users@lists.sourceforge.net>
Subject: Re: BUG: CD driver sends command during host removal
Date: 29 Sep 2004 15:39:47 -0400	[thread overview]
Message-ID: <1096486793.2124.129.camel@mulgrave> (raw)
In-Reply-To: <415B05E3.10300@adaptec.com>

On Wed, 2004-09-29 at 14:58, Luben Tuikov wrote:
> Does this mean that scsi_device_cancel() should set the result
> code to DID_NO_CONNECT either?

No, I think for in-flight commands, DID_ERROR is the safest.  They
could, after all have partially deposited their data load before being
cancelled.  DID_NO_CONNECT means that no processing was ever done.

> > Right.  scsi_remove_host tells the mid-layer that it's OK to trash all
> > inflight commands because you removed all their users before calling
> > it.  It also tells us that you won't accept any future commands for this
> > host (because you'll error any attempt in queuecommand).
> 
> Do you mean to say that when scsi_remove_host() is called,
> the LLDD must no own any commands?  This is good, it means
> that the LLDD plugged queuecommand(), did "recovery" of
> pending commands and is ready for slave_destroy().

No.  It's up to the LLD.  If it wants to complete all its commands then
call scsi_remove_host(), that's fine.  However it's also fine for it to
call  scsi_remove_host() with pending in-flight commands; if it does,
ownership of these is transferred back to the mid-layer and we cancel
them all.

James



  reply	other threads:[~2004-09-29 19:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040926082926.GA1944@uniball>
2004-09-27 18:18 ` BUG: CD driver sends command during host removal Alan Stern
2004-09-27 18:51   ` Mohammed Sameer
2004-09-29 16:06   ` Luben Tuikov
2004-09-29 16:55     ` Alan Stern
2004-09-29 17:09       ` Mike Anderson
2004-09-29 18:02       ` Luben Tuikov
2004-09-29 18:09         ` James Bottomley
2004-09-29 18:58           ` Luben Tuikov
2004-09-29 19:39             ` James Bottomley [this message]
2004-09-29 19:01         ` Alan Stern
2004-09-29 19:27           ` Mike Anderson
2004-09-29 19:33           ` Luben Tuikov
2004-09-29 19:50           ` James Bottomley
2004-09-29 20:31             ` Mike Anderson
2004-09-29 20:41               ` James Bottomley
2004-09-29 21:07                 ` Mike Anderson
2004-09-29 21:14                   ` James Bottomley
2004-09-29 21:20                     ` Luben Tuikov
2004-09-29 21:26                       ` James Bottomley
2004-09-29 21:20                   ` Alan Stern
2004-10-02 23:57                     ` Mohammed Sameer
2004-10-11 19:20 Alan Stern
2004-10-11 19:36 ` James Bottomley
2004-10-11 20:03   ` Alan Stern
2004-10-11 20:12     ` James Bottomley
2004-10-11 20:40       ` Mike Anderson
2004-10-11 21:15         ` James Bottomley
2004-10-11 23:13           ` Mike Anderson

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=1096486793.2124.129.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb-users@lists.sourceforge.net \
    --cc=luben_tuikov@adaptec.com \
    --cc=stern@rowland.harvard.edu \
    --cc=uniball@gmx.net \
    /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.