Re: [PATCH] ipr: do not set DID_PASSTHROUGH on CHECK CONDITION

2017-04-11 Thread Martin K. Petersen
Mauricio Faria de Oliveira  writes:

> On a dual controller setup with multipath enabled, some MEDIUM ERRORs
> caused both paths to be failed, thus I/O got queued/blocked since the
> 'queue_if_no_path' feature is enabled by default on IPR controllers.

Applied to 4.11/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ipr: do not set DID_PASSTHROUGH on CHECK CONDITION

2017-04-11 Thread Mauricio Faria de Oliveira

This is the PATCH v2.  Sorry for the wrong subject line.

On 04/11/2017 11:46 AM, Mauricio Faria de Oliveira wrote:

Signed-off-by: Mauricio Faria de Oliveira 
Acked-by: Brian King 
---
v2:
 - use the scsi_cmd local variable rather than ipr_cmd->scsi_cmd dereference.
 - add Acked-by: Brian King.



--
Mauricio Faria de Oliveira
IBM Linux Technology Center



Re: [PATCH] ipr: do not set DID_PASSTHROUGH on CHECK CONDITION

2017-04-11 Thread Mauricio Faria de Oliveira

On 04/11/2017 11:34 AM, Brian King wrote:

Looks good to me. Thanks for the detailed analysis. One minor nit below
and you can add:

Acked-by: Brian King 


Cool, thanks. I'll submit a v2.


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:


Thanks for catching that oversight.


--
Mauricio Faria de Oliveira
IBM Linux Technology Center



Re: [PATCH] ipr: do not set DID_PASSTHROUGH on CHECK CONDITION

2017-04-11 Thread Brian King
Mauricio,

Looks good to me. Thanks for the detailed analysis. One minor nit below
and you can add:

Acked-by: Brian King 

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