Hi Andrew,
Your persistence on this matter is much appreciated.
On Mon, Jul 20, 2020 at 11:04:49PM +0200, Andrew Lunn wrote:
> > The dev->ports[i].phydev is not actually exposed beyond the driver. The
> > driver sets the phydev.speed in a few places and even reads it back in
> > one place. It als
> The dev->ports[i].phydev is not actually exposed beyond the driver. The
> driver sets the phydev.speed in a few places and even reads it back in
> one place. It also sets phydev.duplex, but never reads it back. It
> queries phydev.link, which is statically 0 due to using devm_kzalloc.
>
> I thin
Ignoring the part about how to cleanup this internal phydev for the
moment.
> int ksz9477_switch_register(struct ksz_device *dev)
> {
> - return ksz_switch_register(dev, &ksz9477_dev_ops);
> + int ret, i;
> + struct phy_device *phydev;
> +
> + ret = ksz_switch_register(dev, &ksz9
When doing "ip link set dev ... up" for a ksz9477 backed link,
ksz9477_phy_setup is called and it calls phy_remove_link_mode to remove
1000baseT HDX. During phy_remove_link_mode, phy_advertise_supported is
called. Doing so reverts any previous change to advertised link modes
e.g. using a udevd .lin