@@ -1029,7 +1029,7 @@ static int phylink_attach_phy(struct phylink *pl, struct phy_device *phy,
if (pl->phydev)
return -EBUSY;
- return phy_attach_direct(pl->netdev, phy, 0, interface);
+ return phy_attach_direct(pl->netdev, phy, phy->dev_flags, interface);
}
/**
@@ -1758,6 +1758,10 @@ static int dsa_slave_phy_connect(struct net_device *slave_dev, int addr)
return -ENODEV;
}
+ if (ds->ops->get_phy_flags)
+ slave_dev->phydev->dev_flags |=
+ ds->ops->get_phy_flags(ds, dp->index);
+
return phylink_connect_phy(dp->pl, slave_dev->phydev);
}
This patch extends the flags of the phy that's being connected with the port specific flags of the switch port. This is needed to handle a port specific erratum of the KSZ8873 switch, which is added in a later patch. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> --- drivers/net/phy/phylink.c | 2 +- net/dsa/slave.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)