Commit 16d884bd authored by Amit Kumar Salecha's avatar Amit Kumar Salecha Committed by David S. Miller

netxen: protect tx timeout recovery by rtnl lock

Signed-off-by: default avatarAmit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8bcfbd0a
...@@ -2001,27 +2001,26 @@ static void netxen_tx_timeout_task(struct work_struct *work) ...@@ -2001,27 +2001,26 @@ static void netxen_tx_timeout_task(struct work_struct *work)
if (++adapter->tx_timeo_cnt >= NX_MAX_TX_TIMEOUTS) if (++adapter->tx_timeo_cnt >= NX_MAX_TX_TIMEOUTS)
goto request_reset; goto request_reset;
rtnl_lock();
if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
/* try to scrub interrupt */ /* try to scrub interrupt */
netxen_napi_disable(adapter); netxen_napi_disable(adapter);
adapter->netdev->trans_start = jiffies;
netxen_napi_enable(adapter); netxen_napi_enable(adapter);
netif_wake_queue(adapter->netdev); netif_wake_queue(adapter->netdev);
clear_bit(__NX_RESETTING, &adapter->state); clear_bit(__NX_RESETTING, &adapter->state);
return;
} else { } else {
clear_bit(__NX_RESETTING, &adapter->state); clear_bit(__NX_RESETTING, &adapter->state);
if (!netxen_nic_reset_context(adapter)) { if (netxen_nic_reset_context(adapter)) {
adapter->netdev->trans_start = jiffies; rtnl_unlock();
return; goto request_reset;
} }
/* context reset failed, fall through for fw reset */
} }
adapter->netdev->trans_start = jiffies;
rtnl_unlock();
return;
request_reset: request_reset:
adapter->need_fw_reset = 1; adapter->need_fw_reset = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment