Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7041782rdb; Wed, 3 Jan 2024 02:35:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IGMr9s+t/n5diFTfruqx/qWrcrJqYEbo4gtS4Dro90TLCEg/KSWlC+wBQXLNZvZgQdJDn2E X-Received: by 2002:a05:6a20:3218:b0:18c:328b:61db with SMTP id hl24-20020a056a20321800b0018c328b61dbmr7955950pzc.1.1704278157230; Wed, 03 Jan 2024 02:35:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704278157; cv=none; d=google.com; s=arc-20160816; b=yshZyHg6CM30pudwU6TCr9V9/CTU079/OFIpOGiWL5wXSnE5XhBFi1CPfyH5LL/qyB gbporc9W6+lLw6mYlA3I6Av48skaEFI16R+HdYu6iF1SWwZr2SAVXBj+vggTtW9Fautw U4uQ7seey2N7ISTMLb63hDy+9h/fDKuvhHRCfY7oLL9mIxpz5ZZFJeygsX+4fukWk87C 9qv/e5yZW9yeVP+eVani4zj/dHl0oTCVBUKc8NoOYTN8jbXBzRPyrowT0DB/H6MQ0H8N iT52m3yO++tgHsHTex9WyinSHNw5cKe+hDmTjqdxD7eOMFBAgFmznyDARrqDaITHJD2d BXMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=XKcY2AE/GnBCs5Lls0ys+fJ/B8ZrEmV4zu/inBIOxr4=; fh=LxTTR2laxmdcPVzPDa1narNa7rCStLm0f6o0nuJFTdY=; b=hO+QvtRpPw2V1sHo2OczcJk5F1Z17o+79ccn9v4ODrX/XshzuR0KdLrCzivNIHG8F0 l17RMH6droeHyHTfhPQiZ3AvzIBjeSSMnS/ujQ3tGM/kZuuZTI7bSysU6z1U8/dsh8QI r7k8ek61yOWpG0gBTRCmhketgq9ZKn1B7OxXoMeGQXQQiJGheSY2nujxwBsuJ1fJoe+k V6PLKsyruIO+kR4snKJLb2940Xi8EyKdHVAFklWWhWQBdndK45VKD+nmSlpDVPkVQKn6 cJjnNskmdJeahguAy6D4uwUjBO+9eUFyTadk9K1aifFb1I6ZTJ4JlTZRvPGARR+xhAnf R1yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P7Koooix; spf=pass (google.com: domain of linux-kernel+bounces-15398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15398-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w189-20020a6362c6000000b005cdc2bdc091si18696829pgb.436.2024.01.03.02.35.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 02:35:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P7Koooix; spf=pass (google.com: domain of linux-kernel+bounces-15398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15398-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 58FB8B232BD for ; Wed, 3 Jan 2024 10:35:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82F0B18C24; Wed, 3 Jan 2024 10:35:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="P7Koooix" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com [209.85.128.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F47A18C13 for ; Wed, 3 Jan 2024 10:35:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-5e76948cda7so68292897b3.3 for ; Wed, 03 Jan 2024 02:35:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704278139; x=1704882939; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XKcY2AE/GnBCs5Lls0ys+fJ/B8ZrEmV4zu/inBIOxr4=; b=P7Koooix6G88RAYwhBkB9Nnt4mAfEeiHBOIxC7yOTvWgDGZrc7qf5n17Jdzd6Mc26W A/CUiVcTEnYidG8eJxHS/R7joWBJsEhW+vQv3i1Kp4tMViu6D2DNFESzh324SRNruvLm 2B0zrjPYKFjIWS2NVRJVDoyVjYNHyXqYufl5YRfpR0igblgclGSkIhTXVCIOE3cRs+Fl cG5cQvav7Jl0vCT+XPntYxLevdwmDZsUDrTrbgsLo98Vkirfue1zDLNbAvkYHP1yRkAu Cqe9LAO7l2XF+z9KEutGsRGG2RuJEyPuXTnZVV5hYB8HDde8BHk0BdzrYwA5w/TqDX42 4bJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704278139; x=1704882939; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XKcY2AE/GnBCs5Lls0ys+fJ/B8ZrEmV4zu/inBIOxr4=; b=Y4yAIi1CCe/XI6GVnjo5xeLwRg+kK09JY+MBTYt63OkoVJp84jmWnxC2KOqXmTYWk+ T2uBp8w4OQXVlsI7xxWkk4UYG8HLxwa1CWGZye8z2vuZkvJVJolhESWKG7Cz4oecdsPb uV2b/djhBWJGiTQKIvILq9mcZhSeNIG8zYhmazm9Cg4QloEp07u/vZ+zGuJDzEicCTd1 /XU2sblYyyZMzMMJiTAvekB2crzIPbdkjNWoMW3g/GZTgyuWdUVrwN5dskGfeWEo4QyS v6vKjHBVjUaIp7ZgTocmLAFd7f3N/brYCK/rPYtKV8teyHbM2jtkwnL0B2+u1ahBwbKY NY9A== X-Gm-Message-State: AOJu0YyhcGViu1y9Gmf+U7GO5bXCRNXEoV+j+p0y6W6XXnSxXygbQKqB O2ZP8aNTJCu6GedUxRKP8bAlhs6UA3v3DWufFOraKk8JhBymZA== X-Received: by 2002:a81:c509:0:b0:5f1:5ab9:2f53 with SMTP id k9-20020a81c509000000b005f15ab92f53mr2770939ywi.27.1704278139277; Wed, 03 Jan 2024 02:35:39 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231211165500.310097-1-jorge@foundries.io> In-Reply-To: <20231211165500.310097-1-jorge@foundries.io> From: Ulf Hansson Date: Wed, 3 Jan 2024 11:35:03 +0100 Message-ID: Subject: Re: [PATCH] mmc: rpmb: do not force a retune before RPMB switch To: Jorge Ramirez-Ortiz Cc: adrian.hunter@intel.com, Avri.Altman@wdc.com, christian.loehle@arm.com, ricardo@foundries.io, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Mon, 11 Dec 2023 at 17:55, 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 retune request prior to switching to the RPMB > partition: mmc_retune_pause() no longer triggers a retune before the > pause period begins. > > 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 This seems reasonable, but I would like to see some justification from a performance point of view in the commit message too. Moreover, please bump the version number of the patch at each iteration and add a version summary of what has changed. That helps the review process. Kind regards Uffe > --- > v2: > mmc_retune_pause() no longer can trigger a retune. > Keeping Avri Altman Acked-by since they are functionally equivalent. > v1: > modify mmc_retune_pause to optionally trigger a retune. > > drivers/mmc/core/host.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c > index 096093f7be00..ed44920e92df 100644 > --- a/drivers/mmc/core/host.c > +++ b/drivers/mmc/core/host.c > @@ -119,13 +119,12 @@ 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. > */ > void mmc_retune_pause(struct mmc_host *host) > { > if (!host->retune_paused) { > host->retune_paused = 1; > - mmc_retune_needed(host); > mmc_retune_hold(host); > } > } > -- > 2.34.1