Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80841C4332F for ; Thu, 16 Dec 2021 02:46:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233064AbhLPCqy (ORCPT ); Wed, 15 Dec 2021 21:46:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232936AbhLPCqx (ORCPT ); Wed, 15 Dec 2021 21:46:53 -0500 Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D44DC06173F for ; Wed, 15 Dec 2021 18:46:53 -0800 (PST) Received: by mail-oi1-x22b.google.com with SMTP id bk14so34453105oib.7 for ; Wed, 15 Dec 2021 18:46:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessos.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=6bVzvpheVBBIcY1ce58sxKYXE1wOehY4K20Ojvv4pk0=; b=tvP/tqXZ5k2rFm+NIJh9lCHtTQIfkuLu8y2SdXjslo1QUBihcxdowh5DV+3N0M/Nw0 Qsh1/jI485BGm0NMimK0uN1TdBOAW0Ey3iHemyd2lQJ6V6JXk47xhcEk+yRXq8fI4Sms 9sORp4pnRH4bn9D+F/KnXKL9NXCx21JHIsdPHtRxdqNrr3rgDVHkai9Zea9YBvqJUInL lbw47ZgWf2FFJ73IoR0IM1Syozs9u5QFgwvgWsTMQeZdk6GdTah+QbMrYu9lEFgIEdLB d0jjVtpWrwGBv6+CT5udoQDdnSxHLnp0X/RJqmjRIttmUR3DGUXTxdzAaWcS9dTC5CyU AiSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=6bVzvpheVBBIcY1ce58sxKYXE1wOehY4K20Ojvv4pk0=; b=ZBXOsCRLBpym2oDJ4Q97dBSC2xOJz0EKTIUpvAGUG+IQk2SMUbbRih7ZjYu0YZWsVO 4w/s4remUW61D6XBoB4faCvQwVLUWfN58/fmFdqwZ7EEEiPpC8p1NBv7olCdufiqEryz zMe9l8MsJgv3s5woVoW7j5tsG/e1SFz9lQfd8qMN+8kqIMg3A5/uPmo1bAZUfeYjruxZ pXbtmNJ6qDjAy2eZ44old3pNWQ6fMIlkM5cxSHdwzuVdnzexxgc4fQnf2kVlPmQYq3G4 Boo0eu9hT64cxZj/Zia4eoSUTyuZzzZp7ESgqH+/+g7hRd43Rzsf3pR+3qS7p4m7T4de FzFA== X-Gm-Message-State: AOAM532SHKLXxV/VwM9RJY2MJZPOXYk+E7h9ThSY4iqczZ/zCtIJWBKb YqvFbYIvyvxKokFXro5GoaMTjqjbJFoEMvYX6jHWPw== X-Google-Smtp-Source: ABdhPJy5KawtFidrvy0PFM5hXDFslMGNOj7QgkQ9XL5FdUUcGwFlx2VhiS+x0TXfg7Qx9As1kud+7KGGNqlKKDYU4EQ= X-Received: by 2002:a05:6808:d1:: with SMTP id t17mr2498324oic.161.1639622812691; Wed, 15 Dec 2021 18:46:52 -0800 (PST) MIME-Version: 1.0 References: <20211215114635.333767-1-kai.heng.feng@canonical.com> In-Reply-To: From: Jian-Hong Pan Date: Thu, 16 Dec 2021 10:46:16 +0800 Message-ID: Subject: Re: [PATCH v4] rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE To: Pkshih Cc: "kai.heng.feng@canonical.com" , "tony0620emma@gmail.com" , "davem@davemloft.net" , "jian-hong@endlessm.com" , "kvalo@codeaurora.org" , Bernie Huang , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "kuba@kernel.org" , "briannorris@chromium.org" , "linux-kernel@vger.kernel.org" , linux@endlessos.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pkshih =E6=96=BC 2021=E5=B9=B412=E6=9C=8815=E6=97=A5 = =E9=80=B1=E4=B8=89 =E4=B8=8B=E5=8D=888:23=E5=AF=AB=E9=81=93=EF=BC=9A > > On Wed, 2021-12-15 at 19:46 +0800, Kai-Heng Feng wrote: > > 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 stat= us > > > > 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=3D215131 > > BugLink: https://bugs.launchpad.net/bugs/1927808 > > Signed-off-by: Kai-Heng Feng > > Reviewed-and-Tested-by: Ping-Ke Shih Acked-by: Jian-Hong Pan > > --- > > v4: > > - Rebase to the right tree. > > > > v3: > > - Move the module parameter to be part of private struct. > > - Ensure link_usage never goes below zero. > > > > v2: > > - Add default value for module parameter. > > > > drivers/net/wireless/realtek/rtw88/pci.c | 70 +++++++----------------- > > drivers/net/wireless/realtek/rtw88/pci.h | 2 + > > 2 files changed, 21 insertions(+), 51 deletions(-) > > > > > > [...] > >