]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: pci: not disable PCI completion timeout control for a variant of RTL8922DE
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 15 May 2026 01:44:25 +0000 (09:44 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 25 May 2026 05:56:09 +0000 (13:56 +0800)
The variant of RTL8922DE change the design, and no need to disable PCI
completion timeout. Apply the setting accordingly.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260515014433.16168-6-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/pci.c

index f7107dc05b71aec184cc36d9124d786c61303c1d..fe1152c560bd34a9b3593d1fd2f9852fc40a3b29 100644 (file)
@@ -4380,10 +4380,20 @@ static void rtw89_pci_l1ss_cfg(struct rtw89_dev *rtwdev)
 static void rtw89_pci_cpl_timeout_cfg(struct rtw89_dev *rtwdev)
 {
        struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv;
+       enum rtw89_core_chip_id chip_id = rtwdev->chip->chip_id;
+       struct rtw89_hal *hal = &rtwdev->hal;
        struct pci_dev *pdev = rtwpci->pdev;
+       bool dis = true;
+
+       if (chip_id == RTL8922D && hal->cid == RTL8922D_CID7090)
+               dis = false;
 
-       pcie_capability_set_word(pdev, PCI_EXP_DEVCTL2,
-                                PCI_EXP_DEVCTL2_COMP_TMOUT_DIS);
+       if (dis)
+               pcie_capability_set_word(pdev, PCI_EXP_DEVCTL2,
+                                        PCI_EXP_DEVCTL2_COMP_TMOUT_DIS);
+       else
+               pcie_capability_clear_word(pdev, PCI_EXP_DEVCTL2,
+                                          PCI_EXP_DEVCTL2_COMP_TMOUT_DIS);
 }
 
 static int rtw89_pci_poll_io_idle_ax(struct rtw89_dev *rtwdev)