LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Tony Lindgren <tony@atomide.com>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Kevin Hilman <khilman@kernel.org>,
	Vinod Koul <vinod.koul@intel.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Wolfram Sang <wsa@the-dreams.de>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Russell King <linux@armlinux.org.uk>,
	Mark Brown <broonie@kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Sanyog Kale <sanyog.r.kale@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-omap <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 07/11] driver core: Respect all error codes from dev_pm_domain_attach()
Date: Mon, 14 May 2018 20:57:17 +0200	[thread overview]
Message-ID: <CAPDyKFqY5u3=db7-Xd9JXWo228PSNbH7-m-QNfSY9z8Z3p8t8A@mail.gmail.com> (raw)
In-Reply-To: <20180514151907.GK98604@atomide.com>

On 14 May 2018 at 17:19, Tony Lindgren <tony@atomide.com> wrote:
> Ulf,
>
> * Ulf Hansson <ulf.hansson@linaro.org> [180426 09:01]:
>> The limitation of being able to check only for -EPROBE_DEFER from
>> dev_pm_domain_attach() has been removed. Hence let's respect all error
>> codes and bail out accordingly.
>>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>> ---
>>  drivers/base/platform.c | 17 ++++++++---------
>>  1 file changed, 8 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
>> index 8075ddc..9460139 100644
>> --- a/drivers/base/platform.c
>> +++ b/drivers/base/platform.c
>> @@ -572,17 +572,16 @@ static int platform_drv_probe(struct device *_dev)
>>               return ret;
>>
>>       ret = dev_pm_domain_attach(_dev, true);
>> -     if (ret != -EPROBE_DEFER) {
>> -             if (drv->probe) {
>> -                     ret = drv->probe(dev);
>> -                     if (ret)
>> -                             dev_pm_domain_detach(_dev, true);
>> -             } else {
>> -                     /* don't fail if just dev_pm_domain_attach failed */
>> -                     ret = 0;
>> -             }
>> +     if (ret)
>> +             goto out;
>> +
>> +     if (drv->probe) {
>> +             ret = drv->probe(dev);
>> +             if (ret)
>> +                     dev_pm_domain_detach(_dev, true);
>>       }
>>
>> +out:
>>       if (drv->prevent_deferred_probe && ret == -EPROBE_DEFER) {
>>               dev_warn(_dev, "probe deferral not supported\n");
>>               ret = -ENXIO;
>> --
>
> Looks like this causes Linux next to not boot for me with device
> probes failing with error -17. So that's at least omaps, looks
> like kernelci has others failing too.

Yep, problem also reported for some Exynos5 platforms.

Omap suffers from the similar problem, because of its SoC specific way
of attaching devices to PM domains.

>
> Reverting for 8c123c14bbba ("driver core: Respect all error codes from
> dev_pm_domain_attach()") fixes the issue for me.
>
> Sounds like something is missing, any ideas?

This should solve the problem:

https://patchwork.kernel.org/patch/10398597/

Kind regards
Uffe

  reply	other threads:[~2018-05-14 18:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26  8:52 [PATCH 00/11] PM / Domains: Fixup error paths with dev_pm_domain_attach() Ulf Hansson
2018-04-26  8:53 ` [PATCH 01/11] PM / Domains: Fix error path during attach in genpd Ulf Hansson
2018-04-26  8:53 ` [PATCH 02/11] PM / Domains: Drop comment in genpd about legacy Samsung DT binding Ulf Hansson
2018-04-26  8:53 ` [PATCH 03/11] PM / Domains: Drop redundant code in genpd while attaching devices Ulf Hansson
2018-04-26  8:53 ` [PATCH 04/11] PM / Domains: Check for existing PM domain in dev_pm_domain_attach() Ulf Hansson
2018-04-26  8:53 ` [PATCH 05/11] PM / Domains: Allow a better error handling of dev_pm_domain_attach() Ulf Hansson
2018-04-26  8:53 ` [PATCH 06/11] amba: Respect all error codes from dev_pm_domain_attach() Ulf Hansson
2018-04-26  8:53 ` [PATCH 07/11] driver core: " Ulf Hansson
2018-04-29 13:35   ` Greg Kroah-Hartman
2018-05-14 15:19   ` Tony Lindgren
2018-05-14 18:57     ` Ulf Hansson [this message]
2018-05-15  0:54       ` Tony Lindgren
2018-04-26  8:53 ` [PATCH 08/11] i2c: " Ulf Hansson
2018-04-26  9:03   ` Wolfram Sang
2018-04-26  8:53 ` [PATCH 09/11] mmc: sdio: " Ulf Hansson
2018-04-26  8:53 ` [PATCH 10/11] soundwire: " Ulf Hansson
2018-04-26  9:26   ` Vinod Koul
2018-04-26  8:53 ` [PATCH 11/11] spi: " Ulf Hansson
2018-04-26 11:39   ` Mark Brown
2018-05-02 12:31 ` [PATCH 00/11] PM / Domains: Fixup error paths with dev_pm_domain_attach() Ulf Hansson
2018-05-03  8:31   ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPDyKFqY5u3=db7-Xd9JXWo228PSNbH7-m-QNfSY9z8Z3p8t8A@mail.gmail.com' \
    --to=ulf.hansson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=sanyog.r.kale@intel.com \
    --cc=tony@atomide.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vinod.koul@intel.com \
    --cc=viresh.kumar@linaro.org \
    --cc=wsa@the-dreams.de \
    --subject='Re: [PATCH 07/11] driver core: Respect all error codes from dev_pm_domain_attach()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).