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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7483C433EF for ; Thu, 14 Oct 2021 14:51:42 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0EBC160C49 for ; Thu, 14 Oct 2021 14:51:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0EBC160C49 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nic.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6D2DC836F1; Thu, 14 Oct 2021 16:51:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz 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; secure) header.d=nic.cz header.i=@nic.cz header.b="YQdNIDpU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 25EED836AD; Thu, 14 Oct 2021 16:51:37 +0200 (CEST) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (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 4A1D6836AD for ; Thu, 14 Oct 2021 16:51:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from dellmb (unknown [IPv6:2001:1488:fffe:6:8747:7254:5571:3010]) by mail.nic.cz (Postfix) with ESMTPSA id B3E6813FDE4; Thu, 14 Oct 2021 16:51:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1634223092; bh=517TQbkkne6a9YJyosKCih3Lui0VlWteyFbfXP/Dts4=; h=Date:From:To; b=YQdNIDpUOqtneulOJYf/FajJkKfHtnT7u6kwGGBRFzVPyLKwyDDsWX73qUKWOnvY1 TBK2Hxa+ev3O4IeRAe9DjSywSEfFC43HTtuBW/Tv26lxlssTGVuLMaV3wnyAkzyluz Ho7kPE4rU01bWUNOsDyL1wcDbicAS7UDoStBZ44M= Date: Thu, 14 Oct 2021 16:51:32 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Kirill Kapranov , Ye Li , Tom Rini , Peng Fan Cc: u-boot@lists.denx.de, Pantelis Antoniou Subject: Re: [PATCH 1/1] mmc: Fix mmc_switch excessive timeout Message-ID: <20211014165132.50480ec1@dellmb> In-Reply-To: <20211009204959.5864-1-kirill.kapranov@compulab.co.il> References: <20211009204959.5864-1-kirill.kapranov@compulab.co.il> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Reviewed-by: Marek Beh=C3=BAn Tested-by: Marek Beh=C3=BAn This fixes a bug introduced in commit 3f4e52fc9d81 https://source.denx.de/u-boot/u-boot/-/commit/3f4e52fc9d81e95ee90f6be7b05= ca62fc8c7c1e3 and it is incorrect. It caused the mmc initialization to take 4 seconds (previously it was <0.1s). The code in Linux also uses &&, and the comment says: If the host doesn't support HW polling via the ->card_busy() ops and when it's not allowed to poll by using CMD13, then we need to rely on waiting the stated timeout to be sufficient. See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree= /drivers/mmc/core/mmc_ops.c?h=3Dv5.15-rc5#n598 Peng, could we get this merged ASAP? :) Marek