]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: at803x: select correct page on config init
authorDavid Bauer <mail@david-bauer.net>
Thu, 15 Apr 2021 01:26:50 +0000 (03:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Apr 2021 23:49:32 +0000 (16:49 -0700)
commita627ec63d05bdbbdee31de63df21e36d22552071
tree399015a121b3e405ca225f1454b88f8e348bf065
parent3b85243e6f821aacb82a3cf454d08bdc723e8714
net: phy: at803x: select correct page on config init

The Atheros AR8031 and AR8033 expose different registers for SGMII/Fiber
as well as the copper side of the PHY depending on the BT_BX_REG_SEL bit
in the chip configure register.

The driver assumes the copper side is selected on probe, but this might
not be the case depending which page was last selected by the
bootloader. Notably, Ubiquiti UniFi bootloaders show this behavior.

Select the copper page when probing to circumvent this.

Signed-off-by: David Bauer <mail@david-bauer.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/at803x.c