提交 16d884bd 编写于 作者: A Amit Kumar Salecha 提交者: David S. Miller

netxen: protect tx timeout recovery by rtnl lock

Signed-off-by: NAmit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8bcfbd0a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册