From: Patrick Mansfield <patmans@us.ibm.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Ronald Kuetemeier <ronald@kuetemeier.com>,
SCSI development list <linux-scsi@vger.kernel.org>,
USB Storage List <usb-storage@one-eyed-alien.net>
Subject: Re: [usb-storage] Re: [PATCH] SCSI: limit mode sense usage
Date: Tue, 28 Oct 2003 17:51:57 -0800 [thread overview]
Message-ID: <20031028175157.A14803@beaverton.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0310281737350.6912-100000@ida.rowland.org>; from stern@rowland.harvard.edu on Tue, Oct 28, 2003 at 05:49:48PM -0500
On Tue, Oct 28, 2003 at 05:49:48PM -0500, Alan Stern wrote:
> All right. The logs make it clear.
Not quite clear for me yet :-/
> Your device doesn't like the MODE-SENSE(10) for page 3F. But instead of
> reporting a normal error code, it tries to send an overlong packet (i.e.,
> longer than the host asked for). Of course this is an error, and the SCSI
> code retries several times, eventually giving up. Oddly enough, the
> device then returns an Invalid Command status for the _next_ command,
> which is an innocuous TEST-UNIT-READY. I don't understand that.
> Anyway, the SCSI layer recognizes that something is wrong. But for some
> unknown reason it goes right back to the beginning of the probe sequence,
> starting with another TEST-UNIT-READY, READ-CAPACITY, and moving on.
> Naturally enough, when it reaches the MODE-SENSE(10) again the same
> problem reoccurs. Patrick, do you know why the sd initialization code is
> doing this?
It does not go back to the probe (scsi scan or sd_probe code), sd_open for
removable media can call sd_revalidate_disk. sd_revalidate_disk is also
called via sd_probe.
The partition check code in register_disk opens the block device once (can
anyone verify that?) calling sd_open. But it almost looks like we have
multiple sd_open calls - given the multiple TEST UNIT READY's READ
CAPACITY, and MODE SENSE calls.
I think the sdev->changed is getting set, causing the read command
(sd_init_command fails) to fail.
I'll look more tomorrow. If anyone figures out or knows the sdev->changed
code please post.
> Even the successful logfile had an odd feature. The sd driver knew enough
> to skip both the page 3F and the page 8 MODE-SENSE(10) calls. But then it
> went ahead and issued MODE-SENSE(6) for page 8! Fortunately this worked
> (or rather, failed cleanly enough) for things to progress okay. Patrick,
> can you explain that too?
The scsi_dev_flags overrides the host adapter setting, and we did not tell
it to skip page 8. Since it worked it does not matter, but we could have
used (given BLIST_MS_SKIP_PAGE_08 is 0x2000 and BLIST_MS_SKIP_PAGE_3F is
0x4000):
echo "model:vendor:0x6000" > /proc/scsi/device_info
-- Patrick Mansfield
next prev parent reply other threads:[~2003-10-29 1:52 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1067293080.1075.8.camel@ronald.kuetemeier.com>
[not found] ` <20031027145531.A2130@beaverton.ibm.com>
2003-10-28 3:51 ` [PATCH] SCSI: limit mode sense usage Ronald Kuetemeier
2003-10-28 15:03 ` [usb-storage] " Alan Stern
2003-10-28 15:16 ` Patrick Mansfield
2003-10-28 15:40 ` Alan Stern
2003-10-28 15:55 ` Ronald Kuetemeier
2003-10-28 16:15 ` Ronald Kuetemeier
2003-10-28 19:17 ` Alan Stern
2003-10-28 19:55 ` Ronald Kuetemeier
2003-10-28 20:29 ` Alan Stern
2003-10-28 21:33 ` Ronald Kuetemeier
2003-10-28 22:49 ` Alan Stern
2003-10-28 23:37 ` Pat LaVarre
2003-10-29 1:51 ` Patrick Mansfield [this message]
2003-10-29 2:16 ` Ronald Kuetemeier
2003-10-29 7:27 ` Patrick Mansfield
2003-10-29 7:21 ` Patrick Mansfield
2003-10-29 15:16 ` Alan Stern
2003-10-29 16:04 ` Ronald Kuetemeier
2003-10-29 15:09 ` Alan Stern
2003-10-29 15:53 ` Ronald Kuetemeier
2003-10-29 16:30 ` Patrick Mansfield
2003-10-28 15:42 ` Ronald Kuetemeier
2003-10-29 16:46 ` [PATCH/RFT] check non-scsi part of status in scsi_status_is_good Patrick Mansfield
2003-10-29 17:53 ` Ronald Kuetemeier
2003-10-29 23:16 ` Patrick Mansfield
2003-10-30 15:11 ` Alan Stern
2003-10-30 16:35 ` Pat LaVarre
2003-10-30 17:18 ` Patrick Mansfield
2003-10-30 17:38 ` Pat LaVarre
2003-10-30 18:05 ` [PATCH/RFT] mode sense madness always use page 8 Patrick Mansfield
2003-10-30 18:14 ` Ronald Kuetemeier
2003-10-30 18:25 ` Patrick Mansfield
2003-10-30 18:15 ` Pat LaVarre
2003-10-30 18:56 ` Alan Stern
2003-10-30 19:06 ` Pat LaVarre
2003-10-30 20:00 ` Alan Stern
2003-10-31 20:47 ` Pat LaVarre
2003-10-30 19:26 ` Patrick Mansfield
2003-10-31 20:38 ` Pat LaVarre
2003-11-03 21:40 ` Pat LaVarre
2003-10-30 19:25 ` Ronald Kuetemeier
2003-10-30 19:39 ` Pat LaVarre
2003-10-30 21:48 ` Patrick Mansfield
2003-10-30 21:58 ` Ronald Kuetemeier
2003-10-30 23:59 ` Pat LaVarre
2003-10-31 18:16 ` Patrick Mansfield
2003-10-31 23:11 ` Pat LaVarre
2003-11-06 23:11 ` Douglas Gilbert
2003-11-07 16:13 ` Pat LaVarre
2003-10-28 15:38 ` [PATCH] SCSI: limit mode sense usage Pat LaVarre
2003-10-28 20:56 ` Pat LaVarre
2003-10-28 22:28 ` Alan Stern
2003-10-28 22:54 ` Pat LaVarre
2003-10-29 14:49 ` Alan Stern
2003-10-29 15:43 ` 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=20031028175157.A14803@beaverton.ibm.com \
--to=patmans@us.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=ronald@kuetemeier.com \
--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 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.