linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: mmci: Set PROBE_PREFER_ASYNCHRONOUS
@ 2023-06-12 14:37 Ulf Hansson
  2023-06-13  6:28 ` Linus Walleij
  2023-06-13 11:42 ` Yann Gautier
  0 siblings, 2 replies; 4+ messages in thread
From: Ulf Hansson @ 2023-06-12 14:37 UTC (permalink / raw)
  To: linux-mmc, Ulf Hansson
  Cc: Russell King, Linus Walleij, Marek Vasut, Yann Gautier, Dennis Zhou

All mmc host driver should have enabled the asynchronous probe option, but
it seems like we missed to set it for mmci, so let's do that now.

Fixes: 21b2cec61c04 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/mmci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index f2b2e8b0574e..97a77eefb11a 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -2455,6 +2455,7 @@ static struct amba_driver mmci_driver = {
 	.drv		= {
 		.name	= DRIVER_NAME,
 		.pm	= &mmci_dev_pm_ops,
+		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
 	},
 	.probe		= mmci_probe,
 	.remove		= mmci_remove,
-- 
2.34.1


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

* Re: [PATCH] mmc: mmci: Set PROBE_PREFER_ASYNCHRONOUS
  2023-06-12 14:37 [PATCH] mmc: mmci: Set PROBE_PREFER_ASYNCHRONOUS Ulf Hansson
@ 2023-06-13  6:28 ` Linus Walleij
  2023-06-13 11:42 ` Yann Gautier
  1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2023-06-13  6:28 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-mmc, Russell King, Marek Vasut, Yann Gautier, Dennis Zhou

On Mon, Jun 12, 2023 at 4:37 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:

> All mmc host driver should have enabled the asynchronous probe option, but
> it seems like we missed to set it for mmci, so let's do that now.
>
> Fixes: 21b2cec61c04 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4")
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

As I had the test system up I applied this on top of the busydetect
fixes and tested on Samsung Skomer, works fine!
Tested-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH] mmc: mmci: Set PROBE_PREFER_ASYNCHRONOUS
  2023-06-12 14:37 [PATCH] mmc: mmci: Set PROBE_PREFER_ASYNCHRONOUS Ulf Hansson
  2023-06-13  6:28 ` Linus Walleij
@ 2023-06-13 11:42 ` Yann Gautier
  2023-06-13 12:12   ` Ulf Hansson
  1 sibling, 1 reply; 4+ messages in thread
From: Yann Gautier @ 2023-06-13 11:42 UTC (permalink / raw)
  To: Ulf Hansson, linux-mmc
  Cc: Russell King, Linus Walleij, Marek Vasut, Dennis Zhou

On 6/12/23 16:37, Ulf Hansson wrote:
> All mmc host driver should have enabled the asynchronous probe option, but
> it seems like we missed to set it for mmci, so let's do that now.
> 
> Fixes: 21b2cec61c04 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4")
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>   drivers/mmc/host/mmci.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
> index f2b2e8b0574e..97a77eefb11a 100644
> --- a/drivers/mmc/host/mmci.c
> +++ b/drivers/mmc/host/mmci.c
> @@ -2455,6 +2455,7 @@ static struct amba_driver mmci_driver = {
>   	.drv		= {
>   		.name	= DRIVER_NAME,
>   		.pm	= &mmci_dev_pm_ops,
> +		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
>   	},
>   	.probe		= mmci_probe,
>   	.remove		= mmci_remove,

Hi Ulf,

I've tested that on a STM32MP eval board.
It boots OK.

Just a warning for other users of this updated driver: if there are 
several MMC devices on the board, we can no more rely on the order of probe.
For example, this board has an SD-card and an eMMC. Before this patch 
mmc0 was the SD-card, mmc1 the eMMC. Now the order has changed on the 
boot I've tested.
It shouldn't be an issue, as filesystems use UUIDs. Maybe for some tools 
or tests.

Anyway, the patch is OK for me.
You can add my:
Tested-by: Yann Gautier <yann.gautier@foss.st.com>


Best regards,
Yann

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

* Re: [PATCH] mmc: mmci: Set PROBE_PREFER_ASYNCHRONOUS
  2023-06-13 11:42 ` Yann Gautier
@ 2023-06-13 12:12   ` Ulf Hansson
  0 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2023-06-13 12:12 UTC (permalink / raw)
  To: Yann Gautier
  Cc: linux-mmc, Russell King, Linus Walleij, Marek Vasut, Dennis Zhou

On Tue, 13 Jun 2023 at 13:43, Yann Gautier <yann.gautier@foss.st.com> wrote:
>
> On 6/12/23 16:37, Ulf Hansson wrote:
> > All mmc host driver should have enabled the asynchronous probe option, but
> > it seems like we missed to set it for mmci, so let's do that now.
> >
> > Fixes: 21b2cec61c04 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4")
> > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> > ---
> >   drivers/mmc/host/mmci.c | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
> > index f2b2e8b0574e..97a77eefb11a 100644
> > --- a/drivers/mmc/host/mmci.c
> > +++ b/drivers/mmc/host/mmci.c
> > @@ -2455,6 +2455,7 @@ static struct amba_driver mmci_driver = {
> >       .drv            = {
> >               .name   = DRIVER_NAME,
> >               .pm     = &mmci_dev_pm_ops,
> > +             .probe_type = PROBE_PREFER_ASYNCHRONOUS,
> >       },
> >       .probe          = mmci_probe,
> >       .remove         = mmci_remove,
>
> Hi Ulf,
>
> I've tested that on a STM32MP eval board.
> It boots OK.
>
> Just a warning for other users of this updated driver: if there are
> several MMC devices on the board, we can no more rely on the order of probe.
> For example, this board has an SD-card and an eMMC. Before this patch
> mmc0 was the SD-card, mmc1 the eMMC. Now the order has changed on the
> boot I've tested.
> It shouldn't be an issue, as filesystems use UUIDs. Maybe for some tools
> or tests.

Note that the order was not guaranteed even before. It was mostly due
to luck, in that case.

UUIDs is preferred, but we also have the mmc aliases that can be used
in DT. This allows us to specify a specific index for the mmc-host
(which always becomes the same id for the later detected block
device).

>
> Anyway, the patch is OK for me.
> You can add my:
> Tested-by: Yann Gautier <yann.gautier@foss.st.com>

Thanks a lot!

Kind regards
Uffe

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

end of thread, other threads:[~2023-06-13 12:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12 14:37 [PATCH] mmc: mmci: Set PROBE_PREFER_ASYNCHRONOUS Ulf Hansson
2023-06-13  6:28 ` Linus Walleij
2023-06-13 11:42 ` Yann Gautier
2023-06-13 12:12   ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).