Skip to content

Commit 812fe64

Browse files
kelleymhmartinkpetersen
authored andcommitted
scsi: storvsc: Handle additional SRB status values
Testing of virtual Fibre Channel devices under Hyper-V has shown additional SRB status values being returned for various error cases. Because these SRB status values are not recognized by storvsc, the I/O operations are not flagged as an error. Requests are treated as if they completed normally but with zero data transferred, which can cause a flood of retries. Add definitions for these SRB status values and handle them like other error statuses from the Hyper-V host. Signed-off-by: Michael Kelley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 1bd3a76 commit 812fe64

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/scsi/storvsc_drv.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ enum storvsc_request_type {
316316
#define SRB_STATUS_ABORTED 0x02
317317
#define SRB_STATUS_ERROR 0x04
318318
#define SRB_STATUS_INVALID_REQUEST 0x06
319+
#define SRB_STATUS_TIMEOUT 0x09
320+
#define SRB_STATUS_SELECTION_TIMEOUT 0x0A
321+
#define SRB_STATUS_BUS_RESET 0x0E
319322
#define SRB_STATUS_DATA_OVERRUN 0x12
320323
#define SRB_STATUS_INVALID_LUN 0x20
321324
#define SRB_STATUS_INTERNAL_ERROR 0x30
@@ -981,6 +984,10 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,
981984
case SRB_STATUS_ABORTED:
982985
case SRB_STATUS_INVALID_REQUEST:
983986
case SRB_STATUS_INTERNAL_ERROR:
987+
case SRB_STATUS_TIMEOUT:
988+
case SRB_STATUS_SELECTION_TIMEOUT:
989+
case SRB_STATUS_BUS_RESET:
990+
case SRB_STATUS_DATA_OVERRUN:
984991
if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID) {
985992
/* Check for capacity change */
986993
if ((asc == 0x2a) && (ascq == 0x9)) {

0 commit comments

Comments
 (0)