Skip to content

Commit

Permalink
netxen: protect tx timeout recovery by rtnl lock
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Amit Kumar Salecha authored and David S. Miller committed Aug 8, 2010
1 parent 8bcfbd0 commit 16d884b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 16d884b

Please sign in to comment.