From 8197f03c0b5a46fd589ec008b407c5a9b0b6d4ba Mon Sep 17 00:00:00 2001 From: Denis Kirjanov Date: Apr 17 2023 13:40:06 +0000 Subject: net: phy: realtek: Use the dummy stubs for MMD register access for rtl8211b (git-fixes). --- diff --git a/patches.suse/net-phy-realtek-Use-the-dummy-stubs-for-MMD-register.patch b/patches.suse/net-phy-realtek-Use-the-dummy-stubs-for-MMD-register.patch new file mode 100644 index 0000000..4301dd9 --- /dev/null +++ b/patches.suse/net-phy-realtek-Use-the-dummy-stubs-for-MMD-register.patch @@ -0,0 +1,42 @@ +From 9be73bb093813473a80b4d14b01cdf5de76991f1 Mon Sep 17 00:00:00 2001 +From: Kevin Hao +Date: Tue, 20 Mar 2018 09:44:53 +0800 +Subject: [PATCH 1/2] net: phy: realtek: Use the dummy stubs for MMD register + access for rtl8211b +Git-commit: 0231b1a074c672f8c00da00a57144072890d816b +Patch-mainline: v4.16-rc7 +References: git-fixes + +The Ethernet on mpc8315erdb is broken since commit b6b5e8a69118 +("gianfar: Disable EEE autoneg by default"). The reason is that +even though the rtl8211b doesn't support the MMD extended registers +access, it does return some random values if we trying to access +the MMD register via indirect method. This makes it seem that the +EEE is supported by this phy device. And the subsequent writing to +the MMD registers does cause the phy malfunction. So use the dummy +stubs for the MMD register access to fix this issue. + +Fixes: b6b5e8a69118 ("gianfar: Disable EEE autoneg by default") +Signed-off-by: Kevin Hao +Signed-off-by: David S. Miller +Signed-off-by: Denis Kirjanov +--- + drivers/net/phy/realtek.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c +index e221feb58d9f..f75c94daf3c2 100644 +--- a/drivers/net/phy/realtek.c ++++ b/drivers/net/phy/realtek.c +@@ -177,6 +177,8 @@ static struct phy_driver realtek_drvs[] = { + .flags = PHY_HAS_INTERRUPT, + .ack_interrupt = &rtl821x_ack_interrupt, + .config_intr = &rtl8211b_config_intr, ++ .read_mmd = &genphy_read_mmd_unsupported, ++ .write_mmd = &genphy_write_mmd_unsupported, + }, { + .phy_id = 0x001cc914, + .name = "RTL8211DN Gigabit Ethernet", +-- +2.16.4 + diff --git a/series.conf b/series.conf index 397fa23..31a8a93 100644 --- a/series.conf +++ b/series.conf @@ -25618,6 +25618,7 @@ patches.suse/batman-adv-fix-header-size-check-in-batadv_dbg_arp.patch patches.suse/batman-adv-Fix-skbuff-rcsum-on-packet-reroute.patch patches.suse/net-phy-Add-general-dummy-stubs-for-MMD-register-acc.patch + patches.suse/net-phy-realtek-Use-the-dummy-stubs-for-MMD-register.patch patches.suse/s390-qeth-free-netdevice-when-removing-a-card.patch patches.suse/s390-qeth-when-thread-completes-wake-up-all-waiters.patch patches.suse/s390-qeth-lock-read-device-while-queueing-next-buffe.patch