Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mellanox]: Add SN4700 patches #126

Merged
merged 1 commit into from
Feb 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
From acc9225e1db4bfc710c83c25f34b2b226060c350 Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Thu, 23 Jan 2020 14:58:38 +0200
Subject: [PATCH backport] firmware: dmi: Add access to the SKU ID string
backport

Backport of two below upstream commits.

commit b23908d3c48a37c46c6a26df2cdeab1610b360ba
Author: Simon Glass <[email protected]>
Date: Sun Jun 17 14:09:42 2018 +0200

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 <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>

commit b23908d3c48a37c46c6a26df2cdeab1610b360ba
Author: Simon Glass <[email protected]>
Date: Sun Jun 17 14:09:42 2018 +0200

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 <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>

Signed-off-by: Vadim Pasternak <[email protected]>
---
drivers/firmware/dmi-id.c | 1 +
drivers/firmware/dmi_scan.c | 1 +
include/linux/mod_devicetable.h | 1 +
3 files changed, 3 insertions(+)

diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c
index dc269cb288c2..5c864ebe1127 100644
--- a/drivers/firmware/dmi-id.c
+++ b/drivers/firmware/dmi-id.c
@@ -47,6 +47,7 @@ DEFINE_DMI_ATTR_WITH_SHOW(product_name, 0444, DMI_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, 0400, 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);
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 150b923ef86d..d2a85a2e5b08 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -426,6 +426,7 @@ static void __init dmi_decode(const struct dmi_header *dm, void *dummy)
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 */
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 616b31a1495d..103c14049a76 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -456,6 +456,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,
--
2.20.1

Loading