mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
net: phy: initialize the port support based on the PHY's for OF ports
With the phy_port infrastructure came an ethernet-connector binding, allowing to represent the MDI of a PHY in devicetree. This allows specifying the mediums and pairs of a port. Let's initialize the port's supported list based on what the PHY reports, so that we can then filter it with what the connector allows using. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Link: https://patch.msgid.link/20260205092317.755906-2-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
37a93dd5c4
commit
0561667105
|
|
@ -3499,6 +3499,9 @@ static int of_phy_ports(struct phy_device *phydev)
|
|||
|
||||
port->parent_type = PHY_PORT_PHY;
|
||||
port->phy = phydev;
|
||||
|
||||
linkmode_copy(port->supported, phydev->supported);
|
||||
|
||||
err = phy_add_port(phydev, port);
|
||||
if (err) {
|
||||
phy_port_destroy(port);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user