[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAd53p4v+CkEz-qruFr1+-Xu+z=pn1nTic-Jhfa5LN+svc7U-Q@mail.gmail.com>
Date: Tue, 14 Dec 2021 11:19:57 +0800
From: Kai-Heng Feng <kai.heng.feng@...onical.com>
To: Pkshih <pkshih@...ltek.com>
Cc: "tony0620emma@...il.com" <tony0620emma@...il.com>,
"jian-hong@...lessm.com" <jhp@...lessos.org>,
Kalle Valo <kvalo@...eaurora.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Brian Norris <briannorris@...omium.org>,
Bernie Huang <phhuang@...ltek.com>,
"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>
Subject: Re: [PATCH] rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE
On Tue, Dec 14, 2021 at 11:19 AM Pkshih <pkshih@...ltek.com> wrote:
>
>
> > -----Original Message-----
> > From: Kai-Heng Feng <kai.heng.feng@...onical.com>
> > Sent: Tuesday, December 14, 2021 10:49 AM
> > To: tony0620emma@...il.com; Pkshih <pkshih@...ltek.com>
> > Cc: jian-hong@...lessm.com; Kai-Heng Feng <kai.heng.feng@...onical.com>; Kalle Valo
> > <kvalo@...eaurora.org>; David S. Miller <davem@...emloft.net>; Jakub Kicinski <kuba@...nel.org>; Brian
> > Norris <briannorris@...omium.org>; Bernie Huang <phhuang@...ltek.com>; linux-wireless@...r.kernel.org;
> > netdev@...r.kernel.org; linux-kernel@...r.kernel.org
> > Subject: [PATCH] rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE
> >
> > Many Intel based platforms face system random freeze after commit
> > 9e2fd29864c5 ("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: 9e2fd29864c5 ("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@...onical.com>
> > ---
> > drivers/net/wireless/realtek/rtw88/pci.c | 74 ++++++++----------------
> > drivers/net/wireless/realtek/rtw88/pci.h | 1 +
> > 2 files changed, 24 insertions(+), 51 deletions(-)
> >
> > diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c
> > index 3b367c9085eba..f09eb5e2437a9 100644
> > --- a/drivers/net/wireless/realtek/rtw88/pci.c
> > +++ b/drivers/net/wireless/realtek/rtw88/pci.c
> > @@ -2,7 +2,6 @@
> > /* Copyright(c) 2018-2019 Realtek Corporation
> > */
> >
> > -#include <linux/dmi.h>
> > #include <linux/module.h>
> > #include <linux/pci.h>
> > #include "main.h"
> > @@ -16,10 +15,13 @@
> >
> > static bool rtw_disable_msi;
> > static bool rtw_pci_disable_aspm;
> > +static int rtw_rx_aspm;
>
> With your parameter description, rtw_rx_aspm = -1 by default.
Thanks for catching this, will send v2.
Kai-Heng
>
> > module_param_named(disable_msi, rtw_disable_msi, bool, 0644);
> > module_param_named(disable_aspm, rtw_pci_disable_aspm, bool, 0644);
> > +module_param_named(rx_aspm, rtw_rx_aspm, int, 0444);
> > MODULE_PARM_DESC(disable_msi, "Set Y to disable MSI interrupt support");
> > MODULE_PARM_DESC(disable_aspm, "Set Y to disable PCI ASPM support");
> > +MODULE_PARM_DESC(rx_aspm, "Use PCIe ASPM for RX (0=disable, 1=enable, -1=default)");
>
>
> [...]
>
> --
> Ping-Ke
>
Powered by blists - more mailing lists