Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dhananjay Phadke and committed by
David S. Miller
a598ae17 03b88a66

+3 -4
+3 -4
drivers/net/netxen/netxen_nic_main.c
··· 1903 1903 1904 1904 netif_wake_queue(adapter->netdev); 1905 1905 1906 - goto done; 1906 + clear_bit(__NX_RESETTING, &adapter->state); 1907 1907 1908 1908 } else { 1909 + clear_bit(__NX_RESETTING, &adapter->state); 1909 1910 if (!netxen_nic_reset_context(adapter)) { 1910 1911 adapter->netdev->trans_start = jiffies; 1911 - goto done; 1912 + return; 1912 1913 } 1913 1914 1914 1915 /* context reset failed, fall through for fw reset */ ··· 1917 1916 1918 1917 request_reset: 1919 1918 adapter->need_fw_reset = 1; 1920 - done: 1921 - clear_bit(__NX_RESETTING, &adapter->state); 1922 1919 } 1923 1920 1924 1921 struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)