From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: RFC: Transport identifier
Date: Thu, 26 Feb 2009 15:48:21 +0000 [thread overview]
Message-ID: <1235663301.19035.44.camel@localhost.localdomain> (raw)
In-Reply-To: <yq1iqmxg6o4.fsf@sermon.lab.mkp.net>
On Wed, 2009-02-25 at 23:31 -0500, Martin K. Petersen wrote:
> There are a few cases where it would be useful to know which transport
> is associated with a scsi_device. For instance when determining whether
> to send a READ CAPACITY(16) to a device or not:
>
> static int sd_try_rc16_first(struct scsi_device *sdp)
> {
> if (scsi_device_transport(sdp) == SCSI_TRANSPORT_USB)
> return 0; /* Run screaming for the hills */
> [...]
>
> This patch implements support for a transport identifier in the
> scsi_host. The id defaults to SPI and it is explicitly overridden in
> the host templates for FC, SAS, USB, etc. drivers.
>
> It also looks like the availability of this transport id could improve
> the sysfs parsing in lsscsi.
I'd really rather not put transport specific knowledge back into the
mid-layer ... the whole idea of the transport classes was to take it out
as much as possible.
The other thought is that a lot of devices nowadays are bridged (all
SCSI DVDs have SPI to ATA bridges; a lot of high end USB storage or
enclosures has USB to ATA bridges), so a single transport identifier
doesn't quite cover it.
The final thought is that a lot of what you're looking for is actually
in the PROTOCOL field of a VPD inquiry, so it might be possible to use
that to obviate a lot of this.
James
next prev parent reply other threads:[~2009-02-26 15:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-26 4:31 RFC: Transport identifier Martin K. Petersen
2009-02-26 4:54 ` Julian Calaby
2009-02-26 5:32 ` Joel Becker
2009-02-26 20:22 ` Martin K. Petersen
2009-02-26 9:53 ` Douglas Gilbert
2009-02-26 15:39 ` Mike Christie
2009-02-26 15:48 ` James Bottomley [this message]
2009-02-26 20:32 ` Martin K. Petersen
2009-02-27 7:33 ` FUJITA Tomonori
2009-02-28 4:13 ` Martin K. Petersen
2009-02-28 4:50 ` Matthew Wilcox
2009-02-28 5:19 ` FUJITA Tomonori
2009-02-28 15:40 ` Martin K. Petersen
2009-02-28 14:53 ` Stefan Richter
2009-02-28 15:06 ` Matthew Wilcox
2009-02-28 15:19 ` Stefan Richter
2009-02-28 15:36 ` James Bottomley
2009-02-28 15:54 ` Martin K. Petersen
2009-02-28 15:42 ` Martin K. Petersen
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=1235663301.19035.44.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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