mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[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 <[email protected]> Acked-by: Mike Snitzer <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
49bd665c54
commit
3c6bdaeab4
5 changed files with 53 additions and 0 deletions
|
|
@ -186,6 +186,9 @@ static int slave_configure(struct scsi_device *sdev)
|
|||
/* Some devices don't handle VPD pages correctly */
|
||||
sdev->skip_vpd_pages = 1;
|
||||
|
||||
/* Do not attempt to use REPORT SUPPORTED OPERATION CODES */
|
||||
sdev->no_report_opcodes = 1;
|
||||
|
||||
/* Some disks return the total number of blocks in response
|
||||
* to READ CAPACITY rather than the highest block number.
|
||||
* If this device makes that mistake, tell the sd driver. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue