2002-06-17 01:24:13

by Kurt Garloff

[permalink] [raw]
Subject: [[email protected]: Re: [linux-usb-devel] Re: /proc/scsi/map]

Hi,

forgot to Cc: the other recipients.
I did not want to turn this into a private discussion.

----- Forwarded message from Kurt Garloff <[email protected]> -----

Date: Mon, 17 Jun 2002 02:46:24 +0200
From: Kurt Garloff <[email protected]>
To: James Bottomley <[email protected]>
Subject: Re: [linux-usb-devel] Re: /proc/scsi/map
In-Reply-To: <[email protected]>
User-Agent: Mutt/1.4i
X-Operating-System: Linux 2.4.16-schedJ2 i686
X-PGP-Info: on http://www.garloff.de/kurt/mykeys.pgp
X-PGP-Key: 1024D/1C98774E, 1024R/CEFC9215
Organization: TU/e(NL), SuSE(DE)

Hi,

On Sun, Jun 16, 2002 at 06:14:33PM -0500, James Bottomley wrote:
> [email protected] said:
> > But the drivers already know, or would have to be taught to know about
> > it. Somewhence that information has to come. You cannot avoid that
> > effort.
>
> Not necessarily: consider the SCSI WWN, which is supported by most modern SCSI
> devices. The driver never probes for or asks for this. Nowhere in the
> current SCSI code do we ask for this. However user level commands (like
> sg_inq) can formulate the 0x83 page inquiry to get this and return the output.
> This works today with the current driver.

This may work for your disks. You just can't open the device node for a
tape, if there is no medium inserted. If you know the mapping between
to a sg device you can use it.
That's the second piece of information that /proc/scsi/map provides.

The first piece is that the kernel tells kernel tells you the way it is
attached by reporting CBTU, which is a good identifier for good old parallel
SCSI that most of our SCSI code still is assuming.

That will change one day ...

Regards,
--
Kurt Garloff <[email protected]> [Eindhoven, NL]
Physics: Plasma simulations <[email protected]> [TU Eindhoven, NL]
Linux: SCSI, Security <[email protected]> [SuSE Nuernberg, DE]
(See mail header or public key servers for PGP2 and GPG public keys.)



----- End forwarded message -----

--
Kurt Garloff <[email protected]> [Eindhoven, NL]
Physics: Plasma simulations <[email protected]> [TU Eindhoven, NL]
Linux: SCSI, Security <[email protected]> [SuSE Nuernberg, DE]
(See mail header or public key servers for PGP2 and GPG public keys.)


Attachments:
(No filename) (2.28 kB)
(No filename) (189.00 B)
Download all attachments

2002-06-17 14:29:28

by James Bottomley

[permalink] [raw]
Subject: Re: [[email protected]: Re: [linux-usb-devel] Re: /proc/scsi/map]

[email protected] said:
> This may work for your disks. You just can't open the device node for
> a tape, if there is no medium inserted. If you know the mapping
> between to a sg device you can use it.

Actually, you have to use sg for a disc as well since you send a scsi CDB
directly to the device for inquiry page 0x83.

> That's the second piece of information that /proc/scsi/map provides.

Oh no question. The way the current code doing this works is that it opens
all scsi devices and issues a GET_IDLUN to compile a database of the nodes and
then matches them up to sg nodes.

James