aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2011-02-25 02:49:39 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-03-07 21:05:02 -0500
commit037c6d0a33453bf025c6d6b21e5a0fabe117a797 (patch)
tree008d21bef2889b7915850d9dddfa7ce110ee05f5
parent68a683cf6a5ff09faa366fc1fcf967add0211fe8 (diff)
ixgbe: cleanup PHY init
This change cleans up several situations in which we were either stepping over possible errors, or calling initialization routines multiple times. Also includes whitespace fixes where applicable. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ixgbe/ixgbe_82598.c31
-rw-r--r--drivers/net/ixgbe/ixgbe_82599.c121
-rw-r--r--drivers/net/ixgbe/ixgbe_phy.c21
3 files changed, 114 insertions, 59 deletions
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c
index fc41329399be..dc977b1c8eab 100644
--- a/drivers/net/ixgbe/ixgbe_82598.c
+++ b/drivers/net/ixgbe/ixgbe_82598.c
@@ -280,10 +280,22 @@ static enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw)
280{ 280{
281 enum ixgbe_media_type media_type; 281 enum ixgbe_media_type media_type;
282 282
283 /* Detect if there is a copper PHY attached. */
284 switch (hw->phy.type) {
285 case ixgbe_phy_cu_unknown:
286 case ixgbe_phy_tn:
287 case ixgbe_phy_aq:
288 media_type = ixgbe_media_type_copper;
289 goto out;
290 default:
291 break;
292 }
293
283 /* Media type for I82598 is based on device ID */ 294 /* Media type for I82598 is based on device ID */
284 switch (hw->device_id) { 295 switch (hw->device_id) {
285 case IXGBE_DEV_ID_82598: 296 case IXGBE_DEV_ID_82598:
286 case IXGBE_DEV_ID_82598_BX: 297 case IXGBE_DEV_ID_82598_BX:
298 /* Default device ID is mezzanine card KX/KX4 */
287 media_type = ixgbe_media_type_backplane; 299 media_type = ixgbe_media_type_backplane;
288 break; 300 break;
289 case IXGBE_DEV_ID_82598AF_DUAL_PORT: 301 case IXGBE_DEV_ID_82598AF_DUAL_PORT:
@@ -306,7 +318,7 @@ static enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw)
306 media_type = ixgbe_media_type_unknown; 318 media_type = ixgbe_media_type_unknown;
307 break; 319 break;
308 } 320 }
309 321out:
310 return media_type; 322 return media_type;
311} 323}
312 324
@@ -632,7 +644,7 @@ out:
632 * @hw: pointer to hardware structure 644 * @hw: pointer to hardware structure
633 * @speed: new link speed 645 * @speed: new link speed
634 * @autoneg: true if auto-negotiation enabled 646 * @autoneg: true if auto-negotiation enabled
635 * @autoneg_wait_to_complete: true if waiting is needed to complete 647 * @autoneg_wait_to_complete: true when waiting for completion is needed
636 * 648 *
637 * Set the link speed in the AUTOC register and restarts link. 649 * Set the link speed in the AUTOC register and restarts link.
638 **/ 650 **/
@@ -671,7 +683,8 @@ static s32 ixgbe_setup_mac_link_82598(struct ixgbe_hw *hw,
671 * ixgbe_hw This will write the AUTOC register based on the new 683 * ixgbe_hw This will write the AUTOC register based on the new
672 * stored values 684 * stored values
673 */ 685 */
674 status = ixgbe_start_mac_link_82598(hw, autoneg_wait_to_complete); 686 status = ixgbe_start_mac_link_82598(hw,
687 autoneg_wait_to_complete);
675 } 688 }
676 689
677 return status; 690 return status;
@@ -1090,10 +1103,12 @@ static u32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw)
1090 1103
1091 /* Copper PHY must be checked before AUTOC LMS to determine correct 1104 /* Copper PHY must be checked before AUTOC LMS to determine correct
1092 * physical layer because 10GBase-T PHYs use LMS = KX4/KX */ 1105 * physical layer because 10GBase-T PHYs use LMS = KX4/KX */
1093 if (hw->phy.type == ixgbe_phy_tn || 1106 switch (hw->phy.type) {
1094 hw->phy.type == ixgbe_phy_cu_unknown) { 1107 case ixgbe_phy_tn:
1095 hw->phy.ops.read_reg(hw, MDIO_PMA_EXTABLE, MDIO_MMD_PMAPMD, 1108 case ixgbe_phy_aq:
1096 &ext_ability); 1109 case ixgbe_phy_cu_unknown:
1110 hw->phy.ops.read_reg(hw, MDIO_PMA_EXTABLE,
1111 MDIO_MMD_PMAPMD, &ext_ability);
1097 if (ext_ability & MDIO_PMA_EXTABLE_10GBT) 1112 if (ext_ability & MDIO_PMA_EXTABLE_10GBT)
1098 physical_layer |= IXGBE_PHYSICAL_LAYER_10GBASE_T; 1113 physical_layer |= IXGBE_PHYSICAL_LAYER_10GBASE_T;
1099 if (ext_ability & MDIO_PMA_EXTABLE_1000BT) 1114 if (ext_ability & MDIO_PMA_EXTABLE_1000BT)
@@ -1101,6 +1116,8 @@ static u32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw)
1101 if (ext_ability & MDIO_PMA_EXTABLE_100BTX) 1116 if (ext_ability & MDIO_PMA_EXTABLE_100BTX)
1102 physical_layer |= IXGBE_PHYSICAL_LAYER_100BASE_TX; 1117 physical_layer |= IXGBE_PHYSICAL_LAYER_100BASE_TX;
1103 goto out; 1118 goto out;
1119 default:
1120 break;
1104 } 1121 }
1105 1122
1106 switch (autoc & IXGBE_AUTOC_LMS_MASK) { 1123 switch (autoc & IXGBE_AUTOC_LMS_MASK) {
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c
index 5ef968a10d42..2f8b9f41714f 100644
--- a/drivers/net/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ixgbe/ixgbe_82599.c
@@ -470,8 +470,6 @@ static void ixgbe_enable_tx_laser_multispeed_fiber(struct ixgbe_hw *hw)
470 **/ 470 **/
471static void ixgbe_flap_tx_laser_multispeed_fiber(struct ixgbe_hw *hw) 471static void ixgbe_flap_tx_laser_multispeed_fiber(struct ixgbe_hw *hw)
472{ 472{
473 hw_dbg(hw, "ixgbe_flap_tx_laser_multispeed_fiber\n");
474
475 if (hw->mac.autotry_restart) { 473 if (hw->mac.autotry_restart) {
476 ixgbe_disable_tx_laser_multispeed_fiber(hw); 474 ixgbe_disable_tx_laser_multispeed_fiber(hw);
477 ixgbe_enable_tx_laser_multispeed_fiber(hw); 475 ixgbe_enable_tx_laser_multispeed_fiber(hw);
@@ -494,17 +492,21 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
494 bool autoneg_wait_to_complete) 492 bool autoneg_wait_to_complete)
495{ 493{
496 s32 status = 0; 494 s32 status = 0;
497 ixgbe_link_speed phy_link_speed; 495 ixgbe_link_speed link_speed = IXGBE_LINK_SPEED_UNKNOWN;
498 ixgbe_link_speed highest_link_speed = IXGBE_LINK_SPEED_UNKNOWN; 496 ixgbe_link_speed highest_link_speed = IXGBE_LINK_SPEED_UNKNOWN;
499 u32 speedcnt = 0; 497 u32 speedcnt = 0;
500 u32 esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP); 498 u32 esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
499 u32 i = 0;
501 bool link_up = false; 500 bool link_up = false;
502 bool negotiation; 501 bool negotiation;
503 int i;
504 502
505 /* Mask off requested but non-supported speeds */ 503 /* Mask off requested but non-supported speeds */
506 hw->mac.ops.get_link_capabilities(hw, &phy_link_speed, &negotiation); 504 status = hw->mac.ops.get_link_capabilities(hw, &link_speed,
507 speed &= phy_link_speed; 505 &negotiation);
506 if (status != 0)
507 return status;
508
509 speed &= link_speed;
508 510
509 /* 511 /*
510 * Try each speed one by one, highest priority first. We do this in 512 * Try each speed one by one, highest priority first. We do this in
@@ -515,9 +517,12 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
515 highest_link_speed = IXGBE_LINK_SPEED_10GB_FULL; 517 highest_link_speed = IXGBE_LINK_SPEED_10GB_FULL;
516 518
517 /* If we already have link at this speed, just jump out */ 519 /* If we already have link at this speed, just jump out */
518 hw->mac.ops.check_link(hw, &phy_link_speed, &link_up, false); 520 status = hw->mac.ops.check_link(hw, &link_speed, &link_up,
521 false);
522 if (status != 0)
523 return status;
519 524
520 if ((phy_link_speed == IXGBE_LINK_SPEED_10GB_FULL) && link_up) 525 if ((link_speed == IXGBE_LINK_SPEED_10GB_FULL) && link_up)
521 goto out; 526 goto out;
522 527
523 /* Set the module link speed */ 528 /* Set the module link speed */
@@ -529,9 +534,9 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
529 msleep(40); 534 msleep(40);
530 535
531 status = ixgbe_setup_mac_link_82599(hw, 536 status = ixgbe_setup_mac_link_82599(hw,
532 IXGBE_LINK_SPEED_10GB_FULL, 537 IXGBE_LINK_SPEED_10GB_FULL,
533 autoneg, 538 autoneg,
534 autoneg_wait_to_complete); 539 autoneg_wait_to_complete);
535 if (status != 0) 540 if (status != 0)
536 return status; 541 return status;
537 542
@@ -548,8 +553,11 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
548 msleep(100); 553 msleep(100);
549 554
550 /* If we have link, just jump out */ 555 /* If we have link, just jump out */
551 hw->mac.ops.check_link(hw, &phy_link_speed, 556 status = hw->mac.ops.check_link(hw, &link_speed,
552 &link_up, false); 557 &link_up, false);
558 if (status != 0)
559 return status;
560
553 if (link_up) 561 if (link_up)
554 goto out; 562 goto out;
555 } 563 }
@@ -561,9 +569,12 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
561 highest_link_speed = IXGBE_LINK_SPEED_1GB_FULL; 569 highest_link_speed = IXGBE_LINK_SPEED_1GB_FULL;
562 570
563 /* If we already have link at this speed, just jump out */ 571 /* If we already have link at this speed, just jump out */
564 hw->mac.ops.check_link(hw, &phy_link_speed, &link_up, false); 572 status = hw->mac.ops.check_link(hw, &link_speed, &link_up,
573 false);
574 if (status != 0)
575 return status;
565 576
566 if ((phy_link_speed == IXGBE_LINK_SPEED_1GB_FULL) && link_up) 577 if ((link_speed == IXGBE_LINK_SPEED_1GB_FULL) && link_up)
567 goto out; 578 goto out;
568 579
569 /* Set the module link speed */ 580 /* Set the module link speed */
@@ -576,9 +587,9 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
576 msleep(40); 587 msleep(40);
577 588
578 status = ixgbe_setup_mac_link_82599(hw, 589 status = ixgbe_setup_mac_link_82599(hw,
579 IXGBE_LINK_SPEED_1GB_FULL, 590 IXGBE_LINK_SPEED_1GB_FULL,
580 autoneg, 591 autoneg,
581 autoneg_wait_to_complete); 592 autoneg_wait_to_complete);
582 if (status != 0) 593 if (status != 0)
583 return status; 594 return status;
584 595
@@ -589,7 +600,11 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
589 msleep(100); 600 msleep(100);
590 601
591 /* If we have link, just jump out */ 602 /* If we have link, just jump out */
592 hw->mac.ops.check_link(hw, &phy_link_speed, &link_up, false); 603 status = hw->mac.ops.check_link(hw, &link_speed, &link_up,
604 false);
605 if (status != 0)
606 return status;
607
593 if (link_up) 608 if (link_up)
594 goto out; 609 goto out;
595 } 610 }
@@ -632,13 +647,10 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
632 bool autoneg_wait_to_complete) 647 bool autoneg_wait_to_complete)
633{ 648{
634 s32 status = 0; 649 s32 status = 0;
635 ixgbe_link_speed link_speed; 650 ixgbe_link_speed link_speed = IXGBE_LINK_SPEED_UNKNOWN;
636 s32 i, j; 651 s32 i, j;
637 bool link_up = false; 652 bool link_up = false;
638 u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC); 653 u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
639 struct ixgbe_adapter *adapter = hw->back;
640
641 hw_dbg(hw, "ixgbe_setup_mac_link_smartspeed.\n");
642 654
643 /* Set autoneg_advertised value based on input link speed */ 655 /* Set autoneg_advertised value based on input link speed */
644 hw->phy.autoneg_advertised = 0; 656 hw->phy.autoneg_advertised = 0;
@@ -664,7 +676,7 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
664 for (j = 0; j < IXGBE_SMARTSPEED_MAX_RETRIES; j++) { 676 for (j = 0; j < IXGBE_SMARTSPEED_MAX_RETRIES; j++) {
665 status = ixgbe_setup_mac_link_82599(hw, speed, autoneg, 677 status = ixgbe_setup_mac_link_82599(hw, speed, autoneg,
666 autoneg_wait_to_complete); 678 autoneg_wait_to_complete);
667 if (status) 679 if (status != 0)
668 goto out; 680 goto out;
669 681
670 /* 682 /*
@@ -677,8 +689,11 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
677 mdelay(100); 689 mdelay(100);
678 690
679 /* If we have link, just jump out */ 691 /* If we have link, just jump out */
680 hw->mac.ops.check_link(hw, &link_speed, 692 status = hw->mac.ops.check_link(hw, &link_speed,
681 &link_up, false); 693 &link_up, false);
694 if (status != 0)
695 goto out;
696
682 if (link_up) 697 if (link_up)
683 goto out; 698 goto out;
684 } 699 }
@@ -696,7 +711,7 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
696 hw->phy.smart_speed_active = true; 711 hw->phy.smart_speed_active = true;
697 status = ixgbe_setup_mac_link_82599(hw, speed, autoneg, 712 status = ixgbe_setup_mac_link_82599(hw, speed, autoneg,
698 autoneg_wait_to_complete); 713 autoneg_wait_to_complete);
699 if (status) 714 if (status != 0)
700 goto out; 715 goto out;
701 716
702 /* 717 /*
@@ -709,8 +724,11 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
709 mdelay(100); 724 mdelay(100);
710 725
711 /* If we have link, just jump out */ 726 /* If we have link, just jump out */
712 hw->mac.ops.check_link(hw, &link_speed, 727 status = hw->mac.ops.check_link(hw, &link_speed,
713 &link_up, false); 728 &link_up, false);
729 if (status != 0)
730 goto out;
731
714 if (link_up) 732 if (link_up)
715 goto out; 733 goto out;
716 } 734 }
@@ -722,7 +740,7 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
722 740
723out: 741out:
724 if (link_up && (link_speed == IXGBE_LINK_SPEED_1GB_FULL)) 742 if (link_up && (link_speed == IXGBE_LINK_SPEED_1GB_FULL))
725 e_info(hw, "Smartspeed has downgraded the link speed from " 743 hw_dbg(hw, "Smartspeed has downgraded the link speed from "
726 "the maximum advertised\n"); 744 "the maximum advertised\n");
727 return status; 745 return status;
728} 746}
@@ -883,7 +901,7 @@ static s32 ixgbe_reset_hw_82599(struct ixgbe_hw *hw)
883 901
884 /* PHY ops must be identified and initialized prior to reset */ 902 /* PHY ops must be identified and initialized prior to reset */
885 903
886 /* Init PHY and function pointers, perform SFP setup */ 904 /* Identify PHY and related function pointers */
887 status = hw->phy.ops.init(hw); 905 status = hw->phy.ops.init(hw);
888 906
889 if (status == IXGBE_ERR_SFP_NOT_SUPPORTED) 907 if (status == IXGBE_ERR_SFP_NOT_SUPPORTED)
@@ -895,6 +913,9 @@ static s32 ixgbe_reset_hw_82599(struct ixgbe_hw *hw)
895 hw->phy.sfp_setup_needed = false; 913 hw->phy.sfp_setup_needed = false;
896 } 914 }
897 915
916 if (status == IXGBE_ERR_SFP_NOT_SUPPORTED)
917 goto reset_hw_out;
918
898 /* Reset PHY */ 919 /* Reset PHY */
899 if (hw->phy.reset_disable == false && hw->phy.ops.reset != NULL) 920 if (hw->phy.reset_disable == false && hw->phy.ops.reset != NULL)
900 hw->phy.ops.reset(hw); 921 hw->phy.ops.reset(hw);
@@ -2051,28 +2072,28 @@ static struct ixgbe_mac_operations mac_ops_82599 = {
2051}; 2072};
2052 2073
2053static struct ixgbe_eeprom_operations eeprom_ops_82599 = { 2074static struct ixgbe_eeprom_operations eeprom_ops_82599 = {
2054 .init_params = &ixgbe_init_eeprom_params_generic, 2075 .init_params = &ixgbe_init_eeprom_params_generic,
2055 .read = &ixgbe_read_eerd_generic, 2076 .read = &ixgbe_read_eerd_generic,
2056 .write = &ixgbe_write_eeprom_generic, 2077 .write = &ixgbe_write_eeprom_generic,
2057 .calc_checksum = &ixgbe_calc_eeprom_checksum_generic, 2078 .calc_checksum = &ixgbe_calc_eeprom_checksum_generic,
2058 .validate_checksum = &ixgbe_validate_eeprom_checksum_generic, 2079 .validate_checksum = &ixgbe_validate_eeprom_checksum_generic,
2059 .update_checksum = &ixgbe_update_eeprom_checksum_generic, 2080 .update_checksum = &ixgbe_update_eeprom_checksum_generic,
2060}; 2081};
2061 2082
2062static struct ixgbe_phy_operations phy_ops_82599 = { 2083static struct ixgbe_phy_operations phy_ops_82599 = {
2063 .identify = &ixgbe_identify_phy_82599, 2084 .identify = &ixgbe_identify_phy_82599,
2064 .identify_sfp = &ixgbe_identify_sfp_module_generic, 2085 .identify_sfp = &ixgbe_identify_sfp_module_generic,
2065 .init = &ixgbe_init_phy_ops_82599, 2086 .init = &ixgbe_init_phy_ops_82599,
2066 .reset = &ixgbe_reset_phy_generic, 2087 .reset = &ixgbe_reset_phy_generic,
2067 .read_reg = &ixgbe_read_phy_reg_generic, 2088 .read_reg = &ixgbe_read_phy_reg_generic,
2068 .write_reg = &ixgbe_write_phy_reg_generic, 2089 .write_reg = &ixgbe_write_phy_reg_generic,
2069 .setup_link = &ixgbe_setup_phy_link_generic, 2090 .setup_link = &ixgbe_setup_phy_link_generic,
2070 .setup_link_speed = &ixgbe_setup_phy_link_speed_generic, 2091 .setup_link_speed = &ixgbe_setup_phy_link_speed_generic,
2071 .read_i2c_byte = &ixgbe_read_i2c_byte_generic, 2092 .read_i2c_byte = &ixgbe_read_i2c_byte_generic,
2072 .write_i2c_byte = &ixgbe_write_i2c_byte_generic, 2093 .write_i2c_byte = &ixgbe_write_i2c_byte_generic,
2073 .read_i2c_eeprom = &ixgbe_read_i2c_eeprom_generic, 2094 .read_i2c_eeprom = &ixgbe_read_i2c_eeprom_generic,
2074 .write_i2c_eeprom = &ixgbe_write_i2c_eeprom_generic, 2095 .write_i2c_eeprom = &ixgbe_write_i2c_eeprom_generic,
2075 .check_overtemp = &ixgbe_tn_check_overtemp, 2096 .check_overtemp = &ixgbe_tn_check_overtemp,
2076}; 2097};
2077 2098
2078struct ixgbe_info ixgbe_82599_info = { 2099struct ixgbe_info ixgbe_82599_info = {
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c
index 197230b2d1ac..9190a8fca427 100644
--- a/drivers/net/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ixgbe/ixgbe_phy.c
@@ -57,6 +57,7 @@ s32 ixgbe_identify_phy_generic(struct ixgbe_hw *hw)
57{ 57{
58 s32 status = IXGBE_ERR_PHY_ADDR_INVALID; 58 s32 status = IXGBE_ERR_PHY_ADDR_INVALID;
59 u32 phy_addr; 59 u32 phy_addr;
60 u16 ext_ability = 0;
60 61
61 if (hw->phy.type == ixgbe_phy_unknown) { 62 if (hw->phy.type == ixgbe_phy_unknown) {
62 for (phy_addr = 0; phy_addr < IXGBE_MAX_PHY_ADDR; phy_addr++) { 63 for (phy_addr = 0; phy_addr < IXGBE_MAX_PHY_ADDR; phy_addr++) {
@@ -65,12 +66,29 @@ s32 ixgbe_identify_phy_generic(struct ixgbe_hw *hw)
65 ixgbe_get_phy_id(hw); 66 ixgbe_get_phy_id(hw);
66 hw->phy.type = 67 hw->phy.type =
67 ixgbe_get_phy_type_from_id(hw->phy.id); 68 ixgbe_get_phy_type_from_id(hw->phy.id);
69
70 if (hw->phy.type == ixgbe_phy_unknown) {
71 hw->phy.ops.read_reg(hw,
72 MDIO_PMA_EXTABLE,
73 MDIO_MMD_PMAPMD,
74 &ext_ability);
75 if (ext_ability &
76 (MDIO_PMA_EXTABLE_10GBT |
77 MDIO_PMA_EXTABLE_1000BT))
78 hw->phy.type =
79 ixgbe_phy_cu_unknown;
80 else
81 hw->phy.type =
82 ixgbe_phy_generic;
83 }
84
68 status = 0; 85 status = 0;
69 break; 86 break;
70 } 87 }
71 } 88 }
72 /* clear value if nothing found */ 89 /* clear value if nothing found */
73 hw->phy.mdio.prtad = 0; 90 if (status != 0)
91 hw->phy.mdio.prtad = 0;
74 } else { 92 } else {
75 status = 0; 93 status = 0;
76 } 94 }
@@ -823,7 +841,6 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
823 goto out; 841 goto out;
824 } 842 }
825 843
826 /* This is guaranteed to be 82599, no need to check for NULL */
827 hw->mac.ops.get_device_caps(hw, &enforce_sfp); 844 hw->mac.ops.get_device_caps(hw, &enforce_sfp);
828 if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) && 845 if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) &&
829 !((hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0) || 846 !((hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0) ||