]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit408dc7d0ae782583f84eeabc95189849906b35c6
tree839b9acf65719f1a8e5d3f0da93cba9a3afcfdb2
parent717969544352594cc356502dbcc0f1691e8e0d8c
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