Re: [PATCH v2] net: dsa: microchip: call phy_remove_link_mode during probe

2020-07-17 Thread Andrew Lunn
On Fri, Jul 17, 2020 at 10:18:52AM +0200, Helmut Grohne wrote: > On Thu, Jul 16, 2020 at 04:10:44PM +0200, Andrew Lunn wrote: > > However, i'm having trouble understanding how PHYs actually work in > > this driver. > > > > We have: > > > > struct ksz_port { > > u16 member; > > u1

Re: [PATCH v2] net: dsa: microchip: call phy_remove_link_mode during probe

2020-07-17 Thread Helmut Grohne
On Thu, Jul 16, 2020 at 04:10:44PM +0200, Andrew Lunn wrote: > However, i'm having trouble understanding how PHYs actually work in > this driver. > > We have: > > struct ksz_port { > u16 member; > u16 vid_member; > int stp_state; > struct phy_device phydev; > > w

Re: [PATCH v2] net: dsa: microchip: call phy_remove_link_mode during probe

2020-07-16 Thread Andrew Lunn
On Thu, Jul 16, 2020 at 02:57:24PM +0200, Helmut Grohne wrote: > 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 rever

[PATCH v2] net: dsa: microchip: call phy_remove_link_mode during probe

2020-07-16 Thread Helmut Grohne
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