]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: add and use phy_check_downshift
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 20 Mar 2020 16:51:38 +0000 (17:51 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2020 04:09:47 +0000 (21:09 -0700)
commit193a0cf224d99303e1644044bf05a73406693830
tree1b1be649227f2a3cd15e40d7c60a9262c1d18a93
parentdbd1951182ae8cb2ee2b3e91de983f7a7d85f8a1
net: phy: add and use phy_check_downshift

So far PHY drivers have to check whether a downshift occurred to be
able to notify the user. To make life of drivers authors a little bit
easier move the downshift notification to phylib. phy_check_downshift()
compares the highest mutually advertised speed with the actual value
of phydev->speed (typically read by the PHY driver from a
vendor-specific register) to detect a downshift.

v2:
- Add downshift hint to phy_print_status

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy-core.c
drivers/net/phy/phy.c
include/linux/phy.h