netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtw88: pci: turn off PCI ASPM during NAPI polling
@ 2021-12-13  8:09 Jian-Hong Pan
  2021-12-13  9:04 ` Pkshih
  0 siblings, 1 reply; 2+ messages in thread
From: Jian-Hong Pan @ 2021-12-13  8:09 UTC (permalink / raw)
  To: Ping-Ke Shih, Po-Hao Huang, Kai-Heng Feng, Yan-Hsuan Chuang,
	Kalle Valo
  Cc: linux-wireless, netdev, linux-kernel, linux, Jian-Hong Pan

The system on the machines equipped with RTL8821CE freezes randomly
until the PCI ASPM is disabled during NAPI poll function.

Link: https://www.spinics.net/lists/linux-wireless/msg218387.html
Fixes: 9e2fd29864c5 ("rtw88: add napi support")
Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
---
 drivers/net/wireless/realtek/rtw88/pci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c
index a7a6ebfaa203..a6fdddecd37d 100644
--- a/drivers/net/wireless/realtek/rtw88/pci.c
+++ b/drivers/net/wireless/realtek/rtw88/pci.c
@@ -1658,6 +1658,7 @@ static int rtw_pci_napi_poll(struct napi_struct *napi, int budget)
 					      priv);
 	int work_done = 0;
 
+	rtw_pci_link_ps(rtwdev, false);
 	while (work_done < budget) {
 		u32 work_done_once;
 
@@ -1681,6 +1682,7 @@ static int rtw_pci_napi_poll(struct napi_struct *napi, int budget)
 		if (rtw_pci_get_hw_rx_ring_nr(rtwdev, rtwpci))
 			napi_schedule(napi);
 	}
+	rtw_pci_link_ps(rtwdev, true);
 
 	return work_done;
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-13  9:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-13  8:09 [PATCH] rtw88: pci: turn off PCI ASPM during NAPI polling Jian-Hong Pan
2021-12-13  9:04 ` Pkshih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).