Skip to content

Commit c823863

Browse files
elvinongbldavem330
authored andcommitted
stmmac: intel: prepare to support 1000BASE-X phy interface setting
Currently, intel_speed_mode_2500() redundantly fix-up phy_interface to PHY_INTERFACE_MODE_SGMII if the underlying controller is in 1000Mbps SGMII mode. The value of phy_interface has been initialized earlier. This patch removes such redundancy to prepare for setting 1000BASE-X mode for certain hardware platform configuration. Also update the intel_mgbe_common_data() to include 1000BASE-X setup. Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent fa9c562 commit c823863

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ static void intel_speed_mode_2500(struct net_device *ndev, void *intel_data)
251251
priv->plat->mdio_bus_data->xpcs_an_inband = false;
252252
} else {
253253
priv->plat->max_speed = 1000;
254-
priv->plat->phy_interface = PHY_INTERFACE_MODE_SGMII;
255254
priv->plat->mdio_bus_data->xpcs_an_inband = true;
256255
}
257256
}
@@ -562,7 +561,8 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
562561
plat->vlan_fail_q = plat->rx_queues_to_use - 1;
563562

564563
/* Intel mgbe SGMII interface uses pcs-xcps */
565-
if (plat->phy_interface == PHY_INTERFACE_MODE_SGMII) {
564+
if (plat->phy_interface == PHY_INTERFACE_MODE_SGMII ||
565+
plat->phy_interface == PHY_INTERFACE_MODE_1000BASEX) {
566566
plat->mdio_bus_data->has_xpcs = true;
567567
plat->mdio_bus_data->xpcs_an_inband = true;
568568
}

0 commit comments

Comments
 (0)