From: James Bottomley <James.Bottomley@steeleye.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: requeuing a Scsi_Cmnd?
Date: 12 May 2003 09:44:46 -0500 [thread overview]
Message-ID: <1052750688.1769.27.camel@mulgrave> (raw)
In-Reply-To: <3EBEB1D5.3040300@pobox.com>
On Sun, 2003-05-11 at 15:25, Jeff Garzik wrote:
> This question applies to 2.4 as well as 2.5 (I believe the strategies
> are different for the two?)
>
> Suppose I am passed several Scsi_Cmnd structures via ->queuecommand.
> TCQ depth is >1. An event causes the entire queue to be aborted, but I
> know that the majority of the queue was actually ok. So, my LLD would
> need to requeue and resend most of the recently-aborted Scsi_Cmnds.
You keep finding these unhandled condidions, sigh. The correct thing to
do (since this is a situation identical to QErr set) is to return a
check condition to the failing command and to return a status of TASK
ABORTED for all the others (SPC3). Of course, the SCSI-2 behaviour was
just to expect all tasks to be silently aborted on QErr=1. Neither of
these, of course, is coded into the mid-layer.
> How do I tell the SCSI layer to requeue and resend a Scsi_Cmnd [almost]
> immediately?
Probably the best thing to do is to return DID_BUS_BUSY which will force
a fast retry. Note, that's the driver return, *not* the status BUSY,
which will force a requeue and take longer---DID_BUS_BUSY will retry
immediately from the SCSI tasklet.
James
next prev parent reply other threads:[~2003-05-12 14:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-11 20:25 requeuing a Scsi_Cmnd? Jeff Garzik
2003-05-12 5:43 ` Luben Tuikov
2003-05-12 14:44 ` James Bottomley [this message]
2003-05-12 18:12 ` Luben Tuikov
2003-05-12 20:30 ` James Bottomley
2003-05-13 0:20 ` Jeff Garzik
2003-10-30 23:48 ` Andre Hedrick
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=1052750688.1769.27.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=jgarzik@pobox.com \
--cc=linux-scsi@vger.kernel.org \
/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.