Message ID | 20230203132102.313314-1-alexander.stein@ew.tq-group.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [1/1] net: fec: Don't fail on missing optional phy-reset-gpios | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Guessing tree name failed - patch did not apply |
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?
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
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");
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(+)