From patchwork Thu Feb 1 14:05:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 1893953 X-Patchwork-Delegate: jh80.chung@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=qTGUI+Ka; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TQgfw3HnCz23gD for ; Fri, 2 Feb 2024 01:06:00 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CA43687C69; Thu, 1 Feb 2024 15:05:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="qTGUI+Ka"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2B8A887BDB; Thu, 1 Feb 2024 15:05:47 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_REPLYTO, FREEMAIL_REPLYTO_END_DIGIT,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D6C3486DD2 for ; Thu, 1 Feb 2024 15:05:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=devnull+forbidden405.outlook.com@kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id AD4486144D; Thu, 1 Feb 2024 14:05:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 5CD3EC433F1; Thu, 1 Feb 2024 14:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706796343; bh=KW4B22ZfQHHRcm4cEXbaEE074Oc0+WDqCDdlBgm91xo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=qTGUI+KaTIx0VJGJ5B+bAtYlk76JMomlwTeSGWpvdn9Y+wihgrEGuNT4OBuNuhWfY Fz1oo4ZVprNQvSApiHTN45gU2mRlrembJjb+8HfwWoGP+slV7JWMxaqd2i+Tba/xs6 yJP/QawwK3IWKugcZk2zUqjpnMCcmZNSYaLdaJH7WfATE9XKboxxc3smW74ISNGvjd QLG8afw/eCK/TfMQYNOhFkIorwvadjz0lm1/zYk0kK0//HVijBIWebW1ELvnMT7Wnq F9E8PzmcocSNmDQnypQ+noifTmrDwGaRq+JVy4NtJMR7pzY4c+AvHLDh+Ms4kIPT4R HgOFrq8LEYADg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44E0FC4828D; Thu, 1 Feb 2024 14:05:43 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Thu, 01 Feb 2024 22:05:43 +0800 Subject: [PATCH v2 2/3] mmc: dw_mmc: Don't return error if data busy timeout MIME-Version: 1.0 Message-Id: <20240201-mmc-v2-2-9f09dc1335fd@outlook.com> References: <20240201-mmc-v2-0-9f09dc1335fd@outlook.com> In-Reply-To: <20240201-mmc-v2-0-9f09dc1335fd@outlook.com> To: Peng Fan , Jaehoon Chung Cc: u-boot@lists.denx.de, Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706796342; l=966; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=7I6x1oiNonfhfkY+33Aj1D+ocpUIR/g2QtbazCaveps=; b=lPdzazMTK3SbqyId2a6GgZSKuF1bkKJqIsnavlmh4ntQjGooNlkQgJmdTwn9yQcOO94ETSFuu 46uwv+nYnnoCn4q3qxZyVfAZnXzuKW5pYQaIvJDZSapgLrm4BqGLZ8j X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen 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: , Reply-To: forbidden405@outlook.com Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean From: Yang Xiwen As described in [1], some poor hardware or cards would fail to release the bus and keep driving data lines low. Ignore it and send the next cmd directly seems okay for most cases. [1]: https://patchwork.kernel.org/project/linux-mmc/patch/1424458179-5456-1-git-send-email-dianders@chromium.org/ Signed-off-by: Yang Xiwen Tested-by: Jaehoon Chung --- drivers/mmc/dw_mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 400066fa99..e103664145 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -262,8 +262,8 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, while (dwmci_readl(host, DWMCI_STATUS) & DWMCI_BUSY) { if (get_timer(start) > timeout) { - debug("%s: Timeout on data busy\n", __func__); - return -ETIMEDOUT; + debug("%s: Timeout on data busy, continue anyway\n", __func__); + break; } }