Re: [linux-usb-devel] Re: /proc/scsi/map

James Bottomley
2002-06-16T23:14:52Z

oliver@neukum.name 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.

> That is wrong. You'd need a common method to determine device type and
> several methods of passing guid. You are better off in implementing
> one common way of getting at that information, which shouldn't be too
> hard, as all the generic layer would have to do is pass up that
> information.

but the complexity is in the "common method to determine device type and
several methods of passing guid". Even for a simple SCSI disk, there's no one
universal way of getting a unique id (let alone when we add the usb devices
masquerading as scsi disks into the mix). That will lead us to scanning a
list of inquiry strings to see what the disk is and determine what globally
unique ID it supports. Since we have to implement a lookup table just to
determine how to get the unqiue id, it's far better off being done outside the
kernel.

James