ixgbe: Complete support for X553 sgmii
authorDon Skidmore <donald.c.skidmore@intel.com>
Sat, 31 Dec 2016 02:07:14 +0000 (21:07 -0500)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 18 Apr 2017 20:05:55 +0000 (13:05 -0700)
The initial patches supporting X553 sgmii forgot some details.  This patch
should cover those missing spots.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

index 0a2eacff73275281be58a8d707a83e798cfad286..633079eaf8fb0cb432494cb58b77dc827c15bcf4 100644 (file)
@@ -334,6 +334,16 @@ static s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw)
        case IXGBE_DEV_ID_X550EM_X_1G_T:
        case IXGBE_DEV_ID_X550EM_X_10G_T:
                return ixgbe_identify_phy_generic(hw);
+       case IXGBE_DEV_ID_X550EM_A_1G_T:
+       case IXGBE_DEV_ID_X550EM_A_1G_T_L:
+               hw->phy.type = ixgbe_phy_fw;
+               hw->phy.ops.read_reg = NULL;
+               hw->phy.ops.write_reg = NULL;
+               if (hw->bus.lan_id)
+                       hw->phy.phy_semaphore_mask |= IXGBE_GSSR_PHY1_SM;
+               else
+                       hw->phy.phy_semaphore_mask |= IXGBE_GSSR_PHY0_SM;
+               break;
        default:
                break;
        }
@@ -2215,8 +2225,20 @@ static s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
                else
                        *speed = IXGBE_LINK_SPEED_10GB_FULL;
        } else {
-               *speed = IXGBE_LINK_SPEED_10GB_FULL |
-                        IXGBE_LINK_SPEED_1GB_FULL;
+               switch (hw->phy.type) {
+               case ixgbe_phy_x550em_kx4:
+                       *speed = IXGBE_LINK_SPEED_1GB_FULL |
+                                IXGBE_LINK_SPEED_2_5GB_FULL |
+                                IXGBE_LINK_SPEED_10GB_FULL;
+                       break;
+               case ixgbe_phy_sgmii:
+                       *speed = IXGBE_LINK_SPEED_1GB_FULL;
+                       break;
+               default:
+                       *speed = IXGBE_LINK_SPEED_10GB_FULL |
+                                IXGBE_LINK_SPEED_1GB_FULL;
+                       break;
+               }
                *autoneg = true;
        }
        return 0;
@@ -3126,6 +3148,9 @@ static s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
                phy->ops.handle_lasi = ixgbe_handle_lasi_ext_t_x550em;
                phy->ops.reset = ixgbe_reset_phy_t_X550em;
                break;
+       case ixgbe_phy_sgmii:
+               phy->ops.setup_link = NULL;
+               break;
        case ixgbe_phy_fw:
                phy->ops.setup_link = ixgbe_setup_fw_link;
                phy->ops.reset = ixgbe_reset_phy_fw;