diff mbox series

mmc: mmci: Set PROBE_PREFER_ASYNCHRONOUS

Message ID 20230612143730.210390-1-ulf.hansson@linaro.org
State New
Headers show
Series mmc: mmci: Set PROBE_PREFER_ASYNCHRONOUS | expand

Commit Message

Ulf Hansson June 12, 2023, 2:37 p.m. UTC
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(+)

Comments

Linus Walleij June 13, 2023, 6:28 a.m. UTC | #1
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
Yann Gautier June 13, 2023, 11:42 a.m. UTC | #2
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
Ulf Hansson June 13, 2023, 12:12 p.m. UTC | #3
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
diff mbox series

Patch

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,