From: James Bottomley <James.Bottomley@SteelEye.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: SCSI development list <linux-scsi@vger.kernel.org>,
"Mike R." <turbanator1@verizon.net>
Subject: Re: Incorrect response to SK/ASC/ASCQ = x 02/04/01 (becoming ready)
Date: 22 Aug 2004 19:32:27 -0400 [thread overview]
Message-ID: <1093217548.1727.367.camel@mulgrave> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0408221154220.15992-100000@netrider.rowland.org>
On Sun, 2004-08-22 at 12:21, Alan Stern wrote:
> The SCSI core doesn't react properly when it receives SK/ASC/ASCQ = x
> 02/04/01 = Not Ready, Logical unit in process of becoming ready.
>
> The core is complex enough that I can't tell exactly what's wrong or how
> it should be fixed. That particular sense data combination is spotted in
> two different places: scsi_lib.c:scsi_io_completion() and
> scsi_error.c:scsi_check_sense(). It's not clear which one is causing the
> problem -- maybe they both are.
>
> Anyway, the reaction in both routines is to requeue the request for
> immediate retry. Obviously that's the wrong thing to do. The request
> should be retried, yes, but only after a delay of, say, a second or so.
> (Presumably the queue should remain blocked during that time.) And this
> should keep happening for up to maybe 30 seconds.
>
> Instead what happens is that all the retries get exhausted in a fraction
> of a second, which isn't long enough for any device to spin up. The
> drivers then proceed blindly with whatever else they want to do, which
> generally incurs its own set of errors.
Well, that all depends on what's causing this.
You're correct in that the mid-layer assumes an operational device won't
spontaneously spin down, so it does interpret this sense as indicating a
transient error....In fact, most often it's the sense returned by disc
arrays after a bus or device reset, which is the case the code is
designed to handle.
If the spin down is caused by user intervention (actually sending a spin
down command followed by a spin up) then I'd say the user needs to
ensure the device has fully spun up before using it.
What other conditions produce something like this?
> This problem seems to be particularly bad for USB DVD drives. One user
> was able to work around it by manually loading the usb-storage driver 20
> to 30 seconds after plugging the drive into the computer. Obviously it
> would be much better to have the system do the right thing in the first
> place.
Hmm, well, the sr code does contain a loop (in get_capabilites()) for
waiting for the device to become ready, but it obviously simply sends
the command five times and then gives up. Perhaps adding logic here to
wait much longer might fix the DVD problem?
James
next prev parent reply other threads:[~2004-08-22 23:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-22 16:21 Incorrect response to SK/ASC/ASCQ = x 02/04/01 (becoming ready) Alan Stern
2004-08-22 22:55 ` Nathan Bryant
2004-08-22 23:32 ` James Bottomley [this message]
2004-08-22 23:56 ` Burn Alting
2004-08-23 15:31 ` James Bottomley
2004-08-23 17:08 ` Burn Alting
2004-08-26 2:54 ` Jeremy Higdon
2004-08-26 15:38 ` James Bottomley
2004-08-26 22:36 ` Jeremy Higdon
2004-08-27 0:03 ` Douglas Gilbert
2004-08-26 15:55 ` PATCH: (as355) Fix test for valid sense data present Alan Stern
2004-08-26 16:09 ` James Bottomley
2004-08-26 16:59 ` Alan Stern
2004-08-26 17:27 ` James Bottomley
2004-08-26 19:32 ` Alan Stern
2004-08-26 23:36 ` Douglas Gilbert
2004-08-26 17:20 ` Proposal for fixing READ_CAPACITY Alan Stern
2004-08-23 15:10 ` Incorrect response to SK/ASC/ASCQ = x 02/04/01 (becoming ready) Luben Tuikov
2004-08-23 16:05 ` Nathan Bryant
2004-08-23 18:29 ` Luben Tuikov
2004-08-24 22:04 ` Brian King
-- strict thread matches above, loose matches on Subject: below --
2004-08-26 15:21 Pat LaVarre
2004-08-26 15:29 ` Pat LaVarre
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=1093217548.1727.367.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=turbanator1@verizon.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.