public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.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 10:53:48 +0100	[thread overview]
Message-ID: <49A666AC.9030202@interlog.com> (raw)
In-Reply-To: <yq1iqmxg6o4.fsf@sermon.lab.mkp.net>

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.

lsscsi could do with some help detecting the transport.
It uses an untidy set of heuristics now that can easily
be tripped up by sysfs changes.

It may be helpful to differentiate between a "near end"
transport (i.e. between the initiator and the target) and
the transport (and possibly different command set) that
the logical unit (LU) reports.

Doug Gilbert

  parent reply	other threads:[~2009-02-26  9:53 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 [this message]
2009-02-26 15:39 ` Mike Christie
2009-02-26 15:48 ` James Bottomley
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=49A666AC.9030202@interlog.com \
    --to=dgilbert@interlog.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