From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jeff Layton <jlayton@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>,
Russ Weight <russ.weight@linux.dev>,
Danilo Krummrich <dakr@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Michal Grzedzicki <mge@meta.com>,
driver-core@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firmware_loader: allow firmware_class.path to take multiple paths
Date: Wed, 18 Mar 2026 13:40:01 +0100 [thread overview]
Message-ID: <2026031838-wieldable-enlisted-5398@gregkh> (raw)
In-Reply-To: <20260318-fw-path-v1-1-7884d9bf618f@kernel.org>
On Wed, Mar 18, 2026 at 08:25:54AM -0400, Jeff Layton wrote:
> Refactor fw_get_filesystem_firmware() by extracting the per-path
> firmware loading logic into a new fw_try_firmware_path() helper.
>
> Use this helper to parse fw_path_para for ';'-separated paths,
> trying each one before falling through to the default firmware
> search paths. This allows users to specify multiple custom firmware
> directories via firmware_class.path, e.g.:
>
> firmware_class.path=/custom/path1;/custom/path2
>
> Suggested-by: Michal Grzedzicki <mge@meta.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> This is something Michal had asked for last year, and I just got around
> to implementing. Tested with a dummy module that calls
> request_firmware().
> ---
> drivers/base/firmware_loader/main.c | 197 +++++++++++++++++++++---------------
> 1 file changed, 118 insertions(+), 79 deletions(-)
>
> diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c
> index a11b30dda23be563bd55f25474ceff2153ddd667..5328d28a2141e85265e1bcc20e995ce4c5517c36 100644
> --- a/drivers/base/firmware_loader/main.c
> +++ b/drivers/base/firmware_loader/main.c
> @@ -470,7 +470,6 @@ static int fw_decompress_xz(struct device *dev, struct fw_priv *fw_priv,
> /* direct firmware loading support */
> static char fw_path_para[256];
> static const char * const fw_path[] = {
> - fw_path_para,
> "/lib/firmware/updates/" UTS_RELEASE,
> "/lib/firmware/updates",
> "/lib/firmware/" UTS_RELEASE,
> @@ -480,10 +479,83 @@ static const char * const fw_path[] = {
> /*
> * Typical usage is that passing 'firmware_class.path=$CUSTOMIZED_PATH'
> * from kernel command line because firmware_class is generally built in
> - * kernel instead of module.
> + * kernel instead of module. Multiple paths can be separated by ';'.
> */
> module_param_string(path, fw_path_para, sizeof(fw_path_para), 0644);
> -MODULE_PARM_DESC(path, "customized firmware image search path with a higher priority than default path");
> +MODULE_PARM_DESC(path, "customized firmware image search path with a higher priority than default path, multiple paths can be separated by ';'");
Ah, you documented it here, sorry, I missed that.
But still, why ';'?
greg k-h
next prev parent reply other threads:[~2026-03-18 12:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 12:25 [PATCH] firmware_loader: allow firmware_class.path to take multiple paths Jeff Layton
2026-03-18 12:39 ` Greg Kroah-Hartman
2026-03-18 12:40 ` Greg Kroah-Hartman [this message]
2026-03-18 12:56 ` Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026031838-wieldable-enlisted-5398@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=jlayton@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mge@meta.com \
--cc=rafael@kernel.org \
--cc=russ.weight@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox