Patch "r8169: fix rtl8125b PAUSE frames blasting when suspended" has been added to the 5.10-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    r8169: fix rtl8125b PAUSE frames blasting when suspended

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     r8169-fix-rtl8125b-pause-frames-blasting-when-suspen.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1c1575c8ec7937d3007b3ef03b756f59275fa9cd
Author: ChunHao Lin <hau@xxxxxxxxxxx>
Date:   Wed Nov 29 23:53:50 2023 +0800

    r8169: fix rtl8125b PAUSE frames blasting when suspended
    
    [ Upstream commit 4b0768b6556af56ee9b7cf4e68452a2b6289ae45 ]
    
    When FIFO reaches near full state, device will issue pause frame.
    If pause slot is enabled(set to 1), in this time, device will issue
    pause frame only once. But if pause slot is disabled(set to 0), device
    will keep sending pause frames until FIFO reaches near empty state.
    
    When pause slot is disabled, if there is no one to handle receive
    packets, device FIFO will reach near full state and keep sending
    pause frames. That will impact entire local area network.
    
    This issue can be reproduced in Chromebox (not Chromebook) in
    developer mode running a test image (and v5.10 kernel):
    1) ping -f $CHROMEBOX (from workstation on same local network)
    2) run "powerd_dbus_suspend" from command line on the $CHROMEBOX
    3) ping $ROUTER (wait until ping fails from workstation)
    
    Takes about ~20-30 seconds after step 2 for the local network to
    stop working.
    
    Fix this issue by enabling pause slot to only send pause frame once
    when FIFO reaches near full state.
    
    Fixes: f1bce4ad2f1c ("r8169: add support for RTL8125")
    Reported-by: Grant Grundler <grundler@xxxxxxxxxxxx>
    Tested-by: Grant Grundler <grundler@xxxxxxxxxxxx>
    Cc: stable@xxxxxxxxxxxxxxx
    Signed-off-by: ChunHao Lin <hau@xxxxxxxxxxx>
    Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>
    Reviewed-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20231129155350.5843-1-hau@xxxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 88253cedd9d96..c72ff0fd38c42 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -205,6 +205,7 @@ enum rtl_registers {
 					/* No threshold before first PCI xfer */
 #define	RX_FIFO_THRESH			(7 << RXCFG_FIFO_SHIFT)
 #define	RX_EARLY_OFF			(1 << 11)
+#define	RX_PAUSE_SLOT_ON		(1 << 11)	/* 8125b and later */
 #define	RXCFG_DMA_SHIFT			8
 					/* Unlimited maximum PCI burst. */
 #define	RX_DMA_BURST			(7 << RXCFG_DMA_SHIFT)
@@ -2318,9 +2319,13 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp)
 	case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_52:
 		RTL_W32(tp, RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST | RX_EARLY_OFF);
 		break;
-	case RTL_GIGA_MAC_VER_60 ... RTL_GIGA_MAC_VER_63:
+	case RTL_GIGA_MAC_VER_61:
 		RTL_W32(tp, RxConfig, RX_FETCH_DFLT_8125 | RX_DMA_BURST);
 		break;
+	case RTL_GIGA_MAC_VER_63:
+		RTL_W32(tp, RxConfig, RX_FETCH_DFLT_8125 | RX_DMA_BURST |
+			RX_PAUSE_SLOT_ON);
+		break;
 	default:
 		RTL_W32(tp, RxConfig, RX128_INT_EN | RX_DMA_BURST);
 		break;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux