* Issue with iwlwifi Firmware Loading When Compiled into the Kernel
@ 2024-10-31 1:46 Gang Yan
2024-10-31 8:06 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: Gang Yan @ 2024-10-31 1:46 UTC (permalink / raw)
To: Miri Korenblit, Kalle Valo; +Cc: linux-wireless, linux-kernel
Dear Maintainer,
Recently, I met an issue that I would like to bring to your attention and
seek your expertise on.
When I compile the iwlwifi driver directly into the kernel by setting
[CONFIG_IWLWIFI=y], I encounter an error message stating, "iwlwifi direct
firmware load for iwlwifi-so-XXXX failed." However, the relevant firmware
files are present in the /lib/firmware directory.
Based on my observations, I suspect that when iwlwifi is compiled into the
kernel, it attempts to load the firmware before the /lib/firmware directory
mounted. Consequently, the firmware cannot be found. Once the filesystem is
mounted, iwlwifi does not attempt to reload the firmware.
To address this issue, I have considered two potential solutions:
1、Modify the Driver Code: Implement a mechanism, such as delayed_work, to
give iwlwifi another chance to load the firmware after the filesystem has
been mounted. This would involve adding additional logic to the driver to
handle retries for firmware loading.
2、Modify the Kconfig: Change the configuration to allow iwlwifi to be
compiled only as a module [CONFIG_IWLWIFI=m]. This way, the module can be
loaded after the filesystem is fully mounted, ensuring that the firmware
can be found and loaded successfully.
From my perspective, unless there are compelling reasons to pursue the first
option, I would recommend implementing the second solution. It seems more
straightforward and avoids potential complications that might arise from
modifying the driver's core functionality.
I would greatly appreciate your insights on whether my understanding of the
issue is correct and whether such modifications are deemed necessary.
Thank you for your time and consideration.
Best regards,
Gang Yan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Issue with iwlwifi Firmware Loading When Compiled into the Kernel
2024-10-31 1:46 Issue with iwlwifi Firmware Loading When Compiled into the Kernel Gang Yan
@ 2024-10-31 8:06 ` Johannes Berg
2024-10-31 8:52 ` Gang Yan
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2024-10-31 8:06 UTC (permalink / raw)
To: Gang Yan, Miri Korenblit, Kalle Valo; +Cc: linux-wireless, linux-kernel
>
> To address this issue, I have considered two potential solutions:
>
> 1、Modify the Driver Code: Implement a mechanism, such as delayed_work, to
> give iwlwifi another chance to load the firmware after the filesystem has
> been mounted. This would involve adding additional logic to the driver to
> handle retries for firmware loading.
>
> 2、Modify the Kconfig: Change the configuration to allow iwlwifi to be
> compiled only as a module [CONFIG_IWLWIFI=m]. This way, the module can be
> loaded after the filesystem is fully mounted, ensuring that the firmware
> can be found and loaded successfully.
Neither of those is going to happen - you should just build the firmware
into the kernel (or initramfs might be enough?) if you want it built-in.
Or set up firmware loading userspace, and set it up appropriately to
only respond after / is mounted.
In any case, not a kernel problem. You need to fix it on your userspace.
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Issue with iwlwifi Firmware Loading When Compiled into the Kernel
2024-10-31 8:06 ` Johannes Berg
@ 2024-10-31 8:52 ` Gang Yan
2024-10-31 8:57 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: Gang Yan @ 2024-10-31 8:52 UTC (permalink / raw)
To: Johannes Berg, miriam.rachel.korenblit, kvalo
Cc: linux-wireless, linux-kernel
On Thu, Oct 31, 2024 at 16:37:49AM +0100, Gang Yan wrote:
Hi, Johannes:
Thanks for your reply.
> On Thu, Oct 31, 2024 at 09:06:49AM +0100, Johannes Berg wrote:
> >
> > To address this issue, I have considered two potential solutions:
> >
> > 1、Modify the Driver Code: Implement a mechanism, such as delayed_work, to
> > give iwlwifi another chance to load the firmware after the filesystem has
> > been mounted. This would involve adding additional logic to the driver to
> > handle retries for firmware loading.
> >
> > 2、Modify the Kconfig: Change the configuration to allow iwlwifi to be
> > compiled only as a module [CONFIG_IWLWIFI=m]. This way, the module can be
> > loaded after the filesystem is fully mounted, ensuring that the firmware
> > can be found and loaded successfully.
>
> Neither of those is going to happen - you should just build the firmware
> into the kernel (or initramfs might be enough?) if you want it built-in.
> Or set up firmware loading userspace, and set it up appropriately to
> only respond after / is mounted.
>
> In any case, not a kernel problem. You need to fix it on your userspace.
>
> johannes
In fact, I'm using Ubuntu's userspace, but I've simply replaced Ubuntu's
kernel with the mainline 6.12.rc2 version (x86_64_defconfig). By merely
changing CONFIG_IWLWIFI from 'm' to 'y', the network functionality normalized,
which is inevitably confusing. By the way, both of my computers encountered
this issue, with network devices being Intel Wireless 8265 and Intel AX210, respectively.
I still think some clarification will be helpful to make the configuration process
here clearer.
Thanks.
Gang Yan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Issue with iwlwifi Firmware Loading When Compiled into the Kernel
2024-10-31 8:52 ` Gang Yan
@ 2024-10-31 8:57 ` Johannes Berg
2024-10-31 9:08 ` Gang Yan
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2024-10-31 8:57 UTC (permalink / raw)
To: Gang Yan, miriam.rachel.korenblit, kvalo; +Cc: linux-wireless, linux-kernel
On Thu, 2024-10-31 at 16:52 +0800, Gang Yan wrote:
>
> In fact, I'm using Ubuntu's userspace, but I've simply replaced Ubuntu's
> kernel with the mainline 6.12.rc2 version (x86_64_defconfig). By merely
> changing CONFIG_IWLWIFI from 'm' to 'y', the network functionality normalized,
> which is inevitably confusing. By the way, both of my computers encountered
> this issue, with network devices being Intel Wireless 8265 and Intel AX210, respectively.
Yeah well, so Ubuntu integrated everything in a certain way, and because
they build everything as modules they didn't integrated anything to make
it possible to build modules in the kernel.
When you change it, you own the integration. I gave you a few ways to
solve this, simplest is just specifying the firmware to build into the
kernel in the .config file.
> I still think some clarification will be helpful to make the configuration process
> here clearer.
I don't think we need to change anything. Whoever makes some changes to
a distro needs to actually do the integration too. This is in no way
specific to iwlwifi, every other devices with firmware has the problem,
and generic ways of fixing it already exist.
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Issue with iwlwifi Firmware Loading When Compiled into the Kernel
2024-10-31 8:57 ` Johannes Berg
@ 2024-10-31 9:08 ` Gang Yan
0 siblings, 0 replies; 5+ messages in thread
From: Gang Yan @ 2024-10-31 9:08 UTC (permalink / raw)
To: Johannes Berg
Cc: miriam.rachel.korenblit, kvalo, linux-wireless, linux-kernel
> On Thu, Oct 31, 2024 at 09:57:33AM +0100, Johannes Berg wrote:
> On Thu, 2024-10-31 at 16:52 +0800, Gang Yan wrote:
> >
> > In fact, I'm using Ubuntu's userspace, but I've simply replaced Ubuntu's
> > kernel with the mainline 6.12.rc2 version (x86_64_defconfig). By merely
> > changing CONFIG_IWLWIFI from 'm' to 'y', the network functionality normalized,
> > which is inevitably confusing. By the way, both of my computers encountered
> > this issue, with network devices being Intel Wireless 8265 and Intel AX210, respectively.
>
> Yeah well, so Ubuntu integrated everything in a certain way, and because
> they build everything as modules they didn't integrated anything to make
> it possible to build modules in the kernel.
>
> When you change it, you own the integration. I gave you a few ways to
> solve this, simplest is just specifying the firmware to build into the
> kernel in the .config file.
>
> > I still think some clarification will be helpful to make the configuration process
> > here clearer.
>
> I don't think we need to change anything. Whoever makes some changes to
> a distro needs to actually do the integration too. This is in no way
> specific to iwlwifi, every other devices with firmware has the problem,
> and generic ways of fixing it already exist.
>
> Johannes
Thanks a lot, I understand what you mean now.
Gang Yan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-31 9:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-31 1:46 Issue with iwlwifi Firmware Loading When Compiled into the Kernel Gang Yan
2024-10-31 8:06 ` Johannes Berg
2024-10-31 8:52 ` Gang Yan
2024-10-31 8:57 ` Johannes Berg
2024-10-31 9:08 ` Gang Yan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®