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)
commit92e6246c8e02f4ce9960731e2411e49c1f0fabbf
treeaccd2bca20490a3e85bba59714b35ef9e019d4d3
parent9fb74c4e66daab5c3fb3b949d37c15684d7ee82a
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