From 1c2365978cadfee9d312e349ae67aa6f379138d2 Mon Sep 17 00:00:00 2001 From: Hayes Wang Date: Sat, 27 Mar 2021 03:28:04 +0000 Subject: [PATCH] r8169: fix r8168fp_adjust_ocp_cmd function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit stable inclusion from stable-5.10.24 commit cab735320fe92b40d1f69b93a20694117aa2d5a5 bugzilla: 51348 -------------------------------- commit abbf9a0ef8848dca58c5b97750c1c59bbee45637 upstream. The (0xBAF70000 & 0x00FFF000) << 6 should be (0xf70 << 18). Fixes: 561535b0f239 ("r8169: fix OCP access on RTL8117") Signed-off-by: Hayes Wang Acked-by: Heiner Kallweit Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman Signed-off-by: Chen Jun Acked-by:  Weilong Chen Signed-off-by: Zheng Zengkai --- drivers/net/ethernet/realtek/r8169_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index b7d5eaa70a67..1591715c9717 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -1042,7 +1042,7 @@ static void r8168fp_adjust_ocp_cmd(struct rtl8169_private *tp, u32 *cmd, int typ { /* based on RTL8168FP_OOBMAC_BASE in vendor driver */ if (tp->mac_version == RTL_GIGA_MAC_VER_52 && type == ERIAR_OOB) - *cmd |= 0x7f0 << 18; + *cmd |= 0xf70 << 18; } DECLARE_RTL_COND(rtl_eriar_cond) -- GitLab