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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3702FCCA489 for ; Tue, 26 Jul 2022 08:28:53 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 46196841E0; Tue, 26 Jul 2022 10:28:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.b="MXe0zQ7K"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7A76F84051; Tue, 26 Jul 2022 10:28:50 +0200 (CEST) Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C3E3B841EF for ; Tue, 26 Jul 2022 10:28:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jh80.chung@samsung.com Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20220726082842epoutp04eadaf1790bc2468799dd1660ee19ff87~FU8AmYX871940019400epoutp04h for ; Tue, 26 Jul 2022 08:28:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20220726082842epoutp04eadaf1790bc2468799dd1660ee19ff87~FU8AmYX871940019400epoutp04h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1658824122; bh=XStVg7HsYC7KXiag3DPpSWJgeLrqXN5QBZN4qMXEubw=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=MXe0zQ7Ko65r0vdsNcIJ2c5jbr47d4phMolkomUKBoUywaWv75/1KjkDU5FK3b3Us QWWlQk9OSnq7Ivf6sc/KHRoI0F537J2IHpdLCx5FL9OtDzWTG5gbPSRXyaWkQkpW+1 z8U7e3leQB3wXIqRSLGgRCj6DxiSNUzZvoKKKNU4= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20220726082841epcas1p1df221177bc1021c25f87a3b5bc027951~FU7-7eOKj2094220942epcas1p1r; Tue, 26 Jul 2022 08:28:41 +0000 (GMT) Received: from epsmges1p4.samsung.com (unknown [182.195.38.233]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4LsVRr5CTCz4x9Py; Tue, 26 Jul 2022 08:28:40 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id A3.3C.10203.8B5AFD26; Tue, 26 Jul 2022 17:28:40 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p4.samsung.com (KnoxPortal) with ESMTPA id 20220726082840epcas1p495e05045d32a4f4e85642b4000703eff~FU7_kBwwX1597315973epcas1p40; Tue, 26 Jul 2022 08:28:40 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220726082840epsmtrp1c82a932ae41b5123839bbc423e87c935~FU7_jXV4C0972709727epsmtrp1N; Tue, 26 Jul 2022 08:28:40 +0000 (GMT) X-AuditID: b6c32a38-597ff700000027db-21-62dfa5b852f5 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id F3.80.08802.8B5AFD26; Tue, 26 Jul 2022 17:28:40 +0900 (KST) Received: from [10.113.113.235] (unknown [10.113.113.235]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220726082840epsmtip2bd08c7beaa548559d5d9472d4c1081da~FU7_Xy7c10455204552epsmtip2K; Tue, 26 Jul 2022 08:28:40 +0000 (GMT) Message-ID: Date: Tue, 26 Jul 2022 17:28:39 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] mmc: Do not send status of send_status is false Content-Language: en-US To: Marek Vasut , u-boot@lists.denx.de Cc: Kirill Kapranov , =?UTF-8?Q?Marek_Beh=c3=ban?= , Pantelis Antoniou , Ye Li From: Jaehoon Chung In-Reply-To: <20220714235824.421904-1-marex@denx.de> Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFJsWRmVeSWpSXmKPExsWy7bCmvu6OpfeTDJYvV7DY96SDzeLEkq+M Fm/aGhktdt2ezGLxdm8nu0Xb8UOMDmwe835OZPKYfXkOu8e8WSdYPM7e2cHosenyHUaPje92 MAWwRWXbZKQmpqQWKaTmJeenZOal2yp5B8c7x5uaGRjqGlpamCsp5CXmptoqufgE6Lpl5gDd oaRQlphTChQKSCwuVtK3synKLy1JVcjILy6xVUotSMkpMC3QK07MLS7NS9fLSy2xMjQwMDIF KkzIzviz6g5jwX2eisV3/zM2MC7m6mLk5JAQMJFo3TWRsYuRi0NIYAejxKwji1khnE+MErP3 trGBVAkJfGaUeLytDKZj7rq5UB27GCX+PPzGDuG8Z5Q4v+gaI0gVr4CdxKUNx5hBbBYBVYnf 7x8yQ8QFJU7OfMICYosKREqs2X2WHcQWFnCR+NTQCLaNWUBc4taT+UwgtoiAqcTaWYuZQBYw C2xllPh39ChYEZuAjsT2b8eBEhwcnEAnrZsuDdErL9G8dTYzSL2EwFQ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wC2xl lNjY8AcsISRgLPGwcSo7iM0moCOx/dtxJpCDOIGuXjddGsRkFlCXWD9PCGKkvETz1tnMExiF ZiG5YhaSbbMQOmYh6VjAyLKKUTK1oDg3PbfYsMAoL7Vcrzgxt7g0L10vOT93EyM4ZrS0djDu WfVB7xAjEwfjIUYJDmYlEd6E6PtJQrwpiZVVqUX58UWlOanFhxilOViUxHkvdJ2MFxJITyxJ zU5NLUgtgskycXBKNTAdUuGbk2qeffHgQZ85dpOEnzklzNbnfvlo+p99hdxLDNM31k99ViK4 6LqTZt6Dw+L7Dq7QyJh/R8dSS/xHcuA3xrvKmslCteJcHFMi5c6uvO8hnrhXbEJV5vk52zYc v7npTs3rSoZOPuuzExZfeHUv4s/Txc95vDNlmro9zrfqJt+Out7mkLjghm1ok7rkKv8+9yMH z4SI+9durn9cFXeQ//6Vbse47PTbq1r89z3leRi++r3KpV/Pk3rCqhdWNAtUhq7u+xVRucP/ aM1PtTyh1uunnwvdz5j29UVzi3PgsabGp8u8t3W9lD90vVT80F17zucOcz8z/eY8cOyx6o+z u1W5DqpPX2IqNXnS0a6rSizFGYmGWsxFxYkA4OPr7wgDAAA= X-CMS-MailID: 20220726082840epcas1p495e05045d32a4f4e85642b4000703eff X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220726082840epcas1p495e05045d32a4f4e85642b4000703eff References: <20220714235824.421904-1-marex@denx.de> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 7/15/22 08:58, Marek Vasut wrote: > Commit 44645f87de5 ("mmc: Fix mmc_switch excessive timeout") introduced > a side effect where CMD13 SEND_STATUS is issued in case mmc_wait_dat0() > does not return -ENOSYS and $send_status is not set. This happens on all > hardware which does implement .mmc_wait_dat0 callback, e.g. i.MX8M . > > This leads to lengthy timeout before booting OS in case of eMMC in one > of the HS200/HS400 modes, since the card cannot respond to CMD13 while > downgrading from HS200/HS400 to regular HS mode. > > Fix this by adding the missing conditional. > > Fixes: 44645f87de5 ("mmc: Fix mmc_switch excessive timeout") > Signed-off-by: Marek Vasut > Cc: Jaehoon Chung > Cc: Kirill Kapranov > Cc: Marek BehĂșn > Cc: Pantelis Antoniou > Cc: Ye Li Reviewed-by: Jaehoon Chung Best Regards, Jaehoon Chung > --- > drivers/mmc/mmc.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c > index 12d29da528a..b62baca8457 100644 > --- a/drivers/mmc/mmc.c > +++ b/drivers/mmc/mmc.c > @@ -831,6 +831,9 @@ static int __mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value, > return 0; > } > > + if (!send_status) > + return 0; > + > /* Finally wait until the card is ready or indicates a failure > * to switch. It doesn't hurt to use CMD13 here even if send_status > * is false, because by now (after 'timeout_ms' ms) the bus should be