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 92985C433FE for ; Fri, 21 Oct 2022 09:08:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4B18C84897; Fri, 21 Oct 2022 11:08:22 +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="OpHZms2C"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 11697848A1; Fri, 21 Oct 2022 11:08:20 +0200 (CEST) Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (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 7082983B23 for ; Fri, 21 Oct 2022 11:08:10 +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 mailout1.samsung.com (KnoxPortal) with ESMTP id 20221021090802epoutp0167c34327b2c6ba261a7996781fd44168~gCmLpu60Z0104001040epoutp01Q for ; Fri, 21 Oct 2022 09:08:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20221021090802epoutp0167c34327b2c6ba261a7996781fd44168~gCmLpu60Z0104001040epoutp01Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1666343282; bh=tY5lIM2ob/nabzf0SWMQVGHoGvr+X5YhIRVIIKEP+Vg=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=OpHZms2C3X88L4mNII8FFAW25Of7yu6OHyw7tJJWmXYUY10ozWh1YCpGSBb1zoFTl fa8jFIR37/gGxOdvzBDBil+IUQJNS0N5e8dds588w0Yvdjp6Tz0DSlsSfrHk3s5JPj atqHTQqk2mebJyeFdXzloLyGLzs39WrWZuR0JCCo= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20221021090801epcas1p4311a73338348afa79c934716e4f58b37~gCmLRoBQK2502525025epcas1p4M; Fri, 21 Oct 2022 09:08:01 +0000 (GMT) Received: from epsmges1p5.samsung.com (unknown [182.195.36.133]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4MtzC45Dfdz4x9Q5; Fri, 21 Oct 2022 09:08:00 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 17.42.17064.07162536; Fri, 21 Oct 2022 18:08:00 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p4.samsung.com (KnoxPortal) with ESMTPA id 20221021090800epcas1p4e8530e3a6eadc6b83cf8b5ce322fd029~gCmKEYKsM2502525025epcas1p4F; Fri, 21 Oct 2022 09:08:00 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20221021090800epsmtrp2f6cc81a6c9c5ea67fc85ccfe3d6c2cc2~gCmKDI1cw2628126281epsmtrp20; Fri, 21 Oct 2022 09:08:00 +0000 (GMT) X-AuditID: b6c32a39-3edff700000042a8-79-635261704e91 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 86.7C.14392.07162536; Fri, 21 Oct 2022 18:08:00 +0900 (KST) Received: from jh80chung01 (unknown [10.113.111.84]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20221021090800epsmtip1aeb3e6eb950c1e1b48b08377377f6e51~gCmJ2gGiu0941709417epsmtip1P; Fri, 21 Oct 2022 09:08:00 +0000 (GMT) From: =?ks_c_5601-1987?B?waTA58jG?= To: "'Matt Ranostay'" , Cc: In-Reply-To: <20221021071602.349483-1-mranostay@ti.com> Subject: RE: [PATCH] drivers: mmc: check the return value of mmc_send_if_cond() call Date: Fri, 21 Oct 2022 18:07:59 +0900 Message-ID: <028301d8e52c$9e1270c0$da375240$@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ks_c_5601-1987" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQJkJlgyTmyA1y9whWcG0wPq5dROpgKBLgU6rO4B4lA= Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLKsWRmVeSWpSXmKPExsWy7bCmnm5BYlCyQds0LYvlF48yWvxY9YXV 4u3eTnYHZo+zd3Ywemx8t4PJ4/iN7UwBzFHZNhmpiSmpRQqpecn5KZl56bZK3sHxzvGmZgaG uoaWFuZKCnmJuam2Si4+AbpumTlAm5QUyhJzSoFCAYnFxUr6djZF+aUlqQoZ+cUltkqpBSk5 BaYFesWJucWleel6eaklVoYGBkamQIUJ2RlnmtuYCz5xVew/fYylgfEWRxcjJ4eEgInEio87 GbsYuTiEBHYwShyZ8oYFwvnEKLF2zxUo5xujRPOCGewwLV8+rYZK7GWUWPr/OjOE85JR4sLh I6wgVWwCNhIN2w4ygdgiQHZ373lmEJtZQEqi6eQuRhCbU8Bc4saTiWwgtrBAmMT0B+/BNrAI qEoce/sYrIZXwFLi14LlTBC2oMTJmU9YIOYYSSxZPZ8JwpaX2P52DjPEdQoSuz8dBbqBA2iv lcShifwQJSISszvboEreskt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4VEbCSODSRH6JERGJ2ZxvzBEbhWUgmzUIyaRaSSbOQtCxgZFnFKJlaUJybnltsWGCY l1quV5yYW1yal66XnJ+7iREcE1qaOxi3r/qgd4iRiYPxEKMEB7OSCG/Bu4BkId6UxMqq1KL8 +KLSnNTiQ4zSHCxK4rwXuk7GCwmkJ5akZqemFqQWwWSZODilGpjMTDpyzXVkz+SwndXsZa56 HRkakP9trnTLevbVNq2KMmZZC5mtHj4W7zMQKhby9ShXmXPubJEjV4beer2aXUqbRHlvLm6Q iOpMtCurF/OcWuz22nXZ9hP2Mz4WKmvottiqZbctOHs84eO27YvFd+qLG3FPrxa+yrH42/65 x6YkHIx72Tnxc4hvlAzvUw/jfw+V/D8l/botsKYw/1mzX92uK29nzO2b8lZ84tmdGy9XsOoY aFqf6LZz4FBzenPPb8dG3lK9v8ufqOgclLNgmed1KWz2zoYjIpJ9s4+rbVG+1HaoW7yp8Pz2 ozHs24wVb1ksllm/SItneYHDz+8LHn9e+mnLpDBfBT6O+7dWcCuxFGckGmoxFxUnAgDsxjHB +AIAAA== X-CMS-MailID: 20221021090800epcas1p4e8530e3a6eadc6b83cf8b5ce322fd029 X-Msg-Generator: CA X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20221021071627epcas1p443b2a156e4ef08f8be8b9d02cb699acc References: <20221021071602.349483-1-mranostay@ti.com> 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 > -----Original Message----- > From: Matt Ranostay [mailto:mranostay@ti.com] > Sent: Friday, October 21, 2022 4:16 PM > To: peng.fan@nxp.com; jh80.chung@samsung.com > Cc: u-boot@lists.denx.de; Matt Ranostay > Subject: [PATCH] drivers: mmc: check the return value of mmc_send_if_cond() call > > Return value from mmc_send_if_cond() isn't checked if it is a error state > and the result immediately is overwritten with the sd_send_op_cond() call. > > Add check for -EOPNOTSUPP to fail early, and trigger a retry for any other > error code. > > Fixes: afd5932b2c27 ("Revert "mmc: retry the cmd8 to meet 74 clocks requirement in the spec") > Signed-off-by: Matt Ranostay Reviewed-by: Jaehoon Chung Best Regards, Jaehoon Chung > --- > drivers/mmc/mmc.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c > index 0b7c0be8cbc..e26a457a74c 100644 > --- a/drivers/mmc/mmc.c > +++ b/drivers/mmc/mmc.c > @@ -2862,6 +2862,13 @@ retry: > > /* Test for SD version 2 */ > err = mmc_send_if_cond(mmc); > + if (err == -EOPNOTSUPP) > + return err; > + > + if (err) { > + mmc_power_cycle(mmc); > + goto retry; > + } > > /* Now try to get the SD card's operating condition */ > err = sd_send_op_cond(mmc, uhs_en); > -- > 2.38.GIT