diff mbox series

mmc: core: log empty non-removable slots

Message ID d2444591-c91b-a94d-71e2-9dedc3b6c514@free.fr (mailing list archive)
State New, archived
Headers show
Series mmc: core: log empty non-removable slots | expand

Commit Message

Marc Gonzalez March 21, 2023, 6:01 p.m. UTC
An empty non-removable slot might be the symptom of probing too early.

Signed-off-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
---
 drivers/mmc/core/core.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ulf Hansson March 23, 2023, 12:13 p.m. UTC | #1
On Tue, 21 Mar 2023 at 19:01, Marc Gonzalez <marc.w.gonzalez@free.fr> wrote:
>
> An empty non-removable slot might be the symptom of probing too early.
>
> Signed-off-by: Marc Gonzalez <marc.w.gonzalez@free.fr>

I took the liberty of adjusting the code and the commit message a bit.
Please let me know if it doesn't look good to you.

So, applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/core/core.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 426c7f66b3492..b8137baecee7c 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -2257,6 +2257,10 @@ void mmc_rescan(struct work_struct *work)
>                         break;
>         }
>
> +       if (!mmc_card_is_removable(host) && !host->card)
> +               pr_info("%s: no card detected, check post-power-on-delay-ms",
> +                       mmc_hostname(host));
> +
>         /*
>          * Ignore the command timeout errors observed during
>          * the card init as those are excepted.
> --
> 2.25.1
diff mbox series

Patch

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 426c7f66b3492..b8137baecee7c 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2257,6 +2257,10 @@  void mmc_rescan(struct work_struct *work)
 			break;
 	}
 
+	if (!mmc_card_is_removable(host) && !host->card)
+		pr_info("%s: no card detected, check post-power-on-delay-ms",
+			mmc_hostname(host));
+
 	/*
 	 * Ignore the command timeout errors observed during
 	 * the card init as those are excepted.