From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: James Chapman <jchapman@katalix.com>
Cc: 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 10:09:51 -0700 [thread overview]
Message-ID: <46D3055F.5060201@intel.com> (raw)
In-Reply-To: <200708271706.l7RH6wT0024567@quickie.katalix.com>
James Chapman wrote:
> Recent NAPI changes require that napi_enable() is always matched with
> a napi_disable(). This patch makes sure that this invariant holds for
> e100. It also moves the netif_napi_add() call until after private
> pointers have been intialized, though this might only be significant
> for cases where netpoll is being used.
>
> Signed-off-by: James Chapman <jchapman@katalix.com>
>
> diff --git a/drivers/net/e100.c b/drivers/net/e100.c
> index e25f5ec..48996a4 100644
> --- a/drivers/net/e100.c
> +++ b/drivers/net/e100.c
> @@ -2575,11 +2575,12 @@ static int __devinit e100_probe(struct pci_dev *pdev,
> strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
>
> 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 ?
Otherwise this sounds OK to me.
Auke
next prev parent reply other threads:[~2007-08-27 17:10 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 ` Kok, Auke [this message]
2007-08-27 21:03 ` [E1000-devel] " James Chapman
2007-08-27 21:18 ` David Miller
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=46D3055F.5060201@intel.com \
--to=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).