Skip to contentSkip to conversation

wifi: rtw89: 8852be: disable PCI D3Cold by quirk for certain platform

PATCH New Ping-Ke Shih 1 participant 1 message Aug 12, 2025 Realtek wireless driver (rtw89)

lore
Share & tools
lore

Ping-Ke Shih

author maintainer
#0 lore raw

PATCH 1/1 wifi: rtw89: 8852be: disable PCI D3Cold by quirk for certain platform

On a platform, RTL8852BE gets lost from suspending, and kernel throws

Unable to change power state from D3cold to D0, device inaccessible

then driver throws

0000:39:00.0: failed to write DBI register, addr=0xB48 0000:39:00.0: failed to write DBI register, addr=0xB48 0000:39:00.0: failed to read PCI cap, ret=134 0000:39:00.0: xtal si not ready(W): offset=90 val=10 mask=10 0000:39:00.0: mac init fail, ret:-110

An solution is to disable d3cold via sysfs to write 1 to

/sys/bus/pci/devices/0000:39:00.0/d3cold_allowed

Since it's hard to measure hardware signals to find cause, add a quirk to disable d3cold for the platform.

---
 drivers/net/wireless/realtek/rtw89/core.h      |  1 +
 drivers/net/wireless/realtek/rtw89/pci.c       |  3 +++
 drivers/net/wireless/realtek/rtw89/rtw8852be.c | 14 +++++++++++++-
 3 files changed, 17 insertions(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw89/core.h +1 -0
index 43e10278e14d..39085c9589da 100644
@@ -5028,6 +5028,7 @@ enum rtw89_flags {
 
 enum rtw89_quirks {
 	RTW89_QUIRK_PCI_BER,
+	RTW89_QUIRK_PCI_NO_D3COLD,
 	RTW89_QUIRK_THERMAL_PROT_120C,
 	RTW89_QUIRK_THERMAL_PROT_110C,
 
drivers/net/wireless/realtek/rtw89/pci.c +3 -0
index a669f2f843aa..c9b93191805d 100644
@@ -3060,6 +3060,9 @@ static int rtw89_pci_claim_device(struct rtw89_dev *rtwdev,
 	pci_set_master(pdev);
 	pci_set_drvdata(pdev, rtwdev->hw);
 
+	if (test_bit(RTW89_QUIRK_PCI_NO_D3COLD, rtwdev->quirks))
+		pci_d3cold_disable(pdev);
+
 	rtwpci->pdev = pdev;
 
 	return 0;
drivers/net/wireless/realtek/rtw89/rtw8852be.c +13 -1
index b0726f590ca2..ea6c129a3422 100644
@@ -65,10 +65,22 @@ static const struct rtw89_pci_info rtw8852b_pci_info = {
 	.ssid_quirks		= NULL,
 };
 
+static const struct dmi_system_id rtw8852b_pci_quirks[] = {
+	{
+		.ident = "ASUS TUF Gaming F16 FX607VUR_FX607VU",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "ASUS TUF Gaming F16 FX607VUR_FX607VU"),
+		},
+		.driver_data = (void *)RTW89_QUIRK_PCI_NO_D3COLD,
+	},
+	{},
+};
+
 static const struct rtw89_driver_info rtw89_8852be_info = {
 	.chip = &rtw8852b_chip_info,
 	.variant = NULL,
-	.quirks = NULL,
+	.quirks = rtw8852b_pci_quirks,
 	.bus = {
 		.pci = &rtw8852b_pci_info,
 	},
Signature · 1 line
2.25.1