Skip to contentSkip to conversation

driver core: Complete fw_devlink processing for zero probe timeout

PATCH New Avi Weiss 1 participant 1 message Nov 28 Driver core

lore
Share & tools
lore

Avi Weiss

author
#0 lore raw

PATCH 1/1 driver core: Complete fw_devlink processing for zero probe timeout

With CONFIG_MODULES=y and deferred_probe_timeout=0, the timeout expires at the end of initcalls. However, deferred_probe_initcall() only runs fw_devlink_drivers_done() and fw_devlink_probing_done() when modules are disabled, while the timeout worker is scheduled only for positive timeouts. Neither timeout-completion path runs in this case.

This can leave inferred links unnecessarily restrictive and supplier sync_state() callbacks pending when consumers remain unbound. Call both completion functions when the timeout is zero, retaining their ordering around the final deferred-probe retry.

Fixes d46f3e3ed527 ("driver core: Improve fw_devlink & deferred_probe_timeout interaction")
Fixes ffbe08a8e86d ("driver core: Add fw_devlink.sync_state command line param")
---
 drivers/base/dd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/base/dd.c +2 -2
index 52123251965d..9738337b9fcd 100644
@@ -349,7 +349,7 @@ static int deferred_probe_initcall(void)
 	flush_work(&deferred_probe_work);
 	initcalls_done = true;
 
-	if (!IS_ENABLED(CONFIG_MODULES))
+	if (!IS_ENABLED(CONFIG_MODULES) || !driver_deferred_probe_timeout)
 		fw_devlink_drivers_done();
 
 	/*
@@ -364,7 +364,7 @@ static int deferred_probe_initcall(void)
 			driver_deferred_probe_timeout * HZ);
 	}
 
-	if (!IS_ENABLED(CONFIG_MODULES))
+	if (!IS_ENABLED(CONFIG_MODULES) || !driver_deferred_probe_timeout)
 		fw_devlink_probing_done();
 
 	return 0;

base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f

Signature · 1 line
2.53.0