All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: core: log empty non-removable slots
@ 2023-03-21 18:01 ` Marc Gonzalez
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Gonzalez @ 2023-03-21 18:01 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: Pierre-Hugues Husson, MMC, AML

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(+)

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] mmc: core: log empty non-removable slots
@ 2023-03-21 18:01 ` Marc Gonzalez
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Gonzalez @ 2023-03-21 18:01 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: Pierre-Hugues Husson, MMC, AML

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(+)

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

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: core: log empty non-removable slots
  2023-03-21 18:01 ` Marc Gonzalez
@ 2023-03-23 12:13   ` Ulf Hansson
  -1 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2023-03-23 12:13 UTC (permalink / raw)
  To: Marc Gonzalez; +Cc: Pierre-Hugues Husson, MMC, AML

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

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: core: log empty non-removable slots
@ 2023-03-23 12:13   ` Ulf Hansson
  0 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2023-03-23 12:13 UTC (permalink / raw)
  To: Marc Gonzalez; +Cc: Pierre-Hugues Husson, MMC, AML

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: core: log empty non-removable slots
  2023-03-23 12:13   ` Ulf Hansson
  (?)
@ 2023-03-23 15:33   ` Marc Gonzalez
  2023-03-24 15:56     ` Ulf Hansson
  -1 siblings, 1 reply; 6+ messages in thread
From: Marc Gonzalez @ 2023-03-23 15:33 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: Pierre-Hugues Husson, MMC

On 23/03/2023 13:13, Ulf Hansson wrote:

> On Tue, 21 Mar 2023 at 19:01, Marc Gonzalez wrote:
>
>> An empty non-removable slot might be the symptom of probing too early.
> 
> 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!

Thanks for reviewing & merging.

Can you tell me (for my knowledge) why it's better to check
host->bus_ops than host->card ?

If the situation should not happen, perhaps we should use pr_warn?

Regards


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: core: log empty non-removable slots
  2023-03-23 15:33   ` Marc Gonzalez
@ 2023-03-24 15:56     ` Ulf Hansson
  0 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2023-03-24 15:56 UTC (permalink / raw)
  To: Marc Gonzalez; +Cc: Pierre-Hugues Husson, MMC

On Thu, 23 Mar 2023 at 16:33, Marc Gonzalez <marc.w.gonzalez@free.fr> wrote:
>
> On 23/03/2023 13:13, Ulf Hansson wrote:
>
> > On Tue, 21 Mar 2023 at 19:01, Marc Gonzalez wrote:
> >
> >> An empty non-removable slot might be the symptom of probing too early.
> >
> > 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!
>
> Thanks for reviewing & merging.
>
> Can you tell me (for my knowledge) why it's better to check
> host->bus_ops than host->card ?

It doesn't really matter at this point, but to keep consistency for
some other earlier code in mmc_rescan(), I decided to use
host->bus_ops instead.

>
> If the situation should not happen, perhaps we should use pr_warn?

Yes, maybe you are right.

In principle, I didn't want to use the warning level as I simply
didn't know if we would end up spamming the log with lots of prints
for various platforms. Perhaps we should change, when we know a bit
more?

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-24 15:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 18:01 [PATCH] mmc: core: log empty non-removable slots Marc Gonzalez
2023-03-21 18:01 ` Marc Gonzalez
2023-03-23 12:13 ` Ulf Hansson
2023-03-23 12:13   ` Ulf Hansson
2023-03-23 15:33   ` Marc Gonzalez
2023-03-24 15:56     ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.