Skip to contentSkip to conversation

wifi: rtw88: disable ASPM for Lenovo IdeaPad S340-14IWL

PATCH Superseded Ata İlhan Köktürk 3 participants 3 messages Aug 20 – Aug 21 Realtek wireless driver (rtw88)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: rtw88: disable ASPM for Lenovo IdeaPad S340-14IWL

The Lenovo IdeaPad S340-14IWL (DMI product name "81N4") experiences severe connectivity issues with the rtw88 PCIe wireless card when ASPM is enabled. Reported symptoms include frequent disconnections, kernel panics, and the driver failing to load.

The issue can be worked around by either adding pci=noaspm to the kernel command line or by reloading the driver via modprobe. Add a DMI quirk to disable ASPM automatically for this device.

---
 drivers/net/wireless/realtek/rtw88/pci.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/net/wireless/realtek/rtw88/pci.c +9 -0
index a30467228..9df8954d8 100644
@@ -1779,6 +1779,15 @@ static const struct dmi_system_id rtw_pci_quirks[] = {
 		.driver_data = (void *)(BIT(QUIRK_DIS_CAP_PCI_ASPM) |
 					BIT(QUIRK_DIS_CAP_LPS_DEEP)),
 	},
+	{
+		.callback = rtw_pci_disable_caps,
+		.ident = "Lenovo IdeaPad S340-14IWL",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "81N4"),
+		},
+		.driver_data = (void *)(BIT(QUIRK_DIS_CAP_PCI_ASPM)),
+	},
 	{}
 };
 
Signature · 1 line
2.55.0
maintainer
#1 lore raw
Quoted 20 lines · Ata İlhan Köktürk

The Lenovo IdeaPad S340-14IWL (DMI product name "81N4") experiences severe connectivity issues with the rtw88 PCIe wireless card when ASPM is enabled. Reported symptoms include frequent disconnections, kernel panics, and the driver failing to load.

The issue can be worked around by either adding pci=noaspm to the kernel command line or by reloading the driver via modprobe. Add a DMI quirk to disable ASPM automatically for this device.

---
 drivers/net/wireless/realtek/rtw88/pci.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/net/wireless/realtek/rtw88/pci.c +0 -0
index a30467228..9df8954d8 100644
@@ -1779,6 +1779,15 @@ static const struct dmi_system_id rtw_pci_quirks[] = {
                .driver_data = (void *)(BIT(QUIRK_DIS_CAP_PCI_ASPM) |

drivers/net/wireless/realtek/rtw88/pci.c static const struct dmi_system_id rtw_pci_quirks[] = { · line 1789

Quoted 10 lines
drivers/net/wireless/realtek/rtw88/pci.c +8 -0
                                        BIT(QUIRK_DIS_CAP_LPS_DEEP)),
        },
+       {
+               .callback = rtw_pci_disable_caps,
+               .ident = "Lenovo IdeaPad S340-14IWL",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "81N4"),
+               },
+               .driver_data = (void *)(BIT(QUIRK_DIS_CAP_PCI_ASPM)),

Remove redundant parenthesis.

.driver_data = (void *)BIT(QUIRK_DIS_CAP_PCI_ASPM),

Quoted 6 lines
drivers/net/wireless/realtek/rtw88/pci.c +1 -1
+       },
        {}
 };
 
--

2.55.0

#2 lore raw
In reply to Ata İlhan Köktürk
Quoted 24 lines · Ata İlhan Köktürk

The Lenovo IdeaPad S340-14IWL (DMI product name "81N4") experiences severe connectivity issues with the rtw88 PCIe wireless card when ASPM is enabled. Reported symptoms include frequent disconnections, kernel panics, and the driver failing to load.

The issue can be worked around by either adding pci=noaspm to the kernel command line or by reloading the driver via modprobe. Add a DMI quirk to disable ASPM automatically for this device.

---
 drivers/net/wireless/realtek/rtw88/pci.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/net/wireless/realtek/rtw88/pci.c +2 -0
index a30467228..9df8954d8 100644
@@ -1779,6 +1779,15 @@ static const struct dmi_system_id rtw_pci_quirks[] = {
 		.driver_data = (void *)(BIT(QUIRK_DIS_CAP_PCI_ASPM) |
 					BIT(QUIRK_DIS_CAP_LPS_DEEP)),
 	},
+	{
+		.callback = rtw_pci_disable_caps,

drivers/net/wireless/realtek/rtw88/pci.c static const struct dmi_system_id rtw_pci_quirks[] = { · line 1793

Quoted 10 lines
drivers/net/wireless/realtek/rtw88/pci.c +7 -0
+		.ident = "Lenovo IdeaPad S340-14IWL",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "81N4"),
+		},
+		.driver_data = (void *)(BIT(QUIRK_DIS_CAP_PCI_ASPM)),
+	},
 	{}
 };
 

By the way, what wifi chip do you have? It would be good to mention that in the summary.