lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <963fc5bc39314dc49faa719b03a79ad4@realtek.com>
Date:   Mon, 13 Dec 2021 09:04:22 +0000
From:   Pkshih <pkshih@...ltek.com>
To:     Jian-Hong Pan <jhp@...lessos.org>,
        Bernie Huang <phhuang@...ltek.com>,
        Kai-Heng Feng <kai.heng.feng@...onical.com>,
        Yan-Hsuan Chuang <tony0620emma@...il.com>,
        Kalle Valo <kvalo@...eaurora.org>
CC:     "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux@...lessos.org" <linux@...lessos.org>
Subject: RE: [PATCH] rtw88: pci: turn off PCI ASPM during NAPI polling


> -----Original Message-----
> From: Jian-Hong Pan <jhp@...lessos.org>
> Sent: Monday, December 13, 2021 4:09 PM
> To: Pkshih <pkshih@...ltek.com>; Bernie Huang <phhuang@...ltek.com>; Kai-Heng Feng
> <kai.heng.feng@...onical.com>; Yan-Hsuan Chuang <tony0620emma@...il.com>; Kalle Valo
> <kvalo@...eaurora.org>
> Cc: linux-wireless@...r.kernel.org; netdev@...r.kernel.org; linux-kernel@...r.kernel.org;
> linux@...lessos.org; Jian-Hong Pan <jhp@...lessos.org>
> Subject: [PATCH] rtw88: pci: turn off PCI ASPM during NAPI polling
> 
> 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@...lessos.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;
>  }

I think we need to add ref_cnt and only do this thing on specific chip and platform [1].

[1] https://lore.kernel.org/linux-wireless/e78b81f3a73c45b59f4c4d9f5b414508@realtek.com/T/#m95b22af523ea801fdb84225b87a84ca4f04bb33d

--
Ping-Ke

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ