Message ID | 20221019145246.v2.5.I418c9eaaf754880fcd2698113e8c3ef821a944d7@changeid (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5E1BEC4332F for <linux-arm-kernel@archiver.kernel.org>; Wed, 19 Oct 2022 21:56:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=R5jq+r1Npb/TKRnJP63KuFzFmfzVm2P10HRnTTvNUvg=; b=VvBHA8tzy8YZBu IHN+qtiQdfo4/sbLP55Cw3UOwjdqCrrDWouROTJQyYqek/tFenfG1Ie9r5nTBRGaY/4XzY0OfP48f Y8KO8VszTE35cBaiuWc19I0ecCP15NAXkcYfv2jRStGFDTDryG751s2boS2BfYpg2CtR4SLhLkUdp 8AHqfTrA4+0kzLltjQt4olh8VOqFEryiHPXxnLzq+guD6gcSC0hFkzr8jnjAxUg0YFkz6e+PkxmB6 iOuEbjJYG8DFFmx4iF5qER72KqFBR1grdxl3eLlSDBpCAfh0e3fTpv4wkkf1DcxBhTz3E7egEVjm8 bOD68M45o0FI86XgMfyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olH2L-005MZY-Ce; Wed, 19 Oct 2022 21:55:41 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olH1t-005MOW-VP for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 21:55:15 +0000 Received: by mail-pj1-x1030.google.com with SMTP id o17-20020a17090aac1100b0020d98b0c0f4so1435792pjq.4 for <linux-arm-kernel@lists.infradead.org>; Wed, 19 Oct 2022 14:55:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=NYKDq3nQvcWGiMSg+hxeuum9J23X3dmFHWVwl7YaDYc=; b=CfYbZ+nJXXk7KoFnE1sVg2XDbJnWj3hQVyrHcC6PGar9i+6OAIY/BwhB1o8E++95Wq lxcU180XOgaqUAVgRDa9NNPFTsOvZ+KK189p0I1A1jg1II+X4whI4JV1qME/yqC+qRqb x4ksvICFtNq8gEHVfGwf9KMw/70IcLQL2C1ok= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=NYKDq3nQvcWGiMSg+hxeuum9J23X3dmFHWVwl7YaDYc=; b=FzxyrEBe5EQycqne5w0twHt6xXTNw0WDbMTkhLHK20dZkW5oKAmaoBiWqyOLsUBWFj vHqDDwM/oyV15RH7BMFGNBHgGcm8Uio/KThviPaHEoWF9rMpNFDy8IV+1p0+iVe/DVmW vGxjP673Efq1VZ5uPn7zKpv8UCT/F+SoygH8bQqv9IomYImtC02k1mblPCNXU7q+ce7J EuqoQ6zdUSvEgZdHYy3WFc3iO0GDJPaWuaxcV4/zTA6y/UYQ/t2fgdTvGqDORbiR+uMu mWXOpc6YSdCne6NEJhZB4deM9DuvBXW2M+Tt4uQlwpN6263hkUnEq4C7KU5ZsERGCU6y cTpA== X-Gm-Message-State: ACrzQf2a6F2tjZI9KGLRdXTZAxXGs5PIxAcOWZP82eFTPv9t9v/5zIkL ULaIBZBR0lcWLLU/76Not5HwNA== X-Google-Smtp-Source: AMsMyM57I9WXTwCoqZq8IJIrWVZbrfmNmvZU+g7bdf0d/ugyHIFaaJuyFfnLqZW5AS8dO+IXT+trXA== X-Received: by 2002:a17:902:82ca:b0:185:75d:ee2c with SMTP id u10-20020a17090282ca00b00185075dee2cmr10547061plz.145.1666216512060; Wed, 19 Oct 2022 14:55:12 -0700 (PDT) Received: from localhost ([2620:15c:9d:2:57b7:1f0e:44d1:f252]) by smtp.gmail.com with UTF8SMTPSA id w14-20020a17090a5e0e00b0020ad53b5883sm422006pjf.14.2022.10.19.14.55.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Oct 2022 14:55:11 -0700 (PDT) From: Brian Norris <briannorris@chromium.org> To: Ulf Hansson <ulf.hansson@linaro.org> Cc: Shawn Lin <shawn.lin@rock-chips.com>, Shawn Guo <shawnguo@kernel.org>, Fabio Estevam <festevam@gmail.com>, Haibo Chen <haibo.chen@nxp.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, NXP Linux Team <linux-imx@nxp.com>, Pengutronix Kernel Team <kernel@pengutronix.de>, Florian Fainelli <f.fainelli@gmail.com>, Michal Simek <michal.simek@xilinx.com>, Faiz Abbas <faiz_abbas@ti.com>, linux-mmc@vger.kernel.org, Jonathan Hunter <jonathanh@nvidia.com>, Al Cooper <alcooperx@gmail.com>, linux-arm-kernel@lists.infradead.org, Sowjanya Komatineni <skomatineni@nvidia.com>, linux-kernel@vger.kernel.org, Thierry Reding <thierry.reding@gmail.com>, Adrian Hunter <adrian.hunter@intel.com>, Sascha Hauer <s.hauer@pengutronix.de>, Brian Norris <briannorris@chromium.org> Subject: [PATCH v2 5/7] mmc: sdhci-tegra: Fix SDHCI_RESET_ALL for CQHCI Date: Wed, 19 Oct 2022 14:54:38 -0700 Message-Id: <20221019145246.v2.5.I418c9eaaf754880fcd2698113e8c3ef821a944d7@changeid> X-Mailer: git-send-email 2.38.0.413.g74048e4d9e-goog In-Reply-To: <20221019215440.277643-1-briannorris@chromium.org> References: <20221019215440.277643-1-briannorris@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_145514_072377_430FFD1F X-CRM114-Status: GOOD ( 14.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
mmc: sdhci controllers: Fix SDHCI_RESET_ALL for CQHCI
|
expand
|
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 413925bce0ca..0a80335a42ec 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -367,6 +367,9 @@ static void tegra_sdhci_reset(struct sdhci_host *host, u8 mask) const struct sdhci_tegra_soc_data *soc_data = tegra_host->soc_data; u32 misc_ctrl, clk_ctrl, pad_ctrl; + if ((host->mmc->caps2 & MMC_CAP2_CQE) && (mask & SDHCI_RESET_ALL)) + cqhci_deactivate(host->mmc); + sdhci_reset(host, mask); if (!(mask & SDHCI_RESET_ALL))
[[ NOTE: this is completely untested by the author, but included solely because, as noted in commit df57d73276b8 ("mmc: sdhci-pci: Fix SDHCI_RESET_ALL for CQHCI for Intel GLK-based controllers"), "other drivers using CQHCI might benefit from a similar change, if they also have CQHCI reset by SDHCI_RESET_ALL." We've now seen the same bug on at least MSM, Arasan, and Intel hardware. ]] SDHCI_RESET_ALL resets will reset the hardware CQE state, but we aren't tracking that properly in software. When out of sync, we may trigger various timeouts. It's not typical to perform resets while CQE is enabled, but this may occur in some suspend or error recovery scenarios. Fixes: 3c4019f97978 ("mmc: tegra: HW Command Queue Support for Tegra SDMMC") Signed-off-by: Brian Norris <briannorris@chromium.org> --- Changes in v2: - Drop unnecessary 'enable_hwcq' check drivers/mmc/host/sdhci-tegra.c | 3 +++ 1 file changed, 3 insertions(+)