Skip to content

Commit

Permalink
netxen: fix minor tx timeout bug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dhananjay Phadke authored and David S. Miller committed Sep 22, 2009
1 parent 03b88a6 commit a598ae1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1903,21 +1903,20 @@ 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 */
}

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)
Expand Down

0 comments on commit a598ae1

Please sign in to comment.