Skip to content

Commit 59ecced

Browse files
Chin-Yen LeeDian-Syuan Yang
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. Change-Id: I6a49929c0e4e3ee8b8e10345ea04a0211d0e3e37 Signed-off-by: Chin-Yen Lee <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 932957b commit 59ecced

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
@@ -4084,6 +4084,15 @@ static void rtw89_pci_l1ss_cfg(struct rtw89_dev *rtwdev)
40844084
rtw89_pci_l1ss_set(rtwdev, true);
40854085
}
40864086

4087+
static void rtw89_pci_cpl_timeout_cfg(struct rtw89_dev *rtwdev)
4088+
{
4089+
struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv;
4090+
struct pci_dev *pdev = rtwpci->pdev;
4091+
4092+
pcie_capability_set_word(pdev, PCI_EXP_DEVCTL2,
4093+
PCI_EXP_DEVCTL2_COMP_TMOUT_DIS);
4094+
}
4095+
40874096
static int rtw89_pci_poll_io_idle_ax(struct rtw89_dev *rtwdev)
40884097
{
40894098
int ret = 0;
@@ -4302,6 +4311,7 @@ void rtw89_pci_basic_cfg(struct rtw89_dev *rtwdev, bool resume)
43024311

43034312
rtw89_pci_disable_eq(rtwdev);
43044313
rtw89_pci_filter_out(rtwdev);
4314+
rtw89_pci_cpl_timeout_cfg(rtwdev);
43054315
rtw89_pci_link_cfg(rtwdev);
43064316
rtw89_pci_l1ss_cfg(rtwdev);
43074317
}

0 commit comments

Comments
 (0)