Skip to content

Commit 9f6be1a

Browse files
committed
Intgerate HW-MGMT 7.0030.0937 Changes
1 parent 14a5f21 commit 9f6be1a

File tree

76 files changed

+768
-12908
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+768
-12908
lines changed

platform/mellanox/hw-management.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
# Mellanox HW Management
1818

19-
MLNX_HW_MANAGEMENT_VERSION = 7.0020.4104
19+
MLNX_HW_MANAGEMENT_VERSION = 7.0030.0937
2020

2121
export MLNX_HW_MANAGEMENT_VERSION
2222

Submodule hw-mgmt updated 324 files
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,11 @@
11
# Current non-upstream patch list, should be updated by hwmgmt_kernel_patches.py script
2-
0099-mlxsw-core_hwmon-Fix-variable-names-for-hwmon-attrib.patch
3-
0100-mlxsw-core_thermal-Rename-labels-according-to-naming.patch
4-
0101-mlxsw-core_thermal-Remove-obsolete-API-for-query-res.patch
5-
0102-mlxsw-reg-Add-mgpir_-prefix-to-MGPIR-fields-comments.patch
6-
0103-mlxsw-core-Remove-unnecessary-asserts.patch
7-
0104-mlxsw-reg-Extend-MTMP-register-with-new-slot-number-.patch
8-
0105-mlxsw-reg-Extend-MTBR-register-with-new-slot-number-.patch
9-
0106-mlxsw-reg-Extend-MCIA-register-with-new-slot-number-.patch
10-
0107-mlxsw-reg-Extend-MCION-register-with-new-slot-number.patch
11-
0108-mlxsw-reg-Extend-PMMP-register-with-new-slot-number-.patch
12-
0109-mlxsw-reg-Extend-MGPIR-register-with-new-slot-fields.patch
13-
0110-mlxsw-core_env-Pass-slot-index-during-PMAOS-register.patch
14-
0111-mlxsw-reg-Add-new-field-to-Management-General-Periph.patch
15-
0112-mlxsw-core-Extend-interfaces-for-cable-info-access-w.patch
16-
0113-mlxsw-core-Extend-port-module-data-structures-for-li.patch
17-
0114-mlxsw-core-Move-port-module-events-enablement-to-a-s.patch
18-
0115-mlxsw-core_hwmon-Split-gearbox-initialization.patch
19-
0116-mlxsw-core_hwmon-Extend-internal-structures-to-suppo.patch
20-
0117-mlxsw-core_hwmon-Introduce-slot-parameter-in-hwmon-i.patch
21-
0118-mlxsw-core_hwmon-Extend-hwmon-device-with-gearbox-ma.patch
22-
0119-mlxsw-core_thermal-Extend-internal-structures-to-sup.patch
23-
0120-mlxsw-core_thermal-Split-gearbox-initialization.patch
24-
0121-mlxsw-core_thermal-Extend-thermal-area-with-gearbox-.patch
25-
0122-mlxsw-core_thermal-Add-line-card-id-prefix-to-line-c.patch
26-
0123-mlxsw-core_thermal-Use-exact-name-of-cooling-devices.patch
27-
0124-mlxsw-core_thermal-Use-common-define-for-thermal-zon.patch
28-
0125-devlink-add-support-to-create-line-card-and-expose-t.patch
29-
0126-devlink-implement-line-card-provisioning.patch
30-
0127-devlink-implement-line-card-active-state.patch
31-
0128-devlink-add-port-to-line-card-relationship-set.patch
32-
0129-devlink-introduce-linecard-info-get-message.patch
33-
0130-devlink-introduce-linecard-info-get-message.patch
34-
0131-mlxsw-reg-Add-Ports-Mapping-event-Configuration-Regi.patch
35-
0132-mlxsw-reg-Add-Management-DownStream-Device-Query-Reg.patch
36-
0133-mlxsw-reg-Add-Management-DownStream-Device-Control-R.patch
37-
0134-mlxsw-reg-Add-Management-Binary-Code-Transfer-Regist.patch
38-
0135-mlxsw-core_linecards-Add-line-card-objects-and-imple.patch
39-
0136-mlxsw-core_linecards-Implement-line-card-activation-.patch
40-
0137-mlxsw-core-Extend-driver-ops-by-remove-selected-port.patch
41-
0138-mlxsw-spectrum-Add-port-to-linecard-mapping.patch
42-
0139-mlxsw-reg-Introduce-Management-Temperature-Extended-.patch
43-
0140-mlxsw-core-Add-APIs-for-thermal-sensor-mapping.patch
44-
0141-mlxsw-reg-Add-Management-DownStream-Device-Tunneling.patch
45-
0142-mlxsw-core_linecards-Probe-devices-for-provisioned-l.patch
46-
0143-mlxsw-core_linecards-Expose-device-FW-version-over-d.patch
47-
0144-mlxsw-core-Introduce-flash-update-components.patch
48-
0145-mlxfw-Get-the-PSID-value-using-op-instead-of-passing.patch
49-
0146-mlxsw-core_linecards-Implement-line-card-device-flas.patch
50-
0147-mlxsw-core_linecards-Introduce-ops-for-linecards-sta.patch
51-
0148-mlxsw-core-Add-interfaces-for-line-card-initializati.patch
52-
0149-mlxsw-core_thermal-Add-interfaces-for-line-card-init.patch
53-
0150-mlxsw-core_hwmon-Add-interfaces-for-line-card-initia.patch
54-
0151-mlxsw-minimal-Prepare-driver-for-modular-system-supp.patch
55-
0152-mlxsw-core-Extend-bus-init-function-with-event-handl.patch
56-
0153-mlxsw-i2c-Add-support-for-system-events-handling.patch
57-
0154-mlxsw-core-Export-line-card-API.patch
58-
0155-mlxsw-minimal-Add-system-event-handler.patch
59-
0156-mlxsw-minimal-Add-interfaces-for-line-card-initializ.patch
60-
0163-platform-mellanox-Introduce-support-for-rack-manager.patch
61-
0176-platform-mellanox-fix-reset_pwr_converter_fail-attri.patch
62-
0177-Documentation-ABI-fix-description-of-fix-reset_pwr_c.patch
63-
0178-platform-mellanox-Introduce-support-for-next-generat.patch
2+
0049-leds-mlxreg-Provide-conversion-for-hardware-LED-colo.patch
3+
0050-leds-mlxreg-Skip-setting-LED-color-during-initializa.patch
4+
0051-leds-mlxreg-Allow-multi-instantiation-of-same-name-L.patch
5+
0167-DS-lan743x-Add-support-for-fixed-phy.patch
6+
0168-TMP-mlxsw-minimal-Ignore-error-reading-SPAD-register.patch
7+
0169-TMP-mlxsw-i2c-Prevent-transaction-execution-for-spec.patch
8+
0174-DS-mlxsw-core_linecards-Skip-devlink-and-provisionin.patch
9+
0181-Revert-Fix-out-of-bounds-memory-accesses-in-thermal.patch
10+
0268-DS-mlxsw-core_linecards-Disable-firmware-bundling-ma.patch
11+
9002-TMP-fix-for-fan-minimum-speed.patch
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
From 4db801c656712234c840883b68429e6d45080ea3 Mon Sep 17 00:00:00 2001
2+
From: Vadim Pasternak <vadimp@nvidia.com>
3+
Date: Tue, 6 Jul 2021 18:38:29 +0000
4+
Subject: [PATCH backport v5.10.43 49/67] leds: mlxreg: Provide conversion for
5+
hardware LED color code
6+
7+
In case register is set by hardware, convert hardware color code to
8+
expose correct color to "sysfs".
9+
For some LED color at initial state is set by hardware. Hardware
10+
controls LED color until the first software write access to any LED
11+
register - the first software access cancels hardware control.
12+
If LED is under hardware control - detect the color in brightness_get()
13+
function.
14+
15+
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
16+
---
17+
drivers/leds/leds-mlxreg.c | 27 ++++++++++++++++++++++-----
18+
1 file changed, 22 insertions(+), 5 deletions(-)
19+
20+
diff --git a/drivers/leds/leds-mlxreg.c b/drivers/leds/leds-mlxreg.c
21+
index 82aea1cd0c12..aa82f6a521f8 100644
22+
--- a/drivers/leds/leds-mlxreg.c
23+
+++ b/drivers/leds/leds-mlxreg.c
24+
@@ -17,7 +17,9 @@
25+
#define MLXREG_LED_OFFSET_BLINK_3HZ 0x01 /* Offset from solid: 3Hz blink */
26+
#define MLXREG_LED_OFFSET_BLINK_6HZ 0x02 /* Offset from solid: 6Hz blink */
27+
#define MLXREG_LED_IS_OFF 0x00 /* Off */
28+
-#define MLXREG_LED_RED_SOLID 0x05 /* Solid red */
29+
+#define MLXREG_LED_RED_SOLID_HW 0x01 /* Solid red or orange by hardware */
30+
+#define MLXREG_LED_RED_SOLID 0x05 /* Solid red or orange */
31+
+#define MLXREG_LED_GREEN_SOLID_HW 0x09 /* Solid green by hardware */
32+
#define MLXREG_LED_GREEN_SOLID 0x0D /* Solid green */
33+
#define MLXREG_LED_AMBER_SOLID 0x09 /* Solid amber */
34+
#define MLXREG_LED_BLINK_3HZ 167 /* ~167 msec off/on - HW support */
35+
@@ -30,6 +32,7 @@
36+
* @data: led configuration data;
37+
* @led_classdev: led class data;
38+
* @base_color: base led color (other colors have constant offset from base);
39+
+ * @base_color_hw: base led color set by hardware;
40+
* @led_data: led data;
41+
* @data_parent: pointer to private device control data of parent;
42+
*/
43+
@@ -37,6 +40,7 @@ struct mlxreg_led_data {
44+
struct mlxreg_core_data *data;
45+
struct led_classdev led_cdev;
46+
u8 base_color;
47+
+ u8 base_color_hw;
48+
void *data_parent;
49+
char led_cdev_name[MLXREG_CORE_LABEL_MAX_SIZE];
50+
};
51+
@@ -124,8 +128,17 @@ mlxreg_led_get_hw(struct mlxreg_led_data *led_data)
52+
regval = regval & ~data->mask;
53+
regval = (ror32(data->mask, data->bit) == 0xf0) ? ror32(regval,
54+
data->bit) : ror32(regval, data->bit + 4);
55+
- if (regval >= led_data->base_color &&
56+
- regval <= (led_data->base_color + MLXREG_LED_OFFSET_BLINK_6HZ))
57+
+
58+
+ /*
59+
+ * For some LED color at initial state is set by hardware. Hardware controls LED color
60+
+ * until the first write access to any LED register. If LED is under hardware control -
61+
+ * convert the value to the software mask to expose correct color. The first LED set by
62+
+ * software cancels hardware control.
63+
+ */
64+
+ if ((regval >= led_data->base_color &&
65+
+ regval <= (led_data->base_color + MLXREG_LED_OFFSET_BLINK_6HZ)) ||
66+
+ (led_data->base_color_hw && regval >= led_data->base_color_hw &&
67+
+ regval <= (led_data->base_color_hw + MLXREG_LED_OFFSET_BLINK_6HZ)))
68+
return LED_FULL;
69+
70+
return LED_OFF;
71+
@@ -217,16 +230,20 @@ static int mlxreg_led_config(struct mlxreg_led_priv_data *priv)
72+
73+
led_cdev = &led_data->led_cdev;
74+
led_data->data_parent = priv;
75+
- if (strstr(data->label, "red") ||
76+
- strstr(data->label, "orange")) {
77+
+ if (strstr(data->label, "red")) {
78+
+ brightness = LED_OFF;
79+
+ led_data->base_color = MLXREG_LED_RED_SOLID;
80+
+ } else if (strstr(data->label, "orange")) {
81+
brightness = LED_OFF;
82+
led_data->base_color = MLXREG_LED_RED_SOLID;
83+
+ led_data->base_color_hw = MLXREG_LED_RED_SOLID_HW;
84+
} else if (strstr(data->label, "amber")) {
85+
brightness = LED_OFF;
86+
led_data->base_color = MLXREG_LED_AMBER_SOLID;
87+
} else {
88+
brightness = LED_OFF;
89+
led_data->base_color = MLXREG_LED_GREEN_SOLID;
90+
+ led_data->base_color_hw = MLXREG_LED_GREEN_SOLID_HW;
91+
}
92+
snprintf(led_data->led_cdev_name, sizeof(led_data->led_cdev_name),
93+
"mlxreg:%s", data->label);
94+
--
95+
2.20.1
96+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From 3d0e396f29b5da17385c279946b70ee5cd373efe Mon Sep 17 00:00:00 2001
2+
From: Vadim Pasternak <vadimp@nvidia.com>
3+
Date: Wed, 7 Jul 2021 10:18:14 +0000
4+
Subject: [PATCH backport 5.10 050/182] leds: mlxreg: Skip setting LED color
5+
during initialization
6+
7+
Hardware controls LED through CPLD device and LED control ownership
8+
passes to the software after it performs the first write operation for
9+
any LED on a system.
10+
For example, hardware sets "system" LED "green blink" during boot and
11+
might change it to "red", in case something is went wrong from hardware
12+
point of view.
13+
The motivation for not setting LED during kernel initialization is for
14+
keeping hardware settings visible for user, until user will not decide
15+
to set LEDs according to user OS specific requirements.
16+
17+
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
18+
---
19+
drivers/leds/leds-mlxreg.c | 3 ---
20+
1 file changed, 3 deletions(-)
21+
22+
diff --git a/drivers/leds/leds-mlxreg.c b/drivers/leds/leds-mlxreg.c
23+
index 82aea1cd0c12..7df4653a80d7 100644
24+
--- a/drivers/leds/leds-mlxreg.c
25+
+++ b/drivers/leds/leds-mlxreg.c
26+
@@ -243,9 +243,6 @@ static int mlxreg_led_config(struct mlxreg_led_priv_data *priv)
27+
if (err)
28+
return err;
29+
30+
- if (led_cdev->brightness)
31+
- mlxreg_led_brightness_set(led_cdev,
32+
- led_cdev->brightness);
33+
dev_info(led_cdev->dev, "label: %s, mask: 0x%02x, offset:0x%02x\n",
34+
data->label, data->mask, data->reg);
35+
}
36+
--
37+
2.20.1
38+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
From 6782d682cb0510d0fee33f456ed3492834bad97d Mon Sep 17 00:00:00 2001
2+
From: Vadim Pasternak <vadimp@nvidia.com>
3+
Date: Wed, 7 Jul 2021 10:29:27 +0000
4+
Subject: leds: mlxreg: Allow multi-instantiation of same name LED for modular
5+
systems
6+
7+
It could be more than one instance of LED with the same name in the
8+
modular systems. For example, "status" or "uid" LED can be located
9+
on chassis and on each line card of modular system.
10+
In order to avoid conflicts with duplicated names, append platform
11+
device Id, which is unique, to LED name after driver name.
12+
Thus, for example, "status" LED on chassis is to be called, like it is
13+
called now on non-modular systems, on which platform device Id is not
14+
specified: "mlxreg:status:green". While for the line cards LEDs it will
15+
be called like: "pcicard48:status:green", "ibcard66:status:green",
16+
etc. Where line card prefix is specified according to the type of bus
17+
connecting line card to the chassis.
18+
19+
LED driver works on top of register space of the programmable devices
20+
(CPLD or FPGA), providing the logic for LED control. The programmable
21+
devices on the line cards are connected through I2C bus and LED driver
22+
will work over I2C. On main board programmable device is connected
23+
through LPC, and LED driver works over LPC.
24+
25+
The motivation it to provide support for new modular systems which
26+
could be equipped with the different types of replaceable line cards
27+
and management board.
28+
29+
Line cards are connected to the chassis through I2C interface for the
30+
chassis management operations and through PCIe for the networking
31+
operations.
32+
33+
The first type of line card supports 16x100GbE QSFP28 Ethernet ports.
34+
Those line cards equipped with the programmable devices aimed for
35+
system control of Nvidia Ethernet switch ASIC control, Nvidia FPGA,
36+
Nvidia gearboxes (PHYs).
37+
The next coming card generations are supposed to support:
38+
- Line cards with 8x200Gbe QSFP28 Ethernet ports.
39+
- Line cards with 4x400Gbe QSFP-DD Ethernet ports.
40+
- Smart cards equipped with Nvidia ARM CPU for offloading and for fast
41+
access to the storage (EBoF).
42+
- Fabric cards for inter-connection.
43+
44+
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
45+
---
46+
drivers/leds/leds-mlxreg.c | 15 +++++++++++++--
47+
1 file changed, 13 insertions(+), 2 deletions(-)
48+
49+
diff --git a/drivers/leds/leds-mlxreg.c b/drivers/leds/leds-mlxreg.c
50+
index 0f2608a34..099ff4be2 100644
51+
--- a/drivers/leds/leds-mlxreg.c
52+
+++ b/drivers/leds/leds-mlxreg.c
53+
@@ -245,8 +245,19 @@ static int mlxreg_led_config(struct mlxreg_led_priv_data *priv)
54+
led_data->base_color = MLXREG_LED_GREEN_SOLID;
55+
led_data->base_color_hw = MLXREG_LED_GREEN_SOLID_HW;
56+
}
57+
- snprintf(led_data->led_cdev_name, sizeof(led_data->led_cdev_name),
58+
- "mlxreg:%s", data->label);
59+
+
60+
+ /*
61+
+ * Id greater than zero is used for LEDs located on replaceable unit,
62+
+ * like line card or fabric card. In this case Id is set to I2C bus
63+
+ * number. Otherwise LEDs located on the main board. The field "identity"
64+
+ * specifies the type of bus connecting line card to the chassis.
65+
+ */
66+
+ if (priv->pdev->id > 0)
67+
+ sprintf(led_data->led_cdev_name, "%scard%d:%s", led_pdata->identity,
68+
+ priv->pdev->id, data->label);
69+
+ else
70+
+ sprintf(led_data->led_cdev_name, "%s:%s", "mlxreg",
71+
+ data->label);
72+
led_cdev->name = led_data->led_cdev_name;
73+
led_cdev->brightness = brightness;
74+
led_cdev->max_brightness = LED_ON;
75+
--
76+
2.14.1
77+

0 commit comments

Comments
 (0)