]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
e1000/e1000e/igb/ixgb: don't txhang after link down
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Thu, 7 May 2009 11:07:35 +0000 (11:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 May 2009 21:52:32 +0000 (14:52 -0700)
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.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/e1000/e1000_main.c
drivers/net/e1000e/netdev.c
drivers/net/igb/igb_main.c
drivers/net/ixgb/ixgb_main.c

index 71d4fe15976a4a6105fb77bab5cea69c28cd2ca4..b455dca0901e0bcf50e832766114b71c1b56d182 100644 (file)
@@ -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;
                }
        }
 
index da6b37e05bea67fe7b618f361c5d653a3d5e50f9..ccaaee0951cfb37cb498a15a9f2d89b78daa4174 100644 (file)
@@ -3651,6 +3651,8 @@ link_up:
                         */
                        adapter->tx_timeout_count++;
                        schedule_work(&adapter->reset_task);
+                       /* return immediately since reset is imminent */
+                       return;
                }
        }
 
index 8de8629b07ec2a05357e762d2462c504f3f0179a..8784c051707e2e990bb26d6f2b65b5264b3a6242 100644 (file)
@@ -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;
                }
        }
 
index cb9ecc48f6d0a3f4a05a340b6f602a58ce2812c0..04cb81a739c2e2146988cb39d10f868776d9364b 100644 (file)
@@ -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;
                }
        }