]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: improve link partner capability detection
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 5 Apr 2019 19:23:13 +0000 (21:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2019 22:18:00 +0000 (15:18 -0700)
commit169c9329af59db8a897eb570aaef7c6200ec4a82
tree40d5b903637dd7da005a08448c67a83df4379ef9
parent2229bfeb53a93abbfc5559a74388c6c588678d5a
net: phy: improve link partner capability detection

genphy_read_status() so far checks phydev->supported, not the actual
PHY capabilities. This can make a difference if the supported speeds
have been limited by of_set_phy_supported() or phy_set_max_speed().

It seems that this issue only affects the link partner advertisements
as displayed by ethtool. Also this patch wouldn't apply to older
kernels because linkmode bitmaps have been introduced recently.
Therefore net-next.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c
include/linux/phy.h