public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrick Mansfield <patmans@us.ibm.com>
To: Pat LaVarre <p.lavarre@ieee.org>
Cc: stern@rowland.harvard.edu, mdharm-usb@one-eyed-alien.net,
	usb-storage@one-eyed-alien.net, linux-scsi@vger.kernel.org
Subject: Re: [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi?
Date: Fri, 12 Sep 2003 13:56:28 -0700	[thread overview]
Message-ID: <20030912135628.B21598@beaverton.ibm.com> (raw)
In-Reply-To: <1063392194.3677.7.camel@patehci2>; from p.lavarre@ieee.org on Fri, Sep 12, 2003 at 12:43:14PM -0600

On Fri, Sep 12, 2003 at 12:43:14PM -0600, Pat LaVarre wrote:
> 
> > From: Patrick Mansfield <patmans@us.ibm.com>
> > ...
> > last April: ... changes since then
> > in how the MODE SENSE is handled (sd.c only?)
> 
> Anybody know more?

The mode sense 6 vs 10 that James mentioned, search the code for
use_10_for_ms, used in scsi_lib.c, set to 0 in scsi_scan.c and set to 1 by
drivers/usb/storage/scsiglue.c.

> > 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.
> 
> Eh?

More specifically, if you are using some LLDD or transport X as a bridge
to another transport Y, we might set flags - maybe what commands we can
send - relative to transport X, when they might be inappropriate for
transport Y.

Examples:

If USB (usb-storage) bridged to a remote device that is actually connected
via SPI, today we will try and send 10 byte MODE SENSE commands to the
device.

If iSCSI bridged to a remote USB device, we will only send 6 byte MODE
SENSE commands.

There are also devices that work with FCP or SPI, but those generally
don't have borken devices like the USB storage ones.

> I thought in linux we have competing cdb authors on purpose.  For
> example, how sr decides if a device is writable differs from how ide-cd
> decides if a device is writable.  I thought that the powers that be like
> linux that way.
> 
> No?

> Having multiple cdb authors necessarily means that the cdb's passed thru
> one kind of transport or another do differ any time the multiple
> versions of copy-edited authoring code differ.
> 
> In particular, people designing an unusual device to work with linux
> have to repeat their work: once for sr, again for ide-cd, and so on.
> 
> No?

I don't get your point - I was talking about the transport (LLDD), not the
actual scsi device or upper level drivers.

Code used for different upper level scsi devices should not be duplicated,
I don't know ide or cd enough to comment in that area, except that there
is common cd code (struct cdrom_device_ops).

sr could probably do some of the same things as sd to figure out if a
device is writable, but we are best maintaining current algorithms (don't
have sr send new mode sense commands) to avoid borken devices.

-- Patrick Mansfield

  reply	other threads:[~2003-09-12 20:57 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   ` [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 [this message]
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=20030912135628.B21598@beaverton.ibm.com \
    --to=patmans@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mdharm-usb@one-eyed-alien.net \
    --cc=p.lavarre@ieee.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