ixgbe: Add 1000Base-T device based on X550EM_X MAC
authorPaul Greenwalt <paul.greenwalt@intel.com>
Thu, 13 Apr 2017 12:07:07 +0000 (08:07 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 30 Apr 2017 03:01:03 +0000 (20:01 -0700)
Add support for new 1000Base-T device based on X550EM_X MAC
type. All PHY operations are disabled as the PHY is controlled
by FW.

Signed-off-by: Paul Greenwalt <paul.greenwalt@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.h
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

index e8cd4491f1fdcd812d21a035f03b2341a55c542f..85b1afb345e3f10d237f72efec5275193be800cf 100644 (file)
@@ -826,6 +826,7 @@ enum ixgbe_boards {
        board_X540,
        board_X550,
        board_X550EM_x,
+       board_x550em_x_fw,
        board_x550em_a,
        board_x550em_a_fw,
 };
@@ -835,6 +836,7 @@ extern const struct ixgbe_info ixgbe_82599_info;
 extern const struct ixgbe_info ixgbe_X540_info;
 extern const struct ixgbe_info ixgbe_X550_info;
 extern const struct ixgbe_info ixgbe_X550EM_x_info;
+extern const struct ixgbe_info ixgbe_x550em_x_fw_info;
 extern const struct ixgbe_info ixgbe_x550em_a_info;
 extern const struct ixgbe_info ixgbe_x550em_a_fw_info;
 #ifdef CONFIG_IXGBE_DCB
index 3d7b091009454bdf16586ba9aac50f57e94be69b..f765a2a0ed4bf8069248c1851dcdc91907a738c0 100644 (file)
@@ -88,6 +88,7 @@ static const struct ixgbe_info *ixgbe_info_tbl[] = {
        [board_X540]            = &ixgbe_X540_info,
        [board_X550]            = &ixgbe_X550_info,
        [board_X550EM_x]        = &ixgbe_X550EM_x_info,
+       [board_x550em_x_fw]     = &ixgbe_x550em_x_fw_info,
        [board_x550em_a]        = &ixgbe_x550em_a_info,
        [board_x550em_a_fw]     = &ixgbe_x550em_a_fw_info,
 };
@@ -138,6 +139,7 @@ static const struct pci_device_id ixgbe_pci_tbl[] = {
        {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_KR), board_X550EM_x},
        {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_10G_T), board_X550EM_x},
        {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_SFP), board_X550EM_x},
+       {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_1G_T), board_x550em_x_fw},
        {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_KR), board_x550em_a },
        {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_KR_L), board_x550em_a },
        {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_SFP_N), board_x550em_a },
index 2f06e4d9208daeb9b96ffdd08dfd459208d9d30d..9c2460c5ef1b1421b4729967942ab63dd0850f85 100644 (file)
@@ -3128,6 +3128,7 @@ enum ixgbe_phy_type {
        ixgbe_phy_x550em_kx4,
        ixgbe_phy_x550em_xfi,
        ixgbe_phy_x550em_ext_t,
+       ixgbe_phy_ext_1g_t,
        ixgbe_phy_cu_unknown,
        ixgbe_phy_qt,
        ixgbe_phy_xaui,
index 58d3bcaca2b9a9e89508a2f5f41521d6c385c1c6..2ba024b575ea84f619d719e7bb25676e9534a478 100644 (file)
@@ -49,6 +49,18 @@ static s32 ixgbe_get_invariants_X550_x(struct ixgbe_hw *hw)
        return 0;
 }
 
+static s32 ixgbe_get_invariants_X550_x_fw(struct ixgbe_hw *hw)
+{
+       struct ixgbe_phy_info *phy = &hw->phy;
+
+       /* Start with X540 invariants, since so similar */
+       ixgbe_get_invariants_X540(hw);
+
+       phy->ops.set_phy_power = NULL;
+
+       return 0;
+}
+
 static s32 ixgbe_get_invariants_X550_a(struct ixgbe_hw *hw)
 {
        struct ixgbe_mac_info *mac = &hw->mac;
@@ -334,9 +346,11 @@ static s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw)
                else
                        hw->phy.phy_semaphore_mask = IXGBE_GSSR_PHY0_SM;
                /* Fallthrough */
-       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_X_1G_T:
+               hw->phy.type = ixgbe_phy_ext_1g_t;
+               break;
        case IXGBE_DEV_ID_X550EM_A_1G_T:
        case IXGBE_DEV_ID_X550EM_A_1G_T_L:
                hw->phy.type = ixgbe_phy_fw;
@@ -2158,6 +2172,8 @@ static void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw)
                                        ixgbe_set_soft_rate_select_speed;
                break;
        case ixgbe_media_type_copper:
+               if (hw->device_id == IXGBE_DEV_ID_X550EM_X_1G_T)
+                       break;
                mac->ops.setup_link = ixgbe_setup_mac_link_t_X550em;
                mac->ops.setup_fc = ixgbe_setup_fc_generic;
                mac->ops.check_link = ixgbe_check_link_t_X550em;
@@ -2238,6 +2254,7 @@ static s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
                        *speed = IXGBE_LINK_SPEED_1GB_FULL |
                                 IXGBE_LINK_SPEED_10GB_FULL;
                        break;
+               case ixgbe_phy_ext_1g_t:
                case ixgbe_phy_sgmii:
                        *speed = IXGBE_LINK_SPEED_1GB_FULL;
                        break;
@@ -3185,6 +3202,11 @@ static s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
                phy->ops.setup_link = ixgbe_setup_fw_link;
                phy->ops.reset = ixgbe_reset_phy_fw;
                break;
+       case ixgbe_phy_ext_1g_t:
+               phy->ops.setup_link = NULL;
+               phy->ops.read_reg = NULL;
+               phy->ops.write_reg = NULL;
+               break;
        default:
                break;
        }
@@ -3888,6 +3910,17 @@ static const struct ixgbe_phy_operations phy_ops_X550EM_x = {
        .write_reg              = &ixgbe_write_phy_reg_generic,
 };
 
+static const struct ixgbe_phy_operations phy_ops_x550em_x_fw = {
+       X550_COMMON_PHY
+       .check_overtemp         = NULL,
+       .init                   = ixgbe_init_phy_ops_X550em,
+       .identify               = ixgbe_identify_phy_x550em,
+       .read_reg               = NULL,
+       .write_reg              = NULL,
+       .read_reg_mdi           = NULL,
+       .write_reg_mdi          = NULL,
+};
+
 static const struct ixgbe_phy_operations phy_ops_x550em_a = {
        X550_COMMON_PHY
        .check_overtemp         = &ixgbe_tn_check_overtemp,
@@ -3950,6 +3983,16 @@ const struct ixgbe_info ixgbe_X550EM_x_info = {
        .link_ops               = &link_ops_x550em_x,
 };
 
+const struct ixgbe_info ixgbe_x550em_x_fw_info = {
+       .mac                    = ixgbe_mac_X550EM_x,
+       .get_invariants         = ixgbe_get_invariants_X550_x_fw,
+       .mac_ops                = &mac_ops_X550EM_x,
+       .eeprom_ops             = &eeprom_ops_X550EM_x,
+       .phy_ops                = &phy_ops_x550em_x_fw,
+       .mbx_ops                = &mbx_ops_generic,
+       .mvals                  = ixgbe_mvals_X550EM_x,
+};
+
 const struct ixgbe_info ixgbe_x550em_a_info = {
        .mac                    = ixgbe_mac_x550em_a,
        .get_invariants         = &ixgbe_get_invariants_X550_a,