scsi: storvsc: Process unsupported MODE_SENSE_10
Subsystems (3)
PATCH v2 1/1 scsi: storvsc: Process unsupported MODE_SENSE_10
From: Long Li <[email protected]>
The Hyper-V host does not support MODE_SENSE_10 and MODE_SENSE. The driver handles MODE_SENSE as unsupported command, but not for MODE_SENSE_10. Add MODE_SENSE_10 to the same handling logic and return correct code to SCSI layer.
Fixes 89ae7d709357 ("Staging: hv: storvsc: Move the storage driver out of the staging area")
Signed-off-by Long Li <[email protected]>
Reviewed-by Michael Kelley <[email protected]>
---
Change in v2:
Added MODE_SENSE_10 to the code comment
drivers/scsi/storvsc_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/storvsc_drv.c +2 -1
@@ -1144,7 +1144,7 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,* The current SCSI handling on the host side does * not correctly handle: * INQUIRY command with page code parameter set to 0x80 -* MODE_SENSE command with cmd[2] == 0x1c +* MODE_SENSE and MODE_SENSE_10 command with cmd[2] == 0x1c * MAINTENANCE_IN is not supported by HyperV FC passthrough * * Setup srb and scsi status so this won't be fatal.
@@ -1154,6 +1154,7 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,if ((stor_pkt->vm_srb.cdb[0 ] ==INQUIRY ) || (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE ) || + (stor_pkt->vm_srb.cdb[0 ] ==MODE_SENSE_10 ) || (stor_pkt->vm_srb.cdb[0 ] ==MAINTENANCE_IN &&hv_dev_is_fc (device))) { vstor_packet->vm_srb.scsi_status =0 ;
Signature · 1 line
2.34.1