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

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



On 27/03/2023 01:08, Diederik de Haas wrote:
> I don't know if it's also an upstream kernel issue or it's only caused by
> Debian's patch, but AFAICT that patch needs to be revised to (at least) account
> for the upstream change(s?) in firmware loading.

AFAICT, it's just a Debian problem now.

I'm attaching a patch, more for documentary purposes than anything else.

This reduces the "firmware: failed to load..." message to a loglevel of info in
cases where the FW_OPT_NO_WARN flag is set, which stops if from bothering the
user on the console.

That same message seems to be the key that the installer greps for to indicate
missing firmware: See [4], line 157. One wonders whether that is the best course
in cases where that firmware is only optional anyway.

-Ken.

[4] https://salsa.debian.org/installer-team/hw-detect/-/blob/master/check-missing-firmware.sh
diff -Naur linux-source-6.1~/drivers/base/firmware_loader/main.c linux-source-6.1/drivers/base/firmware_loader/main.c
--- linux-source-6.1~/drivers/base/firmware_loader/main.c	2023-03-05 15:33:00.000000000 +0000
+++ linux-source-6.1/drivers/base/firmware_loader/main.c	2023-03-27 22:58:25.794997737 +0100
@@ -572,10 +572,15 @@
 	__putname(path);
 
 	if (rc) {
-		dev_err(device, "firmware: failed to load %s (%d)\n",
-			fw_priv->fw_name, rc);
-		if (rc == -ENOENT)
-			pr_err_once("See https://wiki.debian.org/Firmware for information about missing firmware\n");
+		if (!(fw_priv->opt_flags & FW_OPT_NO_WARN)) {
+			dev_err(device, "firmware: failed to load %s (%d)\n",
+				fw_priv->fw_name, rc);
+			if (rc == -ENOENT)
+				pr_err_once("See https://wiki.debian.org/Firmware for information about missing firmware\n");
+		} else {
+			dev_info(device, "firmware: failed to load %s (%d)\n",
+				fw_priv->fw_name, rc);
+		}
 	}
 
 	return rc;

Reply to: