Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: storvsc: Process unsupported MODE_SENSE_10

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")
Cc: stable@kernel.org
Signed-off-by: Long Li <longli@microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Link: https://patch.msgid.link/20260117010302.294068-1-longli@linux.microsoft.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Long Li and committed by
Martin K. Petersen
9eacec5d 901a5f30

+2 -1
+2 -1
drivers/scsi/storvsc_drv.c
··· 1144 1144 * The current SCSI handling on the host side does 1145 1145 * not correctly handle: 1146 1146 * INQUIRY command with page code parameter set to 0x80 1147 - * MODE_SENSE command with cmd[2] == 0x1c 1147 + * MODE_SENSE and MODE_SENSE_10 command with cmd[2] == 0x1c 1148 1148 * MAINTENANCE_IN is not supported by HyperV FC passthrough 1149 1149 * 1150 1150 * Setup srb and scsi status so this won't be fatal. ··· 1154 1154 1155 1155 if ((stor_pkt->vm_srb.cdb[0] == INQUIRY) || 1156 1156 (stor_pkt->vm_srb.cdb[0] == MODE_SENSE) || 1157 + (stor_pkt->vm_srb.cdb[0] == MODE_SENSE_10) || 1157 1158 (stor_pkt->vm_srb.cdb[0] == MAINTENANCE_IN && 1158 1159 hv_dev_is_fc(device))) { 1159 1160 vstor_packet->vm_srb.scsi_status = 0;