]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: mscc: restore the base page in vsc8514/8584_config_init
authorAntoine Tenart <antoine.tenart@bootlin.com>
Thu, 25 Jun 2020 15:42:09 +0000 (17:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Jun 2020 23:22:11 +0000 (16:22 -0700)
commita8275c89977bdfe039b5420a9ae3c86bc198c5bd
treefe47de5c28b4ad2cd13bb5a792e7cd88d8732428
parenta32a84cc82e073000c42c64f1366796d3df3efe4
net: phy: mscc: restore the base page in vsc8514/8584_config_init

In the vsc8584_config_init and vsc8514_config_init, the base page is set
to 'GPIO', configuration is done, and the page is never explicitly
restored to the standard page. No bug was triggered as it turns out
helpers called in those config_init functions do modify the base page,
and set it back to standard. But that is dangerous and any modification
to those functions would introduce bugs. This patch fixes this, to
improve maintenance, by restoring the base page to 'standard' once
'GPIO' accesses are completed.

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mscc/mscc_main.c