public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: /proc/scsi/map
@ 2002-06-15 21:54 Andries.Brouwer
  2002-06-15 22:27 ` /proc/scsi/map Douglas Gilbert
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Andries.Brouwer @ 2002-06-15 21:54 UTC (permalink / raw)
  To: garloff, linux-kernel, linux-scsi, sancho
  Cc: linux-usb-devel, linux1394-devel

    >Life would be easier if the scsi subsystem would just report which SCSI
    >device (uniquely identified by the controller,bus,target,unit tuple) belongs
    >to which high-level device. The information is available in the kernel.
    >
    >Attached patch does this:
    >garloff@pckurt:/raid5/Kernel/src $ cat /proc/scsi/map
    ># C,B,T,U       Type    onl     sg_nm   sg_dev  nm      dev(hex)
    >0,0,00,00       0x05    1       sg0     c:15:00 sr0     b:0b:00
    [...]

    Great, this was really missing badly.

    But how about adding another column: GUID.
    Most usb-storage and (all?) FireWire devices have such a unique identitiy.
    In contrast to native SCSI devices, these emulated SCSI devices on 
    hot-plugging busses will change their LUNs/IDs. Therefor the GUID is
    really a must to be able to create stable names (laptop suspend, etc.).

    Both usb-storage and iee1394-sbp2 know the GUID. It only needs to be 
    communicated..

The usb-storage GUID is just one random item of information.
One might wish for much more.

And: this information is already somewhere:

% cat /proc/scsi/sg/host_strs
SCSI host adapter emulation for IDE ATAPI devices
Iomega VPI2 (imm) interface
SCSI emulation for USB Mass Storage devices
SCSI emulation for USB Mass Storage devices
%

This tells me that host 0 will be in ide-scsi, host 1 in imm,
host 2 in usb-storage-0, host 3 in usb-storage-1.
And

% cat /proc/scsi/ide-scsi/0
SCSI host adapter emulation for IDE ATAPI devices
% cat /proc/scsi/imm/1
Version : 2.05 (for Linux 2.4.0)
Parport : parport0
Mode    : SPP
% cat /proc/scsi/usb-storage-0/2
   Host scsi2: usb-storage
       Vendor: DataFab Systems Inc.
      Product: USB CF+SM
Serial Number: 5DC69477C6
     Protocol: Transparent SCSI
    Transport: Datafab Bulk-Only
         GUID: 07c4a1090000005dc69477c6
     Attached: Yes
% cat /proc/scsi/usb-storage-1/3
   Host scsi3: usb-storage
       Vendor: SCM Microsystems Inc.
      Product: eUSB SmartMedia / CompactFlash 
Serial Number: None
     Protocol: Transparent SCSI
    Transport: Control/Bulk-EUSB/SDDR09
         GUID: 04e600050000000000000000
     Attached: Yes
%

A small utility that looks around in /proc is able to
find the GUID. Of course it would be better when fewer
heuristics were required.

Finally, the GUIDs you see here do not determine the LUN.
So, there is no well-defined line in /proc/scsi/map
where they would belong.

Andries

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2002-06-17 20:27 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox