From: Patrick Mansfield <patmans@us.ibm.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>,
USB Storage List <usb-storage@one-eyed-alien.net>,
SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi?
Date: Wed, 10 Sep 2003 17:02:27 -0700 [thread overview]
Message-ID: <20030910170227.C3367@beaverton.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0309101219190.905-100000@ida.rowland.org>; from stern@rowland.harvard.edu on Wed, Sep 10, 2003 at 12:23:43PM -0400
On Wed, Sep 10, 2003 at 12:23:43PM -0400, Alan Stern wrote:
> Is there any feeling about how to handle these ongoing problems with the
> mode-sense cache page? There doesn't seem to be any general solution that
> can work with all USB storage devices. Some hang when asked to read the
> entire page; some hang when asked to read just part of the page; some hang
> when asked to read just the page header.
>
> What do the SCSI folk have to say about it?
There was at least this thread last April:
http://marc.theaimsgroup.com/?t=104839042700001&r=1&w=2
Matthew had a simple patch so that emulated hosts did not do any (sd.c)
mode-sense cache checks, James had a filter commands patch.
There were changes since then in how the MODE SENSE is handled (sd.c
only?).
In current 2.6 code, the scsi_host emulated flag does nothing, and can
be deleted.
I don't like per-host (or transport) flags or filters that cannot be
modified. They make some sense for hosts that process the scsi commands
(like a RAID card). If you moved a device from one transport to another,
the commands sent to the device should not change: for example, you move
an iSCSI attached device onto your local system via SPI.
IMO we ought to go with two new BFLAGS, one to block the MODE SENSE page 8
(for the cache), and one to block the MODE SENSE page 0x3f (to check the
write protect).
A per host bflags could be added, and overwritten by per device (devinfo)
settings. I'd rather we black list the broken ones but that does not
appear to be practical. usb-storage could then set the per-host bflag to
include the two new flags.
We still end up sending some non-popular SCSI commands to all SCSI
devices.
Such flags would not stop sg from sending those commands, but that is
postive as well as negative in that you can override what the kernel is
doing via user space (sort of what Pat LaVarre experienced).
Also mentioned in the above thread:
The EVPD code has been removed, and is not an issue.
There is now code to set BLIST_INQUIRY_36 (we can still potentially hang
broken devices before it is set, but you should get a warning, and then
could modify devinfo on the boot/module command line or via proc devinfo).
-- Patrick Mansfield
next prev parent reply other threads:[~2003-09-11 0:03 UTC|newest]
Thread overview: 31+ 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
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 ` Patrick Mansfield [this message]
2003-09-11 20:04 ` [usb-storage] Re: [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi? 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
2003-09-10 21:07 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=20030910170227.C3367@beaverton.ibm.com \
--to=patmans@us.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mdharm-usb@one-eyed-alien.net \
--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