From: Emil Tantilov Date: Wed, 19 Oct 2011 07:41:58 +0000 (+0000) Subject: ixgbe: Fix link issues caused by a reset while interface is down X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~145 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b145ed1e42652941975542b7b82d65f0e2610888;p=users%2Fjedix%2Flinux-maple.git ixgbe: Fix link issues caused by a reset while interface is down Interface fails to obtain link on 82599 SFP in the following scenario: 1. Set advertised speed to GB: ethtool -s eth0 advertise 0x20 2. Bring interface down ip link set eth0 down 3. Issue any command that leads to a reset: ethtool -t eth0 4. Bring link back up: ip link set eth0 up Following patch makes sure that the driver flaps the Tx laser every time ixgbe_start_hw() is called, and not only when the speed is set. (cherry picked from commit 232ef6bc451de2bc17c22fd116838cd89b94e1c1) Signed-off-by: Emil Tantilov Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher Signed-off-by: Joe Jin --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 3c063bc4f1b6b..606e92719d1f2 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -6119,7 +6119,6 @@ static void ixgbe_sfp_link_config_subtask(struct ixgbe_adapter *adapter) autoneg = hw->phy.autoneg_advertised; if ((!autoneg) && (hw->mac.ops.get_link_capabilities)) hw->mac.ops.get_link_capabilities(hw, &autoneg, &negotiation); - hw->mac.autotry_restart = false; if (hw->mac.ops.setup_link) hw->mac.ops.setup_link(hw, autoneg, negotiation, true);