Commit c8238631 authored by Ong Boon Leong's avatar Ong Boon Leong Committed by David S. Miller

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: default avatarOng Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fa9c562f
...@@ -251,7 +251,6 @@ static void intel_speed_mode_2500(struct net_device *ndev, void *intel_data) ...@@ -251,7 +251,6 @@ static void intel_speed_mode_2500(struct net_device *ndev, void *intel_data)
priv->plat->mdio_bus_data->xpcs_an_inband = false; priv->plat->mdio_bus_data->xpcs_an_inband = false;
} else { } else {
priv->plat->max_speed = 1000; priv->plat->max_speed = 1000;
priv->plat->phy_interface = PHY_INTERFACE_MODE_SGMII;
priv->plat->mdio_bus_data->xpcs_an_inband = true; priv->plat->mdio_bus_data->xpcs_an_inband = true;
} }
} }
...@@ -562,7 +561,8 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, ...@@ -562,7 +561,8 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
plat->vlan_fail_q = plat->rx_queues_to_use - 1; plat->vlan_fail_q = plat->rx_queues_to_use - 1;
/* Intel mgbe SGMII interface uses pcs-xcps */ /* Intel mgbe SGMII interface uses pcs-xcps */
if (plat->phy_interface == PHY_INTERFACE_MODE_SGMII) { if (plat->phy_interface == PHY_INTERFACE_MODE_SGMII ||
plat->phy_interface == PHY_INTERFACE_MODE_1000BASEX) {
plat->mdio_bus_data->has_xpcs = true; plat->mdio_bus_data->has_xpcs = true;
plat->mdio_bus_data->xpcs_an_inband = true; plat->mdio_bus_data->xpcs_an_inband = true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment