Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3627959iob; Sat, 7 May 2022 10:10:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqotn31p0F0BxTLDdTgmECyEisw7vgX73TYoh/pdk75JRlzoxzBYfDVHVNnr0xPzEfoGBi X-Received: by 2002:a17:902:7298:b0:158:3a08:3163 with SMTP id d24-20020a170902729800b001583a083163mr8696128pll.133.1651943417277; Sat, 07 May 2022 10:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651943417; cv=none; d=google.com; s=arc-20160816; b=PS2v1c/ZJ+vPnQ96OlHrwqBfiNp2dRGqgr6xMovtb/VdRR7e7QokBsKfmpiY2dnV87 TvVRA2OfITotwHjMDA7h/TULNy4YXNyxwRHNNZyK77xeoI1BAGOZRN/3NBPlXi7tZPYB UL65PVHUKBawhQ6t9RBKBiJkcsi9Js5SLgCrnHbJQmT1YPM+VqLGXHPBrisQ0x+nyQXX wlSTbixQeeofqqeXHCad/qS5tOHX5RBtVZHcABfuQ/LuxWJkn/ill4N7z4ASeBihXV35 QiyDckUMZKTp55qcy4bTbA3ug3Z+0NoqRLK7IO5ina90e9zJ7sA5qygA9azrOAvt8Xgt W1zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=VufXFd+RqNGX/bmcvjwIIPynyN6QIirDos7c5+E2Lik=; b=dAYljy2bhESwMTz9fmQyfvym+GjjCvOis7Llf1yL9zWP9g3Wd908PYq6l33lITtozq lcNY6dn15E1pRS6zgjO20WBZ/UbR2wVyeF8rWHm662Oabpjx1yEqWpLksYnXGRERzANq s9veYSEsa0MkIhKL3YQAjHR8xNGvERQE1YuZbcx55MOQbcmvKOWVDhMIDeU9FB/3hmJ8 BVCz7IKNlRJQ6oXQO4QB/0/0mDIwo/YmbsF7CVROMKoELXJ7xROrcmdVB84Fru6rVpgI X9lX52pdPSDhAIMaws3JARlnbw2Ae33Qeoo6bpyt4IEAUx4H1APdCfe/KGzYkROxl5ar rSNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mh15-20020a17090b4acf00b001dc5a2406bdsi9168391pjb.91.2022.05.07.10.10.02; Sat, 07 May 2022 10:10:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344765AbiEDGAH (ORCPT + 99 others); Wed, 4 May 2022 02:00:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230149AbiEDGAE (ORCPT ); Wed, 4 May 2022 02:00:04 -0400 X-Greylist: delayed 572 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 03 May 2022 22:56:28 PDT Received: from smtp2.math.uni-bielefeld.de (smtp2.math.uni-bielefeld.de [129.70.45.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DE69201BC; Tue, 3 May 2022 22:56:28 -0700 (PDT) Received: from math.uni-bielefeld.de (kvm01.math.uni-bielefeld.de [129.70.45.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by smtp2.math.uni-bielefeld.de (Postfix) with ESMTPSA id 72BA360213; Wed, 4 May 2022 07:46:53 +0200 (CEST) Date: Wed, 4 May 2022 07:46:52 +0200 From: Jean Rene Dawin To: Ulf Hansson Cc: "H . Nikolaus Schaller" , Huijin Park , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Subject: Re: [PATCH] mmc: core: Restore (almost) the busy polling for MMC_SEND_OP_COND Message-ID: <20220504054652.GA7851@math.uni-bielefeld.de> References: <20220304105656.149281-1-ulf.hansson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ulf Hansson wrote on Mon 7/03/22 13:17: > On Fri, 4 Mar 2022 at 11:57, Ulf Hansson wrote: > > > > Commit 76bfc7ccc2fa ("mmc: core: adjust polling interval for CMD1"), > > significantly decreased the polling period from ~10-12ms into just a couple > > of us. The purpose was to decrease the total time spent in the busy polling > > loop, but unfortunate it has lead to problems, that causes eMMC cards to > > never gets out busy and thus fails to be initialized. > > > > To fix the problem, but also to try to keep some of the new improved > > behaviour, let's start by using a polling period of 1-2ms, which then > > increases for each loop, according to common polling loop in > > __mmc_poll_for_busy(). > > > > Reported-by: Jean Rene Dawin > > Reported-by: H. Nikolaus Schaller > > Cc: Huijin Park > > Fixes: 76bfc7ccc2fa ("mmc: core: adjust polling interval for CMD1") > > Signed-off-by: Ulf Hansson > > --- > > > > Jean Rene and H. Nikolaus, if this doesn't work, please try extending the > > the MMC_OP_COND_PERIOD_US a bit, to so see if we can find a value that always > > works. > > > > Kind regards > > Uffe > > Applied for fixes and by adding two tested-by tags from you, thanks! > > Kind regards > Uffe Hi, with the current value of MMC_OP_COND_PERIOD_US = 1ms I still see mmc1: Card stuck being busy! __mmc_poll_for_busy mmc1: error -110 doing runtime resume regularly. The same with 2ms. Setting it to 4ms makes the messages go away. Would it be ok to increase MMC_OP_COND_PERIOD_US to 4ms? --- drivers/mmc/core/mmc_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index 180d7e9d3400..1fd57f342842 100644 --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c @@ -21,7 +21,7 @@ #define MMC_BKOPS_TIMEOUT_MS (120 * 1000) /* 120s */ #define MMC_SANITIZE_TIMEOUT_MS (240 * 1000) /* 240s */ -#define MMC_OP_COND_PERIOD_US (1 * 1000) /* 1ms */ +#define MMC_OP_COND_PERIOD_US (4 * 1000) /* 1ms */ #define MMC_OP_COND_TIMEOUT_MS 1000 /* 1s */ static const u8 tuning_blk_pattern_4bit[] = { -- 2.35.1 Regards, Jean Rene