Thread (12 messages) flat view 12 messages, 3 authors, 2021-11-03

Re: [PATCH] net: fec: defer probe if PHY on external MDIO bus is not available

From: Matthias Schiffer <hidden>
Date: 2021-10-22 07:58:00
Also in: lkml

On Thu, 2021-10-21 at 14:50 +0200, Andrew Lunn wrote:
quoted
I would love to do this, but driver-api/driver-model/driver.rst
contains the following warning:

      -EPROBE_DEFER must not be returned if probe() has already created
      child devices, even if those child devices are removed again
      in a cleanup path. If -EPROBE_DEFER is returned after a child
      device has been registered, it may result in an infinite loop of
      .probe() calls to the same driver.

My understanding of this is that there is simply no way to return
-EPROBE_DEFER after fec_enet_mii_init(pdev).
It might say that, but lots of network drivers actually do this. I've
not seen an endless loop.

    Andrew

Hmm, lots of network drivers? I tried to find an example, but all
drivers that generate -EPROBE_DEFER for missing PHYs at all don't have
an internal MDIO bus and thus avoid the circular dependency.

Matthias
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help