net: phy: icplus: fix paged register access
authorMichael Walle <michael@walle.cc>
Thu, 11 Feb 2021 07:47:48 +0000 (08:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Feb 2021 21:53:26 +0000 (13:53 -0800)
commitf9bc51e6cce2171e4d8f28c575278dfa07085b44
tree839b9acf65719f1a8e5d3f0da93cba9a3afcfdb2
parenteeac7d43d4dd037882a288edb1c9d41f31f142c1
net: phy: icplus: fix paged register access

Registers >= 16 are paged. Be sure to set the page. It seems this was
working for now, because the default is correct for the registers used
in the driver at the moment. But this will also assume, nobody will
change the page select register before linux is started. The page select
register is _not_ reset with a soft reset of the PHY.

To ease the function reuse between the non-paged register space of the
IP101A and the IP101G, add noop read_page()/write_page() callbacks so
the IP101G functions can also be used for the IP101A.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/icplus.c