mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
rtw88: pci: 8821c: Disable 21ce completion timeout
Disable this capability to avoid timeout errors on certain platforms. Without it, pci bus might stuck and leads to disconnection. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Tested-by: Chris Chiu <chris.chiu@canonical.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220420093058.31646-2-pkshih@realtek.com
This commit is contained in:
@@ -1482,12 +1482,15 @@ static void rtw_pci_interface_cfg(struct rtw_dev *rtwdev)
|
||||
|
||||
static void rtw_pci_phy_cfg(struct rtw_dev *rtwdev)
|
||||
{
|
||||
struct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv;
|
||||
struct rtw_chip_info *chip = rtwdev->chip;
|
||||
struct pci_dev *pdev = rtwpci->pdev;
|
||||
const struct rtw_intf_phy_para *para;
|
||||
u16 cut;
|
||||
u16 value;
|
||||
u16 offset;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
cut = BIT(0) << rtwdev->hal.cut_version;
|
||||
|
||||
@@ -1520,6 +1523,15 @@ static void rtw_pci_phy_cfg(struct rtw_dev *rtwdev)
|
||||
}
|
||||
|
||||
rtw_pci_link_cfg(rtwdev);
|
||||
|
||||
/* Disable 8821ce completion timeout by default */
|
||||
if (chip->id == RTW_CHIP_TYPE_8821C) {
|
||||
ret = pcie_capability_set_word(pdev, PCI_EXP_DEVCTL2,
|
||||
PCI_EXP_DEVCTL2_COMP_TMOUT_DIS);
|
||||
if (ret)
|
||||
rtw_err(rtwdev, "failed to set PCI cap, ret = %d\n",
|
||||
ret);
|
||||
}
|
||||
}
|
||||
|
||||
static int __maybe_unused rtw_pci_suspend(struct device *dev)
|
||||
|
||||
Reference in New Issue
Block a user