All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Or Gerlitz <ogerlitz@mellanox.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Eran Ben Elisha <eranbe@mellanox.com>,
	Yishai Hadas <yishaih@mellanox.com>,
	Daniel Jurgens <danielj@mellanox.com>
Subject: Re: [PATCH net 4/6] net/mlx4_core: Do not BUG_ON during reset when PCI is offline
Date: Wed, 17 Feb 2016 00:21:53 +0300	[thread overview]
Message-ID: <56C392F1.4050906@cogentembedded.com> (raw)
In-Reply-To: <1455634911-31206-5-git-send-email-ogerlitz@mellanox.com>

Hello.

On 02/16/2016 06:01 PM, Or Gerlitz wrote:

> From: Daniel Jurgens <danielj@mellanox.com>
>
> The PCI channel could go offline during reset due to EEH.  Don't bug on in
> this case, the error is recoverable.
>
> Fixes: f6bc11e42646 ('net/mlx4_core: Enhance the catas flow to support device reset')
> Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
> Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
> ---
>   drivers/net/ethernet/mellanox/mlx4/catas.c | 11 +++++++++--
>   1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx4/catas.c b/drivers/net/ethernet/mellanox/mlx4/catas.c
> index 715de8a..e866082 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/catas.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/catas.c
> @@ -182,10 +182,17 @@ void mlx4_enter_error_state(struct mlx4_dev_persistent *persist)
>   		err = mlx4_reset_slave(dev);
>   	else
>   		err = mlx4_reset_master(dev);
> -	BUG_ON(err != 0);
> +

    Just noticed: the empty line here isn't really needed.

> +	if (!err)
> +		mlx4_err(dev, "device was reset successfully\n");
> +	else
> +		/* EEH could have disabled the PCI channel during reset. That's
> +		 * recoverable and the PCI error flow will handle it.
> +		 */
> +		if (!pci_channel_offline(dev->persist->pdev))
> +			BUG_ON(1);
[...]

MBR, Sergei

  parent reply	other threads:[~2016-02-16 21:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 15:01 [PATCH net 0/6] Mellanox 10/40G mlx4 driver fixes for 4.5-rc Or Gerlitz
2016-02-16 15:01 ` [PATCH net 1/6] net/mlx4_en: Do not count dropped packets twice Or Gerlitz
2016-02-16 18:31   ` Rick Jones
2016-02-17 10:19     ` Or Gerlitz
2016-02-16 15:01 ` [PATCH net 2/6] net/mlx4_en: Choose time-stamping shift value according to HW frequency Or Gerlitz
2016-02-16 15:01 ` [PATCH net 3/6] net/mlx4_core: Fix potential corruption in counters database Or Gerlitz
2016-02-16 15:01 ` [PATCH net 4/6] net/mlx4_core: Do not BUG_ON during reset when PCI is offline Or Gerlitz
2016-02-16 18:30   ` Sergei Shtylyov
2016-02-17  9:21     ` Or Gerlitz
2016-02-17 10:53       ` Sergei Shtylyov
2016-02-16 21:21   ` Sergei Shtylyov [this message]
2016-02-17 18:50   ` Sergei Shtylyov
2016-02-16 15:01 ` [PATCH net 5/6] net/mlx4_core: Set UAR page size to 4KB regardless of system page size Or Gerlitz
2016-02-16 15:01 ` [PATCH net 6/6] net/mlx4_en: Avoid changing dev->features directly in run-time Or Gerlitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56C392F1.4050906@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=danielj@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=eranbe@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=yishaih@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.