From: Rafał Miłecki Date: Mon, 17 Jun 2019 04:53:07 +0000 (+0200) Subject: kernel: backport 4.18 patch adding DMI_PRODUCT_SKU X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4d11c4c3784196ed3e5b5a1f81fa415d99ef32b0;p=openwrt%2Fstaging%2Fluka.git kernel: backport 4.18 patch adding DMI_PRODUCT_SKU It's needed for applying some hardware quirks. This fixes: drivers/net/wireless/broadcom/brcm80211/brcmfmac/dmi.c:60:20: error: 'DMI_PRODUCT_SKU' undeclared here (not in a function); did you mean 'DMI_PRODUCT_UUID'? DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T8"), Fixes: 8888cb725d49 ("mac80211: brcm: backport remaining brcmfmac 5.2 patches") Signed-off-by: Rafał Miłecki --- diff --git a/target/linux/generic/backport-4.14/900-v4.18-firmware-dmi-Add-access-to-the-SKU-ID-string.patch b/target/linux/generic/backport-4.14/900-v4.18-firmware-dmi-Add-access-to-the-SKU-ID-string.patch new file mode 100644 index 0000000000..9c80b47607 --- /dev/null +++ b/target/linux/generic/backport-4.14/900-v4.18-firmware-dmi-Add-access-to-the-SKU-ID-string.patch @@ -0,0 +1,57 @@ +From b23908d3c48a37c46c6a26df2cdeab1610b360ba Mon Sep 17 00:00:00 2001 +From: Simon Glass +Date: Sun, 17 Jun 2018 14:09:42 +0200 +Subject: [PATCH] firmware: dmi: Add access to the SKU ID string + +This is used in some systems from user space for determining the identity +of the device. + +Expose this as a file so that that user-space tools don't need to read +from /sys/firmware/dmi/tables/DMI + +Signed-off-by: Simon Glass +Signed-off-by: Jean Delvare +--- + drivers/firmware/dmi-id.c | 2 ++ + drivers/firmware/dmi_scan.c | 1 + + include/linux/mod_devicetable.h | 1 + + 3 files changed, 4 insertions(+) + +--- a/drivers/firmware/dmi-id.c ++++ b/drivers/firmware/dmi-id.c +@@ -47,6 +47,7 @@ DEFINE_DMI_ATTR_WITH_SHOW(product_name, + DEFINE_DMI_ATTR_WITH_SHOW(product_version, 0444, DMI_PRODUCT_VERSION); + DEFINE_DMI_ATTR_WITH_SHOW(product_serial, 0400, DMI_PRODUCT_SERIAL); + DEFINE_DMI_ATTR_WITH_SHOW(product_uuid, 0400, DMI_PRODUCT_UUID); ++DEFINE_DMI_ATTR_WITH_SHOW(product_sku, 0444, DMI_PRODUCT_SKU); + DEFINE_DMI_ATTR_WITH_SHOW(product_family, 0444, DMI_PRODUCT_FAMILY); + DEFINE_DMI_ATTR_WITH_SHOW(board_vendor, 0444, DMI_BOARD_VENDOR); + DEFINE_DMI_ATTR_WITH_SHOW(board_name, 0444, DMI_BOARD_NAME); +@@ -193,6 +194,7 @@ static void __init dmi_id_init_attr_tabl + ADD_DMI_ATTR(product_serial, DMI_PRODUCT_SERIAL); + ADD_DMI_ATTR(product_uuid, DMI_PRODUCT_UUID); + ADD_DMI_ATTR(product_family, DMI_PRODUCT_FAMILY); ++ ADD_DMI_ATTR(product_sku, DMI_PRODUCT_SKU); + ADD_DMI_ATTR(board_vendor, DMI_BOARD_VENDOR); + ADD_DMI_ATTR(board_name, DMI_BOARD_NAME); + ADD_DMI_ATTR(board_version, DMI_BOARD_VERSION); +--- a/drivers/firmware/dmi_scan.c ++++ b/drivers/firmware/dmi_scan.c +@@ -435,6 +435,7 @@ static void __init dmi_decode(const stru + dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6); + dmi_save_ident(dm, DMI_PRODUCT_SERIAL, 7); + dmi_save_uuid(dm, DMI_PRODUCT_UUID, 8); ++ dmi_save_ident(dm, DMI_PRODUCT_SKU, 25); + dmi_save_ident(dm, DMI_PRODUCT_FAMILY, 26); + break; + case 2: /* Base Board Information */ +--- a/include/linux/mod_devicetable.h ++++ b/include/linux/mod_devicetable.h +@@ -471,6 +471,7 @@ enum dmi_field { + DMI_PRODUCT_VERSION, + DMI_PRODUCT_SERIAL, + DMI_PRODUCT_UUID, ++ DMI_PRODUCT_SKU, + DMI_PRODUCT_FAMILY, + DMI_BOARD_VENDOR, + DMI_BOARD_NAME,