From: Pat LaVarre <p.lavarre@ieee.org>
To: stern@rowland.harvard.edu
Cc: usb-storage@one-eyed-alien.net, linux-scsi@vger.kernel.org
Subject: Re: [usb-storage] unsolicited sense in 2.6.0-test5 usb-storage.ko
Date: 10 Sep 2003 15:24:09 -0600 [thread overview]
Message-ID: <1063229049.6245.12.camel@patehci2> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0309101700230.1579-100000@ida.rowland.org>
> The reason for the unsolicited REQUEST-SENSE ...
Help, lost me.
I'm thinking usb-storage auto sense should always and only follow
bCSWStatus = x01 Failed. I'm thinking unsolicited auto sense should
occur only if the layers above request such an abuse - never
automagically.
I'm thinking not injecting unsolicited auto sense is a part of the
unwritten specification that "everyone knows" helps hosts get along with
devices.
No? Where have I gone wrong?
> usb-storage expects that certain commands will
> never yield a short transfer, so if they do it
> must mean something has gone wrong,
I agree something has gone wrong, indeed I am delighted to see that
linux usb-storage detects that something has gone wrong.
> Since sgp_dd asked for a 64-byte
> READ-CAPACITY, it gets what it deserves.
Ah, here we educate me.
I should prepare and forward a patch to correct sgp_dd?
We the community now broadly accept this rule? We say apps own the job
of keeping the bus "on the thin diagonal" i.e. asking for precisely the
expected count of data bytes?
I expect we can do better, but already I stumbled into a patch that
works (-: because I needed one :-):
--- sg3_utils-1.05/sgp_dd.c 2003-05-29 03:00:48.000000000 -0600
+++ sg3_utils/sgp_dd.c 2003-09-10 14:52:40.408420816 -0600
@@ -244,6 +244,9 @@
io_hdr.mx_sb_len = sizeof(sense_b);
io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
io_hdr.dxfer_len = sizeof(rcBuff);
+#if 1 // PEL
+ io_hdr.dxfer_len = 8;
+#endif
io_hdr.dxferp = rcBuff;
io_hdr.cmdp = rcCmdBlk;
io_hdr.sbp = sense_b;
Pat LaVarre
next prev parent reply other threads:[~2003-09-10 21:26 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3F5E434D.6080801@unixsol.org>
2003-09-10 16:23 ` [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi? Alan Stern
2003-09-10 18:16 ` [usb-storage] " Pat LaVarre
2003-09-10 18:49 ` sg MiB writes scheduling while atomic Pat LaVarre
2003-09-10 19:30 ` Pat LaVarre
2003-09-16 6:35 ` Douglas Gilbert
2003-09-16 11:42 ` Matthew Wilcox
2003-09-16 12:58 ` Christoph Hellwig
2003-10-14 23:36 ` Pat LaVarre
2003-09-10 20:08 ` [PATCH] mount -w of dvd+rw etc. in vanilla 2.6 Pat LaVarre
2003-09-10 22:49 ` Patrick Mansfield
2003-09-22 14:52 ` max GiB written per boot Pat LaVarre
2003-09-10 20:51 ` unsolicited sense in 2.6.0-test5 usb-storage.ko Pat LaVarre
2003-09-10 21:03 ` [usb-storage] " Alan Stern
2003-09-10 21:24 ` Pat LaVarre [this message]
2003-09-10 21:52 ` Matthew Dharm
2003-09-10 22:08 ` Pat LaVarre
2003-09-12 0:21 ` Pat LaVarre
2003-09-12 0:29 ` Pat LaVarre
2003-09-16 11:28 ` Douglas Gilbert
2003-09-11 0:02 ` [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi? Patrick Mansfield
2003-09-11 20:04 ` [usb-storage] " Pat LaVarre
2003-09-11 20:05 ` Alan Stern
2003-09-11 20:19 ` James Bottomley
2003-09-12 21:17 ` Alan Stern
2003-09-11 20:42 ` Pat LaVarre
2003-09-12 19:59 ` Alan Stern
2003-09-12 19:18 ` Pat LaVarre
2003-09-12 18:43 ` Pat LaVarre
2003-09-12 20:56 ` Patrick Mansfield
2003-09-12 21:53 ` 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=1063229049.6245.12.camel@patehci2 \
--to=p.lavarre@ieee.org \
--cc=linux-scsi@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=usb-storage@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