aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2010-08-08 02:05:23 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-08 02:05:23 -0400
commit16d884bd901288fb5cde876489f7093740b66a30 (patch)
tree3aafc6a072a1b8091cf60536ce440e0605413975 /drivers/net/netxen
parent8bcfbd0af0f8ee50033091e75ab3d6b6e7fa8867 (diff)
netxen: protect tx timeout recovery by rtnl lock
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r--drivers/net/netxen/netxen_nic_main.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 6ce6ce1df6d2..fd86e18604e6 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -2001,27 +2001,26 @@ static void netxen_tx_timeout_task(struct work_struct *work)
2001 if (++adapter->tx_timeo_cnt >= NX_MAX_TX_TIMEOUTS) 2001 if (++adapter->tx_timeo_cnt >= NX_MAX_TX_TIMEOUTS)
2002 goto request_reset; 2002 goto request_reset;
2003 2003
2004 rtnl_lock();
2004 if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { 2005 if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
2005 /* try to scrub interrupt */ 2006 /* try to scrub interrupt */
2006 netxen_napi_disable(adapter); 2007 netxen_napi_disable(adapter);
2007 2008
2008 adapter->netdev->trans_start = jiffies;
2009
2010 netxen_napi_enable(adapter); 2009 netxen_napi_enable(adapter);
2011 2010
2012 netif_wake_queue(adapter->netdev); 2011 netif_wake_queue(adapter->netdev);
2013 2012
2014 clear_bit(__NX_RESETTING, &adapter->state); 2013 clear_bit(__NX_RESETTING, &adapter->state);
2015 return;
2016 } else { 2014 } else {
2017 clear_bit(__NX_RESETTING, &adapter->state); 2015 clear_bit(__NX_RESETTING, &adapter->state);
2018 if (!netxen_nic_reset_context(adapter)) { 2016 if (netxen_nic_reset_context(adapter)) {
2019 adapter->netdev->trans_start = jiffies; 2017 rtnl_unlock();
2020 return; 2018 goto request_reset;
2021 } 2019 }
2022
2023 /* context reset failed, fall through for fw reset */
2024 } 2020 }
2021 adapter->netdev->trans_start = jiffies;
2022 rtnl_unlock();
2023 return;
2025 2024
2026request_reset: 2025request_reset:
2027 adapter->need_fw_reset = 1; 2026 adapter->need_fw_reset = 1;