]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: realtek: fix RTL8211F interrupt mode
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 12 Nov 2017 15:16:04 +0000 (16:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Nov 2017 12:33:50 +0000 (21:33 +0900)
commit02f2c1edf7a0d23ba159d8919d914eb1e18f0856
tree0bf6655b71771abfe6aa572b23f47c9d9f68cefc
parent73770f4d3acbbc8b0e5000cb12619e3ffbb10910
net: phy: realtek: fix RTL8211F interrupt mode

After commit b94d22d94ad22 "ARM64: dts: meson-gx: add external PHY
interrupt on some platforms" ethernet stopped working on my Odroid-C2
which has a RTL8211F phy.

It turned out that no interrupts were triggered. Further analysis
showed the register INER can't be altered on page 0.
Because register INSR needs to be accessed via page 0xa43 I assumed
that register INER needs to be accessed via some page too.
Some brute force check resulted in page 0xa42 being the right one.

With this patch the phy is working properly in interrupt mode.

Fixes: 458e34ee8dc9 ("net/phy: Add support for Realtek RTL8211F")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/realtek.c