Skip to content

Commit 231bebb

Browse files
authored
[mellanox]: Add SN4700 patches. (#126)
Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
1 parent d446f16 commit 231bebb

6 files changed

+1118
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
From acc9225e1db4bfc710c83c25f34b2b226060c350 Mon Sep 17 00:00:00 2001
2+
From: Vadim Pasternak <vadimp@mellanox.com>
3+
Date: Thu, 23 Jan 2020 14:58:38 +0200
4+
Subject: [PATCH backport] firmware: dmi: Add access to the SKU ID string
5+
backport
6+
7+
Backport of two below upstream commits.
8+
9+
commit b23908d3c48a37c46c6a26df2cdeab1610b360ba
10+
Author: Simon Glass <sjg@chromium.org>
11+
Date: Sun Jun 17 14:09:42 2018 +0200
12+
13+
firmware: dmi: Add access to the SKU ID string
14+
15+
This is used in some systems from user space for determining the
16+
identity
17+
of the device.
18+
19+
Expose this as a file so that that user-space tools don't need to
20+
read
21+
from /sys/firmware/dmi/tables/DMI
22+
23+
Signed-off-by: Simon Glass <sjg@chromium.org>
24+
Signed-off-by: Jean Delvare <jdelvare@suse.de>
25+
26+
commit b23908d3c48a37c46c6a26df2cdeab1610b360ba
27+
Author: Simon Glass <sjg@chromium.org>
28+
Date: Sun Jun 17 14:09:42 2018 +0200
29+
30+
firmware: dmi: Add access to the SKU ID string
31+
32+
This is used in some systems from user space for determining the
33+
identity
34+
of the device.
35+
36+
Expose this as a file so that that user-space tools don't need to
37+
read
38+
from /sys/firmware/dmi/tables/DMI
39+
40+
Signed-off-by: Simon Glass <sjg@chromium.org>
41+
Signed-off-by: Jean Delvare <jdelvare@suse.de>
42+
43+
Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
44+
---
45+
drivers/firmware/dmi-id.c | 1 +
46+
drivers/firmware/dmi_scan.c | 1 +
47+
include/linux/mod_devicetable.h | 1 +
48+
3 files changed, 3 insertions(+)
49+
50+
diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c
51+
index dc269cb288c2..5c864ebe1127 100644
52+
--- a/drivers/firmware/dmi-id.c
53+
+++ b/drivers/firmware/dmi-id.c
54+
@@ -47,6 +47,7 @@ DEFINE_DMI_ATTR_WITH_SHOW(product_name, 0444, DMI_PRODUCT_NAME);
55+
DEFINE_DMI_ATTR_WITH_SHOW(product_version, 0444, DMI_PRODUCT_VERSION);
56+
DEFINE_DMI_ATTR_WITH_SHOW(product_serial, 0400, DMI_PRODUCT_SERIAL);
57+
DEFINE_DMI_ATTR_WITH_SHOW(product_uuid, 0400, DMI_PRODUCT_UUID);
58+
+DEFINE_DMI_ATTR_WITH_SHOW(product_sku, 0444, DMI_PRODUCT_SKU);
59+
DEFINE_DMI_ATTR_WITH_SHOW(product_family, 0400, DMI_PRODUCT_FAMILY);
60+
DEFINE_DMI_ATTR_WITH_SHOW(board_vendor, 0444, DMI_BOARD_VENDOR);
61+
DEFINE_DMI_ATTR_WITH_SHOW(board_name, 0444, DMI_BOARD_NAME);
62+
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
63+
index 150b923ef86d..d2a85a2e5b08 100644
64+
--- a/drivers/firmware/dmi_scan.c
65+
+++ b/drivers/firmware/dmi_scan.c
66+
@@ -426,6 +426,7 @@ static void __init dmi_decode(const struct dmi_header *dm, void *dummy)
67+
dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6);
68+
dmi_save_ident(dm, DMI_PRODUCT_SERIAL, 7);
69+
dmi_save_uuid(dm, DMI_PRODUCT_UUID, 8);
70+
+ dmi_save_ident(dm, DMI_PRODUCT_SKU, 25);
71+
dmi_save_ident(dm, DMI_PRODUCT_FAMILY, 26);
72+
break;
73+
case 2: /* Base Board Information */
74+
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
75+
index 616b31a1495d..103c14049a76 100644
76+
--- a/include/linux/mod_devicetable.h
77+
+++ b/include/linux/mod_devicetable.h
78+
@@ -456,6 +456,7 @@ enum dmi_field {
79+
DMI_PRODUCT_VERSION,
80+
DMI_PRODUCT_SERIAL,
81+
DMI_PRODUCT_UUID,
82+
+ DMI_PRODUCT_SKU,
83+
DMI_PRODUCT_FAMILY,
84+
DMI_BOARD_VENDOR,
85+
DMI_BOARD_NAME,
86+
--
87+
2.20.1
88+

0 commit comments

Comments
 (0)