diff options
author | Amit Kumar Salecha <amit.salecha@qlogic.com> | 2010-08-07 23:05:23 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-07 23:05:23 -0700 |
commit | 16d884bd901288fb5cde876489f7093740b66a30 (patch) | |
tree | 3aafc6a072a1b8091cf60536ce440e0605413975 /drivers/net/netxen | |
parent | 8bcfbd0af0f8ee50033091e75ab3d6b6e7fa8867 (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.c | 15 |
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) if (++adapter->tx_timeo_cnt >= NX_MAX_TX_TIMEOUTS) goto request_reset; + rtnl_lock(); if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { /* try to scrub interrupt */ netxen_napi_disable(adapter); - adapter->netdev->trans_start = jiffies; - netxen_napi_enable(adapter); netif_wake_queue(adapter->netdev); clear_bit(__NX_RESETTING, &adapter->state); - return; } else { clear_bit(__NX_RESETTING, &adapter->state); - if (!netxen_nic_reset_context(adapter)) { - adapter->netdev->trans_start = jiffies; - return; + if (netxen_nic_reset_context(adapter)) { + rtnl_unlock(); + goto request_reset; } - - /* context reset failed, fall through for fw reset */ } + adapter->netdev->trans_start = jiffies; + rtnl_unlock(); + return; request_reset: adapter->need_fw_reset = 1; |