mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Oliver Neukum <oliver@neukum.name>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	David Brownell <david-b@pacbell.net>,
	Andries.Brouwer@cwi.nl, garloff@suse.de,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	sancho@dauskardt.de, linux-usb-devel@lists.sourceforge.net,
	linux1394-devel@lists.sourceforge.net, dougg@torque.net
Subject: Re: [linux-usb-devel] Re: /proc/scsi/map
Date: Mon, 17 Jun 2002 09:54:56 -0500	[thread overview]
Message-ID: <200206171454.g5HEsu802593@localhost.localdomain> (raw)
In-Reply-To: Message from Oliver Neukum <oliver@neukum.name>  of "Mon, 17 Jun 2002 07:19:52 +0200." <200206170719.52136.oliver@neukum.name>

oliver@neukum.name said:
>  These may be an exception. You usually want to get drivers involved
> even if only for synchronisation. Failing to do so has already let to
> problems with usb storage. 

I don't deny that there may be devices that need some type of vendor specific 
probe to get the information.

> That is the point. The driver knows best what kind of devices it works
> on. You can forget about the whole identification method business, if
> you go for the driver. In case of usb storage and firewire that data
> is already sitting there ready for taking. I suspect the same for
> fibrechannel. 

But, in SCSI, you can't.  Just for a simple device showing up as a SCSI disc 
(that's a real SCSI disc, attached say by parallel connectors), there are 
several potential ways to get a unique ID.  No one way works for all such 
disks, that is the nub of the problem.

I think, by driver, we may mean different things.  A scsi disc attaches like 
this:

   +----+
   | sd |
   +----+
      |
 +-------+
 | mid   |
 | layer |
 +-------+
     |
  +-----+
  | lld |
  +-----+
     |
 +--------+
 | real   |
 | device |
 +--------+

but the only piece that has disc specific logic is sd.  The lld is specific to 
the host adapter card (not shown), not the real device, so it is not the right 
element to probe for an ID.

In USB, things look slightly different:

   +----+
   | sd |
   +----+
      |
 +-------+
 | mid   |
 | layer |
 +-------+
     |
+---------+
| usb     |
| storage |
+---------+
     |
 +--------+
 | real   |
 | device |
 +--------+

Here, the usb-storage driver does know about the real device (and already has 
a huge exception table), so it has enough knowledge to probe for an identifier.

The thing I think is a bad idea is having to code the logic to look up a 
unique identifier (plus all the exceptions) in sd.  But for the pure SCSI 
stack, there's nowhere else to place it.  Even if you get usb-storage to 
supply an API for providing the id, it will be one of the few llds that can 
retrieve this, so it will become just another exception sd has to cope with.

James



  reply	other threads:[~2002-06-17 14:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-15 21:54 /proc/scsi/map Andries.Brouwer
2002-06-15 22:27 ` /proc/scsi/map Douglas Gilbert
2002-06-15 22:40   ` /proc/scsi/map Sancho Dauskardt
2002-06-16 20:36     ` /proc/scsi/map Kurt Garloff
2002-06-15 22:28 ` /proc/scsi/map Sancho Dauskardt
2002-06-16 17:05 ` [linux-usb-devel] /proc/scsi/map David Brownell
2002-06-16 17:25   ` James Bottomley
2002-06-16 20:54     ` Oliver Neukum
2002-06-16 22:02       ` James Bottomley
2002-06-16 22:38         ` Oliver Neukum
2002-06-16 23:14           ` James Bottomley
2002-06-17  5:19             ` Oliver Neukum
2002-06-17 14:54               ` James Bottomley [this message]
2002-06-17 16:09                 ` Patrick Mansfield
2002-06-17 16:42                   ` James Bottomley
2002-06-17 19:07                     ` Patrick Mansfield
2002-06-17 20:25                       ` James Bottomley
2002-06-17 16:53                   ` David Brownell
2002-06-17 17:15         ` David Brownell

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=200206171454.g5HEsu802593@localhost.localdomain \
    --to=james.bottomley@steeleye.com \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=david-b@pacbell.net \
    --cc=dougg@torque.net \
    --cc=garloff@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=oliver@neukum.name \
    --cc=sancho@dauskardt.de \
    /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

all inboxes | Powered by JetHome®