Skip to contentSkip to conversation

: Add missing napi_disable() in bnx2_close().

PATCH Applied Michael Chan 2 participants 2 messages Oct 2, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 : Add missing napi_disable() in bnx2_close().

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

drivers/net/bnx2.c +2 -2
index cd5f1b7..4887c31 100644
@@ -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;
maintainer Applied
#1 lore raw

From: "Michael Chan" <[email protected]>
Date: Tue, 02 Oct 2007 17:23:09 -0700

Quoted 7 lines

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

Applied to net-2.6.24