Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Hans Zhang <18255117159@163.com>
Cc: hkallweit1@gmail.com, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk,
	netdev@vger.kernel.org, netdev-bot+sashiko@kernel.org
Subject: Re: [PATCH 0/4] prepare MDIO callers for -EPROBE_DEFER from __mdiobus_register()
Date: Tue, 1 Dec 2026 14:40:20 +0100	[thread overview]
Message-ID: <8541a0f4-8f25-47ab-89ec-4e37a48358e8@lunn.ch> (raw)
In-Reply-To: <8e19948b-2376-4913-82cc-281bd924c668@163.com>

On Tue, Dec 01, 2026 at 12:19:54PM +0800, Hans Zhang wrote:
> Hi sashiko,
> 
> 
> Thank you for the review. The High issues are valid.
> 
> v2 will:
> - drop the smsc9420 change, since its mdiobus_register() call is in
>   ndo_open rather than a probe path, and the v1 version could return
>   success after a PHY probe failure;

You need to be careful here. What context is open called in? Can you
return EPROBE_DEFER here? Generally no.

What makes this interesting is things like NFS root. You pass on the
kernel command line all the parameters needed to connect to the NFS
server. Deep within netdev_register(), generally called from probe, it
can open the device, and start sending packets in order to connect to
the NFS server. So the device is alive and running before
netdev_register() even returns.

If probe was called in async mode, can open be called in async mode,
resulting in an EPROBE_DEFER from mdiobus_register? What happens then?
Does it all correctly unwind and the probe is tried again later in
sync mode?

	Andrew

  reply	other threads:[~2026-12-01 13:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  2:37 [PATCH 0/4] prepare MDIO callers for -EPROBE_DEFER from __mdiobus_register() Hans Zhang
2026-11-30  2:37 ` [PATCH 1/4] net: ethernet: lantiq_etop: propagate mdiobus_register() errors Hans Zhang
2026-12-01  2:46   ` netdev-bot+sashiko
2026-11-30  2:37 ` [PATCH 2/4] net: ethernet: smsc911x: " Hans Zhang
2026-12-01  2:46   ` netdev-bot+sashiko
2026-11-30  2:37 ` [PATCH 3/4] net: ethernet: smsc9420: " Hans Zhang
2026-12-01  2:46   ` netdev-bot+sashiko
2026-11-30  2:37 ` [PATCH 4/4] net: use dev_err_probe() for MDIO bus registration errors Hans Zhang
2026-12-01  2:46   ` netdev-bot+sashiko
2026-12-01  4:19 ` [PATCH 0/4] prepare MDIO callers for -EPROBE_DEFER from __mdiobus_register() Hans Zhang
2026-12-01 13:40   ` Andrew Lunn [this message]
2026-12-02 15:09     ` Hans Zhang
2026-12-03  9:05       ` Hans Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8541a0f4-8f25-47ab-89ec-4e37a48358e8@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=18255117159@163.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox