From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 4BC72FA373D for ; Thu, 27 Oct 2022 08:00:13 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=luhZHhlNMVUb1V1Docq7zLcefh9RPPrWdaHy1RSaCW4=; b=e47fO9dFJD5hd6 1H2APH1tcH1qFv4YGhkjti2NlRLyJcKeAxliCEjjp5EDIO2E1vPY/vaKARtytnfzPrC97z7ehq2xF oYi2hjziQeyFu0t5NgJNOsATgPhIMN46amGNZvTa+k5SLmNE1mCx3vUqcOCzRjiBgl33YHpRsUOPl ymb06QMtD4d9e3hJs3RuH2NnU2Ec8hMIk7F0uclPLVaEe0MLtq59kZaxUdAPO1ay+QAm5qHK60Ddg vNikREPEt8fSy0UbqAmiNf3p/YDUpOpRkl1bHwIkqPF467EytYdTCOa4YZHTSn/WbvXx8mPcfpf49 AngkW3XGESAlzO5NQohQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onxn6-00CGgJ-4H; Thu, 27 Oct 2022 07:59:04 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onxn2-00CGeV-So for linux-arm-kernel@lists.infradead.org; Thu, 27 Oct 2022 07:59:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666857540; x=1698393540; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=MAhoxDpWOZ3W1/ZytWkfCJ/aC+ldNer6TRDQPscOqWw=; b=CFBeUXnO+oS5B/apWHG52m8TkgraWRsCVEKkjDdkQxFBySOioHyfCorA y05euQGboXegIHslVQUS5HeQj4hMBj4h8pu3WWrz7HCxwOHoA1rVgQb/+ D0H+UnPzQon8L02mRcF6kJ39xZOxLEK18QFGbmIJoTpntpsyTEpQU2nff gNgNBctLDCyH+BZ0aJDt4WRahaVHolW0/rQCVrDe3yS2vZkopCDQsrzem 4SBblOeG0s4hSPHmCK/tjdQKLWdOFlmj7+LzHRaJoNFSHdkMwTdYll8g6 1vJ5szRYzTwCFoCnk3OA0+xOQY0kdb9fOWe0dvcCg3QCAHvoGcQX/Te7f A==; X-IronPort-AV: E=McAfee;i="6500,9779,10512"; a="295567804" X-IronPort-AV: E=Sophos;i="5.95,217,1661842800"; d="scan'208";a="295567804" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2022 00:58:53 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10512"; a="583465107" X-IronPort-AV: E=Sophos;i="5.95,217,1661842800"; d="scan'208";a="583465107" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.252.45.150]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2022 00:58:47 -0700 Message-ID: Date: Thu, 27 Oct 2022 10:58:43 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.4.1 Subject: Re: [PATCH v4 6/7] mmc: sdhci_am654: Fix SDHCI_RESET_ALL for CQHCI Content-Language: en-US To: Brian Norris , Ulf Hansson Cc: Shawn Guo , linux-mmc@vger.kernel.org, Shawn Lin , Michal Simek , Sascha Hauer , Bjorn Andersson , Thierry Reding , linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Broadcom internal kernel review list , Jonathan Hunter , Andy Gross , Pengutronix Kernel Team , linux-kernel@vger.kernel.org, Konrad Dybcio , Al Cooper , Fabio Estevam , Florian Fainelli , NXP Linux Team , Haibo Chen , Sowjanya Komatineni References: <20221026194209.3758834-1-briannorris@chromium.org> <20221026124150.v4.6.I35ca9d6220ba48304438b992a76647ca8e5b126f@changeid> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: <20221026124150.v4.6.I35ca9d6220ba48304438b992a76647ca8e5b126f@changeid> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221027_005901_004004_9745C06C X-CRM114-Status: GOOD ( 26.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 26/10/22 22:42, Brian Norris wrote: > [[ 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. > > Include this fix by way of the new sdhci_and_cqhci_reset() helper. > > This patch depends on (and should not compile without) the patch > entitled "mmc: cqhci: Provide helper for resetting both SDHCI and > CQHCI". > > Fixes: f545702b74f9 ("mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E") > Signed-off-by: Brian Norris Acked-by: Adrian Hunter > --- > > Changes in v4: > - Also fix sdhci_am654_ops, sdhci_j721e_8bit_ops > - Add dependency notes > - Drop bouncing Faiz Abbas address > > Changes in v3: > - Use new SDHCI+CQHCI helper > > drivers/mmc/host/sdhci_am654.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c > index 8f1023480e12..c2333c7acac9 100644 > --- a/drivers/mmc/host/sdhci_am654.c > +++ b/drivers/mmc/host/sdhci_am654.c > @@ -15,6 +15,7 @@ > #include > > #include "cqhci.h" > +#include "sdhci-cqhci.h" > #include "sdhci-pltfm.h" > > /* CTL_CFG Registers */ > @@ -378,7 +379,7 @@ static void sdhci_am654_reset(struct sdhci_host *host, u8 mask) > struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); > struct sdhci_am654_data *sdhci_am654 = sdhci_pltfm_priv(pltfm_host); > > - sdhci_reset(host, mask); > + sdhci_and_cqhci_reset(host, mask); > > if (sdhci_am654->quirks & SDHCI_AM654_QUIRK_FORCE_CDTEST) { > ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); > @@ -464,7 +465,7 @@ static struct sdhci_ops sdhci_am654_ops = { > .set_clock = sdhci_am654_set_clock, > .write_b = sdhci_am654_write_b, > .irq = sdhci_am654_cqhci_irq, > - .reset = sdhci_reset, > + .reset = sdhci_and_cqhci_reset, > }; > > static const struct sdhci_pltfm_data sdhci_am654_pdata = { > @@ -494,7 +495,7 @@ static struct sdhci_ops sdhci_j721e_8bit_ops = { > .set_clock = sdhci_am654_set_clock, > .write_b = sdhci_am654_write_b, > .irq = sdhci_am654_cqhci_irq, > - .reset = sdhci_reset, > + .reset = sdhci_and_cqhci_reset, > }; > > static const struct sdhci_pltfm_data sdhci_j721e_8bit_pdata = { _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel