From 8432fc3feab34d2263644a5d6819489f9d566468 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Mon, 30 Nov 2026 16:49:03 +0100 Subject: [PATCH] mmc: bcm2835-mmc: Warn once when the inhibit bits stay set At boot, the first command on the Wi-Fi SDIO controller of a Pi 400 can find the inhibit bits still set. The core retries the command, and the SDIO card is found about 85 ms later. Wi-Fi works. pr_err() puts this message on the console of every boot. Warn once at warning level instead. A later failure still shows once in the log. Assisted-by: Claude Opus 5.5 Signed-off-by: Igor Pecovnik --- drivers/mmc/host/bcm2835-mmc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c index c0d25994b16673..7a573a72677c5e 100644 --- a/drivers/mmc/host/bcm2835-mmc.c +++ b/drivers/mmc/host/bcm2835-mmc.c @@ -674,8 +674,14 @@ static void bcm2835_mmc_send_command(struct bcm2835_host *host, struct mmc_comma while (bcm2835_mmc_readl(host, SDHCI_PRESENT_STATE) & mask) { if (timeout == 0) { - pr_err("%s: Controller never released inhibit bit(s).\n", - mmc_hostname(host->mmc)); + /* + * The first command after power-up can find the SDIO + * controller still busy. The core retries it, so warn + * once and keep a later failure in the log. + */ + dev_warn_once(mmc_dev(host->mmc), + "%s: Controller never released inhibit bit(s).\n", + mmc_hostname(host->mmc)); bcm2835_mmc_dumpregs(host); cmd->error = -EIO; tasklet_schedule(&host->finish_tasklet);