netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jchapman@katalix.com
Cc: auke-jan.h.kok@intel.com, netdev@vger.kernel.org,
	e1000-devel@lists.sourceforge.net
Subject: Re: [E1000-devel] [PATCH net-2.6.24] e100: fix driver init lockup on e100_up()
Date: Mon, 27 Aug 2007 14:18:13 -0700 (PDT)	[thread overview]
Message-ID: <20070827.141813.115913906.davem@davemloft.net> (raw)
In-Reply-To: <46D33C13.7060605@katalix.com>

From: James Chapman <jchapman@katalix.com>
Date: Mon, 27 Aug 2007 22:03:15 +0100

> Kok, Auke wrote:
> > James Chapman wrote:
> >>      nic = netdev_priv(netdev);
> >> -    netif_napi_add(netdev, &nic->napi, e100_poll, E100_NAPI_WEIGHT);
> >>      nic->netdev = netdev;
> >>      nic->pdev = pdev;
> >>      nic->msg_enable = (1 << debug) - 1;
> >>      pci_set_drvdata(pdev, netdev);
> >> +    netif_napi_add(netdev, &nic->napi, e100_poll, E100_NAPI_WEIGHT);
> >> +    napi_disable(&nic->napi);
> > 
> > Just wondering, could we even reverse this order? IOW disable NAPI 
> > first, then add it ?
> 
> I think the order shouldn't matter. DaveM?

It doesn't matter.

I'm beginning to think maybe we should do an implicit napi_disable()
in netif_napi_add(), then it's easier for drivers to play nice.

On open you do napi_enable(), in close you do napi_disable().
That's it.

And anywhere else in your driver that you have to napi_disable()
(suspend, recovering from hardware errors, etc.) you must be sure to
do the associated napi_enable() later on in order to keep things
balanced.

      reply	other threads:[~2007-08-27 21:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27 17:06 [PATCH net-2.6.24] e100: fix driver init lockup on e100_up() James Chapman
2007-08-27 17:09 ` [E1000-devel] " Kok, Auke
2007-08-27 21:03   ` James Chapman
2007-08-27 21:18     ` David Miller [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=20070827.141813.115913906.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=auke-jan.h.kok@intel.com \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=jchapman@katalix.com \
    --cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).