From nobody Thu Apr 2 00:13:28 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08E68C145 for ; Sat, 14 Mar 2026 08:49:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773478168; cv=none; b=K/u9SXFGFDIsa5ktJxuzKoNXdd9U/OmAuFOs9h0zP5JTqtsSbBaXWycISByNbD6ZbKX8rt8JgESLxN9B8Mpf2vSIKWKFeI03wgcxnEyWyEtM7sxhZBiiItTGM6+vPKMAHzqGx4sLSTDQ5hNvvQhXyvLniVgfVyUOM2Am6lDzlSs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773478168; c=relaxed/simple; bh=+du+jkCWqt5JYYTqfLZwn4YsVU8iQgm8nY+nvnQsM4s=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qQWLw99dfgx339at+hFrOTLLRQ0oinFpBSUm3x7aYgHs7llX2N/C1fVxAikEZVUReK4Vgb7RlmLjrBNXrSYdnfB3IKWyCPZb2A1sKE2zeFKcM3pbOJ2ugd8m4IVZjpGO9UHHkI5Oy68EbpLfMWgOiwrgw/qKKzcEHb+d+B7IsE8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=KZPbNO03; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=GczXDEEW; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="KZPbNO03"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="GczXDEEW" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62E5Qfl72995990 for ; Sat, 14 Mar 2026 08:49:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=l/MN7+sA+yIHrjy7R9mqNBlMIYQZp6uaqpX 78efrk6A=; b=KZPbNO03qbNyl+6M0lv4guuupzLY0f8iUDpUdy3klTIE0qwecXk BluDolsctehNneFmV8uQ3UclNSGDlJ/2WCVf7i0WQNpfQGnty+DfN11wtaCodzEs 7584SB+sWDUAMx1FAzbiZwNG63Fd1UKrux3HVYEiSYQ8AHR3y9diaLHygP9w1aXj QNIZHE1a/HEJp4kfPWTFef7DoSKJIsK+f/4Px1ppJHjl1qwGoY9b61IhfJiUwAPA UnBD+mJJ1+yQWZJ43V8DQdnfnyD784SwA5EztpwNsKC995bpLbwab/BD4uT+60Q/ 3CtA9YBnufAusuNWdPUDKgjw0OUb8DS7YZQ== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cvyy5getw-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 14 Mar 2026 08:49:20 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-8cd773dd39bso2168881285a.2 for ; Sat, 14 Mar 2026 01:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773478159; x=1774082959; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=l/MN7+sA+yIHrjy7R9mqNBlMIYQZp6uaqpX78efrk6A=; b=GczXDEEW8Flo5NZhfjxq4o0l6FQxxXR5sBniD8Vywk5nc5O3w8ZANRPZpaW8dP576w +V+/e6YWRjcHMNk6z7sZ5XTTjelBhuDV/KNxmJGC4TYmQ6q19/yltOv81wa44mc24mrn T+3qpt/ToicVBm4CCBVePSfkDBt35UssSFyWlw3HkdCeHiueNWfG7JgwCpTN9T/9D+Mx aDN4k3kDCI4NmL5QqwHGDS+LKQeOxebw7KT9qAuknP8rUTWEAGeE0u1qC+2KSv6XhIm2 EFBNdZRmkGhSZQUmy3o7uQXRJXxUnQ46iK06RYzqOXbTYSZrHmW2wwi/XmPEQ7MQzAhE CtCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773478159; x=1774082959; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=l/MN7+sA+yIHrjy7R9mqNBlMIYQZp6uaqpX78efrk6A=; b=NGPewq6dFtLBlqJMoZJo6QfT4/D0x7XrjB+ggXGhF0yPOec+/+qBFTrL8MH7AnCkuo zaOiq0XGJQBVeGmucqPbsXqg09ZCerebqOSVccb/FWOHbjK+6XMVpRVRI94qjw2H7PCR V9DehlrFCxKRrYa/0HBlIctObhWVpHAAEz8Lk3WiJyQZKPsXjh6jUGY+OVbhp+L+eTSQ s5l4bNFcwMwwLedmCQDsO0BmURK8hkAb1KHLcWxMWEveiNqwuMcKm1xFTPh0VmrSJ4jU ia8hNyyZdeADTlX3EF/nYPKYuhKOXNs3r+EpbCH3yR3dRB8lD6CrU1uFNJGBTaZ25HWW JNBA== X-Forwarded-Encrypted: i=1; AJvYcCUCVvsIEV7WcBBI+kXSTMVHZYLQciPDQosho3qEgUuXP/B17menw/lhhgnWieK/rDE6spORNz+/fZMksVg=@vger.kernel.org X-Gm-Message-State: AOJu0Yy5avjevbJIbyLQ4QbK7BILQmU2RiPNxfQnu6sST4qt0QAMna8F pvK2r+fNWUhYfUfyyUchpiK0PXcmLE+HmlQjHHvy+RhzGSERpaJ0FLjrUO4EM5f/wJsB7su0tbX nJqqIXrqDxucBq0cmQofhPuEq6ny4NoZwvqUnb94A0SYOSuAHbk46SNBYtc0nn6DGDGA= X-Gm-Gg: ATEYQzzIclRo4p7j62n6Lh/SFjrIb/3jH29/+8egxSxgRW4PSCAsnnCIGA+vhBoIdTJ BifV4+XPgpwTObqPZe18chIyql51XyUFyM50Sb+aezWEs+qX87RvjT2i/4KneFvy3efNjZhYlhn xQ3UJKH9UIvVzd1SJVOlWSn9O/7aur0lXCEYkRUe2NwNI9gcQ8KVx+SOYDucVB0KLQ/LsBnhbm5 FJ/3WvCVOWYf6BBG1v7aNyE43Xo9+UJRoUiqwwKJdGxM7HhOmM/gttmlN6Riqt1fH/tLlLjTlem TGlARwsaYzggir4cr5+FZVJ418pDg8tBWHhL75Xw58n9pPUCMQxP0GXcswanVlQSiyOh/X8KMPc q3N8WmHkxFo4ABhvlcYp3+WIrGamMYsUUS96d3bjnY6kYQmngJX64081x4YxD4VaZIpGT6eaPUx Kn08xsvC6Qjo8+BbEDKKku3918LHP56v0eJygO X-Received: by 2002:a05:620a:4081:b0:8c5:4e48:c908 with SMTP id af79cd13be357-8cdb5aa4e60mr854401385a.27.1773478158881; Sat, 14 Mar 2026 01:49:18 -0700 (PDT) X-Received: by 2002:a05:620a:4081:b0:8c5:4e48:c908 with SMTP id af79cd13be357-8cdb5aa4e60mr854400085a.27.1773478158444; Sat, 14 Mar 2026 01:49:18 -0700 (PDT) Received: from shalem (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b976cc2b902sm192709066b.29.2026.03.14.01.49.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Mar 2026 01:49:17 -0700 (PDT) From: Hans de Goede To: Greg Kroah-Hartman , "Rafael J . Wysocki" , Danilo Krummrich Cc: Hans de Goede , Rob Herring , Bjorn Andersson , linux-kernel@vger.kernel.org, Saravana Kannan Subject: [PATCH v2 resend] driver core: Make deferred_probe_timeout default a Kconfig option Date: Sat, 14 Mar 2026 09:49:16 +0100 Message-ID: <20260314084916.10868-1-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: h0bJkvYI3MwoMnW8_g5Vl_uHHVj7nlG5 X-Authority-Analysis: v=2.4 cv=QOxlhwLL c=1 sm=1 tr=0 ts=69b52110 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=xqWC_Br6kY4A:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=iWeWSTDGdGHhZ6Hty2QA:9 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-ORIG-GUID: h0bJkvYI3MwoMnW8_g5Vl_uHHVj7nlG5 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzE0MDA2NyBTYWx0ZWRfX8uN23JE0Ef6V XwWUDzfNZc1+xblL6Rw0i0E8CI+J4WmOVfcuRXXi6qNTGzV/WCQVagv45Mv8T1bhRXt1GyOzEfV 3/ZaMNgC1Nz1t3P8P2xnHJIscx1nGalVXxmxG0VrwP3GskL24xsvqXSIKpA3gf+I4bcrLo8OR5M PmSqz+CGjY0x/LLMhvjV2v3d9QJXqlSSFJQjpwFVQYZf5MmWZEr+EozpyQYl5GueyGg93sU6Mwr idTMWwCFM5yAEYU32UAhysoHIxyp+0c4UasYjO/9Z3QgANT0z2+PMnFMZ4aN++PYCpNO8gQp4Nw wYemn7VpgJy88uxabiNniZ8024p8NHW1Tz0LeF3PfY90tcn+uGm1kRDlC18cv0J0S4C+wrBrRDt rmdcKP57JZlQZQZzbhsGTXh7gcE6HSBqxluwfuoXKV8i973AbCc3u1JYGn0BZtXrwxkoTBaCF91 yh+Xq/1mbi+bYCHipQA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-14_02,2026-03-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 suspectscore=0 clxscore=1015 adultscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603140067 Content-Type: text/plain; charset="utf-8" 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. While at it document that a value of -1 can be used to disable the timeout (wait indefinitely). Acked-by: Saravana Kannan Signed-off-by: Hans de Goede --- Changes in v2: - Remove unnecessary addition of "if (driver_deferred_probe_timeout < 0)" check - Add Acked-by from Saravana --- Resending as this one seems to have fallen through the cracks. --- Documentation/admin-guide/kernel-parameters.txt | 2 +- drivers/base/Kconfig | 9 +++++++++ drivers/base/dd.c | 6 +----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index aa0031108bc1..d26957741713 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -1250,7 +1250,7 @@ Kernel parameters out 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. + retrying. Set to -1 to wait indefinitely. =20 delayacct [KNL] Enable per-task delay accounting =20 diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index 1786d87b29e2..f7d385cbd3ba 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. =20 +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 bea8da5f8a3a..2f358e29e0e8 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); =20 -#ifdef CONFIG_MODULES -static int driver_deferred_probe_timeout =3D 10; -#else -static int driver_deferred_probe_timeout; -#endif +static int driver_deferred_probe_timeout =3D CONFIG_DRIVER_DEFERRED_PROBE_= TIMEOUT; =20 static int __init deferred_probe_timeout_setup(char *str) { --=20 2.53.0