On Wed, 23 Aug 2023 15:43:58 +0800 Ruan Jinjie wrote:
quoted
EPROBE_DEFER is not a unix error code. We can't return it to user
space, so propagating it from ndo_open is not correct.
When the error is EPROBE_DEFER, Whether print the netdev_err is ok? And
what should it return?
How about this?
if (IS_ERR(phydev)) {
......
if (PTR_ERR(phydev) != -EPROBE_DEFER)
return PTR_ERR(phydev);
else
return -EIO;
}
That's too much code to copy & paste into every driver.
Someone who understands the code flow very well should tackle this.
Please leave the cases where fixed_phy_register() is called outside
of probe alone.