All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] sky2: recovery deadlock fix
Date: Tue, 04 Dec 2007 14:54:25 -0500	[thread overview]
Message-ID: <4755B071.3050200@pobox.com> (raw)
In-Reply-To: <20071203170217.492d9eb9@freepuppy.rosehill>

Stephen Hemminger wrote:
> Prevent deadlock in sky2 recovery logic. sky2_down calls napi_synchronize
> which gets stuck if napi was already disabled. 
> 
> Fix by rearranging slightly and not calling napi_disable until after
> both ports are stopped. The napi_disable probably is being overly
> paranoid, but it is safe now.
> 
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
> 
> ---
> Please apply for 2.6.24 (upstream-fixes)
> 
> --- a/drivers/net/sky2.c	2007-11-30 16:51:50.000000000 -0800
> +++ b/drivers/net/sky2.c	2007-11-30 16:54:52.000000000 -0800
> @@ -2906,16 +2906,14 @@ static void sky2_restart(struct work_str
>  	int i, err;
>  
>  	rtnl_lock();
> -	sky2_write32(hw, B0_IMSK, 0);
> -	sky2_read32(hw, B0_IMSK);
> -	napi_disable(&hw->napi);
> -
>  	for (i = 0; i < hw->ports; i++) {
>  		dev = hw->dev[i];
>  		if (netif_running(dev))
>  			sky2_down(dev);
>  	}
>  
> +	napi_disable(&hw->napi);
> +	sky2_write32(hw, B0_IMSK, 0);
>  	sky2_reset(hw);
>  	sky2_write32(hw, B0_IMSK, Y2_IS_BASE);
>  	napi_enable(&hw->napi);

applied #upstream-fixes



      reply	other threads:[~2007-12-04 19:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04  1:02 [PATCH] sky2: recovery deadlock fix Stephen Hemminger
2007-12-04 19:54 ` Jeff Garzik [this message]

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=4755B071.3050200@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.org \
    /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.