Re: [PATCH 2/6] net: ibm: emac: manage emac_irq with devm
From: Andrew Lunn
Date: Mon Sep 02 2024 - 16:39:59 EST
> > Is this an internal interrupt, or a GPIO? It could be it is done in
> > open because there is a danger the GPIO controller has not probed
> > yet. So here you might get an EPROBE_DEFFER, where as the much older
> > kernel this was written for might not of done, if just gave an error
> > had gave up. So dev_err_probe() might be better.
> Good call on that. In my experience, I get these EPROBE_DEFER errors
> on OpenWrt's ath79 target (QCA MIPS) but not on PowerPC when trying to
> use GPIOs. Nevertheless it seems to be good practice to use
> dev_err_probe anyway. Will fix in v2.
You might want to look at
https://elixir.bootlin.com/linux/v6.10.7/source/drivers/net/ethernet/ibm/emac/core.c#L2418
and then replace it by correctly handling EPROBE_DEFER.
As you said, an old driver, needing some cleanup.
Andrew