mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 08:39:08 -04:00
net: stmmac: use PCS supported_interfaces
Use the PCS' supported_interfaces member to build the MAC level supported_interfaces bitmap. Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tTfff-007Roc-Ff@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
b0f88c1b9a
commit
d13cefbb10
@@ -1203,6 +1203,7 @@ static int stmmac_phy_setup(struct stmmac_priv *priv)
|
||||
struct stmmac_mdio_bus_data *mdio_bus_data;
|
||||
int mode = priv->plat->phy_interface;
|
||||
struct fwnode_handle *fwnode;
|
||||
struct phylink_pcs *pcs;
|
||||
struct phylink *phylink;
|
||||
|
||||
priv->phylink_config.dev = &priv->dev->dev;
|
||||
@@ -1224,8 +1225,14 @@ static int stmmac_phy_setup(struct stmmac_priv *priv)
|
||||
|
||||
/* If we have an xpcs, it defines which PHY interfaces are supported. */
|
||||
if (priv->hw->xpcs)
|
||||
xpcs_get_interfaces(priv->hw->xpcs,
|
||||
priv->phylink_config.supported_interfaces);
|
||||
pcs = xpcs_to_phylink_pcs(priv->hw->xpcs);
|
||||
else
|
||||
pcs = priv->hw->phylink_pcs;
|
||||
|
||||
if (pcs)
|
||||
phy_interface_or(priv->phylink_config.supported_interfaces,
|
||||
priv->phylink_config.supported_interfaces,
|
||||
pcs->supported_interfaces);
|
||||
|
||||
fwnode = priv->plat->port_node;
|
||||
if (!fwnode)
|
||||
|
||||
Reference in New Issue
Block a user