Re: FAILED: patch "[PATCH] r8169: don't advertise pause in jumbo mode" failed to apply to 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18.04.2021 12:36, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> 
> The patch below does not apply to the 5.4-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@xxxxxxxxxxxxxxx>.
> 
> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
>>From 453a77894efa4d9b6ef9644d74b9419c47ac427c Mon Sep 17 00:00:00 2001
> From: Heiner Kallweit <hkallweit1@xxxxxxxxx>
> Date: Wed, 14 Apr 2021 10:47:10 +0200
> Subject: [PATCH] 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: 9cf9b84cc701 ("r8169: make use of phy_set_asym_pause")
> Reported-by: Roman Mamedov <rm+bko@xxxxxxxxxxx>
> Tested-by: Roman Mamedov <rm+bko@xxxxxxxxxxx>
> Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
> 
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index 581a92fc3292..1df2c002c9f6 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -2350,6 +2350,13 @@ static void rtl_jumbo_config(struct rtl8169_private *tp)
>  
>  	if (pci_is_pcie(tp->pci_dev) && tp->supports_gmii)
>  		pcie_set_readrq(tp->pci_dev, readrq);
> +
> +	/* Chip doesn't support pause in jumbo mode */
> +	linkmode_mod_bit(ETHTOOL_LINK_MODE_Pause_BIT,
> +			 tp->phydev->advertising, !jumbo);
> +	linkmode_mod_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
> +			 tp->phydev->advertising, !jumbo);
> +	phy_start_aneg(tp->phydev);
>  }
>  
>  DECLARE_RTL_COND(rtl_chipcmd_cond)
> @@ -4630,8 +4637,6 @@ static int r8169_phy_connect(struct rtl8169_private *tp)
>  	if (!tp->supports_gmii)
>  		phy_set_max_speed(phydev, SPEED_100);
>  
> -	phy_support_asym_pause(phydev);
> -
>  	phy_attached_info(phydev);
>  
>  	return 0;
> 

>From 90501465d4f9be209587047db1560a310a9fce1b Mon Sep 17 00:00:00 2001
From: Heiner Kallweit <hkallweit1@xxxxxxxxx>
Date: Sun, 18 Apr 2021 17:42:13 +0200
Subject: [PATCH] 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: 9cf9b84cc701 ("r8169: make use of phy_set_asym_pause")
Reported-by: Roman Mamedov <rm+bko@xxxxxxxxxxx>
Tested-by: Roman Mamedov <rm+bko@xxxxxxxxxxx>
Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
---
 drivers/net/ethernet/realtek/r8169_main.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 1e8244ec5b33..d61fb63da340 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -4175,6 +4175,13 @@ static void rtl_jumbo_config(struct rtl8169_private *tp, int mtu)
 		rtl_hw_jumbo_enable(tp);
 	else
 		rtl_hw_jumbo_disable(tp);
+
+	/* Chip doesn't support pause in jumbo mode */
+	linkmode_mod_bit(ETHTOOL_LINK_MODE_Pause_BIT,
+			 tp->phydev->advertising, mtu <= ETH_DATA_LEN);
+	linkmode_mod_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
+			 tp->phydev->advertising, mtu <= ETH_DATA_LEN);
+	phy_start_aneg(tp->phydev);
 }
 
 DECLARE_RTL_COND(rtl_chipcmd_cond)
@@ -6366,8 +6373,6 @@ static int r8169_phy_connect(struct rtl8169_private *tp)
 	if (!tp->supports_gmii)
 		phy_set_max_speed(phydev, SPEED_100);
 
-	phy_support_asym_pause(phydev);
-
 	phy_attached_info(phydev);
 
 	return 0;
-- 
2.31.1




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux