kernel: add pc engines apu1 led detection with new bios.

bios 4.x change the dmi device name from APU to apu1

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Arne Fitzenreiter
2021-02-17 20:41:23 +01:00
parent 604945c060
commit fead781062
2 changed files with 30 additions and 0 deletions

View File

@@ -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

View File

@@ -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;
}