diff mbox series

[RFC,v1,8/9] net: ipconfig: Force fw_devlink to unblock any devices that might probe

Message ID 20220526081550.1089805-9-saravanak@google.com
State New
Headers show
Series deferred_probe_timeout logic clean up | expand

Commit Message

Saravana Kannan May 26, 2022, 8:15 a.m. UTC
If there are network devices that could probe without some of their
suppliers probing and those network devices are needed for IP auto
config to work, then fw_devlink=on might break that usecase by blocking
the network devices from probing by the time IP auto config starts.

So, when IP auto config is enabled, make sure fw_devlink doesn't block
the probing of any device that has a driver by the time we get to IP
auto config.

Signed-off-by: Saravana Kannan <saravanak@google.com>
---
 net/ipv4/ipconfig.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Geert Uytterhoeven June 7, 2022, 12:36 p.m. UTC | #1
Hi Saravana,

On Thu, May 26, 2022 at 10:16 AM Saravana Kannan <saravanak@google.com> wrote:
> If there are network devices that could probe without some of their
> suppliers probing and those network devices are needed for IP auto
> config to work, then fw_devlink=on might break that usecase by blocking
> the network devices from probing by the time IP auto config starts.
>
> So, when IP auto config is enabled, make sure fw_devlink doesn't block
> the probing of any device that has a driver by the time we get to IP
> auto config.
>
> Signed-off-by: Saravana Kannan <saravanak@google.com>
> ---
>  net/ipv4/ipconfig.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
> index 9d41d5d5cd1e..aa7b8ba68ca6 100644
> --- a/net/ipv4/ipconfig.c
> +++ b/net/ipv4/ipconfig.c
> @@ -1435,6 +1435,8 @@ static int __init wait_for_devices(void)
>  {
>         int i;
>
> +       fw_devlink_unblock_may_probe();
> +
>         for (i = 0; i < DEVICE_WAIT_MAX; i++) {
>                 struct net_device *dev;
>                 int found = 0;

FTR, this lacks an include <linux/fwnode.h>, as my mips rbtx4927
build fails with:

net/ipv4/ipconfig.c:1438:2: error: implicit declaration of function
‘fw_devlink_unblock_may_probe’ [-Werror=implicit-function-declaration]

Switching to v2 instead...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
diff mbox series

Patch

diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 9d41d5d5cd1e..aa7b8ba68ca6 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -1435,6 +1435,8 @@  static int __init wait_for_devices(void)
 {
 	int i;
 
+	fw_devlink_unblock_may_probe();
+
 	for (i = 0; i < DEVICE_WAIT_MAX; i++) {
 		struct net_device *dev;
 		int found = 0;