Skip to contentSkip to conversation

e1000/e1000e/igb/ixgb: don't txhang after link down

PATCH Applied Jeff Kirsher 2 participants 2 messages May 7, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 e1000/e1000e/igb/ixgb: don't txhang after link down

From: Jesse Brandeburg <[email protected]>

after the recent changes to wired drivers to use only netif_carrier_off the driver can have outstanding tx work to complete that will never complete once link is down. Since the intel hardware will hold this tx work forever, the driver notices a tx timeout condition internally and might try to instigate printk and reset of the part with a netif_stop_queue, which doesn't work because link is down.

Don't bother arming to tx hang detection when link is down.

---

 drivers/net/e1000/e1000_main.c |    2 ++
 drivers/net/e1000e/netdev.c    |    2 ++
 drivers/net/igb/igb_main.c     |    2 ++
 drivers/net/ixgb/ixgb_main.c   |    2 ++
 4 files changed, 8 insertions(+), 0 deletions(-)
drivers/net/e1000/e1000_main.c +2 -0
index 71d4fe1..b455dca 100644
@@ -2646,6 +2646,8 @@ static void e1000_watchdog(unsigned long data)
 			 * (Do the reset outside of interrupt context). */
 			adapter->tx_timeout_count++;
 			schedule_work(&adapter->reset_task);
+			/* return immediately since reset is imminent */
+			return;
 		}
 	}
 
drivers/net/e1000e/netdev.c +2 -0
index da6b37e..ccaaee0 100644
@@ -3651,6 +3651,8 @@ link_up:
 			 */
 			adapter->tx_timeout_count++;
 			schedule_work(&adapter->reset_task);
+			/* return immediately since reset is imminent */
+			return;
 		}
 	}
 
drivers/net/igb/igb_main.c +2 -0
index 8de8629..8784c05 100644
@@ -2711,6 +2711,8 @@ link_up:
 			 * (Do the reset outside of interrupt context). */
 			adapter->tx_timeout_count++;
 			schedule_work(&adapter->reset_task);
+			/* return immediately since reset is imminent */
+			return;
 		}
 	}
 
drivers/net/ixgb/ixgb_main.c +2 -0
index cb9ecc4..04cb81a 100644
@@ -1140,6 +1140,8 @@ ixgb_watchdog(unsigned long data)
 			 * to get done, so reset controller to flush Tx.
 			 * (Do the reset outside of interrupt context). */
 			schedule_work(&adapter->tx_timeout_task);
+			/* return immediately since reset is imminent */
+			return;
 		}
 	}
 
maintainer Applied
#1 lore raw

From: Jeff Kirsher <[email protected]>
Date: Thu, 07 May 2009 14:07:35 -0700

Quoted 8 lines

after the recent changes to wired drivers to use only netif_carrier_off the driver can have outstanding tx work to complete that will never complete once link is down. Since the intel hardware will hold this tx work forever, the driver notices a tx timeout condition internally and might try to instigate printk and reset of the part with a netif_stop_queue, which doesn't work because link is down.

Quoted 4 lines

Don't bother arming to tx hang detection when link is down.

Applied.