]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: at803x: use operating parameters from PHY-specific status
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 4 Oct 2019 16:06:14 +0000 (17:06 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 5 Oct 2019 01:11:08 +0000 (18:11 -0700)
commite98c0fd2969b04fabc5177c1ed683ff11d2d6db9
treed5b1e04d66cffe9b3dafdf2b923c30e055e9c437
parent500fbf41753561ac113cb14cc7b74f9f70cc3cc7
net: phy: at803x: use operating parameters from PHY-specific status

Read the PHY-specific status register for the current operating mode
(speed and duplex) of the PHY.  This register reflects the actual
mode that the PHY has resolved depending on either the advertisements
of autoneg is enabled, or the forced mode if autoneg is disabled.

This ensures that phylib's software state always tracks the hardware
state.

It seems both AR8033 (which uses the AR8031 ID) and AR8035 support
this status register.  AR8030 is not known at the present time.

This patch depends on "net: phy: extract pause mode" and "net: phy:
extract link partner advertisement reading".

Reported-by: tinywrkb <tinywrkb@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: tinywrkb <tinywrkb@gmail.com>
Fixes: 03efb164adbf ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/at803x.c