On Tue, Jun 10, 2008 at 6:46 PM, John Huttley <John@xxxxxxxxxxxxxxxxxx> wrote: > Ken Brush wrote: > > On Tue, Jun 10, 2008 at 2:07 PM, John Huttley <John@xxxxxxxxxxxxxxxxxx> > wrote: > > > Hi folks, I've been pokeing in scsi_id trying to understand the serialnumber > part. > > I don't understand the choices patrick made in doing this. > My note to patrick follows: > > > Hi patrick, > > I'm trying to undertstand your scsi_id program. > > I'm testing on an LTO drive and the code > seems to call > > do_scsi_page83_inquiry() which returns the (not really) serial number. > > Why are you doing that? The page is. > > sg_inq -vpd --page=0x83 /dev/st2 > VPD INQUIRY: Device Identification page > inquiry cdb: 12 01 83 00 fc 00 > inquiry: requested 252 bytes but got 42 bytes > Designation descriptor number 1, descriptor length: 38 > id_type: T10 vendor identification, code_set: ASCII > associated with the addressed logical unit > vendor id: HP > vendor specific: C7438A HU107108XD > > > > Why not get the real serial number from page 0x80?? > > sg_inq -vpd --page=0x80 /dev/st2 > VPD INQUIRY: Unit serial number page > inquiry cdb: 12 01 80 00 fc 00 > inquiry: requested 252 bytes but got 14 bytes > Unit serial number: HU107108XD > close error: No medium found > > > Did you read the scsi_id man page? > > > Yes Ken, I have. > > > It says nothing of why it works the way it does > . > > The code is ignoring a perfectly good 0x80 page and grovelling through 0x83 > for vendor_specific > information and passing that off as the serial number. > > Why? > > I want to "fix" it so that serial_short really is the serial number. > Patrick chose not do so for reasons I don't understand. > I don't want to bust things, particularly for hardware or situations I can't > test for. > One simple answer is because SPC-3 requires that page 83 [Device Identification] is mandatory but page 80 [Unit Serial Number] is optional. -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html