Re: [BK PATCHES] add ata scsi driver

James Bottomley
2003-05-27T15:27:39Z

On Tue, 2003-05-27 at 11:21, Jeff Garzik wrote:
> ATA defines WWN too... I'm curious what the format is? uuid-ish?

Heh, you'll regret asking that one. There are currently seven possible
identifier formats for the WWN (which is basically the SCSI Device
Identification VPD page).

The extremely gory details are in the SPC-3 spec (section 7.6.4 of r12).

However, really, as far as Linux is concerned we don't need to care. It
just needs to be reducible to an ASCII representation and dumped into
the sysfs name or embedded into bus_id. The reduction to ASCII can be
subsystem (or even device driver) specific.

However, note that I'm not thinking of forcing the WWN here. I'm
thinking of using whatever makes most sense to the device, so SPI
devices will continue to use simple target/lun numbers here. FC devices
will probably want to use their variant of WWN/PortID. The rationale is
to get rid of the unnecessary internal mappings some drivers use to get
to the physical address they send on the wire.

Thus, if you never address ATA devices by the WWN, you probably never
want to make it part of the addressing scheme.

Exporting a unique ID for userspace to use is a different (and probably
orthogonal) issue.

James