]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit06d5f3441b2e80eeb6deb0885aefa00589e463c1
treed5b1e04d66cffe9b3dafdf2b923c30e055e9c437
parent2d880b8709c013d47472f85a9d42ea1aca3bce47
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: 5502b218e001 ("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