aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_82599.c
diff options
context:
space:
mode:
authorMallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>2009-09-01 09:50:14 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-01 20:40:20 -0400
commitc3c7432741211bc9f6b072958653647b9d5cdd5d (patch)
tree44565970c9c5683904e2b1da610cdd5c40417c18 /drivers/net/ixgbe/ixgbe_82599.c
parentb7fdb714856541cd4b659a7b86ec04415e2809f7 (diff)
ixgbe: Patch to fix 82599 multispeed fiber link issues when driver is loaded without any cable and reconnecting it to 1G partner
In 82599 multi speed fiber case when driver is loaded without any cable and reconnecting the cable with a 1G partner does not bring up the link in 1Gb mode. When there is no link we first setup the link at 10G & 1G and then try to re-establish the link at highest speed 10G and thereby changing autoneg_advertised value to highest speed 10G. After connecting back the cable to a 1G link partner we never try 1G as autoneg advertised value is changed to link at 10G only. The following patch fixes the issue by properly initializing the autoneg_advertised value just before exiting from link setup routine. Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@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_82599.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_82599.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c
index 5ee560855268..61af47e75aa1 100644
--- a/drivers/net/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ixgbe/ixgbe_82599.c
@@ -421,15 +421,6 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
421 hw->mac.ops.get_link_capabilities(hw, &phy_link_speed, &negotiation); 421 hw->mac.ops.get_link_capabilities(hw, &phy_link_speed, &negotiation);
422 speed &= phy_link_speed; 422 speed &= phy_link_speed;
423 423
424 /* Set autoneg_advertised value based on input link speed */
425 hw->phy.autoneg_advertised = 0;
426
427 if (speed & IXGBE_LINK_SPEED_10GB_FULL)
428 hw->phy.autoneg_advertised |= IXGBE_LINK_SPEED_10GB_FULL;
429
430 if (speed & IXGBE_LINK_SPEED_1GB_FULL)
431 hw->phy.autoneg_advertised |= IXGBE_LINK_SPEED_1GB_FULL;
432
433 /* 424 /*
434 * When the driver changes the link speeds that it can support, 425 * When the driver changes the link speeds that it can support,
435 * it sets autotry_restart to true to indicate that we need to 426 * it sets autotry_restart to true to indicate that we need to
@@ -466,7 +457,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
466 autoneg, 457 autoneg,
467 autoneg_wait_to_complete); 458 autoneg_wait_to_complete);
468 if (status != 0) 459 if (status != 0)
469 goto out; 460 return status;
470 461
471 /* Flap the tx laser if it has not already been done */ 462 /* Flap the tx laser if it has not already been done */
472 if (hw->mac.autotry_restart) { 463 if (hw->mac.autotry_restart) {
@@ -520,7 +511,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
520 autoneg, 511 autoneg,
521 autoneg_wait_to_complete); 512 autoneg_wait_to_complete);
522 if (status != 0) 513 if (status != 0)
523 goto out; 514 return status;
524 515
525 /* Flap the tx laser if it has not already been done */ 516 /* Flap the tx laser if it has not already been done */
526 if (hw->mac.autotry_restart) { 517 if (hw->mac.autotry_restart) {
@@ -558,6 +549,15 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
558 autoneg_wait_to_complete); 549 autoneg_wait_to_complete);
559 550
560out: 551out:
552 /* Set autoneg_advertised value based on input link speed */
553 hw->phy.autoneg_advertised = 0;
554
555 if (speed & IXGBE_LINK_SPEED_10GB_FULL)
556 hw->phy.autoneg_advertised |= IXGBE_LINK_SPEED_10GB_FULL;
557
558 if (speed & IXGBE_LINK_SPEED_1GB_FULL)
559 hw->phy.autoneg_advertised |= IXGBE_LINK_SPEED_1GB_FULL;
560
561 return status; 561 return status;
562} 562}
563 563