From: Andries.Brouwer@cwi.nl
To: Andries.Brouwer@cwi.nl, mdharm-kernel@one-eyed-alien.net
Cc: linux-kernel@vger.kernel.org, linux-usb-devel@lists.sourceforge.net
Subject: Re: Unit attention in USB storage
Date: Tue, 5 Jun 2001 05:39:47 +0200 (MET DST) [thread overview]
Message-ID: <UTC200106050339.FAA180067.aeb@vlet.cwi.nl> (raw)
>> [things work better when "Unit Attention: not ready to ready transition"
>> is not regarded as an error]
> I suggest trying this with 2.4.5 -- several people report that kernel
> works much better than previous ones with usb-storage.
The details of the behaviour are a bit different, but the essence
is unchanged: with the same .config as the 2.4.3 I reported on,
2.4.5 failed. (With a different one it was successful. It is a
matter of timing.) Again adding the patch:
diff -r -u ../linux-2.4.5/linux/drivers/usb/storage/debug.c linux/drivers/usb/storage/debug.c
--- ../linux-2.4.5/linux/drivers/usb/storage/debug.c Sat Sep 9 01:39:12 2000
+++ linux/drivers/usb/storage/debug.c Tue Jun 5 05:23:46 2001
@@ -302,6 +302,8 @@
case 0x1C00: what="defect list not found"; break;
case 0x2400: what="invalid field in CDB"; break;
case 0x2703: what="associated write protect"; break;
+ case 0x2800: what="not ready to ready transtion (media change?)";
+ break;
case 0x2903: what="bus device reset function occurred"; break;
case 0x2904: what="device internal reset"; break;
case 0x2B00: what="copy can't execute since host can't disconnect";
diff -r -u ../linux-2.4.5/linux/drivers/usb/storage/transport.c linux/drivers/usb/storage/transport.c
--- ../linux-2.4.5/linux/drivers/usb/storage/transport.c Wed Apr 18 20:49:12 2001
+++ linux/drivers/usb/storage/transport.c Tue Jun 5 05:23:13 2001
@@ -793,6 +793,15 @@
/* If things are really okay, then let's show that */
if ((srb->sense_buffer[2] & 0xf) == 0x0)
srb->result = GOOD << 1;
+
+ /* A transition from non-ready to ready sounds OK. */
+ if ((srb->sense_buffer[2] & 0xf) == 0x6 /* unit attention */
+ && srb->sense_buffer[12] == 0x28
+ && srb->sense_buffer[13] == 0 /* not ready -> ready */) {
+ srb->result = GOOD << 1;
+ srb->sense_buffer[0] = 0;
+ }
+
} else /* if (need_auto_sense) */
srb->result = GOOD << 1;
makes things work.
Andries
next reply other threads:[~2001-06-05 3:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-05 3:39 Andries.Brouwer [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-06-05 1:58 Andries.Brouwer
2001-06-05 2:07 ` Matthew Dharm
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=UTC200106050339.FAA180067.aeb@vlet.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=mdharm-kernel@one-eyed-alien.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®