]> git.baikalelectronics.ru Git - kernel.git/commit
rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Wed, 15 Dec 2021 11:46:34 +0000 (19:46 +0800)
committerKalle Valo <kvalo@kernel.org>
Mon, 20 Dec 2021 18:48:10 +0000 (20:48 +0200)
commitc7733e27e9e73345a711c070417225e71ad79a15
treee05316b6b76c3b27475824b0ba98547b6202c7c5
parentee3348c606672175d61db8011e6541ef57285aef
rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE

Many Intel based platforms face system random freeze after commit
9f989e37c55f ("rtw88: add napi support").

The commit itself shouldn't be the culprit. My guess is that the 8821CE
only leaves ASPM L1 for a short period when IRQ is raised. Since IRQ is
masked during NAPI polling, the PCIe link stays at L1 and makes RX DMA
extremely slow. Eventually the RX ring becomes messed up:
[ 1133.194697] rtw_8821ce 0000:02:00.0: pci bus timeout, check dma status

Since the 8821CE hardware may fail to leave ASPM L1, manually do it in
the driver to resolve the issue.

Fixes: 9f989e37c55f ("rtw88: add napi support")
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=215131
BugLink: https://bugs.launchpad.net/bugs/1927808
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Jian-Hong Pan <jhp@endlessos.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20211215114635.333767-1-kai.heng.feng@canonical.com
drivers/net/wireless/realtek/rtw88/pci.c
drivers/net/wireless/realtek/rtw88/pci.h