Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2002922rdf; Mon, 6 Nov 2023 01:29:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHe+a7CKGoTc4T8IVGWUpxVcS/ICi7S3PN8LNmLXSra/o6kjbT2KVGEXYF+NtWx+qPneKsj X-Received: by 2002:a25:840e:0:b0:da0:3d48:aa68 with SMTP id u14-20020a25840e000000b00da03d48aa68mr23348137ybk.50.1699262959839; Mon, 06 Nov 2023 01:29:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699262959; cv=none; d=google.com; s=arc-20160816; b=hii6ReXnv10DIy9r16+b2o3lWNSC8fniwAGTdBzVSvPYF0uSK7Y0g4hLbyHIe71pgl KNnw2c07pQ2GVZ7o6QhbyBSbUqqqK8NSyIKAKckj2DKjCjYzqK0bILU0TjM/5nvDljPf hyBrTYFLbh5++fLn26UGjMmh/z1T9oKV3MResMdTYwXu4pNTnP+BjAqLmpE+FOTATQDV AjpwzmAThBOgyFgNjUruGq0IRaJnjBJZ3xj4wZJIy05j+U9qi0rH/Z1fBj0xt+5e/15b sCLlR2V4sYuRvMWlKtMKhkstOhF/iYo5p9Rsy38KkAHVPmj5Yo1b4V0px9fcHl9+Eeh2 Qdag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=9xsqljJfv1jH/8Oo6JmD18RNL0vSz8ePHFMTkVXpdP8=; fh=B3LHSWlahPCY70Ec0VthNQvb5OH/ws+LQOFFEoMFxRI=; b=ViIYqheJo4lXZ4CCFNa0qx/bbBAUag1FKOIysjb1G6eMbbizIqBAkAfsAG1roBswaN 3kFYeA8XxhdRgthUTpPVq4uyBRVhVOskLEAQWlnaoqR8sZ+w9bioWtWtS1/tdF5obiCS oyZZyRJguQg1/GTDqoviTkUo+HPqPND6N9AbILmLzHpXn+uCFi32DnF2FbLKM1x+hSgD piyg1BQsK8Rg8CXaxfpRdiD+ra5EDlSRq+rYe2a4qXzUOiFreAKJr1J1BorMRktvXGJR ZvTU3r+r5+vTvdO60tejGT6y0s9xM2P9AVsOzPpopzdFshHoG81nRvIcPv/FyRcj/qJU VsNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fO9AdEK1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id fh27-20020a056a00391b00b006be04b8c3basi7736387pfb.178.2023.11.06.01.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 01:29:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fO9AdEK1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 6EFD7802FB96; Mon, 6 Nov 2023 01:29:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231407AbjKFJ3Q (ORCPT + 99 others); Mon, 6 Nov 2023 04:29:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231250AbjKFJ3O (ORCPT ); Mon, 6 Nov 2023 04:29:14 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AAECAB; Mon, 6 Nov 2023 01:29:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699262952; x=1730798952; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=n7Pg7QEUgF0AOa0JoeE8yu+anEa9R0Webe/V+kY/BHM=; b=fO9AdEK11/Cp4d1rGFPVrRXvuZwXmVWfELpZRxT7a6G/c7EO4BrEH1tF Tf18W1SkXjREHAOZ0LAKSLgfNLDVedfyDUJhn7FDyfaFu2EjfpS01Dww7 Klwzrj7xtNzPTi06m8pCUmRqmhd0WN6GVxXu2TJ/RAfHo6y+O1pw3RA3a d2x0t9IidZZm/XlosRlXczkNqGmgaH48b+3rpzKlWN6YvXn1Phv7e5gYc r94Ht/7gNedoct2C+tsZgLQHiL5KJgZAoom5BhjlaYybAix+35d5XhpBD uQ77+0DswNYlRi2tbXHV9RgoERpFILtJtGtzLDBdJ9rOScfb5BImMWYE6 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10885"; a="453547815" X-IronPort-AV: E=Sophos;i="6.03,281,1694761200"; d="scan'208";a="453547815" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2023 01:29:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,281,1694761200"; d="scan'208";a="10404050" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.251.215.231]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2023 01:29:08 -0800 Message-ID: Date: Mon, 6 Nov 2023 11:29:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V2] mmc: sdhci-pci-gli: GL975[05]: Mask the replay timer timeout of AER Content-Language: en-US To: Victor Shih , ulf.hansson@linaro.org 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 References: <20231018103337.34622-1-victorshihgli@gmail.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: <20231018103337.34622-1-victorshihgli@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Mon, 06 Nov 2023 01:29:18 -0800 (PST) On 18/10/23 13:33, 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 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 Acked-by: Adrian Hunter > --- > > 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(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 *host) > value &= ~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 |= 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 &= ~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 |= PCI_GLI_9755_CORRERR_MASK_REPLAY_TIMER_TIMEOUT; > + pci_write_config_dword(pdev, PCI_GLI_9755_CORRERR_MASK, value); > + > gl9755_wt_off(pdev); > } >