Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp366209rdf; Fri, 3 Nov 2023 03:14:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYpANQIIzECaJ6LSwVMPX1uhvH5nSkSNTeBivjwOJCf7HYmezKmsOUJhi+tFRi8K5YQfiM X-Received: by 2002:a05:6358:52c1:b0:16b:42bc:75fc with SMTP id z1-20020a05635852c100b0016b42bc75fcmr3287844rwz.8.1699006452442; Fri, 03 Nov 2023 03:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699006452; cv=none; d=google.com; s=arc-20160816; b=j/lAWeAuiSFqIHLbSqMRoESaIH4Pu+nlEVARidHB0jtBoJTYm/3PYEEnz3M2jsxEhx Ear81y85haIi5bgk5avEHcHtz/kZUCEWMKHXhHKvMDyyFFxjC9ABFVM6dI146YxQgFav bcv11nGqFxVRtt25PK7V1eHnYHDB16y/D+uFCX2NC3Pepw5MzSiOakStMQ3drW6iMOUF HdEZHYo2Am8mUm6coKUA4wV0n80ZeCRL7QEU5H5JYBPXnpk0l2vKJT+XAriKHjuTEhJT q7macOjSYYcShRT0y/0RiwWHyfMsk7N8+84t/iifmxDZnLpF3vRHUFf2FwAsJ9hXA0Ua 3bKQ== 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=z+ADtzhxZ6RdxuvI42DF3VVuo0agKsBYzgsrJ1KxhwY=; fh=YI4dzzg9Ql1QPfNEaQiIrowDEFHaS9NbmL98xMHSf0U=; b=XDOupIbLR08TTvKrEGYfVVl+GXrW0goXFLlEK75V9jaT4lFQRloCbYcf9LjEYWhwVL XBJucysBlstIC0K1IBidV1yYu9O83yu8IMC3A1NR41Vx2ZiCBNGjK/HSp9j2ivotRFJN cUXFeOY+fPuFkQSFloQOmrmMiNEHeqIHxICE4ostbrQpe9nnqkEdyR+cSFRdsbsvrlYd MfWTub80W5e85st22Iafg58ivRnmeKYkto8FPUgo7DY7lvNqO85/o/ejNGEZERj5yaal BnyTVWkPWMVeVmDGx0TC+q0db4lJ/AET9H5r8c7XH69Rio0WnuR7v1rbxbth60J76/km cVYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cEAMqvZx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id a2-20020a656042000000b0057795cb4f16si1302046pgp.684.2023.11.03.03.14.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 03:14:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cEAMqvZx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 9C83681BFB8F; Fri, 3 Nov 2023 03:14:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347768AbjKCKOC (ORCPT + 99 others); Fri, 3 Nov 2023 06:14:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347633AbjKCKOB (ORCPT ); Fri, 3 Nov 2023 06:14:01 -0400 Received: from mail-vk1-xa2c.google.com (mail-vk1-xa2c.google.com [IPv6:2607:f8b0:4864:20::a2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9329E13E; Fri, 3 Nov 2023 03:13:58 -0700 (PDT) Received: by mail-vk1-xa2c.google.com with SMTP id 71dfb90a1353d-495eb6e2b80so697172e0c.1; Fri, 03 Nov 2023 03:13:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699006437; x=1699611237; 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=z+ADtzhxZ6RdxuvI42DF3VVuo0agKsBYzgsrJ1KxhwY=; b=cEAMqvZxa/ukoJSyhapG7RB3vcz0WWA+DyySwTCR/0lU9g+8QlD7+7F8ug1uyBg2ad 6H6CbPXFR+L1baSGprtgGw9XkntXHdmY2zI7d7f1Mt50srx7fKsdkM0bCbqzDD1zppfF V9iak0GYmNuJMX/OOiToO/BtvWDwK0r/ZvCX6j8HBhwo18GhZymGj+n/8mE5D/d0mCtv KcxFjGxgUNfQe2smZ0vjeteXmxr6fRJx8kDvb5UINIrl+Rr4DSTHiyWBR4z8O5vX5+bz cttgrctArS+zoSnoRrRewMLuLuqJMp8eXG1zVP/Ql0Ycb4BcGHIYFwrQaBni2xW8ugKz yf2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699006437; x=1699611237; 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=z+ADtzhxZ6RdxuvI42DF3VVuo0agKsBYzgsrJ1KxhwY=; b=kaJvT19UMhEuQ/fTqUj++yvdmD2vF1HId21NFNgj68jM1QNSsDFNfcWILqceygD1P3 ZF98GEwFV5fua0x8+no/YOpUbXI96vCFlC9mZCcTcn+nlfxWfxT27J4zxpbpI6JqL1/x rs21pFZrplsUntcq9iw5WarVF1t/KVui5rBDz7GS+SMrZHjHHbHnaRT5SIhjtVaQp8MC 8iHIXlBIOzqRH6TOaKWMgunQv41ldgi0oyq9A0gKa29Zn/lT90TA5gjvig0cI0AVuLIR RNd2AtKYdycdWRtyxjKQZv4KconQhZ7rOHklTZnNNeATQsF+ZKoZTDLHMRHbpCdZU0Ib g/+w== X-Gm-Message-State: AOJu0Yyid8BlC4WEUQAd9+PNbrqAu5iFNVxbGZM4GLnodw6K5zgoaghV JhzBiwR6ZoLKtbnGZoLEp45+V7HCoWaRUz3iyQg= X-Received: by 2002:a1f:29d7:0:b0:4ac:5d9:e655 with SMTP id p206-20020a1f29d7000000b004ac05d9e655mr249516vkp.0.1699006437640; Fri, 03 Nov 2023 03:13:57 -0700 (PDT) MIME-Version: 1.0 References: <20231018103337.34622-1-victorshihgli@gmail.com> In-Reply-To: <20231018103337.34622-1-victorshihgli@gmail.com> From: Victor Shih Date: Fri, 3 Nov 2023 18:13:45 +0800 Message-ID: Subject: Re: [PATCH V2] mmc: sdhci-pci-gli: GL975[05]: Mask the replay timer timeout of AER To: ulf.hansson@linaro.org, adrian.hunter@intel.com Cc: 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.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 fry.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 (fry.vger.email [0.0.0.0]); Fri, 03 Nov 2023 03:14:09 -0700 (PDT) Hi, Ulf Please help review this patch and give me some advice. I look forward to your reply. Thanks, Victor Shih 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 frequently > times out when ASPM is enabled. As a result, the warning messages that wi= ll > 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 > --- > > 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-pc= i-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(12) > + > #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(12) > + > #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 *hos= t) > 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_slot = *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 >