Skip to content

Commit dd42903

Browse files
Saravana Kannangregkh
authored andcommitted
net: ipconfig: Relax fw_devlink if we need to mount a network rootfs
If there are network devices that could probe without some of their suppliers probing and those network devices are needed to mount a network rootfs, then fw_devlink=on might break that usecase by blocking the network devices from probing by the time IP auto config starts. So, if no network devices are available when IP auto config is enabled and we have a network rootfs, make sure fw_devlink doesn't block the probing of any device that has a driver and then retry finding a network device. Tested-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Saravana Kannan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2f8c3ae commit dd42903

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

net/ipv4/ipconfig.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,7 @@ __be32 __init root_nfs_parse_addr(char *name)
14341434
static int __init wait_for_devices(void)
14351435
{
14361436
int i;
1437+
bool try_init_devs = true;
14371438

14381439
for (i = 0; i < DEVICE_WAIT_MAX; i++) {
14391440
struct net_device *dev;
@@ -1452,6 +1453,11 @@ static int __init wait_for_devices(void)
14521453
rtnl_unlock();
14531454
if (found)
14541455
return 0;
1456+
if (try_init_devs &&
1457+
(ROOT_DEV == Root_NFS || ROOT_DEV == Root_CIFS)) {
1458+
try_init_devs = false;
1459+
wait_for_init_devices_probe();
1460+
}
14551461
ssleep(1);
14561462
}
14571463
return -ENODEV;

0 commit comments

Comments
 (0)