diff options
author | Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> | 2010-03-18 10:34:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-19 01:14:27 -0400 |
commit | 1097cd17700c4e9903b7bbfcec1432f61784cb53 (patch) | |
tree | 9920455ace2c9b5618852607658e8efb08fa49ad /drivers/net/ixgbe/ixgbe_main.c | |
parent | 4227f62db38ed221a49908c224b9fa2b91dc797b (diff) |
ixgbe: Fix 82599 multispeed fiber link issues due to Tx laser flapping
Fix 82599 link issues during driver load and unload test using multi-speed
10G & 1G fiber modules. When connected back to back sometime 82599 multispeed
fiber modules would link at 1G speed instead of 10G highest speed, due to a
race condition in autotry process involving Tx laser flapping. Move autotry
autoneg-37 tx laser flapping process from multispeed module init setup
to driver unload. This will alert the link partner to restart its
autotry process when it tries to establish the link with the link partner
Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 684af371462d..b858a1a79d0e 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -5018,6 +5018,7 @@ static void ixgbe_multispeed_fiber_task(struct work_struct *work) | |||
5018 | autoneg = hw->phy.autoneg_advertised; | 5018 | autoneg = hw->phy.autoneg_advertised; |
5019 | if ((!autoneg) && (hw->mac.ops.get_link_capabilities)) | 5019 | if ((!autoneg) && (hw->mac.ops.get_link_capabilities)) |
5020 | hw->mac.ops.get_link_capabilities(hw, &autoneg, &negotiation); | 5020 | hw->mac.ops.get_link_capabilities(hw, &autoneg, &negotiation); |
5021 | hw->mac.autotry_restart = false; | ||
5021 | if (hw->mac.ops.setup_link) | 5022 | if (hw->mac.ops.setup_link) |
5022 | hw->mac.ops.setup_link(hw, autoneg, negotiation, true); | 5023 | hw->mac.ops.setup_link(hw, autoneg, negotiation, true); |
5023 | adapter->flags |= IXGBE_FLAG_NEED_LINK_UPDATE; | 5024 | adapter->flags |= IXGBE_FLAG_NEED_LINK_UPDATE; |
@@ -6380,6 +6381,16 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev) | |||
6380 | del_timer_sync(&adapter->sfp_timer); | 6381 | del_timer_sync(&adapter->sfp_timer); |
6381 | cancel_work_sync(&adapter->watchdog_task); | 6382 | cancel_work_sync(&adapter->watchdog_task); |
6382 | cancel_work_sync(&adapter->sfp_task); | 6383 | cancel_work_sync(&adapter->sfp_task); |
6384 | if (adapter->hw.phy.multispeed_fiber) { | ||
6385 | struct ixgbe_hw *hw = &adapter->hw; | ||
6386 | /* | ||
6387 | * Restart clause 37 autoneg, disable and re-enable | ||
6388 | * the tx laser, to clear & alert the link partner | ||
6389 | * that it needs to restart autotry | ||
6390 | */ | ||
6391 | hw->mac.autotry_restart = true; | ||
6392 | hw->mac.ops.flap_tx_laser(hw); | ||
6393 | } | ||
6383 | cancel_work_sync(&adapter->multispeed_fiber_task); | 6394 | cancel_work_sync(&adapter->multispeed_fiber_task); |
6384 | cancel_work_sync(&adapter->sfp_config_module_task); | 6395 | cancel_work_sync(&adapter->sfp_config_module_task); |
6385 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE || | 6396 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE || |