From: Laurent Pinchart <laurentp@cse-semaphore.com>
To: netdev@vger.kernel.org
Cc: linuxppc-dev@ozlabs.org, Jeff Garzik <jgarzik@pobox.com>
Subject: [PATCH] fs_enet: Don't call NAPI functions when NAPI is not used.
Date: Fri, 11 Apr 2008 14:05:50 +0200 [thread overview]
Message-ID: <200804111405.50896.laurentp@cse-semaphore.com> (raw)
fs_enet_close() calls napi_disable() unconditionally. This patch skips the
call when use_napi isn't set.
Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
---
drivers/net/fs_enet/fs_enet-main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index c83bd65..1801ce3 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -835,7 +835,8 @@ static int fs_enet_close(struct net_device *dev)
netif_stop_queue(dev);
netif_carrier_off(dev);
- napi_disable(&fep->napi);
+ if (fep->fpi->use_napi)
+ napi_disable(&fep->napi);
phy_stop(fep->phydev);
spin_lock_irqsave(&fep->lock, flags);
--
1.5.0
This is a bugfix and should probably go in 2.6.25.
--
Laurent Pinchart
CSE Semaphore Belgium
Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium
T +32 (2) 387 42 59
F +32 (2) 387 42 75
next reply other threads:[~2008-04-11 12:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-11 12:05 Laurent Pinchart [this message]
2008-04-12 5:53 ` [PATCH] fs_enet: Don't call NAPI functions when NAPI is not used Jeff Garzik
-- strict thread matches above, loose matches on Subject: below --
2008-02-28 15:36 Laurent Pinchart
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=200804111405.50896.laurentp@cse-semaphore.com \
--to=laurentp@cse-semaphore.com \
--cc=jgarzik@pobox.com \
--cc=linuxppc-dev@ozlabs.org \
--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).