wifi: rtw89: pci: disable D3cold on ASUS ExpertBook B3/P3 series
Ping-Ke Shih
maintainerPATCH 1/1 wifi: rtw89: pci: disable D3cold on ASUS ExpertBook B3/P3 series
From: Chin-Yen Lee <[email protected]>
ASUS ExpertBook models (B3406CMA, B3606CMA, P3406CMA, and P3606CMA) may encounter PCIe link loss or recovery issues after entering the L2 low-power state associated with D3cold.
Prevent these affected platforms from entering D3cold to avoid the problematic PCIe L2 state transition.
Add a DMI quirk match table so that other non-affected platforms can continue utilizing D3cold power saving.
--- drivers/net/wireless/realtek/rtw89/pci.c | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+)
drivers/net/wireless/realtek/rtw89/pci.c +44 -0
@@ -4766,6 +4766,49 @@ static const struct rtw89_hci_ops rtw89_pci_ops = { .rst_bdram = rtw89_pci_reset_bdram, }; +static void rtw89_pci_d3cold_quirks (struct rtw89_dev *rtwdev,struct pci_dev *pdev) +{ +static const struct dmi_system_id d3cold_quirks[] = { + { + .ident ="ASUS EXPERTBOOK B3406CMA" , + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"ASUS" ), +DMI_MATCH (DMI_BOARD_NAME ,"B3406CMA" ), + }, + }, + { + .ident ="ASUS EXPERTBOOK B3606CMA" , + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"ASUS" ), +DMI_MATCH (DMI_BOARD_NAME ,"B3606CMA" ), + }, + }, + { + .ident ="ASUS EXPERTBOOK P3406CMA" , + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"ASUS" ), +DMI_MATCH (DMI_BOARD_NAME ,"P3406CMA" ), + }, + }, + { + .ident ="ASUS EXPERTBOOK P3606CMA" , + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"ASUS" ), +DMI_MATCH (DMI_BOARD_NAME ,"P3606CMA" ), + }, + }, + {}, + }; +const struct dmi_system_id *match; + + match =dmi_first_match (d3cold_quirks); +if (!match) +return ; + +rtw89_debug (rtwdev,RTW89_DBG_STATE ,"Disable D3Cold on %s\n" , match->ident); +pci_d3cold_disable (pdev); +} +int rtw89_pci_probe (struct pci_dev *pdev,const struct pci_device_id *id) {struct rtw89_dev *rtwdev;
@@ -4791,6 +4834,7 @@ int rtw89_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) rtwdev->hci.rpwm_addr = pci_info->rpwm_addr; rtwdev->hci.cpwm_addr = pci_info->cpwm_addr; +rtw89_pci_d3cold_quirks (rtwdev, pdev);rtw89_check_quirks (rtwdev, info->quirks);rtw89_check_pci_ssid_quirks (rtwdev, pdev, pci_info->ssid_quirks);
base-commit: f71dd599a98182d6bc34dce39977f928068ecd64
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerQuoted 6 lines · Ping-Ke Shih
From: Chin-Yen Lee <[email protected]>
ASUS ExpertBook models (B3406CMA, B3606CMA, P3406CMA, and P3606CMA) may encounter PCIe link loss or recovery issues after entering the L2 low-power state associated with D3cold.
Quoted 8 lines
Prevent these affected platforms from entering D3cold to avoid the problematic PCIe L2 state transition.
Add a DMI quirk match table so that other non-affected platforms can continue utilizing D3cold power saving.
Signed-off-by Chin-Yen Lee <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
8cf894e2c693 wifi: rtw89: pci: disable D3cold on ASUS ExpertBook B3/P3 series