summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorMarc Gonzalez <marc.w.gonzalez@free.fr>2023-03-21 21:01:01 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2023-03-24 18:48:01 +0300
commitf6ca8f906bc3073840d832484865757392be2819 (patch)
tree276c2faff48ddcaa2f5ba9c1de526a1e45665e92 /drivers/mmc
parenta72b7bbc700a47672ff95ce41a6d59b3d4dbb79b (diff)
downloadlinux-f6ca8f906bc3073840d832484865757392be2819.tar.xz
mmc: core: Log about empty non-removable slots
Failing to detect a non-removable card shouldn't happen. Let's log a message about it to inform that we have problem that ought to be fixed. Signed-off-by: Marc Gonzalez <marc.w.gonzalez@free.fr> Link: https://lore.kernel.org/r/d2444591-c91b-a94d-71e2-9dedc3b6c514@free.fr Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 426c7f66b349..3d3e0ca52614 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2257,6 +2257,11 @@ void mmc_rescan(struct work_struct *work)
break;
}
+ /* A non-removable card should have been detected by now. */
+ if (!mmc_card_is_removable(host) && !host->bus_ops)
+ pr_info("%s: Failed to initialize a non-removable card",
+ mmc_hostname(host));
+
/*
* Ignore the command timeout errors observed during
* the card init as those are excepted.