Re: [PATCH] net: phy: Trigger link_change_notify on PHY_HALTED

2021-01-05 Thread Heiner Kallweit
On 05.01.2021 17:11, Marek Vasut wrote: > In case the PHY transitions to PHY_HALTED state in phy_stop(), the > link_change_notify callback is not triggered. That's because the > phydev->state = PHY_HALTED in phy_stop() is assigned first, and > phy_state_machine() is called afterward. For phy_state_

Re: [PATCH] net: phy: Trigger link_change_notify on PHY_HALTED

2021-01-05 Thread Heiner Kallweit
On 05.01.2021 18:05, Russell King - ARM Linux admin wrote: > On Tue, Jan 05, 2021 at 05:58:21PM +0100, Heiner Kallweit wrote: >> On 05.01.2021 17:11, Marek Vasut wrote: >>> @@ -1021,8 +1022,17 @@ void phy_stop(struct phy_device *phydev) >>> if (phydev->sfp_bus) >>> sfp_upstream_stop

Re: [PATCH] net: phy: Trigger link_change_notify on PHY_HALTED

2021-01-05 Thread Russell King - ARM Linux admin
On Tue, Jan 05, 2021 at 05:58:21PM +0100, Heiner Kallweit wrote: > On 05.01.2021 17:11, Marek Vasut wrote: > > @@ -1021,8 +1022,17 @@ void phy_stop(struct phy_device *phydev) > > if (phydev->sfp_bus) > > sfp_upstream_stop(phydev->sfp_bus); > > > > + old_state = phydev->state; >

Re: [PATCH] net: phy: Trigger link_change_notify on PHY_HALTED

2021-01-05 Thread Heiner Kallweit
On 05.01.2021 17:11, Marek Vasut wrote: > In case the PHY transitions to PHY_HALTED state in phy_stop(), the > link_change_notify callback is not triggered. That's because the > phydev->state = PHY_HALTED in phy_stop() is assigned first, and > phy_state_machine() is called afterward. For phy_state_

[PATCH] net: phy: Trigger link_change_notify on PHY_HALTED

2021-01-05 Thread Marek Vasut
In case the PHY transitions to PHY_HALTED state in phy_stop(), the link_change_notify callback is not triggered. That's because the phydev->state = PHY_HALTED in phy_stop() is assigned first, and phy_state_machine() is called afterward. For phy_state_machine(), no state transition happens, because