firmware_loader: Log direct loading failures as info for d-i
authorBen Hutchings <benh@debian.org>
Thu, 30 May 2024 12:14:32 +0000 (13:14 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Tue, 12 Aug 2025 03:28:04 +0000 (05:28 +0200)
Forwarded: not-needed

On an installed Debian system, firmware packages will normally be
installed automatically based on a mapping of device IDs to firmware.
Within the Debian installer this has not yet happened and we need a
way to detect missing firmware.

Although many/most drivers log firmware loading failures, they do so
using many different formats.  This adds a single log message to the
firmware loader, which the installer's hw-detect package will look
for.  The log level is set to "info" because some failures are
expected and we do not want to confuse users with bogus error messages
(like in bug #966218).

NOTE: The log message format must not be changed without coordinating
this with the check-missing-firmware.sh in hw-detect.

Gbp-Pq: Topic debian
Gbp-Pq: Name firmware_loader-log-direct-loading-failures-as-info-for-d-i.patch

drivers/base/firmware_loader/main.c

index c6664a7879697944eec1fa8d54e39492be53875a..c75b53b13009be32357c33be6d63f2028d071876 100644 (file)
@@ -590,6 +590,10 @@ fw_get_filesystem_firmware(struct device *device, struct fw_priv *fw_priv,
        }
        __putname(path);
 
+       if (rc)
+               dev_info(device, "firmware: failed to load %s (%d)\n",
+                        fw_priv->fw_name, rc);
+
        return rc;
 }