* [PATCH] mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n
@ 2019-11-19 11:25 Geert Uytterhoeven
2019-11-19 18:05 ` Florian Fainelli
0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2019-11-19 11:25 UTC (permalink / raw)
To: YueHaibing, David S . Miller, Andrew Lunn, Florian Fainelli,
Heiner Kallweit
Cc: netdev, linux-renesas-soc, linux-kernel, Geert Uytterhoeven
Commit 1d4639567d970de0 ("mdio_bus: Fix PTR_ERR applied after
initialization to constant") accidentally changed a check from -ENOTSUPP
to -ENOSYS, causing failures if reset controller support is not enabled.
E.g. on r7s72100/rskrza1:
sh-eth e8203000.ethernet: MDIO init failed: -524
sh-eth: probe of e8203000.ethernet failed with error -524
Fixes: 1d4639567d970de0 ("mdio_bus: Fix PTR_ERR applied after initialization to constant")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
This is a regression in v5.4-rc8.
Seen on r8a7740/armadillo, r7s72100/rskrza1, and r7s9210/rza2mevb.
---
drivers/net/phy/mdio_bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 35876562e32a02ce..dbacb00318775ff1 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -65,7 +65,7 @@ static int mdiobus_register_reset(struct mdio_device *mdiodev)
reset = devm_reset_control_get_exclusive(&mdiodev->dev,
"phy");
if (IS_ERR(reset)) {
- if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOSYS)
+ if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOTSUPP)
reset = NULL;
else
return PTR_ERR(reset);
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n
2019-11-19 11:25 [PATCH] mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n Geert Uytterhoeven
@ 2019-11-19 18:05 ` Florian Fainelli
2019-11-19 18:55 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2019-11-19 18:05 UTC (permalink / raw)
To: Geert Uytterhoeven, YueHaibing, David S . Miller, Andrew Lunn,
Heiner Kallweit
Cc: netdev, linux-renesas-soc, linux-kernel
On 11/19/19 3:25 AM, Geert Uytterhoeven wrote:
> Commit 1d4639567d970de0 ("mdio_bus: Fix PTR_ERR applied after
> initialization to constant") accidentally changed a check from -ENOTSUPP
> to -ENOSYS, causing failures if reset controller support is not enabled.
> E.g. on r7s72100/rskrza1:
>
> sh-eth e8203000.ethernet: MDIO init failed: -524
> sh-eth: probe of e8203000.ethernet failed with error -524
>
> Fixes: 1d4639567d970de0 ("mdio_bus: Fix PTR_ERR applied after initialization to constant")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
This has been fixed in the "net" tree with:
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=075e238d12c21c8bde700d21fb48be7a3aa80194
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n
2019-11-19 18:05 ` Florian Fainelli
@ 2019-11-19 18:55 ` Geert Uytterhoeven
2019-11-20 3:18 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2019-11-19 18:55 UTC (permalink / raw)
To: Florian Fainelli
Cc: Geert Uytterhoeven, YueHaibing, David S . Miller, Andrew Lunn,
Heiner Kallweit, netdev, Linux-Renesas,
Linux Kernel Mailing List
Hi Florian,
On Tue, Nov 19, 2019 at 7:05 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
> On 11/19/19 3:25 AM, Geert Uytterhoeven wrote:
> > Commit 1d4639567d970de0 ("mdio_bus: Fix PTR_ERR applied after
> > initialization to constant") accidentally changed a check from -ENOTSUPP
> > to -ENOSYS, causing failures if reset controller support is not enabled.
> > E.g. on r7s72100/rskrza1:
> >
> > sh-eth e8203000.ethernet: MDIO init failed: -524
> > sh-eth: probe of e8203000.ethernet failed with error -524
> >
> > Fixes: 1d4639567d970de0 ("mdio_bus: Fix PTR_ERR applied after initialization to constant")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> This has been fixed in the "net" tree with:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=075e238d12c21c8bde700d21fb48be7a3aa80194
Ah, hadn't seen that one.
However, that one (a) keeps the unneeded check for -ENOSYS, and (b)
carries a wrong Fixes tag.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n
2019-11-19 18:55 ` Geert Uytterhoeven
@ 2019-11-20 3:18 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2019-11-20 3:18 UTC (permalink / raw)
To: geert
Cc: f.fainelli, geert+renesas, yuehaibing, andrew, hkallweit1,
netdev, linux-renesas-soc, linux-kernel
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Tue, 19 Nov 2019 19:55:53 +0100
> Hi Florian,
>
> On Tue, Nov 19, 2019 at 7:05 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>> On 11/19/19 3:25 AM, Geert Uytterhoeven wrote:
>> > Commit 1d4639567d970de0 ("mdio_bus: Fix PTR_ERR applied after
>> > initialization to constant") accidentally changed a check from -ENOTSUPP
>> > to -ENOSYS, causing failures if reset controller support is not enabled.
>> > E.g. on r7s72100/rskrza1:
>> >
>> > sh-eth e8203000.ethernet: MDIO init failed: -524
>> > sh-eth: probe of e8203000.ethernet failed with error -524
>> >
>> > Fixes: 1d4639567d970de0 ("mdio_bus: Fix PTR_ERR applied after initialization to constant")
>> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>>
>> This has been fixed in the "net" tree with:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=075e238d12c21c8bde700d21fb48be7a3aa80194
>
> Ah, hadn't seen that one.
>
> However, that one (a) keeps the unneeded check for -ENOSYS, and (b)
> carries a wrong Fixes tag.
Linus took Geert's fix so I reverted the one in 'net' and cherry picked
Geert's fix from Linus's tree.
Just FYI...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-20 3:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 11:25 [PATCH] mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n Geert Uytterhoeven
2019-11-19 18:05 ` Florian Fainelli
2019-11-19 18:55 ` Geert Uytterhoeven
2019-11-20 3:18 ` David Miller
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).