* [PATCH] scsi: storvsc: Process unsupported MODE_SENSE_10
@ 2026-01-07 19:56 longli
2026-01-09 17:48 ` Michael Kelley
0 siblings, 1 reply; 3+ messages in thread
From: longli @ 2026-01-07 19:56 UTC (permalink / raw)
To: K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
James E.J. Bottomley, Martin K. Petersen, James Bottomley,
linux-hyperv, linux-scsi, linux-kernel
Cc: Long Li, stable
From: Long Li <longli@microsoft.com>
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>
---
drivers/scsi/storvsc_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 6e4112143c76..9b15784e2d64 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -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;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] scsi: storvsc: Process unsupported MODE_SENSE_10
2026-01-07 19:56 [PATCH] scsi: storvsc: Process unsupported MODE_SENSE_10 longli
@ 2026-01-09 17:48 ` Michael Kelley
2026-01-12 17:52 ` Long Li
0 siblings, 1 reply; 3+ messages in thread
From: Michael Kelley @ 2026-01-09 17:48 UTC (permalink / raw)
To: longli@linux.microsoft.com, K. Y. Srinivasan, Haiyang Zhang,
Wei Liu, Dexuan Cui, James E.J. Bottomley, Martin K. Petersen,
James Bottomley, linux-hyperv@vger.kernel.org,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Long Li, stable@kernel.org
From: longli@linux.microsoft.com <longli@linux.microsoft.com> Sent: Wednesday, January 7, 2026 11:57 AM
>
> 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>
> ---
> drivers/scsi/storvsc_drv.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index 6e4112143c76..9b15784e2d64 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -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;
There's a code comment above this "if" statement that describes the situation.
The comment specifically lists INQUIRY, MODE_SENSE, and MAINTENANCE_IN. For
consistency, it should be updated to include MODE_SENSE_10.
With the comment updated,
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] scsi: storvsc: Process unsupported MODE_SENSE_10
2026-01-09 17:48 ` Michael Kelley
@ 2026-01-12 17:52 ` Long Li
0 siblings, 0 replies; 3+ messages in thread
From: Long Li @ 2026-01-12 17:52 UTC (permalink / raw)
To: Michael Kelley, longli@linux.microsoft.com, KY Srinivasan,
Haiyang Zhang, Wei Liu, Dexuan Cui, James E.J. Bottomley,
Martin K. Petersen, James Bottomley, linux-hyperv@vger.kernel.org,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: stable@kernel.org
> > @@ -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;
>
> There's a code comment above this "if" statement that describes the situation.
> The comment specifically lists INQUIRY, MODE_SENSE, and
> MAINTENANCE_IN. For consistency, it should be updated to include
> MODE_SENSE_10.
>
> With the comment updated,
>
> Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Will send v2, thank you.
Long
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-12 17:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-07 19:56 [PATCH] scsi: storvsc: Process unsupported MODE_SENSE_10 longli
2026-01-09 17:48 ` Michael Kelley
2026-01-12 17:52 ` Long Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox