From: "Tony Battersby" <tonyb@cybernetics.com>
To: 'Alan Stern' <stern@rowland.harvard.edu>,
'James Bottomley' <James.Bottomley@steeleye.com>
Cc: 'Matthew Dharm' <mdharm-scsi@one-eyed-alien.net>,
'Joerg Schilling' <schilling@fokus.fraunhofer.de>,
magliery@csb.yale.edu, appro@fy.chalmers.se,
'USB development list' <linux-usb-devel@lists.sourceforge.net>,
'SCSI development list' <linux-scsi@vger.kernel.org>
Subject: RE: [linux-usb-devel] FW: USB 2.0 external hard drive problem
Date: Mon, 9 Feb 2004 17:11:19 -0500 [thread overview]
Message-ID: <04Feb9.171120est.332381@cyborg.cybernetics.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0402091317290.1821-100000@ida.rowland.org>
> Especially if the sense code is NO SENSE. Logically that should
> indicate the driver needed to find out whether or not there was error,
> and it learned that there wasn't.
For tape drives, sense key == NO SENSE is not equivalent to no error to
report. Often a tape drive returns a sense key of NO SENSE but with one
of the other bits (EOM, FILEMARK, ILI) set in the same byte as the sense
key. There are also some ASC/ASCQ combinations that go with a sense key
of NO SENSE but without any of the EOM, FILEMARK, or ILI bits set.
On the other hand, some tape drives set the EOM bit in unsolicited
request sense data just to report the position of the tape, so the EOM
bit being set isn't necessarily an indicator that there was an error.
However, ASC/ASCQ should be nonzero when the EOM bit is set because of
an error.
I recommend defining "no error" to be:
(sense_data[2] & 0xaf) == 0x00 && /* Filemark 0, ignore EOM, ILI 0, NO
SENSE */
sense_data[12] == 0x00 && /* ASC */
sense_data[13] == 0x00 /* ASCQ */
This should work for most devices that I have encountered.
Anthony J. Battersby
Cybernetics
next prev parent reply other threads:[~2004-02-09 22:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200402061211.i16CBSIw001678@burner.fokus.fraunhofer.de>
2004-02-06 14:59 ` [linux-usb-devel] FW: USB 2.0 external hard drive problem Alan Stern
2004-02-06 15:24 ` James Bottomley
2004-02-06 20:59 ` Matthew Dharm
2004-02-09 16:40 ` Alan Stern
2004-02-09 16:50 ` James Bottomley
2004-02-09 21:11 ` Matthew Dharm
2004-02-09 21:30 ` Alan Stern
2004-02-09 22:11 ` Tony Battersby [this message]
2004-02-06 15:10 Joerg Schilling
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=04Feb9.171120est.332381@cyborg.cybernetics.com \
--to=tonyb@cybernetics.com \
--cc=James.Bottomley@steeleye.com \
--cc=appro@fy.chalmers.se \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=magliery@csb.yale.edu \
--cc=mdharm-scsi@one-eyed-alien.net \
--cc=schilling@fokus.fraunhofer.de \
--cc=stern@rowland.harvard.edu \
/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