]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] Add EVPD page 0x83 and 0x80 to sysfs
authorHannes Reinecke <hare@suse.de>
Sat, 15 Mar 2014 08:51:49 +0000 (09:51 +0100)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 27 Mar 2014 15:25:33 +0000 (08:25 -0700)
commit70afcdc79f8ab3f36349fa4908e7d71901de115c
treef3791a3002248327f6f72a9335a275b123e06dab
parent6bcc40850df2c6ef4d4df282e5de0c8927b5262a
[SCSI] Add EVPD page 0x83 and 0x80 to sysfs

EVPD page 0x83 is used to uniquely identify the device.
So instead of having each and every program issue a separate
SG_IO call to retrieve this information it does make far more
sense to display it in sysfs.

Some older devices (most notably tapes) will only report reliable
information in page 0x80 (Unit Serial Number). So export this
in the sysfs attribute 'vpd_pg80'.

[jejb: checkpatch fix]
[hare: attach after transport configure]
[fengguang.wu@intel.com: spotted problems with the original now fixed]
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi.c
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_sysfs.c
include/scsi/scsi_device.h