netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG: "13d0ab6750b2 net: phy: check return code when requesting PHY driver module" breaks NFS-Root
@ 2019-03-11 12:23 Marc Kleine-Budde
  2019-03-11 18:04 ` Marc Kleine-Budde
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2019-03-11 12:23 UTC (permalink / raw)
  To: netdev@vger.kernel.org, ptx kernel, Heiner Kallweit, Andrew Lunn


[-- Attachment #1.1: Type: text/plain, Size: 1565 bytes --]

Hello,

I'm on next-next/master and noticed that the following patch:

| 13d0ab6750b2 net: phy: check return code when requesting PHY
|              driver module

breaks NFS Root for my embedded device (riotboard). The kernel dhcp
fails to get an address and thus no NFS Root.

> [    1.869897] mdio_bus 2188000.ethernet-1:04: error -2 loading PHY driver module for ID 0x004dd072

The PHY driver is not compiled as a module, but compiled into the kernel:

> git grep 0x004dd072 drivers/net/phy/
> drivers/net/phy/at803x.c:#define ATH8035_PHY_ID 0x004dd072

> grep AT803 .config
> CONFIG_AT803X_PHY=y

After hacking the return value check away, the system boots again.

> diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> index ddb12f420940..49c8aa7c7c03 100644
> --- a/drivers/net/phy/phy_device.c
> +++ b/drivers/net/phy/phy_device.c
> @@ -558,7 +558,7 @@ static int phy_request_driver_module(struct phy_device *dev, int phy_id)
>         if (IS_ENABLED(CONFIG_MODULES) && ret < 0) {
>                 phydev_err(dev, "error %d loading PHY driver module for ID 0x%08x\n",
>                            ret, phy_id);
> -               return ret;
> +               return 0;
>         }
> 
>         return 0;

regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-12  8:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-11 12:23 BUG: "13d0ab6750b2 net: phy: check return code when requesting PHY driver module" breaks NFS-Root Marc Kleine-Budde
2019-03-11 18:04 ` Marc Kleine-Budde
2019-03-11 18:11   ` Florian Fainelli
2019-03-12  8:02     ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).