Mauricio, Looks good to me. Thanks for the detailed analysis. One minor nit below and you can add: Acked-by: Brian King <brking@xxxxxxxxxxxxxxxxxx> On 04/10/2017 09:28 PM, Mauricio Faria de Oliveira wrote: > diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c > index b29afafc2885..1012674d9dc5 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 (ipr_cmd->scsi_cmd->result != SAM_STAT_CHECK_CONDITION) Since we already have a scsi_cmd local, you don't need to go back to the ipr_cmd to get the pointer, so could be: 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: > Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center