summaryrefslogtreecommitdiff
path: root/drivers/scsi/ipr.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2017-04-12 07:29:17 -0700
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2017-04-12 07:29:17 -0700
commit0e1bfea999daa27c801b19617a6ef8b8ec4adc75 (patch)
tree891abcb5f7c1607a868486be63c9918d5242ec79 /drivers/scsi/ipr.c
parent0917ac4f5346d01cee1d568ff5dc0b99be02829e (diff)
parent785a470496d8e0a32e3d39f376984eb2c98ca5b3 (diff)
Merge remote-tracking branch 'mkp-scsi/4.11/scsi-fixes' into fixes
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r--drivers/scsi/ipr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index b29afafc2885..5d5e272fd815 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -6293,7 +6293,12 @@ static void ipr_erp_start(struct ipr_ioa_cfg *ioa_cfg,
break;
case IPR_IOASC_MED_DO_NOT_REALLOC: /* prevent retries */
case IPR_IOASA_IR_DUAL_IOA_DISABLED:
- scsi_cmd->result |= (DID_PASSTHROUGH << 16);
+ /*
+ * exception: do not set DID_PASSTHROUGH on CHECK CONDITION
+ * so SCSI mid-layer and upper layers handle it accordingly.
+ */
+ if (scsi_cmd->result != SAM_STAT_CHECK_CONDITION)
+ scsi_cmd->result |= (DID_PASSTHROUGH << 16);
break;
case IPR_IOASC_BUS_WAS_RESET:
case IPR_IOASC_BUS_WAS_RESET_BY_OTHER: