From nobody Sun Feb 8 18:18:29 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 943FD2D8760 for ; Wed, 4 Feb 2026 15:01:04 +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=1770217264; cv=none; b=aD6nAWn4aiGx+x33EeSLtDIV/N1K3xaGaR4+RGTRFHLKjgO7PEItgk0YQxNreYETpsY2FK8pBAYBhwivKO8hZVXggsog0kpXts7QUsANWIghdtKTTJprXSMNi1eHKRlyhdDK87xCedCfvpY+ShHJlGygXQyDvu1CVyC2v1DMQAQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770217264; c=relaxed/simple; bh=GXBtoeC9LFNkJDZqdfR+vD7L3Zu5OIk5Rq74CjtI93k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZbVoV0jZpjfSZuScpI7a1JJ3AtdjUZ9SWV16MR9OBn2owUf/2H1oL+fkNSnGEBUm92NoM1gUfeuq6/5H43JRDLxN/ff4pL/UYW/Hh6I07L/wBCdzpOAuhpMnQ1WfEHarHIynaO/OW3HbnNiYEDmelitxDw3Z7eWylY1AnQ50zyw= 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=OByThz8D; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=HszjobS2; 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="OByThz8D"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="HszjobS2" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 614CIa331032505 for ; Wed, 4 Feb 2026 15:01:03 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=5Zt3oDzbaCUjmPeRW0ThtNXN1XRzan/1m7Y DMt3CNgo=; b=OByThz8DhiO4YSf+DlqFHkmcsL6l98Ivj3NYmKRwF8MjBhvPO4l fWt5pKm4rTUD3IudNfRJW/6eJvLt4PKSPnDNM4MJPhpJxt6B6hoXDmesR/wn+U+G PIqhYi71KhQ8W83lCnCE7xnxB7YRExwP33RomzEDqQ0np3vA7JstHxGIcVhH+0N6 /g1WFTo6vBh+IKy6qMNd44aAdqNJwsV9m64PIOgqVpdtjkCqpwwoeib/DaG0KLvX tZqRgKE7NNwDUym7hTooU/Fq50bId7Ae0NgI8Znrlu+uQeXjaoKRlKRFpj+c3HRW YL6heLERArqUKlTrKop6HsLSDuW1Esrz/WA== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c3ne7up5k-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 04 Feb 2026 15:01:03 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-8c70e610242so1880921885a.2 for ; Wed, 04 Feb 2026 07:01:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770217262; x=1770822062; 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=5Zt3oDzbaCUjmPeRW0ThtNXN1XRzan/1m7YDMt3CNgo=; b=HszjobS2Ytc6VSLlqflmPYFWPfFXnuEY+ypJhvGaKK4DJQLLi38do8dmcLpyHwRiZw JQROCuiOidv2ztkE4cEeVBGY/6JCTduslN8obM/U4MThz+zOjDV93b0lz0eieIQjDoKF CW0t6Rrz85zYPXtmkMKWchxJjF3cpROQg6qu243SQidE0vWhGkQQc526b6n8I0c64T7w QEnCbl12iTy4ZlLqi/zRP0Uy5QWI0QnC3foF3pIFerivbKvY5B6cDztbZWqI4wtxyuKm IMhIOYRFkS6hKZuPB3ZksuSl437Oc8FypUqMkiNOQ9MIDidPVpzCzaoC5s7kVhmF4zk1 cPbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770217262; x=1770822062; 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=5Zt3oDzbaCUjmPeRW0ThtNXN1XRzan/1m7YDMt3CNgo=; b=lHAGS7ymbDc/wFwcSvgi59VpSCILgQmRcI0n/MaF11vtGbrf1TQHfHwCgNrOfdsJ5i afAsb9SKwhNtpa/GL+agiqogf8RfJDYGNuY44zBlSRQ3W2ieAB0Xd4DrEssGlhEblXAc CWFFOFwTxGJg5qnFs2HCj2gQXJ76NTO0V8Xq4yc/FT1V2cU+pohMzfd2J1xVlUMpgKHs i4rcdkimFJbsF5dkAIdjFCy/5xwQqJKZej9KAAHIeIGopYWA4nYlIUCvIOZE+R7ZtBJa OdXgJ2QBPO/7UMkkk5+G9SlrXcR4+tyOerGE26rk7SDmg38B0/GmhIinBzJWj7QIzSQL uJnQ== X-Forwarded-Encrypted: i=1; AJvYcCXmBVVsBtML+D4yWq9LhFwnuOppLpHT2Mosf2D+CObwe793tplGXCoA3klHbEoJj21LQ9agRwdRuEUYbLk=@vger.kernel.org X-Gm-Message-State: AOJu0Ywk1hc+9BzJLShGEJTmwz+P6Z0T0VgOx05cw0ekQGOB+6TevPja VULga9MRa2O/XG/18IQ3jz5/KTmSjXb8CWiH8LpK/zQ3B3+a8VL8IJwUwmBGYeoADtHef8DthnW QpqA0HNF/vQ9Y6sGCOjEuyyGTZJJW7N4LtlPz7wO+KAt1LX7hB3lzN1cnuUNtkx4ZpHEv8ZSFiI s= X-Gm-Gg: AZuq6aL9Es8dR8l9WkgxD7re77VolEr6O6v0LCUrll+JT9UIm2KpeVJ2H4Ok7X1VqfF xByzhtwhkKCxB8RVIEeD2I7CkPp2ZooSEzHd+fIFnQ9bHEM6lP1Ny8dG6tKuiM44ha2itDhkb6K vcKKWBL0wCuC63GKxt411qb0sn/kW5+FTy9eEUw1VEEbKvPLk2rwdNHA0s3Y9/YTIW0mhzVU5eq n4YLRWYLOg55uVdLJ6/QMlIPwKqqTNu+d8q+ZKC/nffpYqF6u+F0znO8oRaXF/Xuq1bLy1bAeFH Pb5tLlfi5p1p0ocyiSwV2MWDWHmtIh4/0O7A/qJZuP+zPpjAY4CJddyfc/i/++Y0uXT/1RIsZpW aiNlUMCjRECDJDvM/qUYb05EyG4sZtOE/oAyHXf2NlwBzzrV/nVWpUhMyZwBMq9zjcadgb7a9ha mB8XTJ1Ig0cj5GPOpIb2zdoijq X-Received: by 2002:a05:620a:480b:b0:8c9:e976:d20 with SMTP id af79cd13be357-8ca2f9c577fmr414952685a.46.1770217259243; Wed, 04 Feb 2026 07:00:59 -0800 (PST) X-Received: by 2002:a05:620a:480b:b0:8c9:e976:d20 with SMTP id af79cd13be357-8ca2f9c577fmr414828685a.46.1770217247478; Wed, 04 Feb 2026 07:00:47 -0800 (PST) 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 4fb4d7f45d1cf-65949ed6b7esm1272702a12.11.2026.02.04.07.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Feb 2026 07:00:46 -0800 (PST) From: Hans de Goede To: Greg Kroah-Hartman , "Rafael J . Wysocki" , Danilo Krummrich Cc: Hans de Goede , linux-kernel@vger.kernel.org Subject: [PATCH] driver core: Make deferred_probe_timeout default a Kconfig option Date: Wed, 4 Feb 2026 16:00:45 +0100 Message-ID: <20260204150045.32892-1-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.52.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-ORIG-GUID: NmqZp2A3j-XSfYfoc0PGgruQR8PNRqKD X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjA0MDExNCBTYWx0ZWRfX4YRl5N6RLO/i 1TDvYqySaJhWfXpY6SRuy5pAboTCYW3TLnKsOon0ugN0olDfcjCkdQvKFPSL1GWFWrNv2HPy65i YIwGeQ84Fm/HeIiUmjubHybCgaKJvA18m4dlagr/HdYpvgA9DbZDSTy28hzYO/dUDJQ2DXt7JsS 2SzCvaaPxUhpmhbtPClb1ajrR76/HmXlBaSmsgqgy8QXl9lltrBTuRksGM7LGuCI2hmYeq+aXtO TM6jNu8n1ySqLr7wYRxYebuWvb5OlMBGo7a8bdUijGBpZMt7yNZlzPnv/9AfXcd3AZffOWug9PJ jqZaPCe260H7FxXO6+LzfJmhmFqEa840qkLqjfI1D0StaFOuO76Fyqb8qHnHsQtCV5NrEDWqBRj all3nUM63bploYmbF3me4TiOyiC9DX3HttdTCoiKvz/CdP49x8iP7H2cx/PEn+7mrM49AXEKS9F 7qJjzF7PrWSROEhMKxQ== X-Authority-Analysis: v=2.4 cv=TZmbdBQh c=1 sm=1 tr=0 ts=69835f2f cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=xqWC_Br6kY4A:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=TZbnZ9SDAF1jH3i77HIA:9 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-GUID: NmqZp2A3j-XSfYfoc0PGgruQR8PNRqKD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-04_04,2026-02-04_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602040114 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 and allow using a value of -1 to disable the timeout (wait indefinitely). Signed-off-by: Hans de Goede Acked-by: Saravana Kannan --- Documentation/admin-guide/kernel-parameters.txt | 2 +- drivers/base/Kconfig | 9 +++++++++ drivers/base/dd.c | 9 ++++----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index 1058f2a6d6a8..80d300c4e16b 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..e57144aa168d 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) { @@ -323,6 +319,9 @@ static DECLARE_DELAYED_WORK(deferred_probe_timeout_work= , deferred_probe_timeout_ =20 void deferred_probe_extend_timeout(void) { + if (driver_deferred_probe_timeout < 0) + return; + /* * If the work hasn't been queued yet or if the work expired, don't * start a new one. --=20 2.52.0