Skip to contentSkip to conversation

r8169: avoid link-up interrupt issue on RTL8106e if user enables ASPM

PATCH Applied Heiner Kallweit 3 participants 4 messages Jun 10, 2021 – Jun 11, 2021

Subsystems (3)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 r8169: avoid link-up interrupt issue on RTL8106e if user enables ASPM

It has been reported that on RTL8106e the link-up interrupt may be significantly delayed if the user enables ASPM L1. Per default ASPM is disabled. The change leaves L1 enabled on the PCIe link (thus still allowing to reach higher package power saving states), but the NIC won't actively trigger it.

---
 drivers/net/ethernet/realtek/r8169_main.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/realtek/r8169_main.c +0 -1
index 64f94a3fe..6a9fe9f7e 100644
@@ -3508,7 +3508,6 @@ static void rtl_hw_start_8106(struct rtl8169_private *tp)
 	rtl_eri_write(tp, 0x1b0, ERIAR_MASK_0011, 0x0000);
 
 	rtl_pcie_state_l2l3_disable(tp);
-	rtl_hw_aspm_clkreq_enable(tp, true);
 }
 
 DECLARE_RTL_COND(rtl_mac_ocp_e00e_cond)
Signature · 1 line
2.32.0
#1 lore raw
Quoted 19 lines · Heiner Kallweit

It has been reported that on RTL8106e the link-up interrupt may be significantly delayed if the user enables ASPM L1. Per default ASPM is disabled. The change leaves L1 enabled on the PCIe link (thus still allowing to reach higher package power saving states), but the NIC won't actively trigger it.

---
 drivers/net/ethernet/realtek/r8169_main.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/realtek/r8169_main.c +0 -0
index 64f94a3fe..6a9fe9f7e 100644

drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8106(struct rtl8169_private *tp) · line 3511

Quoted 5 lines
drivers/net/ethernet/realtek/r8169_main.c +0 -1
@@ -3508,7 +3508,6 @@ static void rtl_hw_start_8106(struct rtl8169_private *tp)
        rtl_eri_write(tp, 0x1b0, ERIAR_MASK_0011, 0x0000);
 
        rtl_pcie_state_l2l3_disable(tp);
-       rtl_hw_aspm_clkreq_enable(tp, true);
 }

As per 0866cd15029b, this also affects the intel soc idle state. Even the result is positive currently, I think this modification would have higher risk.

Quoted 5 lines
drivers/net/ethernet/realtek/r8169_main.c +0 -1
 DECLARE_RTL_COND(rtl_mac_ocp_e00e_cond)
--

2.32.0

author maintainer
#2 lore raw
Quoted 22 lines · Koba Ko
Quoted 21 lines · Heiner Kallweit

It has been reported that on RTL8106e the link-up interrupt may be significantly delayed if the user enables ASPM L1. Per default ASPM is disabled. The change leaves L1 enabled on the PCIe link (thus still allowing to reach higher package power saving states), but the NIC won't actively trigger it.

---
 drivers/net/ethernet/realtek/r8169_main.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/realtek/r8169_main.c +0 -0
index 64f94a3fe..6a9fe9f7e 100644
@@ -3508,7 +3508,6 @@ static void rtl_hw_start_8106(struct rtl8169_private *tp)
        rtl_eri_write(tp, 0x1b0, ERIAR_MASK_0011, 0x0000);
 
Quoted 8 lines

drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8106(struct rtl8169_private *tp) · line 3511

Quoted 3 lines
drivers/net/ethernet/realtek/r8169_main.c +0 -1
        rtl_pcie_state_l2l3_disable(tp);
-       rtl_hw_aspm_clkreq_enable(tp, true);
 }

As per 0866cd15029b, this also affects the intel soc idle state. Even the result is positive currently, I think this modification would have higher risk.

At the time of 0866cd15029b ASPM was enabled in r8169. Interesting that after 0866cd15029b nobody reported the link-up issue you're facing. A few months later (with b75bb8a5b755) we had to disable ASPM again because of several problem reports. Since then 0866cd15029b has no practical relevance in mainline.

Quoted 5 lines
Quoted 5 lines
drivers/net/ethernet/realtek/r8169_main.c +0 -1
 DECLARE_RTL_COND(rtl_mac_ocp_e00e_cond)
--

2.32.0

#3 lore raw
In reply to Heiner Kallweit
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 11 lines · On Thu, 10 Jun 2021 22:56:59 +0200 you wrote:

It has been reported that on RTL8106e the link-up interrupt may be significantly delayed if the user enables ASPM L1. Per default ASPM is disabled. The change leaves L1 enabled on the PCIe link (thus still allowing to reach higher package power saving states), but the NIC won't actively trigger it.

[...]

Here is the summary with links:
- [net-next] r8169: avoid link-up interrupt issue on RTL8106e if user enables ASPM

    https://git.kernel.org/netdev/net-next/c/1ee8856de82f

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html