netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] netxen: fix minor tx timeout bug
@ 2009-09-21  5:20 Dhananjay Phadke
  2009-09-21  5:20 ` [PATCH 2/2] netxen: fix firmware init after resume Dhananjay Phadke
  2009-09-22 21:14 ` [PATCH 1/2] netxen: fix minor tx timeout bug David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Dhananjay Phadke @ 2009-09-21  5:20 UTC (permalink / raw)
  To: davem; +Cc: netdev

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>
---
 drivers/net/netxen/netxen_nic_main.c |    7 +++----
 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 f7bdde1..b8c7235 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)
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-22 21:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-21  5:20 [PATCH 1/2] netxen: fix minor tx timeout bug Dhananjay Phadke
2009-09-21  5:20 ` [PATCH 2/2] netxen: fix firmware init after resume Dhananjay Phadke
2009-09-22 21:14   ` David Miller
2009-09-22 21:14 ` [PATCH 1/2] netxen: fix minor tx timeout bug David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).