realtek: phy: keep register state during RTL8214FC fibre check
Reading the fibre status of a RTL8214FC needs access to the
page register (31) and the extended page register (30).
The current implementation has two issues.
- The extended page register is not restored after changes
- Instead of register 30 its write-only sibling 29 is used.
This has the following side effect:
During regular polling kernel calls rtl8214fc_read_status
and determines the media status via __rtl8214fc_media_is_fibre.
Writing to register 29 a copy of that value is handed over
to register 30. This makes use of mdio tools for the first
port of the RTL8214FC hard. Register 30 is overwritten with
zero every second.
Change access from register 29 to register 30 and adapt
the sequence to restore register 30 contents at the end.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21393
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>