Subject: Re: [PATCH net] sfc:On MCDI timeout, issue an FLR (and mark MCDI to fail-fast)

From: Edward Cree <[email-masked]>
Date: Mon, 14 Apr 2014 16:02:54 +0100

On 14/04/14 15:41, Shradha Shah wrote:
> diff --git a/drivers/net/ethernet/sfc/enum.h b/drivers/net/ethernet/sfc/enum.h
> index 75ef7ef..70c2473 100644
> --- a/drivers/net/ethernet/sfc/enum.h
> +++ b/drivers/net/ethernet/sfc/enum.h
> @@ -165,7 +168,14 @@ enum reset_type {
>  	RESET_TYPE_DMA_ERROR,
>  	RESET_TYPE_TX_SKIP,
>  	RESET_TYPE_MC_FAILURE,
> -	RESET_TYPE_MC_BIST,
> +	/* RESET_TYPE_MC_BIST and RESET_TYPE_MCDI_TIMEOUT are actually methods,
> +	 * not just reasons, but they don't fit the scope hierarchy (they're
> +	 * not well-ordered by inclusion)
> +	 * We encode this by having their enum values be greater than
> +	 * RESET_TYPE_MAX_METHOD.  This also prevents issuing them with
> +	 * efx_ioctl_reset
> +	 */
> +	RESET_TYPE_MCDI_TIMEOUT,
>  	RESET_TYPE_MAX,
>  };
>  
Looks like I messed up this comment; this is only true of
RESET_TYPE_MCDI_TIMEOUT, not RESET_TYPE_MC_BIST.
So should be something like:

    /* RESET_TYPE_MCDI_TIMEOUT is actually a method, not just a reason, but
    * it doesn't fit the scope hierarchy (not well-ordered by inclusion).
    * We encode this by having its enum value be greater than
    * RESET_TYPE_MAX_METHOD. This also prevents issuing it with
    * efx_ioctl_reset.
    */

-Edward