linux/debian/patches/debian/firmware_class-refer-to-deb...

29 lines
863 B
Diff

From: Ben Hutchings <ben@decadent.org.uk>
Date: Mon, 12 Mar 2018 01:14:03 +0000
Subject: firmware_class: Refer to Debian wiki page when logging missing firmware
Bug-Debian: https://bugs.debian.org/888405
Forwarded: not-needed
If firmware loading fails due to a missing file, log a second error
message referring to our wiki page about firmware. This will explain
why some firmware is in non-free, or can't be packaged at all. Only
do this once per boot.
---
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -430,9 +430,12 @@ fw_get_filesystem_firmware(struct device
}
__putname(path);
- if (rc)
+ if (rc) {
dev_err(device, "firmware: failed to load %s (%d)\n",
buf->fw_id, rc);
+ if (rc == -ENOENT)
+ pr_err_once("See https://wiki.debian.org/Firmware for information about missing firmware\n");
+ }
return rc;
}