Re: [PATCH net-next v2 2/4] net: phy: warn if phy_start is called from invalid state

2019-01-21 Thread Heiner Kallweit
On 21.01.2019 19:29, Andrew Lunn wrote: >> For all invalid states phy_start() basically was a no-op. All it did was >> triggering a state machine run, but for all "running" states the poll >> loop was active anyway. And if called from PHY_DOWN, the state machine >> does nothing. Therefore I see no

Re: [PATCH net-next v2 2/4] net: phy: warn if phy_start is called from invalid state

2019-01-21 Thread Andrew Lunn
> For all invalid states phy_start() basically was a no-op. All it did was > triggering a state machine run, but for all "running" states the poll > loop was active anyway. And if called from PHY_DOWN, the state machine > does nothing. Therefore I see no scenario where jumping to out would > break

Re: [PATCH net-next v2 2/4] net: phy: warn if phy_start is called from invalid state

2019-01-21 Thread Heiner Kallweit
On 21.01.2019 17:40, Andrew Lunn wrote: > On Sun, Jan 20, 2019 at 10:02:13AM +0100, Heiner Kallweit wrote: >> phy_start() should be called from states PHY_READY or PHY_HALTED only. >> Check for this to detect misbehaving drivers. Also the state machine >> should be started only when being called fr

Re: [PATCH net-next v2 2/4] net: phy: warn if phy_start is called from invalid state

2019-01-21 Thread Andrew Lunn
On Sun, Jan 20, 2019 at 10:02:13AM +0100, Heiner Kallweit wrote: > phy_start() should be called from states PHY_READY or PHY_HALTED only. > Check for this to detect misbehaving drivers. Also the state machine > should be started only when being called from one of the valid states. > > Signed-off-b

[PATCH net-next v2 2/4] net: phy: warn if phy_start is called from invalid state

2019-01-20 Thread Heiner Kallweit
phy_start() should be called from states PHY_READY or PHY_HALTED only. Check for this to detect misbehaving drivers. Also the state machine should be started only when being called from one of the valid states. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy.c | 11 +-- 1 file cha