]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: fix too strict check in phy_start_aneg
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 9 Jan 2019 19:34:56 +0000 (20:34 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Jan 2019 21:33:44 +0000 (13:33 -0800)
commit46f77d053fe547615ce02221e1a21e6f42902a2e
tree4f1203cdd10f6b4fa5cec836d7fd08d60a406974
parent264bc618dcc71acd41e8f68f7851fa74201a773d
net: phy: fix too strict check in phy_start_aneg

When adding checks to detect wrong usage of the phylib API we added
a check to phy_start_aneg() which is too strict. If the phylib
state machine is in state PHY_HALTED we should allow reconfiguring
and restarting aneg, and just don't touch the state.

Fixes: 554406ff9b5d ("net: phy: improve phy state checking")
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c