Skip to content

Commit bee8994

Browse files
committed
scsi: storvsc: Do not flag MAINTENANCE_IN return of SRB_STATUS_DATA_OVERRUN as an error
jira LE-2289 Rebuild_History Non-Buildable kernel-4.18.0-553.36.1.el8_10 commit-author Cathy Avery <[email protected]> commit b1aee7f This partially reverts commit 812fe64 ("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 <[email protected]> Signed-off-by: Cathy Avery <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Michael Kelley <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> (cherry picked from commit b1aee7f) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 7b476b5 commit bee8994

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/scsi/storvsc_drv.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ struct hv_fc_wwn_packet {
149149
*/
150150
static int vmstor_proto_version;
151151

152+
static bool hv_dev_is_fc(struct hv_device *hv_dev);
153+
152154
#define STORVSC_LOGGING_NONE 0
153155
#define STORVSC_LOGGING_ERROR 1
154156
#define STORVSC_LOGGING_WARN 2
@@ -1137,14 +1139,17 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
11371139
* not correctly handle:
11381140
* INQUIRY command with page code parameter set to 0x80
11391141
* MODE_SENSE command with cmd[2] == 0x1c
1142+
* MAINTENANCE_IN is not supported by HyperV FC passthrough
11401143
*
11411144
* Setup srb and scsi status so this won't be fatal.
11421145
* We do this so we can distinguish truly fatal failues
11431146
* (srb status == 0x4) and off-line the device in that case.
11441147
*/
11451148

11461149
if ((stor_pkt->vm_srb.cdb[0] == INQUIRY) ||
1147-
(stor_pkt->vm_srb.cdb[0] == MODE_SENSE)) {
1150+
(stor_pkt->vm_srb.cdb[0] == MODE_SENSE) ||
1151+
(stor_pkt->vm_srb.cdb[0] == MAINTENANCE_IN &&
1152+
hv_dev_is_fc(device))) {
11481153
vstor_packet->vm_srb.scsi_status = 0;
11491154
vstor_packet->vm_srb.srb_status = SRB_STATUS_SUCCESS;
11501155
}

0 commit comments

Comments
 (0)