From patchwork Tue Nov 7 09:54:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Shih X-Patchwork-Id: 162362 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp125433vqo; Tue, 7 Nov 2023 01:56:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHqw4LUOOMGMehAHw+J7iQaaOhTppkPUntvZetlJbFqrtYvKabSJ7TccO4ncandiW9fSyhf X-Received: by 2002:a0d:d497:0:b0:5a8:277f:b378 with SMTP id w145-20020a0dd497000000b005a8277fb378mr13013388ywd.1.1699350979584; Tue, 07 Nov 2023 01:56:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699350979; cv=none; d=google.com; s=arc-20160816; b=ZZhIEL9e/iG/LwtOAqJWxwGdGHTLTG7u8+E8SaKLyXps+D8+cQshXp7n4+STwQuHat H3ka4WJ9TN/U11G9ersf+d4dFgCgKwHbC7ijNNMzZXwC/woJlLNDHHnxJfmINMwoNlb6 PSOcyT3K7x20FS7FUj//4amp/9XlkEjN7Kr9fvDr7tChZe2HXbKjgAqHR5zLYmydZjwl Y5s5E3hRFWftoYDd2N45QWmDu1RN711EkHhVSmP8Zp9rfToiWBc3kThpin/qj7maO8bm OJLDC0AjdyK/xsS1iWIa0u7VRae78DPuY7Is17+4jKC1mji7WaE+mNuP7x1QApMpc5DI rJiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZgbrRFHSh+56Lz72WSMa9a/GQjYEEMIgbG85FsQ7VvM=; fh=zQgC8sTNi2x59HjzRDjjBr5HWRoco0nlaJ9ddut/E6w=; b=OY1CMY+Qm4zGowGY11tteLUTakJPGs2hCHHWeqZok0c06Y0xwFoZW5rQc5fHdxChsU SlSxT9hXWHAnAuTqJdoSZn5SyCZ1EGy/EjhedCouVEZQkVs7uV6mCVYl/zqDN/j2fMp/ j4xpFuwYxXXMMDJ/rr/mSsQr14aB8t8bsBYYzXpCU6C7cSx5QeXK9AMLo1xWoYLJTsR3 E2NhZswToY1vRKdZH9CRMN4mbR/5+T2wI78zumKJM3BLB4JquIk0WlT+JV40QjmOA5ZI w182ZXKJDy6iaJhfuEso1axuXbpHpmMhrvCQQWFXbghHMWzlST03Q4Ziaqt01p1KyJ+A d6Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=V1+Xwa6Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id i198-20020a636dcf000000b005aa41728293si1706119pgc.318.2023.11.07.01.56.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 01:56:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=V1+Xwa6Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 047B58072A04; Tue, 7 Nov 2023 01:55:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233853AbjKGJzJ (ORCPT + 33 others); Tue, 7 Nov 2023 04:55:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234048AbjKGJyv (ORCPT ); Tue, 7 Nov 2023 04:54:51 -0500 Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50F9FD78; Tue, 7 Nov 2023 01:54:48 -0800 (PST) Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-6cf65093780so3505218a34.0; Tue, 07 Nov 2023 01:54:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699350887; x=1699955687; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZgbrRFHSh+56Lz72WSMa9a/GQjYEEMIgbG85FsQ7VvM=; b=V1+Xwa6ZwuQ0QrWE6TFpdznm46EjasPaxOk31bj/p8obqNYcSKLYinEOnvSL/kX9/n PsNOpBLSF5L0I2FO3wXprqQ0yo/uF0ho83X+6Y5DvkKi2XZlhaqKfa9vrNDVH4m5ERmU 02k5TNjkocapXy8sSgQ7YKDthT+AcF9FvGR4829WcHaucG+m4jrBIJKZweuf7tWQkjAA veSopktXE5ptaL9cfG/zwFzJ2UbQHGXUwoWzGUF0vdQZA6J4867PPNrNc8Potf3wXwxp 02hQDgXw2nXE5lPmCwHkX9Q2/+iOu2LTWrPOXBIZoU5wHFOX4lyUtn7cvs94hHN+pYaU PtAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699350887; x=1699955687; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZgbrRFHSh+56Lz72WSMa9a/GQjYEEMIgbG85FsQ7VvM=; b=lrgv477o2CTDyk8ZvrpUvHPv0weRGBP2TpdCFmxIUbgO5H/hqkAZ5+E4627UVQ8wfL C16tiOOd4TFSTUvMGEdWMiSOJTko9SWClVpqPZmADuUsGyY2xncnUA1FfoTAIOQ5qrWt VFnnCZWlc/EyQvHBX1tK7w67KkIMJSmKLNiLwV/c5wMlm3xcS5P6UDp1Z9841XnJ2OVj ueJe/bh0Y1BUxG/LEyuJrRgOxPHvML1SOg8yK+I0JWQFKF37Gyn+5D/CxjJgHmwK0rRP 2uUOkG5Ic+IP4cXZTI6bzj0CSnejaaNb1/bcynJxGY19OUKn4Qwjj0iLg0mEmzQSZJAQ vK3Q== X-Gm-Message-State: AOJu0YwxWtIgHZjVi0TSVVlIKTSYUi6eFleccuAtH4lxIrswaUzOUW6e Zy4tyaUAAXH/LgDAWv7AjCq4gZinBopP+A== X-Received: by 2002:a05:6830:925:b0:6bf:1444:966d with SMTP id v37-20020a056830092500b006bf1444966dmr37863634ott.1.1699350887400; Tue, 07 Nov 2023 01:54:47 -0800 (PST) Received: from localhost.localdomain (2001-b400-e25d-e1ee-eb42-adf3-9163-f337.emome-ip6.hinet.net. [2001:b400:e25d:e1ee:eb42:adf3:9163:f337]) by smtp.gmail.com with ESMTPSA id u8-20020aa78388000000b0068fe5a5a566sm7106705pfm.142.2023.11.07.01.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 01:54:47 -0800 (PST) From: Victor Shih 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.tu@genesyslogic.com.tw, kai.heng.feng@canonical.com, Victor Shih , Victor Shih , Kai-Heng Feng Subject: [PATCH V3 1/2] mmc: sdhci-pci-gli: GL9750: Mask the replay timer timeout of AER Date: Tue, 7 Nov 2023 17:54:36 +0800 Message-Id: <20231107095437.8724-2-victorshihgli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231107095437.8724-1-victorshihgli@gmail.com> References: <20231107095437.8724-1-victorshihgli@gmail.com> MIME-Version: 1.0 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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 07 Nov 2023 01:55:43 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781898652490082224 X-GMAIL-MSGID: 1781898652490082224 From: Victor Shih Due to a flaw in the hardware design, the GL9750 replay timer frequently times out when ASPM is enabled. As a result, the warning messages will often appear in the system log when the system accesses the GL9750 PCI config. Therefore, the replay timer timeout must be masked. Fixes: d7133797e9e1 ("mmc: sdhci-pci-gli: A workaround to allow GL9750 to enter ASPM L1.2") Signed-off-by: Victor Shih Acked-by: Adrian Hunter Acked-by: Kai-Heng Feng --- drivers/mmc/host/sdhci-pci-gli.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c index d83261e857a5..3887bfd7386b 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 @@ -561,6 +564,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); } From patchwork Tue Nov 7 09:54:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Shih X-Patchwork-Id: 162363 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp125441vqo; Tue, 7 Nov 2023 01:56:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyLnzOWenTlKD4szdzhbGzKsliq1+J6sDKHpxAdygZ4nZhKABjBLYXrwg/irAomygth85q X-Received: by 2002:a54:4888:0:b0:3b5:66c2:5ffb with SMTP id r8-20020a544888000000b003b566c25ffbmr21392029oic.33.1699350980787; Tue, 07 Nov 2023 01:56:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699350980; cv=none; d=google.com; s=arc-20160816; b=zWG0whaIIkBu6cKLNCWeo6GIxd3aUi9daA4otv4aWkhtrsY1OqN63WViP6ia5O+I8h UQQZrGFAEu36aL0rmS21QLeGiiGNGqqpNTbOrw/3Z78p7Q+SbfI3Ezrx13MvkTFq+Phq ZGB3xJVxPWM5QviBTpFFBvnEDLUj04YMlfsfOYhW+x9BHZvl6+BKV1VZiChLhfbPPOve +oerPYu5iphmwPn2zpk0JG7nfAHoMoJ0AWOO895MWS+EogYqWBFG74ocN6vWbosnZ3sl PNYelNDnV3qFBaBGhP4Tpi80NAWo/TtJVjB3GUE3brudHuvxjHfOPYtI0nyRI7sfzJU3 cWfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SmIG2BB5oMZIMJvfS5LNShy64tFn+UOtZXHaIVjFwZs=; fh=zQgC8sTNi2x59HjzRDjjBr5HWRoco0nlaJ9ddut/E6w=; b=cNWZ30n1S2zpUuVnGQ6TYP6wHhtxoheclK4u2CAFQIymGfPt4ImtYfOEhdg3dmFDn3 Ca9xsaP33WY+U6eS8hWbWxybUXNC1B57Qdg/EIx36VYAY+b6MyWlS8Gdx2Hj/hNSIOXw 15WVn6FiH8BI8f0TsuRG1U3VwacSxFv+vdvOEEGmj+FYwt8hFQ1CeKgBzavUPwFPVAKI AxTaARL4Z/raC9oE98AndwrSQl34SxH4VpBCh25ZFT1WVA/N11RC7zxZDzAHkYZ0F4bb FF8eZyz8LTCmAptjzcVlMnAmjaH9O8aFzHvZ0kiPir7cVV19zppDv8UTv2OVyVj0vtnp Hq3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jhhNAtwA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id y1-20020a656c01000000b005b99c0dae65si1849302pgu.357.2023.11.07.01.56.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 01:56:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jhhNAtwA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 1F1DC80BFECB; Tue, 7 Nov 2023 01:56:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234086AbjKGJzT (ORCPT + 33 others); Tue, 7 Nov 2023 04:55:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234054AbjKGJzA (ORCPT ); Tue, 7 Nov 2023 04:55:00 -0500 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7417210F3; Tue, 7 Nov 2023 01:54:51 -0800 (PST) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6b5cac99cfdso4465859b3a.2; Tue, 07 Nov 2023 01:54:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699350890; x=1699955690; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SmIG2BB5oMZIMJvfS5LNShy64tFn+UOtZXHaIVjFwZs=; b=jhhNAtwAfKw4Ecof8CqgOav8c70S/H3H2RGhEq5q3J1iFkk5KQt0B828pU81Mpy3V+ 9kV/SPA15D/dUREy0YIEX3a6YDTacBbszExVRYPUg861HKYAsIKQj5WXzNTjccuYui4+ eWtbbMPKxtHjXyH4bXaU5qmYwXsox2vj3aaP0io4ijHPZymM+aoxjItpDzeuI+hXLimS 2t3H58gvON3eO5omLeAyeSGmySeVB+yCnXF05uSaQVTueOmRvKWT0MPLYpo5O6ZvqqGU +Cvuq1N9NFF/yJYr3ltVazq3i6BR3lBr8QV5sCFXRDOQU2XVQuaffEVWjDhmi2L95RR3 27PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699350890; x=1699955690; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SmIG2BB5oMZIMJvfS5LNShy64tFn+UOtZXHaIVjFwZs=; b=dVk/Tee5utmGenmtOw2JMjfQZor8hTUASTpcKnQW5AF0CHvt4UY+4iHSsiDrnYlJCk uaNrAWwb2IGO0wwFRW++ddyWQ+8GH9WtPUEsn4aXhycVzVBNPSh/EmwRauqlC+7iTCz9 vqkfSpY+AH/j2iHmOmB/GRyhSTYwjjGPQykqQ8vF2yVhCiC6SWEX9GvAq8c8kAir1uqh mMjCorYg5IS4OWFZZ3HmlXqKGLOgttslwUWdGe6grz0vd/Z5cWcs41dYzePjCo39/0It NriARJ8/5TunfNd1aXr4ubOpbSTKtoXDqdTaqHHHIyaSWhDvjLbW2e2jzNftwdYZ/9Bc vMNg== X-Gm-Message-State: AOJu0Yw4Qu3MgdHTX+ETsAQcFaQFkcGxIE4h7v2YdzKA7PbuiLOhRY8w cAQI3wXrjeSfsu5umkMF1Sk= X-Received: by 2002:a05:6a00:814:b0:6b2:2a2d:7a26 with SMTP id m20-20020a056a00081400b006b22a2d7a26mr32525997pfk.28.1699350890518; Tue, 07 Nov 2023 01:54:50 -0800 (PST) Received: from localhost.localdomain (2001-b400-e25d-e1ee-eb42-adf3-9163-f337.emome-ip6.hinet.net. [2001:b400:e25d:e1ee:eb42:adf3:9163:f337]) by smtp.gmail.com with ESMTPSA id u8-20020aa78388000000b0068fe5a5a566sm7106705pfm.142.2023.11.07.01.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 01:54:50 -0800 (PST) From: Victor Shih 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.tu@genesyslogic.com.tw, kai.heng.feng@canonical.com, Victor Shih , Victor Shih , Kai-Heng Feng Subject: [PATCH V3 2/2] mmc: sdhci-pci-gli: GL9755: Mask the replay timer timeout of AER Date: Tue, 7 Nov 2023 17:54:37 +0800 Message-Id: <20231107095437.8724-3-victorshihgli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231107095437.8724-1-victorshihgli@gmail.com> References: <20231107095437.8724-1-victorshihgli@gmail.com> MIME-Version: 1.0 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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 07 Nov 2023 01:56:12 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781898654136798959 X-GMAIL-MSGID: 1781898654136798959 From: Victor Shih Due to a flaw in the hardware design, the GL9755 replay timer frequently times out when ASPM is enabled. As a result, the warning messages will often appear in the system log when the system accesses the GL9755 PCI config. Therefore, the replay timer timeout must be masked. Fixes: 36ed2fd32b2c ("mmc: sdhci-pci-gli: A workaround to allow GL9755 to enter ASPM L1.2") Signed-off-by: Victor Shih Acked-by: Adrian Hunter Acked-by: Kai-Heng Feng --- drivers/mmc/host/sdhci-pci-gli.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c index 3887bfd7386b..d8a991b349a8 100644 --- a/drivers/mmc/host/sdhci-pci-gli.c +++ b/drivers/mmc/host/sdhci-pci-gli.c @@ -155,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) @@ -778,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); }