Commit a598ae17 authored by Dhananjay Phadke's avatar Dhananjay Phadke Committed by David S. Miller

netxen: fix minor tx timeout bug

Fix minor bug in netdev tx timeout handling which could
always lead to firmware reset instead of pci function reset.

netxen_nic_reset_context() requires __NX_RESETTING bit
cleared.
Signed-off-by: default avatarDhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 03b88a66
...@@ -1903,12 +1903,13 @@ static void netxen_tx_timeout_task(struct work_struct *work) ...@@ -1903,12 +1903,13 @@ static void netxen_tx_timeout_task(struct work_struct *work)
netif_wake_queue(adapter->netdev); netif_wake_queue(adapter->netdev);
goto done; clear_bit(__NX_RESETTING, &adapter->state);
} else { } else {
clear_bit(__NX_RESETTING, &adapter->state);
if (!netxen_nic_reset_context(adapter)) { if (!netxen_nic_reset_context(adapter)) {
adapter->netdev->trans_start = jiffies; adapter->netdev->trans_start = jiffies;
goto done; return;
} }
/* context reset failed, fall through for fw reset */ /* context reset failed, fall through for fw reset */
...@@ -1916,8 +1917,6 @@ static void netxen_tx_timeout_task(struct work_struct *work) ...@@ -1916,8 +1917,6 @@ static void netxen_tx_timeout_task(struct work_struct *work)
request_reset: request_reset:
adapter->need_fw_reset = 1; adapter->need_fw_reset = 1;
done:
clear_bit(__NX_RESETTING, &adapter->state);
} }
struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev) struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)
......
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