E1000: Fix ifdown hang in git-2.6.24
Subsystems (2)
PATCH 1/2 E1000: Fix ifdown hang in git-2.6.24
Doing napi_disable twice hangs "ifdown" of the device. e1000_down is the common place to call napi_disable.
--- e1000_main.c | 4 ---- 1 files changed, 4 deletions(-)
drivers/net/e1000/e1000_main.c +0 -4
@@ -1477,10 +1477,6 @@ e1000_close(struct net_device *netdev) {struct e1000_adapter *adapter =netdev_priv (netdev); -#ifdef CONFIG_E1000_NAPI -napi_disable (&adapter->napi); -#endif -WARN_ON (test_bit (__E1000_RESETTING, &adapter->flags));e1000_down (adapter);e1000_power_down_phy (adapter);
RFC PATCH 2/2 E1000: Fix hang in netdev_wait_allrefs()
After applying patch1, I started getting "waiting for count" messages when doing ifdown. Not sure if this is the right fix since the count was already showing as -1 in that message, but this patch fixes the problem.
--- e1000_main.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-)
drivers/net/e1000/e1000_main.c +2 -1
@@ -1219,12 +1219,13 @@ e1000_remove(struct pci_dev *pdev)* would have already happened in close and is redundant. */ e1000_release_hw_control (adapter); -unregister_netdev (netdev);#ifdef CONFIG_E1000_NAPI for (i =0 ; i < adapter->num_rx_queues; i++)dev_put (&adapter->polling_netdev[i]);#endif +unregister_netdev (netdev); +if (!e1000_check_phy_reset_block (&adapter->hw))e1000_phy_hw_reset (&adapter->hw);
Quoted 12 lines · Krishna Kumar
Doing
napi_disabletwice hangs "ifdown" of the device.e1000_downis the common place to callnapi_disable.Signed-off-by Krishna Kumar <[email protected]>--- e1000_main.c | 4 ---- 1 files changed, 4 deletions(-)diff -ruNp
org/drivers/net/e1000/e1000_main.cnew/drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_main.c e1000_close(struct net_device *netdev) · line 1482
Quoted 10 lines
drivers/net/e1000/e1000_main.c +0
-4@@ -1477,10 +1477,6 @@ e1000_close(struct net_device *netdev) {struct e1000_adapter *adapter =netdev_priv (netdev); -#ifdef CONFIG_E1000_NAPI -napi_disable (&adapter->napi); -#endif -WARN_ON (test_bit (__E1000_RESETTING, &adapter->flags));e1000_down (adapter);e1000_power_down_phy (adapter);
I pushed this change to akpm for -mm as well in e1000e...
Thanks Krishna,
Auke
From: Krishna Kumar <[email protected]>
Date: Thu, 23 Aug 2007 14:34:18 +0530
Quoted 4 lines
Doing
napi_disabletwice hangs "ifdown" of the device.e1000_downis the common place to callnapi_disable.Signed-off-by Krishna Kumar <[email protected]>
Applied, thanks a lot.
David Miller
maintainerRe: [PATCH 2/2] [RFC] E1000: Fix hang in netdev_wait_allrefs()
In reply to Krishna KumarFrom: Krishna Kumar <[email protected]>
Date: Thu, 23 Aug 2007 14:34:31 +0530
Quoted 5 lines
After applying patch1, I started getting "waiting for count" messages when doing ifdown. Not sure if this is the right fix since the count was already showing as -1 in that message, but this patch fixes the problem.
Signed-off-by Krishna Kumar <[email protected]>
I've applied this because is fixes the problem and there have be no objections coming along with better fixes :)
If this is bogus we can rever it and put in a more proper fix.