[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#969264: firmware-iwlwifi: failed to load iwl-debug-yoyo.bin (-2)



This bug still persists on Bookworm kernels despite having been "fixed"
upstream. It has been annoying me for a while, so I decided to work out exactly
what was going on.

>From the upstream discussion and elsewhere, I gather that the firmware file
"iwl-debug-yoyo.bin" is optional "TLV debug data" associated with the iwlwifi
driver. This data does not seem to have been made generally available by Intel,
nor is it required for operation, nor is it even expected to exist on a normal
production system. So the error message generated when the kernel tries to load
it is harmless, but it is going to be irksome to almost everybody with an Intel
wireless adapter.

There are a few posts floating around which suggest making the problem go away
by setting the enable_ini module parameter on the iwlwifi module. This
certainly doesn't work for me on a fairly recent AX211 adapter, which fails to
initialise completely if I try messing with enable_ini.

The upstream fix [1] to avoid the irksome error messages has been to replace
a call to request_firmware() from the iwlwifi driver with
firmware_request_nowarn() instead. This causes option flag FW_OPT_NO_WARN to be
set inside the firmware subsystem to indicate that it should not complain if it
fails to load this particular file.

Unfortunately, Debian also applies a couple of downstream patches which
customise the firmware loading code so as to unconditionally issue a message at
loglevel 3 whenever a firmware file fails to load. See [2] and [3] for details.

>From the above, it is difficult to know what the correct "fix" is here, as the
Debian approach seems to be to deliberately issue an error on firmware load
failure, whether asked to or not. If this behaviour were changed, it would
clearly affect the error reporting behaviour for all firmware in general, so it
needs thought.

One possible approach might be to downgrade the Debian-specific errors in
[2] and [3] to a lower loglevel in cases where FW_OPT_NO_WARN has been set
by the driver. This would stop them from appearing on the console during
boot. Loglevel 3 would still need to be used in cases where FW_OPT_NO_WARN
is unset (i.e. for firmware that is expected to exist).

Sadly the required option flags are not available in
fw_get_filesystem_firmware() where the error messages are currently issued,
so either the flags will need to be passed in, or the error checking will need
to be moved out into _request_firmware() where the flags are visible.

Note also there are a lot of fallbacks in _request_firmware(): to compressed
versions of firmware files, to firmware embedded on the platform etc. I'm not
clear on how many of these should be tried prior to issuing an error message.

If a decision is ever made on the preferred solution here, I'll be happy to
prepare a patch, but I assume further discussion will be needed as it affects
firmware loading in general. Hopefully these notes may have shed some light
to inform that.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c?id=3f4600de8c93917594a8b3c9ca713160ee4d563c
[2] https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/patches/bugfix/all/firmware_class-log-every-success-and-failure.patch
[3] https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/patches/debian/firmware_class-refer-to-debian-wiki-firmware-page.patch


Reply to: