Skip to content

Commit 453a778

Browse files
hkallweitdavem330
authored andcommitted
r8169: don't advertise pause in jumbo mode
It has been reported [0] that using pause frames in jumbo mode impacts performance. There's no available chip documentation, but vendor drivers r8168 and r8125 don't advertise pause in jumbo mode. So let's do the same, according to Roman it fixes the issue. [0] https://bugzilla.kernel.org/show_bug.cgi?id=212617 Fixes: 9cf9b84 ("r8169: make use of phy_set_asym_pause") Reported-by: Roman Mamedov <rm+bko@romanrm.net> Tested-by: Roman Mamedov <rm+bko@romanrm.net> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 16756d3 commit 453a778

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2350,6 +2350,13 @@ static void rtl_jumbo_config(struct rtl8169_private *tp)
23502350

23512351
if (pci_is_pcie(tp->pci_dev) && tp->supports_gmii)
23522352
pcie_set_readrq(tp->pci_dev, readrq);
2353+
2354+
/* Chip doesn't support pause in jumbo mode */
2355+
linkmode_mod_bit(ETHTOOL_LINK_MODE_Pause_BIT,
2356+
tp->phydev->advertising, !jumbo);
2357+
linkmode_mod_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
2358+
tp->phydev->advertising, !jumbo);
2359+
phy_start_aneg(tp->phydev);
23532360
}
23542361

23552362
DECLARE_RTL_COND(rtl_chipcmd_cond)
@@ -4630,8 +4637,6 @@ static int r8169_phy_connect(struct rtl8169_private *tp)
46304637
if (!tp->supports_gmii)
46314638
phy_set_max_speed(phydev, SPEED_100);
46324639

4633-
phy_support_asym_pause(phydev);
4634-
46354640
phy_attached_info(phydev);
46364641

46374642
return 0;

0 commit comments

Comments
 (0)