Re: BUG: CD driver sends command during host removal

Mike Anderson
2004-09-29T19:28:19Z

Alan Stern [stern@rowland.harvard.edu] wrote:
> On 29 Sep 2004, James Bottomley wrote:
>
> > On Wed, 2004-09-29 at 14:02, Luben Tuikov wrote:
> > > > According to Documentation/scsi/scsi_mid_low_api.txt, the only possible
> > > > error returns are SCSI_MLQUEUE_DEVICE_BUSY and SCSI_MLQUEUE_HOST_BUSY.
> > > > Neither is appropriate; should the second one be returned?
> > >
> > > I believe internally SCSI Core returns DID_ERROR.
> >
> > For a device that no-longer exists, DID_NO_CONNECT is probably the most
> > appropriately descriptive.
>
> Regardless of how descriptive the value is, the code in
> scsi_dispatch_cmd treats anything other than SCSI_MLQUEUE_DEVICE_BUSY
> as SCSI_MLQUEUE_HOST_BUSY. Will this matter?
>

You would not want to return non zero status from your queucommand, but
set the result of the command to DID_NO_CONNECT and call done.

-andmike
--
Michael Anderson
andmike@us.ibm.com