Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a598ae17 authored by Dhananjay Phadke's avatar Dhananjay Phadke Committed by David S. Miller
Browse files

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: default avatarDhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 03b88a66
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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)