]> Pileus Git - ~andy/linux/commit
[SCSI] Add a report opcode helper
authorMartin K. Petersen <martin.petersen@oracle.com>
Tue, 18 Sep 2012 16:19:30 +0000 (12:19 -0400)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 14 Nov 2012 05:11:31 +0000 (21:11 -0800)
commit3c6bdaeab4fda6c9fdd5f3f5c610dea97bddf7d6
tree85fad84ab7a257e1da2465711e6af8569934cf7c
parent49bd665c5407a453736d3232ee58f2906b42e83c
[SCSI] Add a report opcode helper

The REPORT SUPPORTED OPERATION CODES command can be used to query
whether a given opcode is supported by a device. Add a helper function
that allows us to look up commands.

We only issue RSOC if the device reports compliance with SPC-3 or
later. But to err on the side of caution we disable the command for ATA,
FireWire and USB.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/ata/libata-scsi.c
drivers/firewire/sbp2.c
drivers/scsi/scsi.c
drivers/usb/storage/scsiglue.c
include/scsi/scsi_device.h