From dd99640e6a0bb19e6cb53bd5ec6b0c2e33aa33c4 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 14 Mar 2026 09:49:16 +0100 Subject: [PATCH 1/3] BACKPORT: driver core: Make deferred_probe_timeout default a Kconfig option Code using driver_deferred_probe_check_state() differs from most EPROBE_DEFER handling in the kernel. Where other EPROBE_DEFER handling (e.g. clks, gpios and regulators) waits indefinitely for suppliers to show up, code using driver_deferred_probe_check_state() will fail after the deferred_probe_timeout. This is a problem for generic distro kernels which want to support many boards using a single kernel build. These kernels want as much drivers to be modular as possible. The initrd also should be as small as possible, so the initrd will *not* have drivers not needing to get the rootfs. Combine this with waiting for a full-disk encryption password in the initrd and it is pretty much guaranteed that the default 10s timeout will be hit, causing probe() failures when drivers on the rootfs happen to get modprobe-d before other rootfs modules providing their suppliers. Make the default timeout configurable from Kconfig to allow distro kernel configs where many of the supplier drivers are modules to set the default through Kconfig. Reviewed-by: Saravana Kannan Signed-off-by: Hans de Goede Link: https://patch.msgid.link/20260314084916.10868-1-johannes.goede@oss.qualcomm.com [ Drop deferred_probe_timeout documentation change in kernel-parameters.txt. - Danilo ] Signed-off-by: Danilo Krummrich --- drivers/base/Kconfig | 9 +++++++++ drivers/base/dd.c | 6 +----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index 1786d87b29e22..f7d385cbd3ba4 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -73,6 +73,15 @@ config DEVTMPFS_SAFE with the PROT_EXEC flag. This can break, for example, non-KMS video drivers. +config DRIVER_DEFERRED_PROBE_TIMEOUT + int "Default value for deferred_probe_timeout" + default 0 if !MODULES + default 10 if MODULES + help + Set the default value for the deferred_probe_timeout kernel parameter. + See Documentation/admin-guide/kernel-parameters.txt for a description + of the deferred_probe_timeout kernel parameter. + config STANDALONE bool "Select only drivers that don't need compile-time external firmware" default y diff --git a/drivers/base/dd.c b/drivers/base/dd.c index f67642c1b8280..a3c6084bb5f5d 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -257,11 +257,7 @@ static int deferred_devs_show(struct seq_file *s, void *data) } DEFINE_SHOW_ATTRIBUTE(deferred_devs); -#ifdef CONFIG_MODULES -static int driver_deferred_probe_timeout = 15; -#else -static int driver_deferred_probe_timeout; -#endif +static int driver_deferred_probe_timeout = CONFIG_DRIVER_DEFERRED_PROBE_TIMEOUT; static int __init deferred_probe_timeout_setup(char *str) { From b9d9e3f873aa58cf3e95b49da84d365ebfa16bf8 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 16 Apr 2026 16:41:44 +0200 Subject: [PATCH 2/3] BACKPORT: Documentation: update deferred_probe_timeout cmdline parameter documentation Extend the deferred_probe_timeout cmdline parameter documentation, documenting that negative values are treated as an infinite timeout value. Suggested-by: Danilo Krummrich Signed-off-by: Hans de Goede Link: https://patch.msgid.link/20260416144144.54547-1-johannes.goede@oss.qualcomm.com Signed-off-by: Danilo Krummrich --- Documentation/admin-guide/kernel-parameters.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index ab4e03f91e744..1b9716dc3a529 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -1144,8 +1144,9 @@ deferred probe to give up waiting on dependencies to probe. Only specific dependencies (subsystems or drivers) that have opted in will be ignored. A timeout - of 0 will timeout at the end of initcalls. If the time - out hasn't expired, it'll be restarted by each + of 0 will timeout at the end of initcalls; a negative + value is treated as an infinite timeout value. If the + timeout hasn't expired, it'll be restarted by each successful driver registration. This option will also dump out devices still on the deferred probe list after retrying. From f24eb440fd18f9c81da7e5eaf4ef2794bc27edf0 Mon Sep 17 00:00:00 2001 From: Anurag Pateriya Date: Thu, 11 Jun 2026 11:18:55 +0530 Subject: [PATCH 3/3] QCLINUX: arm64: configs: qcom: Set DRIVER_DEFERRED_PROBE_TIMEOUT to 60 Set the deferred probe timeout to 60 seconds in the Qualcomm config fragment.With the kernel default of 10s ,we are observing probe deferrals on Qualcomm platforms where supplier drivers (e.g. regulators, clocks) are probing late; 60s gives sufficient margin without waiting indefinitely. Signed-off-by: Anurag Pateriya --- arch/arm64/configs/qcom.config | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/qcom.config b/arch/arm64/configs/qcom.config index 2ad32d471033f..9466461272165 100644 --- a/arch/arm64/configs/qcom.config +++ b/arch/arm64/configs/qcom.config @@ -24,6 +24,7 @@ CONFIG_CPU_IDLE_THERMAL=y CONFIG_DMABUF_HEAPS=y CONFIG_DMABUF_HEAPS_CMA=y CONFIG_DMABUF_HEAPS_SYSTEM=y +CONFIG_DRIVER_DEFERRED_PROBE_TIMEOUT=60 CONFIG_EDAC_QCOM=m CONFIG_EXPERT=y CONFIG_FW_LOADER_COMPRESS=y