public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* FAILED: Patch "fpga: dfl: use subsys_initcall to allow built-in drivers to be added" failed to apply to 6.12-stable tree
@ 2026-03-01  1:18 Sasha Levin
  2026-03-02 14:31 ` Thadeu Lima de Souza Cascardo
  0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2026-03-01  1:18 UTC (permalink / raw)
  To: stable, cascardo; +Cc: Xu Yilun, Xu Yilun, linux-fpga

The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

Thanks,
Sasha

------------------ original commit in Linus's tree ------------------

From 267f53140c9d0bf270bbe0148082e9b8e5011273 Mon Sep 17 00:00:00 2001
From: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Date: Mon, 15 Dec 2025 16:05:50 -0300
Subject: [PATCH] fpga: dfl: use subsys_initcall to allow built-in drivers to
 be added

The dfl code adds a bus. If it is built-in and there is a built-in driver
as well, the dfl module_init may be called after the driver module_init,
leading to a failure to register the driver as the bus has not been added
yet.

Use subsys_initcall, which guarantees it will be called before the drivers
init code.

Without the fix, we see failures like this:

[    0.479475] Driver 'intel-m10-bmc' was unable to register with bus_type 'dfl' because the bus was not initialized.

Cc: stable@vger.kernel.org
Fixes: 9ba3a0aa09fe ("fpga: dfl: create a dfl bus type to support DFL devices")
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Link: https://lore.kernel.org/r/20251215-dfl_subsys-v1-1-21807bad6b10@igalia.com
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
---
 drivers/fpga/dfl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/fpga/dfl.c b/drivers/fpga/dfl.c
index 7022657243c0a..449c3a082e232 100644
--- a/drivers/fpga/dfl.c
+++ b/drivers/fpga/dfl.c
@@ -2018,7 +2018,7 @@ static void __exit dfl_fpga_exit(void)
 	bus_unregister(&dfl_bus_type);
 }
 
-module_init(dfl_fpga_init);
+subsys_initcall(dfl_fpga_init);
 module_exit(dfl_fpga_exit);
 
 MODULE_DESCRIPTION("FPGA Device Feature List (DFL) Support");
-- 
2.51.0





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: FAILED: Patch "fpga: dfl: use subsys_initcall to allow built-in drivers to be added" failed to apply to 6.12-stable tree
  2026-03-01  1:18 FAILED: Patch "fpga: dfl: use subsys_initcall to allow built-in drivers to be added" failed to apply to 6.12-stable tree Sasha Levin
@ 2026-03-02 14:31 ` Thadeu Lima de Souza Cascardo
  0 siblings, 0 replies; 2+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2026-03-02 14:31 UTC (permalink / raw)
  To: Sasha Levin; +Cc: stable, Xu Yilun, Xu Yilun, linux-fpga

On Sat, Feb 28, 2026 at 08:18:22PM -0500, Sasha Levin wrote:
> The patch below does not apply to the 6.12-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
> 
> Thanks,
> Sasha

Hi, Sasha!

I grabbed queue-6.12/fpga-dfl-use-subsys_initcall-to-allow-built-in-drive.patch
from https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git,
and applied it on top of v6.12.74 with git-am and it does apply just fine.

Was this message triggered accidentally, given the patch is still on the queue?
Or how should I verify that it applies (or doesn't)?

Thanks.
Cascardo.

> 
> ------------------ original commit in Linus's tree ------------------
> 
> From 267f53140c9d0bf270bbe0148082e9b8e5011273 Mon Sep 17 00:00:00 2001
> From: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
> Date: Mon, 15 Dec 2025 16:05:50 -0300
> Subject: [PATCH] fpga: dfl: use subsys_initcall to allow built-in drivers to
>  be added
> 
> The dfl code adds a bus. If it is built-in and there is a built-in driver
> as well, the dfl module_init may be called after the driver module_init,
> leading to a failure to register the driver as the bus has not been added
> yet.
> 
> Use subsys_initcall, which guarantees it will be called before the drivers
> init code.
> 
> Without the fix, we see failures like this:
> 
> [    0.479475] Driver 'intel-m10-bmc' was unable to register with bus_type 'dfl' because the bus was not initialized.
> 
> Cc: stable@vger.kernel.org
> Fixes: 9ba3a0aa09fe ("fpga: dfl: create a dfl bus type to support DFL devices")
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
> Link: https://lore.kernel.org/r/20251215-dfl_subsys-v1-1-21807bad6b10@igalia.com
> Reviewed-by: Xu Yilun <yilun.xu@intel.com>
> Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
> ---
>  drivers/fpga/dfl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/fpga/dfl.c b/drivers/fpga/dfl.c
> index 7022657243c0a..449c3a082e232 100644
> --- a/drivers/fpga/dfl.c
> +++ b/drivers/fpga/dfl.c
> @@ -2018,7 +2018,7 @@ static void __exit dfl_fpga_exit(void)
>  	bus_unregister(&dfl_bus_type);
>  }
>  
> -module_init(dfl_fpga_init);
> +subsys_initcall(dfl_fpga_init);
>  module_exit(dfl_fpga_exit);
>  
>  MODULE_DESCRIPTION("FPGA Device Feature List (DFL) Support");
> -- 
> 2.51.0
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-02 14:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-01  1:18 FAILED: Patch "fpga: dfl: use subsys_initcall to allow built-in drivers to be added" failed to apply to 6.12-stable tree Sasha Levin
2026-03-02 14:31 ` Thadeu Lima de Souza Cascardo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox