netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.24 1/3][BNX2]: Add missing napi_disable() in bnx2_close().
@ 2007-10-03  0:23 Michael Chan
  2007-10-02 23:27 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Chan @ 2007-10-03  0:23 UTC (permalink / raw)
  To: davem; +Cc: netdev

[BNX2]: Add missing napi_disable() in bnx2_close().

bnx2_close() -> bnx2_netif_stop() will not call napi_disable() because
the netif_state is not running in bnx2_close().  To avoid confusion,
we change it to disable interrupt and napi directly in bnx2_close().

Signed-off-by: Michael Chan <mchan@broadcom.com>

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index cd5f1b7..4887c31 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -5212,8 +5212,8 @@ bnx2_close(struct net_device *dev)
 	while (bp->in_reset_task)
 		msleep(1);
 
-	/* This does napi_disable() for us.  */
-	bnx2_netif_stop(bp);
+	bnx2_disable_int_sync(bp);
+	napi_disable(&bp->napi);
 	del_timer_sync(&bp->timer);
 	if (bp->flags & NO_WOL_FLAG)
 		reset_code = BNX2_DRV_MSG_CODE_UNLOAD_LNK_DN;



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-02 23:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-03  0:23 [PATCH 2.6.24 1/3][BNX2]: Add missing napi_disable() in bnx2_close() Michael Chan
2007-10-02 23:27 ` David Miller

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).