From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9AB0613B2B8; Tue, 27 Feb 2024 14:25:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709043906; cv=none; b=Roq8ucT7CWae5Q/xJrd9f9ifhqCbO8sqOk1M+jPGOy+/9iSNdBImZYbwPkuGct1Px8F44an6nPmJlslvnlZL+W/lBnuQMPpG8HrmkoxCKRMtT7CtNkxjk7+T71Gr8NC8fy5G/u9ddOIyemSObOYxOI4LT4FnSvMaxAO+VgRa6Os= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709043906; c=relaxed/simple; bh=CKUCtjYyRgbPt2ohqgqJoET8BcdlH3+L17nxccHyu3U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hS2wU7yq1hOQ2cQRjNS9Z9RIm4yyx/xZhBV+F1q0n/qZtZd4GbiBJ99l3nlSZGQH4nxGAHI9ibnfGve8oAWjYzh/cMB4pCMO2Ag/Xz85v5gyE1EQUBaZ0WDCGv7nhAViSmUeEW1ifoyw8VUnq0Kts1LyK7g7YPMFg0xophyJkko= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TgziO8wi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="TgziO8wi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A60BDC433F1; Tue, 27 Feb 2024 14:25:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709043906; bh=CKUCtjYyRgbPt2ohqgqJoET8BcdlH3+L17nxccHyu3U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TgziO8wimjYCM3DMUxWwv2loX0SuoX8K1tSSubX/MIPQNPvuSoiq+EpLvt4+jC6bt u7eyAaISrF3/3KhNAtxA6oNeG/CLP8OqmBXbcAAJNLmrWVrbU4btvmotIAjdqoYnFS Ai+2PmFIiFua/vhmOV3OWX4uqn0HKPJ7sOQKSmbc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, linux-pm@vger.kernel.org, Linus Walleij , Thierry Reding , Mark Brown , Liam Girdwood , Bjorn Andersson , Saravana Kannan , Todd Kjos , Len Brown , Pavel Machek , Ulf Hansson , Kevin Hilman , "Rafael J. Wysocki" , Rob Herring , "Rafael J. Wysocki" , John Stultz , Sasha Levin Subject: [PATCH 5.4 39/84] driver core: Set deferred_probe_timeout to a longer default if CONFIG_MODULES is set Date: Tue, 27 Feb 2024 14:27:06 +0100 Message-ID: <20240227131554.144760148@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240227131552.864701583@linuxfoundation.org> References: <20240227131552.864701583@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: John Stultz [ Upstream commit e2cec7d6853712295cef5377762165a489b2957f ] When using modules, its common for the modules not to be loaded until quite late by userland. With the current code, driver_deferred_probe_check_state() will stop returning EPROBE_DEFER after late_initcall, which can cause module dependency resolution to fail after that. So allow a longer window of 30 seconds (picked somewhat arbitrarily, but influenced by the similar regulator core timeout value) in the case where modules are enabled. Cc: linux-pm@vger.kernel.org Cc: Greg Kroah-Hartman Cc: Linus Walleij Cc: Thierry Reding Cc: Mark Brown Cc: Liam Girdwood Cc: Bjorn Andersson Cc: Saravana Kannan Cc: Todd Kjos Cc: Len Brown Cc: Pavel Machek Cc: Ulf Hansson Cc: Kevin Hilman Cc: "Rafael J. Wysocki" Cc: Rob Herring Reviewed-by: Bjorn Andersson Reviewed-by: Rafael J. Wysocki Signed-off-by: John Stultz Link: https://lore.kernel.org/r/20200225050828.56458-3-john.stultz@linaro.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/base/dd.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 7941a8fd22841..0b97a0c96baa3 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -224,7 +224,16 @@ static int deferred_devs_show(struct seq_file *s, void *data) } DEFINE_SHOW_ATTRIBUTE(deferred_devs); +#ifdef CONFIG_MODULES +/* + * In the case of modules, set the default probe timeout to + * 30 seconds to give userland some time to load needed modules + */ +static int deferred_probe_timeout = 30; +#else +/* In the case of !modules, no probe timeout needed */ static int deferred_probe_timeout = -1; +#endif static int __init deferred_probe_timeout_setup(char *str) { int timeout; -- 2.43.0