Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2878584rdb; Mon, 4 Dec 2023 09:52:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IEAF7K86t4EAlReCjel70z3Njt6rMF6YtL8qwMC8T6+VM/6wUuglBmG0oS7KwEkP9WjrvTC X-Received: by 2002:a05:6a20:158b:b0:18d:b43:78e8 with SMTP id h11-20020a056a20158b00b0018d0b4378e8mr2594116pzj.32.1701712358896; Mon, 04 Dec 2023 09:52:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701712358; cv=none; d=google.com; s=arc-20160816; b=FaqEGDKYEkS9ZOhJ6bgi8pm56mRsHJdCI39QhIZqTYWNIC0jkWJmZV9TJxAMsTN1Rg OPxcddzI/joTmgJs4w8VRi/YWLp57+uPPcEFWTCgpH/yROFTLayo5bvhQsMlqXTrUwmr kbdAjNLu1YGgGpOVAMJSc9fOO5LBPyitf+/VPGKcOJgpEhu08BzYvs5aqk8pa5NMoFmL fF6ky9Am0/k0hF7Jxg1lNa6UFilsGiubZxcHqGGOfc9cA3cm+QKkqYt+aUBdA7UNlby2 abKxgYXkPYlt8wSvh6Kz9IPEW6iwGKkfH3Bu8uGdHT+TwzJYtnU420zN7n3OyZoOJLbd aIcw== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=pyy1GWUVcF/OJvz0EU3LmVgclsoH2wl6Q7WnzqiRB0E=; fh=eB4d1whmR+TsKiXsD11vCgzXSLCfFemahQNQompXyr4=; b=qWyl4Y/uvB7gOlJS5NA1c2deOgB3b1NozaiJ/f3NDA/o989fAuHQ85sYiAnHdLuPk9 rpKzB7vwghIGcRxPOIuFGU4HdG22xxk2gW4QJ1CmtjdOKRGoTci3Q4heec4Qo9gPws9k RsYfZ7Hm/eKmH00LL0hkTmyMmUey9HFepqbVmedv0GVDizYey7sveSDyJ3bsJpx9y05U 8jFABFgo49zd+1OtMmtCWhSqteliel90kw7vYmfGOjv5FRrDVFCjNEeDyP3x7s1VMyAH qMXPk3DOTCXkQuLwjdtA9kEVSj3dqZXCl5gzYNdslhITIZRflC0G0aGtjbsPXJtfmWvZ x+gg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id h9-20020a056a00170900b006cbc1f9b4e0si8210770pfc.261.2023.12.04.09.52.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 09:52:38 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5A137805F409; Mon, 4 Dec 2023 09:52:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230525AbjLDRwW (ORCPT + 99 others); Mon, 4 Dec 2023 12:52:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjLDRwV (ORCPT ); Mon, 4 Dec 2023 12:52:21 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E6921116; Mon, 4 Dec 2023 09:52:27 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D9CF7152B; Mon, 4 Dec 2023 09:53:14 -0800 (PST) Received: from [10.57.74.29] (unknown [10.57.74.29]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5A2283F5A1; Mon, 4 Dec 2023 09:52:26 -0800 (PST) Message-ID: <9747ebb3-98e6-47da-8a9b-9b7dcf7909f6@arm.com> Date: Mon, 4 Dec 2023 17:52:24 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mmc: rpmb: do not force a retune before RPMB switch Content-Language: en-US To: Jorge Ramirez-Ortiz , Avri.Altman@wdc.com, adrian.hunter@intel.com, ulf.hansson@linaro.org Cc: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org References: <20231204172243.3382495-1-jorge@foundries.io> From: Christian Loehle In-Reply-To: <20231204172243.3382495-1-jorge@foundries.io> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=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]); Mon, 04 Dec 2023 09:52:36 -0800 (PST) On 04/12/2023 17:22, Jorge Ramirez-Ortiz wrote: > Requesting a retune before switching to the RPMB partition has been > observed to cause CRC errors on the RPMB reads (-EILSEQ). > > Since RPMB reads can not be retried, the clients would be directly > affected by the errors. > > This commit disables the request prior to RPMB switching while allowing > the pause interface to still request a retune before the pause for other > use cases. > > This was verified with the sdhci-of-arasan driver (ZynqMP) configured > for HS200 using two separate eMMC cards (DG4064 and 064GB2). In both > cases, the error was easy to reproduce triggering every few tenths of > reads. > > Signed-off-by: Jorge Ramirez-Ortiz > Acked-by: Avri Altman Is the difference between this mail and the previous one just Avri's Ack? No need to resend for every tag you receive. > > --- > drivers/mmc/core/block.c | 2 +- > drivers/mmc/core/host.c | 7 ++++--- > drivers/mmc/core/host.h | 2 +- > 3 files changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c > index f9a5cffa64b1..1d69078ad9b2 100644 > --- a/drivers/mmc/core/block.c > +++ b/drivers/mmc/core/block.c > @@ -859,7 +859,7 @@ static int mmc_blk_part_switch_pre(struct mmc_card *card, > if (ret) > return ret; > } > - mmc_retune_pause(card->host); > + mmc_retune_pause(card->host, false); > } > > return ret; > diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c > index 096093f7be00..a9b95aaa2235 100644 > --- a/drivers/mmc/core/host.c > +++ b/drivers/mmc/core/host.c > @@ -119,13 +119,14 @@ void mmc_retune_enable(struct mmc_host *host) > > /* > * Pause re-tuning for a small set of operations. The pause begins after the > - * next command and after first doing re-tuning. > + * next command and, if retune is set, after first doing re-tuning. > */ > -void mmc_retune_pause(struct mmc_host *host) > +void mmc_retune_pause(struct mmc_host *host, bool retune) > { > if (!host->retune_paused) { > host->retune_paused = 1; > - mmc_retune_needed(host); > + if (retune) > + mmc_retune_needed(host); > mmc_retune_hold(host); > } > } > diff --git a/drivers/mmc/core/host.h b/drivers/mmc/core/host.h > index 48c4952512a5..321776b52270 100644 > --- a/drivers/mmc/core/host.h > +++ b/drivers/mmc/core/host.h > @@ -18,7 +18,7 @@ void mmc_retune_disable(struct mmc_host *host); > void mmc_retune_hold(struct mmc_host *host); > void mmc_retune_release(struct mmc_host *host); > int mmc_retune(struct mmc_host *host); > -void mmc_retune_pause(struct mmc_host *host); > +void mmc_retune_pause(struct mmc_host *host, bool retune); > void mmc_retune_unpause(struct mmc_host *host); > > static inline void mmc_retune_clear(struct mmc_host *host) > -- > 2.34.1