[PATCH] wifi: rtw88: add quirks to disable PCI ASPM and deep LPS for Dell Vostro 15 3530

Branislav Klocok <[email protected]>
Newsgroups org.kernel.vger.linux-wireless
Message-ID <[email protected]>
On a Dell Vostro 15 3530 with RTL8821CE [10ec:c821] the driver floods the
kernel log with

  rtw88_8821ce 0000:03:00.0: failed to send h2c command

at roughly 220 messages per minute while the interface is associated. On
this machine that amounted to 143704 of 167707 journal lines in a single
day, or 86 percent of everything logged. The association also dropped
its DHCP lease from time to time.

Disabling PCI ASPM and deep LPS makes the messages disappear entirely.
Measured over one continuous hour with the card as the only route out
and 979 MB received / 341 MB transmitted: zero occurrences, against
roughly 13000 per hour before the change. The only rtw88 lines left in
the log for the whole boot are the interface rename, the firmware
version and "enabling device".

The measurement was taken with the rtw88_pci.disable_aspm=1 and
rtw88_core.disable_lps_deep=1 module parameters, which set the same two
variables that rtw_pci_disable_caps() sets for a quirk entry, so the
result carries over unchanged.

DMI on this machine:

  sys_vendor:   Dell Inc.
  product_name: Vostro 15 3530
  product_sku:  0C32
  board_name:   0RRJRM
  BIOS:         1.3.0

Signed-off-by: Branislav Klocok <[email protected]>
---
 drivers/net/wireless/realtek/rtw88/pci.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Compile-tested on openSUSE Tumbleweed 7.1.8 with the equivalent entry, since
the ASUS quirk this patch is based on is not in that tree yet.

--- a/drivers/net/wireless/realtek/rtw88/pci.c
+++ b/drivers/net/wireless/realtek/rtw88/pci.c
@@ -1789,6 +1789,16 @@
 		.driver_data = (void *)(BIT(QUIRK_DIS_CAP_PCI_ASPM) |
 					BIT(QUIRK_DIS_CAP_LPS_DEEP)),
 	},
+	{
+		.callback = rtw_pci_disable_caps,
+		.ident = "Dell Vostro 15 3530",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 15 3530"),
+		},
+		.driver_data = (void *)(BIT(QUIRK_DIS_CAP_PCI_ASPM) |
+					BIT(QUIRK_DIS_CAP_LPS_DEEP)),
+	},
 	{}
 };
 
-- 
2.51.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.