Commit 6cf73913 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Jakub Kicinski

r8169: fix jumbo packet handling on RTL8168e

Josef reported [0] that using jumbo packets fails on RTL8168e.
Aligning the values for register MaxTxPacketSize with the
vendor driver fixes the problem.

[0] https://bugzilla.kernel.org/show_bug.cgi?id=211827

Fixes: d58d46b5 ("r8169: jumbo fixes.")
Reported-by: default avatarJosef Oškera <joskera@redhat.com>
Tested-by: default avatarJosef Oškera <joskera@redhat.com>
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/b15ddef7-0d50-4320-18f4-6a3f86fbfd3e@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 764d31ca
...@@ -2285,14 +2285,14 @@ static void r8168dp_hw_jumbo_disable(struct rtl8169_private *tp) ...@@ -2285,14 +2285,14 @@ static void r8168dp_hw_jumbo_disable(struct rtl8169_private *tp)
static void r8168e_hw_jumbo_enable(struct rtl8169_private *tp) static void r8168e_hw_jumbo_enable(struct rtl8169_private *tp)
{ {
RTL_W8(tp, MaxTxPacketSize, 0x3f); RTL_W8(tp, MaxTxPacketSize, 0x24);
RTL_W8(tp, Config3, RTL_R8(tp, Config3) | Jumbo_En0); RTL_W8(tp, Config3, RTL_R8(tp, Config3) | Jumbo_En0);
RTL_W8(tp, Config4, RTL_R8(tp, Config4) | 0x01); RTL_W8(tp, Config4, RTL_R8(tp, Config4) | 0x01);
} }
static void r8168e_hw_jumbo_disable(struct rtl8169_private *tp) static void r8168e_hw_jumbo_disable(struct rtl8169_private *tp)
{ {
RTL_W8(tp, MaxTxPacketSize, 0x0c); RTL_W8(tp, MaxTxPacketSize, 0x3f);
RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Jumbo_En0); RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Jumbo_En0);
RTL_W8(tp, Config4, RTL_R8(tp, Config4) & ~0x01); RTL_W8(tp, Config4, RTL_R8(tp, Config4) & ~0x01);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment