linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Board breakage due to upstream patch
@ 2012-03-29  9:52 Lee Jones
  2012-03-29 11:04 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Lee Jones @ 2012-03-29  9:52 UTC (permalink / raw)
  To: broonie; +Cc: Grant Likely, lrg, Greg Kroah-Hartman, linux-kernel

Hi Mark,

Your patch "regulator: Support driver probe deferral" (below) prevents my Snowball Development Board from booting.

What's the correct thing to do?

---------------------------------------------------------------------

Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date:   Sun Mar 11 13:07:56 2012 +0000

    regulator: Support driver probe deferral
    
    If we fail to locate a requested regulator return -EPROBE_DEFER. If drivers
    pass this error code through to their caller (which they really should)
    then this will ensure that the probe is retried later when further devices
    become available.  In the unusual case where a driver doesn't want this
    it can override the default behaviour.
    
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
    Acked-by: Grant Likely <grant.likely@secretlab.ca>
    Acked-by: Liam Girdwood <lrg@ti.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index e9a83f8..fcde037 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1210,7 +1210,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
 {
        struct regulator_dev *rdev;
        struct regulator_map *map;
-       struct regulator *regulator = ERR_PTR(-ENODEV);
+       struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
        const char *devname = NULL;
        int ret;
 
@@ -2834,7 +2834,7 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
 
                if (!r) {
                        dev_err(dev, "Failed to find supply %s\n", supply);
-                       ret = -ENODEV;
+                       ret = -EPROBE_DEFER;
                        goto scrub;
                }

Kind regards,
Lee

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515 
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: Board breakage due to upstream patch
  2012-03-29  9:52 Board breakage due to upstream patch Lee Jones
@ 2012-03-29 11:04 ` Mark Brown
  2012-03-29 11:53   ` Lee Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2012-03-29 11:04 UTC (permalink / raw)
  To: Lee Jones; +Cc: Grant Likely, lrg, Greg Kroah-Hartman, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 655 bytes --]

On Thu, Mar 29, 2012 at 10:52:07AM +0100, Lee Jones wrote:

> Your patch "regulator: Support driver probe deferral" (below) prevents my Snowball Development Board from booting.

> What's the correct thing to do?

Provide a report with a little more detail on the problem:

   http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

It's possible the patch I posted yesterday which fixes a deadlock in
error handling paths might help, though given that all we're doing is
changing the error code here I'd say regulator support on your your
board was broken anyway.  Given the lack of any detail in your report
I'm just guessing completely in the dark here.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: Board breakage due to upstream patch
  2012-03-29 11:04 ` Mark Brown
@ 2012-03-29 11:53   ` Lee Jones
  2012-03-29 12:05     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Lee Jones @ 2012-03-29 11:53 UTC (permalink / raw)
  To: Mark Brown; +Cc: Grant Likely, lrg, Greg Kroah-Hartman, linux-kernel

On 29/03/12 12:04, Mark Brown wrote:
> On Thu, Mar 29, 2012 at 10:52:07AM +0100, Lee Jones wrote:
> 
>> Your patch "regulator: Support driver probe deferral" (below) prevents my Snowball Development Board from booting.
> 
>> What's the correct thing to do?
> 
> Provide a report with a little more detail on the problem:
> 
>    http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
> 
> It's possible the patch I posted yesterday which fixes a deadlock in
> error handling paths might help, though given that all we're doing is
> changing the error code here I'd say regulator support on your your
> board was broken anyway.  Given the lack of any detail in your report
> I'm just guessing completely in the dark here.

I haven't undertaken any debugging of the issue, as I don't have the
time, nor do I have the knowledge to be able to tell you what might be
happening as a result of the change.

All I can tell you at this stage is that with your patch applied, my
board doesn't boot past "Uncompressing Linux... done, booting the
kernel..". Once reverted it boots again.

I'll try to find some time to have a dig around, in order to provide you
with some more useful information.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: Board breakage due to upstream patch
  2012-03-29 11:53   ` Lee Jones
@ 2012-03-29 12:05     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-03-29 12:05 UTC (permalink / raw)
  To: Lee Jones; +Cc: Grant Likely, lrg, Greg Kroah-Hartman, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 552 bytes --]

On Thu, Mar 29, 2012 at 12:53:31PM +0100, Lee Jones wrote:

> I haven't undertaken any debugging of the issue, as I don't have the
> time, nor do I have the knowledge to be able to tell you what might be
> happening as a result of the change.

> All I can tell you at this stage is that with your patch applied, my
> board doesn't boot past "Uncompressing Linux... done, booting the
> kernel..". Once reverted it boots again.

Like I say I would expect that the board had some breakage in the first
place - look for errors in the boot log for example.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-03-29 12:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-29  9:52 Board breakage due to upstream patch Lee Jones
2012-03-29 11:04 ` Mark Brown
2012-03-29 11:53   ` Lee Jones
2012-03-29 12:05     ` Mark Brown

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