Commit b7501b9f authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'r8169-improve-jumbo-configuration'

Heiner Kallweit says:

====================
r8169: improve jumbo configuration

Small improvements to jumbo configuration.
====================

Link: https://lore.kernel.org/r/1dd337a0-ff5a-3fa0-91f5-45e86c0fce58@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 22fe6b04 5e00e16c
...@@ -2341,13 +2341,14 @@ static void r8168b_1_hw_jumbo_disable(struct rtl8169_private *tp) ...@@ -2341,13 +2341,14 @@ static void r8168b_1_hw_jumbo_disable(struct rtl8169_private *tp)
static void rtl_jumbo_config(struct rtl8169_private *tp) static void rtl_jumbo_config(struct rtl8169_private *tp)
{ {
bool jumbo = tp->dev->mtu > ETH_DATA_LEN; bool jumbo = tp->dev->mtu > ETH_DATA_LEN;
int readrq = 4096;
rtl_unlock_config_regs(tp); rtl_unlock_config_regs(tp);
switch (tp->mac_version) { switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_12: case RTL_GIGA_MAC_VER_12:
case RTL_GIGA_MAC_VER_17: case RTL_GIGA_MAC_VER_17:
if (jumbo) { if (jumbo) {
pcie_set_readrq(tp->pci_dev, 512); readrq = 512;
r8168b_1_hw_jumbo_enable(tp); r8168b_1_hw_jumbo_enable(tp);
} else { } else {
r8168b_1_hw_jumbo_disable(tp); r8168b_1_hw_jumbo_disable(tp);
...@@ -2355,7 +2356,7 @@ static void rtl_jumbo_config(struct rtl8169_private *tp) ...@@ -2355,7 +2356,7 @@ static void rtl_jumbo_config(struct rtl8169_private *tp)
break; break;
case RTL_GIGA_MAC_VER_18 ... RTL_GIGA_MAC_VER_26: case RTL_GIGA_MAC_VER_18 ... RTL_GIGA_MAC_VER_26:
if (jumbo) { if (jumbo) {
pcie_set_readrq(tp->pci_dev, 512); readrq = 512;
r8168c_hw_jumbo_enable(tp); r8168c_hw_jumbo_enable(tp);
} else { } else {
r8168c_hw_jumbo_disable(tp); r8168c_hw_jumbo_disable(tp);
...@@ -2368,20 +2369,18 @@ static void rtl_jumbo_config(struct rtl8169_private *tp) ...@@ -2368,20 +2369,18 @@ static void rtl_jumbo_config(struct rtl8169_private *tp)
r8168dp_hw_jumbo_disable(tp); r8168dp_hw_jumbo_disable(tp);
break; break;
case RTL_GIGA_MAC_VER_31 ... RTL_GIGA_MAC_VER_33: case RTL_GIGA_MAC_VER_31 ... RTL_GIGA_MAC_VER_33:
if (jumbo) { if (jumbo)
pcie_set_readrq(tp->pci_dev, 512);
r8168e_hw_jumbo_enable(tp); r8168e_hw_jumbo_enable(tp);
} else { else
r8168e_hw_jumbo_disable(tp); r8168e_hw_jumbo_disable(tp);
}
break; break;
default: default:
break; break;
} }
rtl_lock_config_regs(tp); rtl_lock_config_regs(tp);
if (!jumbo && pci_is_pcie(tp->pci_dev) && tp->supports_gmii) if (pci_is_pcie(tp->pci_dev) && tp->supports_gmii)
pcie_set_readrq(tp->pci_dev, 4096); pcie_set_readrq(tp->pci_dev, readrq);
} }
DECLARE_RTL_COND(rtl_chipcmd_cond) DECLARE_RTL_COND(rtl_chipcmd_cond)
......
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