Package: linux / 4.19.37-3

debian/firmware_class-refer-to-debian-wiki-firmware-page.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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.

Do something similar in the radeon and amdgpu drivers, where we have
an early check to avoid failing at a point where we cannot display
anything.

---
--- a/drivers/base/firmware_loader/main.c
+++ b/drivers/base/firmware_loader/main.c
@@ -334,9 +334,12 @@ fw_get_filesystem_firmware(struct device
 	}
 	__putname(path);
 
-	if (rc)
+	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");
+	}
 
 	return rc;
 }
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -367,6 +367,7 @@ static int radeon_pci_probe(struct pci_d
 	if ((ent->driver_data & RADEON_FAMILY_MASK) >= CHIP_R600 &&
 	    !radeon_firmware_installed()) {
 		DRM_ERROR("radeon kernel modesetting for R600 or later requires firmware installed\n");
+		pr_err_once("See https://wiki.debian.org/Firmware for information about missing firmware\n");
 		return -ENODEV;
 	}
 
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -626,6 +626,7 @@ static int amdgpu_pci_probe(struct pci_d
 
 	if (!amdgpu_firmware_installed()) {
 		DRM_ERROR("amdgpu requires firmware installed\n");
+		pr_err_once("See https://wiki.debian.org/Firmware for information about missing firmware\n");
 		return -ENODEV;
 	}