From: Patrick Mansfield <patmans@us.ibm.com>
To: Alan Stern <stern@rowland.harvard.edu>,
Dmitri Katchalov <dmitrik@users.sourceforge.net>
Cc: USB development list <linux-usb-devel@lists.sourceforge.net>,
SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: usb-storage and Sony Handycam
Date: Fri, 7 Nov 2003 09:29:10 -0800 [thread overview]
Message-ID: <20031107092910.A3471@beaverton.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0311071117160.1577-100000@ida.rowland.org>; from stern@rowland.harvard.edu on Fri, Nov 07, 2003 at 11:21:48AM -0500
On Fri, Nov 07, 2003 at 11:21:48AM -0500, Alan Stern wrote:
> On Fri, 7 Nov 2003, Dmitri Katchalov wrote:
> > I investigated it a little and that's what I found:
> > This device uses CB transport (SENSE status not reported).
> > This device does not support MODE_SENSE at all.
> > MODE_SENSE(6) fails with STALL condition. Subsequent
> > REQUEST-SENSE reports ILLEGAL REQUEST. SCSI layer is
> > able to handle this situation, the only drawback is
> > that write-protect status is not reported.
> >
> > Unfortunately usb-storage sets use_10_for_ms flag
> > by default which causes SCSI to try MODE_SENSE(10)
> > first.
> > The device responds to MODE_SENSE(10) with "babble"
> > (-EOVERFLOW). scsiglue sees transport error and
> > tries to do a soft reset (which also fails).
> > Note that scsiglue does not automatically send
> > REQUEST-SENSE in this case.
> >
> > scsiglue then gives up after several attempts and
> > reports the error to the upper layer. Upper layer
> > (SCSI) correctly realises that MODE_SENSE(10) does
> > not work and attempts to fallback to MODE_SENSE(6)
> > but before that it issues TEST_UNIT_READY.
> > This time the device responds with ILLEGAL REQUEST.
> > Now SCSI gets totally confused and decides to give up.
The above sequence is not quite correct (assuming the same behaviour as
logs for another failing Sony/Sony DSC), the MODE SENSE goes out, but we
do not notice in scsi core that it failed (host byte DID_ERROR).
The MODE SENSE is treated as if it succeeded, and yes the TEST UNIT READY
gets an ILLEGAL REQUEST.
I don't recall what happens to further MODE SENSE commands.
> > As I understand it this ILLEGAL REQUEST actually refers
> > to the previous MODE_SENSE(10) command because this
> > error condition has never been cleared properly.
>
> You're probably right. But that's not how TEST-UNIT-READY is _supposed_
> to behave. It shouldn't be reporting the status from a previous command;
> it should indicate the device's current status.
>
> > If I change interpret_usb_result() in transport.c
> > to ignore "babble" then the next REQUEST-SENSE
> > reports ILLEGAL REQUEST, SCSI handles that and
> > everything sort of works.
I don't see how that worked, I would expect nearly the same command
sequence, since scsi core is not checking the error.
USB storage debug logs are needed to verify what happened (when ignoring
babble/overflow).
> > Regards,
> > Dmitri
>
> Patrick, what do you think about implementing that change to have the
> response checker retry when it gets ILLEGAL REQUEST from a
> TEST-UNIT-READY?
No, since we should fix scsi_status_is_good, and then we see a different
failure mode for the Sony/Sony DSC.
Dmitri -
Reference to the patch and discussion about scsi_status_is_good change,
you will likely get the same bad result if you apply the patch:
http://marc.theaimsgroup.com/?t=106744619500004&r=1&w=2
We should figure out what commands work for the device using SG_IO, try
using Pat L's plscsi or modify one of the sg_util programs to send the
exact failing command, reference:
http://marc.theaimsgroup.com/?l=linux-scsi&m=106755844319144&w=2
A USB trace under Windows would be helpful.
-- Patrick Mansfield
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
next prev parent reply other threads:[~2003-11-07 17:29 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1068207145.3fab8c2988d43@webmail.netregistry.net>
2003-11-07 16:21 ` usb-storage and Sony Handycam Alan Stern
2003-11-07 17:29 ` Patrick Mansfield [this message]
2003-11-07 19:49 ` Alan Stern
2003-11-08 2:54 ` Dmitri Katchalov
2003-11-08 6:34 ` Patrick Mansfield
2003-11-08 13:29 ` Dmitri Katchalov
2003-11-08 16:28 ` Alan Stern
2003-11-08 20:37 ` Patrick Mansfield
2003-11-09 3:47 ` [linux-usb-devel] " Alan Stern
2003-11-09 8:45 ` Dmitri Katchalov
2003-11-10 20:45 ` Patrick Mansfield
2003-11-10 17:59 ` Patrick Mansfield
2003-11-10 18:46 ` Alan Stern
2003-11-10 19:04 ` [linux-usb-devel] " Patrick Mansfield
2003-11-10 19:57 ` Alan Stern
2003-11-10 22:46 ` Sancho Dauskardt
2003-11-18 15:20 ` Unaligned scatter-gather buffers and usb-storage Alan Stern
2003-11-18 22:37 ` Patrick Mansfield
2003-11-19 8:47 ` Jens Axboe
2003-11-19 13:01 ` [linux-usb-devel] " Oliver Neukum
2003-11-19 13:04 ` Jens Axboe
2003-11-19 14:37 ` James Bottomley
2003-11-19 14:39 ` Jens Axboe
2003-11-19 14:58 ` James Bottomley
2003-11-19 15:00 ` [linux-usb-devel] " Jens Axboe
2003-11-19 16:56 ` Kai Makisara
2003-11-19 20:19 ` Jens Axboe
2003-11-19 22:06 ` Kai Makisara
2003-11-20 6:53 ` Jens Axboe
2003-11-20 15:20 ` Alan Stern
2003-11-20 15:30 ` Jens Axboe
2003-11-20 16:09 ` Alan Stern
2003-11-20 16:24 ` Jens Axboe
2003-11-20 16:28 ` [linux-usb-devel] " Oliver Neukum
2003-11-20 19:23 ` Kai Makisara
2003-11-20 17:18 ` Kai Makisara
2003-11-20 19:18 ` [linux-usb-devel] " Kai Mäkisara
2003-11-21 18:03 ` PATCH: (as141) " Alan Stern
2003-11-21 20:07 ` Kai Makisara
2003-12-01 1:30 ` Matthew Dharm
2004-01-05 0:41 ` Matthew Dharm
2004-01-05 10:08 ` Jens Axboe
2004-01-05 21:58 ` PATCH: (as141b) " Alan Stern
2004-01-06 11:28 ` Oliver Neukum
2004-01-06 16:10 ` Alan Stern
2004-02-02 15:51 ` James Bottomley
2004-02-03 15:47 ` Alan Stern
2004-02-03 15:55 ` James Bottomley
2004-02-03 16:02 ` Matthew Wilcox
2003-11-19 15:44 ` Alan Stern
2003-11-19 15:49 ` Jens Axboe
2003-11-19 16:58 ` Alan Stern
2003-11-19 17:03 ` Jens Axboe
2003-11-07 22:09 ` usb-storage and Sony Handycam Alan Stern
2003-11-10 22:21 Andries.Brouwer
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=20031107092910.A3471@beaverton.ibm.com \
--to=patmans@us.ibm.com \
--cc=dmitrik@users.sourceforge.net \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--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;
as well as URLs for NNTP newsgroup(s).