From: Dhananjay Phadke Date: Sun, 20 Sep 2009 19:20:38 +0000 (+0000) Subject: netxen: fix minor tx timeout bug X-Git-Tag: firefly_0821_release~11864^2~317 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a598ae177a11ebae065e20059d9bc63a5da4ccc3;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: David S. Miller --- 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) netif_wake_queue(adapter->netdev); - goto done; + clear_bit(__NX_RESETTING, &adapter->state); } else { + clear_bit(__NX_RESETTING, &adapter->state); if (!netxen_nic_reset_context(adapter)) { adapter->netdev->trans_start = jiffies; - goto done; + return; } /* context reset failed, fall through for fw reset */ @@ -1916,8 +1917,6 @@ static void netxen_tx_timeout_task(struct work_struct *work) request_reset: adapter->need_fw_reset = 1; -done: - clear_bit(__NX_RESETTING, &adapter->state); } struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)