aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2009-09-20 15:20:38 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-22 17:00:01 -0400
commita598ae177a11ebae065e20059d9bc63a5da4ccc3 (patch)
tree8228a1815d3cd565561cc1c5baaff277a71942a3 /drivers/net/netxen
parent03b88a66c040acb4b770221ca24a609527b47fc5 (diff)
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: Dhananjay Phadke <dhananjay@netxen.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.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index f7bdde111dfc..b8c723539dd2 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -1903,12 +1903,13 @@ static void netxen_tx_timeout_task(struct work_struct *work)
1903 1903
1904 netif_wake_queue(adapter->netdev); 1904 netif_wake_queue(adapter->netdev);
1905 1905
1906 goto done; 1906 clear_bit(__NX_RESETTING, &adapter->state);
1907 1907
1908 } else { 1908 } else {
1909 clear_bit(__NX_RESETTING, &adapter->state);
1909 if (!netxen_nic_reset_context(adapter)) { 1910 if (!netxen_nic_reset_context(adapter)) {
1910 adapter->netdev->trans_start = jiffies; 1911 adapter->netdev->trans_start = jiffies;
1911 goto done; 1912 return;
1912 } 1913 }
1913 1914
1914 /* context reset failed, fall through for fw reset */ 1915 /* context reset failed, fall through for fw reset */
@@ -1916,8 +1917,6 @@ static void netxen_tx_timeout_task(struct work_struct *work)
1916 1917
1917request_reset: 1918request_reset:
1918 adapter->need_fw_reset = 1; 1919 adapter->need_fw_reset = 1;
1919done:
1920 clear_bit(__NX_RESETTING, &adapter->state);
1921} 1920}
1922 1921
1923struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev) 1922struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)