Skip to content

Commit f69ccbc

Browse files
Chin-Yen LeePing-Ke Shih
authored andcommitted
wifi: rtw89: pci: disable PCI completion timeout control
Realtek's chips follow suggestion of PCIe spec to design the max timeout of PCI completion, but some PCIe host reply too slow to meet it and lead PCI AER. Disable PCI completion timeout function via PCI configuration to avoid the AER. Signed-off-by: Chin-Yen Lee <timlee@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241225122804.10214-1-pkshih@realtek.com
1 parent 93b3a45 commit f69ccbc

File tree

1 file changed

+10
-0
lines changed
  • drivers/net/wireless/realtek/rtw89

1 file changed

+10
-0
lines changed

drivers/net/wireless/realtek/rtw89/pci.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4078,6 +4078,15 @@ static void rtw89_pci_l1ss_cfg(struct rtw89_dev *rtwdev)
40784078
rtw89_pci_l1ss_set(rtwdev, true);
40794079
}
40804080

4081+
static void rtw89_pci_cpl_timeout_cfg(struct rtw89_dev *rtwdev)
4082+
{
4083+
struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv;
4084+
struct pci_dev *pdev = rtwpci->pdev;
4085+
4086+
pcie_capability_set_word(pdev, PCI_EXP_DEVCTL2,
4087+
PCI_EXP_DEVCTL2_COMP_TMOUT_DIS);
4088+
}
4089+
40814090
static int rtw89_pci_poll_io_idle_ax(struct rtw89_dev *rtwdev)
40824091
{
40834092
int ret = 0;
@@ -4291,6 +4300,7 @@ void rtw89_pci_basic_cfg(struct rtw89_dev *rtwdev, bool resume)
42914300

42924301
rtw89_pci_disable_eq(rtwdev);
42934302
rtw89_pci_filter_out(rtwdev);
4303+
rtw89_pci_cpl_timeout_cfg(rtwdev);
42944304
rtw89_pci_link_cfg(rtwdev);
42954305
rtw89_pci_l1ss_cfg(rtwdev);
42964306
}

0 commit comments

Comments
 (0)