]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: Fix verification of EEE support in phy_init_eee
authorGuenter Roeck <linux@roeck-us.net>
Tue, 17 Feb 2015 17:36:22 +0000 (09:36 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Feb 2015 20:29:49 +0000 (15:29 -0500)
commit6ffae8a1dec0937c433c3379409be2dfe3d74a6c
tree0b30ead04b8db4b2cd0ce246b60483ef3ae55657
parenta25cb442d9e4cc3c071c9b7b951e0e8a8b035559
net: phy: Fix verification of EEE support in phy_init_eee

phy_init_eee uses phy_find_setting(phydev->speed, phydev->duplex)
to find a valid entry in the settings array for the given speed
and duplex value. For full duplex 1000baseT, this will return
the first matching entry, which is the entry for 1000baseKX_Full.

If the phy eee does not support 1000baseKX_Full, this entry will not
match, causing phy_init_eee to fail for no good reason.

Fixes: 1a076d807276 ("net: phy: fix a bug when verify the EEE support")
Fixes: b235a967c4a10 ("phy: Expand phy speed/duplex settings array")
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c