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. 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 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) {