]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: Export SCSI Inquiry data to sysfs
authorJohannes Thumshirn <jthumshirn@suse.de>
Mon, 9 Nov 2015 09:56:57 +0000 (10:56 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 9 Nov 2015 16:46:44 +0000 (11:46 -0500)
commitc207ea93c6ca751c05a577bb335cd6abef86cbea
treeaccd2bca20490a3e85bba59714b35ef9e019d4d3
parent9640292e8040c18601e0c1aeec8b86982a206fc2
scsi: Export SCSI Inquiry data to sysfs

Export the RAW SCSI Inquiry to sysfs as binfile. This way the data can be used
by userland without the need to have and ioctl or use the sg_inq tool.

Here is an example of the provided data

linux:~ # hexdump /sys/class/scsi_device/1\:0\:0\:0/device/inquiry
0000000 8005 3205 001f 0000 4551 554d 2020 2020
0000010 4551 554d 4420 4456 522d 4d4f 2020 2020
0000020 2e32 2e33
0000024

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_sysfs.c