]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
kernel: add pc engines apu1 led detection with new bios.
authorArne Fitzenreiter <arne_f@ipfire.org>
Wed, 17 Feb 2021 19:41:23 +0000 (20:41 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 5 Jul 2021 05:42:37 +0000 (07:42 +0200)
bios 4.x change the dmi device name from APU to apu1

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
lfs/linux
src/patches/linux/linux-5.10.16-apu1-led-new-bios.patch [new file with mode: 0644]

index ec3e5bcda7391071b029d816eb2f5ae96d239ed9..c193235457986bde766564d4ab73a0086846eea1 100644 (file)
--- a/lfs/linux
+++ b/lfs/linux
@@ -125,6 +125,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.14_ath_user_regd.patch
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.9.8-iwlwifi-noibss_only_on_radar_chan.patch
 
+       # Fix apu1 led detection with newer bios versions
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-5.10.16-apu1-led-new-bios.patch
+
        # Fix igb and e1000e crash
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.14.1-igb-e1000e_fix_lock_at_update_stats.patch
 
diff --git a/src/patches/linux/linux-5.10.16-apu1-led-new-bios.patch b/src/patches/linux/linux-5.10.16-apu1-led-new-bios.patch
new file mode 100644 (file)
index 0000000..572136d
--- /dev/null
@@ -0,0 +1,27 @@
+diff -Naur linux-5.10.16.org/drivers/leds/leds-apu.c linux-5.10.16/drivers/leds/leds-apu.c
+--- linux-5.10.16.org/drivers/leds/leds-apu.c  2021-02-13 13:55:19.000000000 +0100
++++ linux-5.10.16/drivers/leds/leds-apu.c      2021-02-17 09:32:19.154531597 +0100
+@@ -90,6 +90,13 @@
+                       DMI_MATCH(DMI_PRODUCT_NAME, "APU")
+               }
+       },
++      {
++              .ident = "apu",
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "apu1")
++              }
++      },
+       {}
+ };
+ MODULE_DEVICE_TABLE(dmi, apu_led_dmi_table);
+@@ -173,7 +180,8 @@
+       int err;
+       if (!(dmi_match(DMI_SYS_VENDOR, "PC Engines") &&
+-            dmi_match(DMI_PRODUCT_NAME, "APU"))) {
++            dmi_match(DMI_PRODUCT_NAME, "APU")||
++            dmi_match(DMI_PRODUCT_NAME, "apu1"))) {
+               pr_err("No PC Engines APUv1 board detected. For APUv2,3 support, enable CONFIG_PCENGINES_APU2\n");
+               return -ENODEV;
+       }