* [net-next-2.6 PATCH] ixgbe: ixgbe_down needs to stop dev_watchdog
@ 2010-04-27 12:13 Jeff Kirsher
2010-04-27 19:56 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Kirsher @ 2010-04-27 12:13 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, John Fastabend, Peter P Waskiewicz Jr,
Jeff Kirsher
From: John Fastabend <john.r.fastabend@intel.com>
There is a small race between when the tx queues are stopped
and when netif_carrier_off() is called in ixgbe_down. If the
dev_watchdog() timer fires during this time it is possible for
a false tx timeout to occur.
This patch moves the netif_carrier_off() so that it is called before
the tx queues are stopped preventing the dev_watchdog timer from
detecting false tx timeouts. The race is seen occosionally when
FCoE or DCB settings are being configured or changed.
Testing note, running ifconfig up/down will not reproduce this
issue because dev_open/dev_close call dev_deactivate() and then
dev_activate().
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_main.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index fe7e260..5258b3d 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -3291,22 +3291,23 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
rxctrl = IXGBE_READ_REG(hw, IXGBE_RXCTRL);
IXGBE_WRITE_REG(hw, IXGBE_RXCTRL, rxctrl & ~IXGBE_RXCTRL_RXEN);
- netif_tx_disable(netdev);
-
IXGBE_WRITE_FLUSH(hw);
msleep(10);
netif_tx_stop_all_queues(netdev);
- ixgbe_irq_disable(adapter);
-
- ixgbe_napi_disable_all(adapter);
-
clear_bit(__IXGBE_SFP_MODULE_NOT_FOUND, &adapter->state);
del_timer_sync(&adapter->sfp_timer);
del_timer_sync(&adapter->watchdog_timer);
cancel_work_sync(&adapter->watchdog_task);
+ netif_carrier_off(netdev);
+ netif_tx_disable(netdev);
+
+ ixgbe_irq_disable(adapter);
+
+ ixgbe_napi_disable_all(adapter);
+
if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE ||
adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)
cancel_work_sync(&adapter->fdir_reinit_task);
@@ -3324,8 +3325,6 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
(IXGBE_READ_REG(hw, IXGBE_DMATXCTL) &
~IXGBE_DMATXCTL_TE));
- netif_carrier_off(netdev);
-
/* clear n-tuple filters that are cached */
ethtool_ntuple_flush(netdev);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [net-next-2.6 PATCH] ixgbe: ixgbe_down needs to stop dev_watchdog
2010-04-27 12:13 [net-next-2.6 PATCH] ixgbe: ixgbe_down needs to stop dev_watchdog Jeff Kirsher
@ 2010-04-27 19:56 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-04-27 19:56 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, john.r.fastabend, peter.p.waskiewicz.jr
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 27 Apr 2010 05:13:39 -0700
> From: John Fastabend <john.r.fastabend@intel.com>
>
> There is a small race between when the tx queues are stopped
> and when netif_carrier_off() is called in ixgbe_down. If the
> dev_watchdog() timer fires during this time it is possible for
> a false tx timeout to occur.
>
> This patch moves the netif_carrier_off() so that it is called before
> the tx queues are stopped preventing the dev_watchdog timer from
> detecting false tx timeouts. The race is seen occosionally when
> FCoE or DCB settings are being configured or changed.
>
> Testing note, running ifconfig up/down will not reproduce this
> issue because dev_open/dev_close call dev_deactivate() and then
> dev_activate().
>
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-27 19:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-27 12:13 [net-next-2.6 PATCH] ixgbe: ixgbe_down needs to stop dev_watchdog Jeff Kirsher
2010-04-27 19:56 ` 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).