Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp372551rdf; Fri, 3 Nov 2023 03:29:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFUBmEvaaDxExga/QiX5ykHkYlXr39ndju7UB0ReNucP9c2/nX7aWz+zMEV23d9RdDZA/q5 X-Received: by 2002:a17:903:32d1:b0:1cc:3bc9:b924 with SMTP id i17-20020a17090332d100b001cc3bc9b924mr16045600plr.25.1699007363076; Fri, 03 Nov 2023 03:29:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699007363; cv=none; d=google.com; s=arc-20160816; b=bYUgvGAnYLV9IrcFPHRkeSkvzahXDADXUrT4pgTl9OJZ1c2lgSPxWXSLw1E+zQyn62 bUwiAjqlJjZBmu9it1eCZAlBj1s0xFWQuAk+fMYPlJsw2ZS4hNWT/06kooGTIcFqOb9P yT7V/7q1UXYCCPKKtKiI5G40GVDRsi0P8y98cpDuVOq/6QSyLZkUw1ckW+QxfiuYWqNk LM/n0d9WasXKPEnKs/Qzcr9qf9/NCJHAahM2JLHmyswckp1/ShsIVuMD9R+2BJl8ALMd sI/Rumj/haUTU3Y7uVj3v9ixODoC+BfH+JWu0dmu7OLHNL5uy83fCc34eWvfVvH42ifB 6OrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ZHXSWJ2cpn8cbZ9gOeRdIq5F7XsE7dwhucIAWozFSUU=; fh=ypHGyNxNGiBvJtbaxsg9XvW8zgqahFmGDG3oTlwPX5k=; b=BbSRbjb+exAuy8F7hppFSH49zS3mzW/2m36y7QQ6qzJVIqFWvQIrkdiLjfsLqWmBS9 AHerEOOYrTLD+chz3qCOaIUcNa0L+p2sUxYWrhW2ZL0ahK9im77N1+/Z9XSzt0EoHugV syGUNfTw647rxKlen762r+nCDjwrczddV7KsRjGq1et+xTIL74Khq1ekAm1XO1gCCb0p 2o4ect1Ba1qCDW5f1s7/VvW/XIRO3mtanFhPCY8VSh/Ri1uTdlvHPZq7JixbQ6JrSmd3 FoXLPqb8PKAQuDQrAt9SiG8rNmzfx+QevsUkWeDF00szs5zRsTS6ZW6U908TdRaOLr56 3Gwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TvQJT42V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id o10-20020a170903210a00b001cc76bea519si1272870ple.87.2023.11.03.03.29.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 03:29:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TvQJT42V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 8495E822741A; Fri, 3 Nov 2023 03:29:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232184AbjKCK3H (ORCPT + 99 others); Fri, 3 Nov 2023 06:29:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232822AbjKCK3F (ORCPT ); Fri, 3 Nov 2023 06:29:05 -0400 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BB3013E for ; Fri, 3 Nov 2023 03:29:00 -0700 (PDT) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-5af5b532d8fso22373847b3.2 for ; Fri, 03 Nov 2023 03:29:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699007339; x=1699612139; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZHXSWJ2cpn8cbZ9gOeRdIq5F7XsE7dwhucIAWozFSUU=; b=TvQJT42VYil5NZWpICSmb3Lk1wJ+2GwraTIF/AM1C0Shu2KZ9qORFHTHVPtLAG15mV tppqlkMiZlPgPglT3uyU5O9NrhxXTJO7GFUSKreTa59jXiq0LEcPTKBIXzOzNVTv1TAN fjUH/AhFPxVCJCz525dEZEOFYCj1Y4snX/s4/TW7CPcaMe9CmTrZ8OC7oe9xLFEk/q1v FCOVqAv2pE+OVNcpKal2P6sTcfhWXavdWWLFj/Sjl0BhXIjRGNnWnzqNzuTs7z8avG3M YZpWI01bfoGdZnm9kbBVaJhzCSojyrqnH9Lxbo2RdWABvNHgfgDrFwqmHMCy1Qp/0T5W HuFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699007339; x=1699612139; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZHXSWJ2cpn8cbZ9gOeRdIq5F7XsE7dwhucIAWozFSUU=; b=N+L0DWSZXq+0horTcn15of6E9scWNat7tcnZ8QFkqz7MvDXaCkwam6e40uTQoaPf41 vIuS3x/v7eTJW/UAyAsSjK7UWG/QzuYo4vbCEVP/xv1nu+hIy3Ra/z7R5EFhtSxfIOl/ cF90lXbVjvDY5+dJCn+86JIXryI4EJBt30yJvJh4pQCeBT+LimlmuZcn3EQAtxe3mjJV e/eMC0yRVR4GwudMk4yCEpe+9jv6Gg6mVzFgCatbOgLvyp+kwQYgKk0bAKJKLU4UCtFf tZUTcr8/4+0ljxHeMCKMX+w0j8hTVUPmAjRz6XxBFie4zazQgmDFhXYrxJK789j1eiPc XFkQ== X-Gm-Message-State: AOJu0YyXh5bQDTOVgd2ESzDO6DmuynWL6lQ31oL7032t9Q/yFzGPLkE8 6FnUqzl+xvykUn/B4tyKsbi8PFuiPqwgak6ALvw/OA== X-Received: by 2002:a25:d80f:0:b0:da0:c581:6663 with SMTP id p15-20020a25d80f000000b00da0c5816663mr21968266ybg.28.1699007339179; Fri, 03 Nov 2023 03:28:59 -0700 (PDT) MIME-Version: 1.0 References: <20231018103337.34622-1-victorshihgli@gmail.com> In-Reply-To: From: Ulf Hansson Date: Fri, 3 Nov 2023 11:28:22 +0100 Message-ID: Subject: Re: [PATCH V2] mmc: sdhci-pci-gli: GL975[05]: Mask the replay timer timeout of AER To: Victor Shih Cc: adrian.hunter@intel.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, benchuanggli@gmail.com, HL.Liu@genesyslogic.com.tw, Greg.tu@genesyslogic.com.tw, SeanHY.Chen@genesyslogic.com.tw, kai.heng.feng@canonical.com, Victor Shih Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 03 Nov 2023 03:29:18 -0700 (PDT) On Fri, 3 Nov 2023 at 11:13, Victor Shih wrote: > > Hi, Ulf > > Please help review this patch and give me some advice. > I look forward to your reply. > > Thanks, Victor Shih I don't have in-depth knowledge of how to properly solve this for pci, so I am relying on Kai and others to help review. > > On Wed, Oct 18, 2023 at 6:33=E2=80=AFPM Victor Shih wrote: > > > > From: Victor Shih > > > > Due to a flaw in the hardware design, the GL975x replay timer frequentl= y > > times out when ASPM is enabled. As a result, the warning messages that = will > > often appear in the system log when the system accesses the GL975x > > PCI config. Therefore, the replay timer timeout must be masked. > > > > Signed-off-by: Victor Shih The code looks good to me, but let's allow Kai to get some time to come back to this before I apply it. Kind regards Uffe > > --- > > > > Updates in V2: > > - Modify the commit message. > > > > --- > > > > drivers/mmc/host/sdhci-pci-gli.c | 16 ++++++++++++++++ > > 1 file changed, 16 insertions(+) > > > > diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-= pci-gli.c > > index d83261e857a5..d8a991b349a8 100644 > > --- a/drivers/mmc/host/sdhci-pci-gli.c > > +++ b/drivers/mmc/host/sdhci-pci-gli.c > > @@ -28,6 +28,9 @@ > > #define PCI_GLI_9750_PM_CTRL 0xFC > > #define PCI_GLI_9750_PM_STATE GENMASK(1, 0) > > > > +#define PCI_GLI_9750_CORRERR_MASK 0x214 > > +#define PCI_GLI_9750_CORRERR_MASK_REPLAY_TIMER_TIMEOUT BIT(1= 2) > > + > > #define SDHCI_GLI_9750_CFG2 0x848 > > #define SDHCI_GLI_9750_CFG2_L1DLY GENMASK(28, 24) > > #define GLI_9750_CFG2_L1DLY_VALUE 0x1F > > @@ -152,6 +155,9 @@ > > #define PCI_GLI_9755_PM_CTRL 0xFC > > #define PCI_GLI_9755_PM_STATE GENMASK(1, 0) > > > > +#define PCI_GLI_9755_CORRERR_MASK 0x214 > > +#define PCI_GLI_9755_CORRERR_MASK_REPLAY_TIMER_TIMEOUT BIT(1= 2) > > + > > #define SDHCI_GLI_9767_GM_BURST_SIZE 0x510 > > #define SDHCI_GLI_9767_GM_BURST_SIZE_AXI_ALWAYS_SET BIT(8) > > > > @@ -561,6 +567,11 @@ static void gl9750_hw_setting(struct sdhci_host *h= ost) > > value &=3D ~PCI_GLI_9750_PM_STATE; > > pci_write_config_dword(pdev, PCI_GLI_9750_PM_CTRL, value); > > > > + /* mask the replay timer timeout of AER */ > > + pci_read_config_dword(pdev, PCI_GLI_9750_CORRERR_MASK, &value); > > + value |=3D PCI_GLI_9750_CORRERR_MASK_REPLAY_TIMER_TIMEOUT; > > + pci_write_config_dword(pdev, PCI_GLI_9750_CORRERR_MASK, value); > > + > > gl9750_wt_off(host); > > } > > > > @@ -770,6 +781,11 @@ static void gl9755_hw_setting(struct sdhci_pci_slo= t *slot) > > value &=3D ~PCI_GLI_9755_PM_STATE; > > pci_write_config_dword(pdev, PCI_GLI_9755_PM_CTRL, value); > > > > + /* mask the replay timer timeout of AER */ > > + pci_read_config_dword(pdev, PCI_GLI_9755_CORRERR_MASK, &value); > > + value |=3D PCI_GLI_9755_CORRERR_MASK_REPLAY_TIMER_TIMEOUT; > > + pci_write_config_dword(pdev, PCI_GLI_9755_CORRERR_MASK, value); > > + > > gl9755_wt_off(pdev); > > } > > > > -- > > 2.25.1 > >