aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/vmw_pvscsi.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index 777e5f1e52d1..0cd947f78b5b 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -561,9 +561,14 @@ static void pvscsi_complete_request(struct pvscsi_adapter *adapter,
561 (btstat == BTSTAT_SUCCESS || 561 (btstat == BTSTAT_SUCCESS ||
562 btstat == BTSTAT_LINKED_COMMAND_COMPLETED || 562 btstat == BTSTAT_LINKED_COMMAND_COMPLETED ||
563 btstat == BTSTAT_LINKED_COMMAND_COMPLETED_WITH_FLAG)) { 563 btstat == BTSTAT_LINKED_COMMAND_COMPLETED_WITH_FLAG)) {
564 cmd->result = (DID_OK << 16) | sdstat; 564 if (sdstat == SAM_STAT_COMMAND_TERMINATED) {
565 if (sdstat == SAM_STAT_CHECK_CONDITION && cmd->sense_buffer) 565 cmd->result = (DID_RESET << 16);
566 cmd->result |= (DRIVER_SENSE << 24); 566 } else {
567 cmd->result = (DID_OK << 16) | sdstat;
568 if (sdstat == SAM_STAT_CHECK_CONDITION &&
569 cmd->sense_buffer)
570 cmd->result |= (DRIVER_SENSE << 24);
571 }
567 } else 572 } else
568 switch (btstat) { 573 switch (btstat) {
569 case BTSTAT_SUCCESS: 574 case BTSTAT_SUCCESS: