r8169: fix page read in r8168g_mdio_read
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 6 Nov 2019 20:51:31 +0000 (21:51 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Nov 2019 05:36:48 +0000 (21:36 -0800)
commit9c6850fea3edefef6e7153b2c466f09155399882
tree20c2f559740a428af9a7523f996f9724b1eab41b
parent58b87d21fe796953a2addc69e26179fb31f792a4
r8169: fix page read in r8168g_mdio_read

Functions like phy_modify_paged() read the current page, on Realtek
PHY's this means reading the value of register 0x1f. Add special
handling for reading this register, similar to what we do already
in r8168g_mdio_write(). Currently we read a random value that by
chance seems to be 0 always.

Fixes: a2928d28643e ("r8169: use paged versions of phylib MDIO access functions")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c