Re: BUG: CD driver sends command during host removal

James Bottomley
2004-09-29T21:15:02Z

On Wed, 2004-09-29 at 17:07, Mike Anderson wrote:
> ok, thanks for the clarification. Your previous statement seemed to imply
> once scsi_remove_host was called the LLDD had no responsibility for
> calling done on commands sent to the LLDDs queuecommand.

Hang on a minute, there are two cases:

Existing in-flight commands:

Here, either the LLD returns done on them or the mid-layer will cancel
them during the invocation of scsi_remove_host(). In the latter case,
the LLD doesn't need to call done on them.

New Commands going down into queuecommand:

These the LLD must error out (by returning done with an error status).

> So now that this thread and the other thread related to similar
> shutdown issues has grown long is the next step to see if we can get the
> usb queuecommand to return DID_NO_CONNECT in this shutdown case.

Yes, that sounds correct.

James