diff mbox series

[1/2] mmc: sdhci-iproc: handle mmc_of_parse() errors during probe

Message ID 1545598758-4502-1-git-send-email-stefan.wahren@i2se.com (mailing list archive)
State New, archived
Headers show
Series [1/2] mmc: sdhci-iproc: handle mmc_of_parse() errors during probe | expand

Commit Message

Stefan Wahren Dec. 23, 2018, 8:59 p.m. UTC
We need to handle mmc_of_parse() errors during probe.

This finally fixes the wifi regression on Raspberry Pi 3 series.
In error case the wifi chip was permanently in reset because of
the power sequence depending on the deferred probe of the GPIO expander.

Fixes: b580c52d58d9 ("mmc: sdhci-iproc: add IPROC SDHCI driver")
Cc: stable@vger.kernel.org
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/mmc/host/sdhci-iproc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Adrian Hunter Dec. 27, 2018, 7:02 a.m. UTC | #1
On 23/12/18 10:59 PM, Stefan Wahren wrote:
> We need to handle mmc_of_parse() errors during probe.
> 
> This finally fixes the wifi regression on Raspberry Pi 3 series.
> In error case the wifi chip was permanently in reset because of
> the power sequence depending on the deferred probe of the GPIO expander.
> 
> Fixes: b580c52d58d9 ("mmc: sdhci-iproc: add IPROC SDHCI driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci-iproc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> index 0db9905..9d12c06 100644
> --- a/drivers/mmc/host/sdhci-iproc.c
> +++ b/drivers/mmc/host/sdhci-iproc.c
> @@ -296,7 +296,10 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
>  
>  	iproc_host->data = iproc_data;
>  
> -	mmc_of_parse(host->mmc);
> +	ret = mmc_of_parse(host->mmc);
> +	if (ret)
> +		goto err;
> +
>  	sdhci_get_property(pdev);
>  
>  	host->mmc->caps |= iproc_host->data->mmc_caps;
>
Ulf Hansson Jan. 14, 2019, 11:44 a.m. UTC | #2
On Sun, 23 Dec 2018 at 22:00, Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> We need to handle mmc_of_parse() errors during probe.
>
> This finally fixes the wifi regression on Raspberry Pi 3 series.
> In error case the wifi chip was permanently in reset because of
> the power sequence depending on the deferred probe of the GPIO expander.
>
> Fixes: b580c52d58d9 ("mmc: sdhci-iproc: add IPROC SDHCI driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-iproc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> index 0db9905..9d12c06 100644
> --- a/drivers/mmc/host/sdhci-iproc.c
> +++ b/drivers/mmc/host/sdhci-iproc.c
> @@ -296,7 +296,10 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
>
>         iproc_host->data = iproc_data;
>
> -       mmc_of_parse(host->mmc);
> +       ret = mmc_of_parse(host->mmc);
> +       if (ret)
> +               goto err;
> +
>         sdhci_get_property(pdev);
>
>         host->mmc->caps |= iproc_host->data->mmc_caps;
> --
> 2.7.4
>
Stefan Wahren Jan. 14, 2019, 12:01 p.m. UTC | #3
Hi Ulf,

Am 14.01.2019 um 12:44 schrieb Ulf Hansson:
> On Sun, 23 Dec 2018 at 22:00, Stefan Wahren <stefan.wahren@i2se.com> wrote:
>> We need to handle mmc_of_parse() errors during probe.
>>
>> This finally fixes the wifi regression on Raspberry Pi 3 series.
>> In error case the wifi chip was permanently in reset because of
>> the power sequence depending on the deferred probe of the GPIO expander.
>>
>> Fixes: b580c52d58d9 ("mmc: sdhci-iproc: add IPROC SDHCI driver")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Applied for next, thanks!

since this fixes a regression can this applied to fixes, please?

Stefan


>
> Kind regards
> Uffe
>
Ulf Hansson Jan. 14, 2019, 1:19 p.m. UTC | #4
On Mon, 14 Jan 2019 at 13:01, Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> Hi Ulf,
>
> Am 14.01.2019 um 12:44 schrieb Ulf Hansson:
> > On Sun, 23 Dec 2018 at 22:00, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> >> We need to handle mmc_of_parse() errors during probe.
> >>
> >> This finally fixes the wifi regression on Raspberry Pi 3 series.
> >> In error case the wifi chip was permanently in reset because of
> >> the power sequence depending on the deferred probe of the GPIO expander.
> >>
> >> Fixes: b580c52d58d9 ("mmc: sdhci-iproc: add IPROC SDHCI driver")
> >> Cc: stable@vger.kernel.org
> >> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> > Applied for next, thanks!
>
> since this fixes a regression can this applied to fixes, please?

Of course, my apologies! I don't know why I didn't notice earlier,
especially due to your descriptive changelog.

I moved patch to fixes, thanks!

Kind regards
Uffe
diff mbox series

Patch

diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
index 0db9905..9d12c06 100644
--- a/drivers/mmc/host/sdhci-iproc.c
+++ b/drivers/mmc/host/sdhci-iproc.c
@@ -296,7 +296,10 @@  static int sdhci_iproc_probe(struct platform_device *pdev)
 
 	iproc_host->data = iproc_data;
 
-	mmc_of_parse(host->mmc);
+	ret = mmc_of_parse(host->mmc);
+	if (ret)
+		goto err;
+
 	sdhci_get_property(pdev);
 
 	host->mmc->caps |= iproc_host->data->mmc_caps;