Patch "scsi: storvsc: Do not flag MAINTENANCE_IN return of SRB_STATUS_DATA_OVERRUN as an error" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: storvsc: Do not flag MAINTENANCE_IN return of SRB_STATUS_DATA_OVERRUN as an error

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-storvsc-do-not-flag-maintenance_in-return-of-sr.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit cbfced476773add300b2f8607dd3e51f1177f42d
Author: Cathy Avery <cavery@xxxxxxxxxx>
Date:   Wed Nov 27 13:13:24 2024 -0500

    scsi: storvsc: Do not flag MAINTENANCE_IN return of SRB_STATUS_DATA_OVERRUN as an error
    
    [ Upstream commit b1aee7f034615b6824d2c70ddb37ef9fc23493b7 ]
    
    This partially reverts commit 812fe6420a6e ("scsi: storvsc: Handle
    additional SRB status values").
    
    HyperV does not support MAINTENANCE_IN resulting in FC passthrough
    returning the SRB_STATUS_DATA_OVERRUN value. Now that
    SRB_STATUS_DATA_OVERRUN is treated as an error, multipath ALUA paths go
    into a faulty state as multipath ALUA submits RTPG commands via
    MAINTENANCE_IN.
    
    [    3.215560] hv_storvsc 1d69d403-9692-4460-89f9-a8cbcc0f94f3:
    tag#230 cmd 0xa3 status: scsi 0x0 srb 0x12 hv 0xc0000001
    [    3.215572] scsi 1:0:0:32: alua: rtpg failed, result 458752
    
    Make MAINTENANCE_IN return success to avoid the error path as is
    currently done with INQUIRY and MODE_SENSE.
    
    Suggested-by: Michael Kelley <mhklinux@xxxxxxxxxxx>
    Signed-off-by: Cathy Avery <cavery@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20241127181324.3318443-1-cavery@xxxxxxxxxx
    Reviewed-by: Michael Kelley <mhklinux@xxxxxxxxxxx>
    Reviewed-by: Ewan D. Milne <emilne@xxxxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 37ad5f525647..7dc916ce0c3c 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -155,6 +155,8 @@ static int sense_buffer_size = PRE_WIN8_STORVSC_SENSE_BUFFER_SIZE;
 */
 static int vmstor_proto_version;
 
+static bool hv_dev_is_fc(struct hv_device *hv_dev);
+
 #define STORVSC_LOGGING_NONE	0
 #define STORVSC_LOGGING_ERROR	1
 #define STORVSC_LOGGING_WARN	2
@@ -1153,6 +1155,7 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
 	 * not correctly handle:
 	 * INQUIRY command with page code parameter set to 0x80
 	 * MODE_SENSE 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.
 	 * We do this so we can distinguish truly fatal failues
@@ -1160,7 +1163,9 @@ 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) ||
+	   (stor_pkt->vm_srb.cdb[0] == MAINTENANCE_IN &&
+	   hv_dev_is_fc(device))) {
 		vstor_packet->vm_srb.scsi_status = 0;
 		vstor_packet->vm_srb.srb_status = SRB_STATUS_SUCCESS;
 	}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux