From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 02 Jul 2025 14:05:05 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uWwD3-00DI6t-2c for lore@lore.pengutronix.de; Wed, 02 Jul 2025 14:05:05 +0200 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1uWwD3-0006jI-9p for lore@pengutronix.de; Wed, 02 Jul 2025 14:05:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=10ehhI552co+sbY7MfC8GR9v2METWVIOel6KR4ac9tM=; b=SS6zhhmxXslEiAD92cPkWh/Fyx 7SRknUBbQFcHjSdsCyTAVNaBC8ds1Stu/OiTcbe56Cv826m8jct8SpB27JUoT/663SLoLCBSZD5o4 jK/G+7+FTiT+CR3+fzRBj9h7yThzjvNY25bDepx0GFSd3wGcdx/l19QfDHcklN6gc6HvXJOH0JyV8 Jqedt0xskq3Jn7vowrHuC5TQatjK8uTKkRtl4nHIzpPbZbeXx4ufkya9LB9cYdunbLnRKPe4su81d gbrQcwB6VojHJ5TIGRzr0GXWbvjdIzhu6L8Y6MkXC326ZheH7MrKjYWhC2uqejURbu2HCOTForvg8 9EzzxxOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uWwCa-00000008F0i-2t7u; Wed, 02 Jul 2025 12:04:36 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uWvDi-000000083TC-1669 for barebox@lists.infradead.org; Wed, 02 Jul 2025 11:01:44 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1uWvDg-0005t7-Tx; Wed, 02 Jul 2025 13:01:40 +0200 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uWvDg-006QSZ-2J; Wed, 02 Jul 2025 13:01:40 +0200 Received: from localhost ([::1] helo=dude05.red.stw.pengutronix.de) by dude05.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1uWvDg-009NqZ-0M; Wed, 02 Jul 2025 13:01:40 +0200 From: Ahmad Fatoum To: barebox@lists.infradead.org Cc: Ahmad Fatoum Date: Wed, 2 Jul 2025 13:01:37 +0200 Message-Id: <20250702110139.2235318-3-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250702110139.2235318-1-a.fatoum@pengutronix.de> References: <20250702110139.2235318-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250702_040142_326634_AB40677E X-CRM114-Status: GOOD ( 13.37 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-5.3 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH 2/4] mci: bcm2835: allow core to request timeouts longer than 100ms X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) For longer erase operations in future, the core may want to increase the busy_timeout value beyond 100ms. Drivers should respect that and only enforce a minimum timeout duration, but not a maximum one. This is not a full solution, because some drivers/hardwares indeed have a maximum duration they can wait, but that should probably be solved via a max_busy_timeout attribute for MMC hosts like Linux does. Signed-off-by: Ahmad Fatoum --- drivers/mci/mci-bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mci/mci-bcm2835.c b/drivers/mci/mci-bcm2835.c index 0099e4e35753..aad5ae0d9e1d 100644 --- a/drivers/mci/mci-bcm2835.c +++ b/drivers/mci/mci-bcm2835.c @@ -129,7 +129,7 @@ static int bcm2835_mci_request(struct mci_host *mci, struct mci_cmd *cmd, } /* BCM2xxx SDHCI might take up to 100ms to complete a command */ - cmd->busy_timeout = 100; + cmd->busy_timeout = max(cmd->busy_timeout, 100U); ret = sdhci_wait_idle_data(&host->sdhci, cmd); if (ret) -- 2.39.5