* [PATCH 1/1] net: fec: Don't fail on missing optional phy-reset-gpios
@ 2023-02-03 13:21 Alexander Stein
2023-02-07 6:30 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Stein @ 2023-02-03 13:21 UTC (permalink / raw)
To: Wei Fang, Shenwei Wang, Clark Wang, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Arnd Bergmann,
Andrew Lunn
Cc: Alexander Stein, NXP Linux Team, netdev
The conversion to gpio descriptors accidentally removed the short return
if there is no 'phy-reset-gpios' property, leading to the error
fec 30be0000.ethernet: error -ENOENT: failed to get phy-reset-gpios
This is especially the case when the PHY reset GPIO is specified in
the PHY node itself.
Fixes: 468ba54bd616 ("fec: convert to gpio descriptor")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
drivers/net/ethernet/freescale/fec_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 2716898e0b9b..1fddd7ec1118 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -4058,6 +4058,8 @@ static int fec_reset_phy(struct platform_device *pdev)
phy_reset = devm_gpiod_get(&pdev->dev, "phy-reset",
active_high ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW);
+ if (PTR_ERR(phy_reset) == -ENOENT)
+ return 0;
if (IS_ERR(phy_reset))
return dev_err_probe(&pdev->dev, PTR_ERR(phy_reset),
"failed to get phy-reset-gpios\n");
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] net: fec: Don't fail on missing optional phy-reset-gpios
2023-02-03 13:21 [PATCH 1/1] net: fec: Don't fail on missing optional phy-reset-gpios Alexander Stein
@ 2023-02-07 6:30 ` Jakub Kicinski
2023-02-07 13:24 ` Alexander Stein
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2023-02-07 6:30 UTC (permalink / raw)
To: Alexander Stein
Cc: Wei Fang, Shenwei Wang, Clark Wang, David S . Miller,
Eric Dumazet, Paolo Abeni, Arnd Bergmann, Andrew Lunn,
NXP Linux Team, netdev
On Fri, 3 Feb 2023 14:21:02 +0100 Alexander Stein wrote:
> The conversion to gpio descriptors accidentally removed the short return
> if there is no 'phy-reset-gpios' property, leading to the error
>
> fec 30be0000.ethernet: error -ENOENT: failed to get phy-reset-gpios
>
> This is especially the case when the PHY reset GPIO is specified in
> the PHY node itself.
>
> Fixes: 468ba54bd616 ("fec: convert to gpio descriptor")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Fixed around the same time by commit d7b5e5dd669436 right?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] net: fec: Don't fail on missing optional phy-reset-gpios
2023-02-07 6:30 ` Jakub Kicinski
@ 2023-02-07 13:24 ` Alexander Stein
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Stein @ 2023-02-07 13:24 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Wei Fang, Shenwei Wang, Clark Wang, David S . Miller,
Eric Dumazet, Paolo Abeni, Arnd Bergmann, Andrew Lunn,
NXP Linux Team, netdev
Am Dienstag, 7. Februar 2023, 07:30:27 CET schrieb Jakub Kicinski:
> On Fri, 3 Feb 2023 14:21:02 +0100 Alexander Stein wrote:
> > The conversion to gpio descriptors accidentally removed the short return
> > if there is no 'phy-reset-gpios' property, leading to the error
> >
> > fec 30be0000.ethernet: error -ENOENT: failed to get phy-reset-gpios
> >
> > This is especially the case when the PHY reset GPIO is specified in
> > the PHY node itself.
> >
> > Fixes: 468ba54bd616 ("fec: convert to gpio descriptor")
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
>
> Fixed around the same time by commit d7b5e5dd669436 right?
Yes, this does the trick as well. Thanks
Best regards
Alexander
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-07 13:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 13:21 [PATCH 1/1] net: fec: Don't fail on missing optional phy-reset-gpios Alexander Stein
2023-02-07 6:30 ` Jakub Kicinski
2023-02-07 13:24 ` Alexander Stein
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.