* Re: [PATCH 07/11] driver core: Respect all error codes from dev_pm_domain_attach()
[not found] ` <1524732790-2234-8-git-send-email-ulf.hansson@linaro.org>
@ 2018-05-14 15:19 ` Tony Lindgren
2018-05-14 18:57 ` Ulf Hansson
0 siblings, 1 reply; 3+ messages in thread
From: Tony Lindgren @ 2018-05-14 15:19 UTC (permalink / raw)
To: Ulf Hansson
Cc: Rafael J . Wysocki, Greg Kroah-Hartman, linux-pm, Vincent Guittot,
Geert Uytterhoeven, Kevin Hilman, Vinod Koul, Viresh Kumar,
Wolfram Sang, Pierre-Louis Bossart, Russell King, Mark Brown,
linux-arm-kernel, Sanyog Kale, linux-kernel, linux-omap
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.
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?
Regards,
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 07/11] driver core: Respect all error codes from dev_pm_domain_attach()
2018-05-14 15:19 ` [PATCH 07/11] driver core: Respect all error codes from dev_pm_domain_attach() Tony Lindgren
@ 2018-05-14 18:57 ` Ulf Hansson
2018-05-15 0:54 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Ulf Hansson @ 2018-05-14 18:57 UTC (permalink / raw)
To: Tony Lindgren
Cc: Rafael J . Wysocki, Greg Kroah-Hartman, Linux PM, Vincent Guittot,
Geert Uytterhoeven, Kevin Hilman, Vinod Koul, Viresh Kumar,
Wolfram Sang, Pierre-Louis Bossart, Russell King, Mark Brown,
Linux ARM, Sanyog Kale, Linux Kernel Mailing List, linux-omap
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 07/11] driver core: Respect all error codes from dev_pm_domain_attach()
2018-05-14 18:57 ` Ulf Hansson
@ 2018-05-15 0:54 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2018-05-15 0:54 UTC (permalink / raw)
To: Ulf Hansson
Cc: Rafael J . Wysocki, Greg Kroah-Hartman, Linux PM, Vincent Guittot,
Geert Uytterhoeven, Kevin Hilman, Vinod Koul, Viresh Kumar,
Wolfram Sang, Pierre-Louis Bossart, Russell King, Mark Brown,
Linux ARM, Sanyog Kale, Linux Kernel Mailing List, linux-omap
* Ulf Hansson <ulf.hansson@linaro.org> [180514 18:59]:
> On 14 May 2018 at 17:19, Tony Lindgren <tony@atomide.com> wrote:
> > 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/
Thanks yeah that fixes it for me too.
Regards,
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-15 0:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1524732790-2234-1-git-send-email-ulf.hansson@linaro.org>
[not found] ` <1524732790-2234-8-git-send-email-ulf.hansson@linaro.org>
2018-05-14 15:19 ` [PATCH 07/11] driver core: Respect all error codes from dev_pm_domain_attach() Tony Lindgren
2018-05-14 18:57 ` Ulf Hansson
2018-05-15 0:54 ` Tony Lindgren
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).