]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: initialise phydev speed and duplex sanely
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 22 Nov 2019 15:23:23 +0000 (15:23 +0000)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 23 Nov 2019 18:46:41 +0000 (10:46 -0800)
commit780df603a8231cb385151ee2783772497d5352bd
tree457880c2e26fce15a61f19a6eba8dccc3c4c31a6
parent111879172023dcae8eb881d99b228412d35ae609
net: phy: initialise phydev speed and duplex sanely

When a phydev is created, the speed and duplex are set to zero and
-1 respectively, rather than using the predefined SPEED_UNKNOWN and
DUPLEX_UNKNOWN constants.

There is a window at initialisation time where we may report link
down using the 0/-1 values.  Tidy this up and use the predefined
constants, so debug doesn't complain with:

"Unsupported (update phy-core.c)/Unsupported (update phy-core.c)"

when the speed and duplex settings are printed.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/phy/phy_device.c