27f15d40e1
- Why I did it 1. Update Mellanox HW-MGMT package to newer version V.7.0030.1011 2. Replace the SONiC PMON Thermal control algorithm with the one inside the HW-MGMT package on all Nvidia platforms 3. Support Spectrum-4 systems - How I did it 1. Update the HW-MGMT package version number and submodule pointer 2. Remove the thermal control algorithm implementation from Mellanox platform API 3. Revise the patch to HW-MGMT package which will disable HW-MGMT from running on SIMX 4. Update the downstream kernel patch list Signed-off-by: Kebo Liu <kebol@nvidia.com>
100 lines
3.2 KiB
Diff
100 lines
3.2 KiB
Diff
From 4a49468e7fc7e94a83703215445d9b3919642eb9 Mon Sep 17 00:00:00 2001
|
|
From: Jiri Pirko <jiri@nvidia.com>
|
|
Date: Fri, 29 Jan 2021 08:45:09 +0100
|
|
Subject: [PATCH backport 5.10 131/182] mlxsw: reg: Add Ports Mapping event
|
|
Configuration Register
|
|
|
|
The PMECR register use to enable/disable event trigger in case of
|
|
local port mapping change.
|
|
|
|
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
|
|
---
|
|
drivers/net/ethernet/mellanox/mlxsw/reg.h | 64 +++++++++++++++++++++++
|
|
1 file changed, 64 insertions(+)
|
|
|
|
diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
|
|
index 98c627ffe039..93e3366cfcb9 100644
|
|
--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
|
|
+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
|
|
@@ -5524,6 +5524,69 @@ static inline void mlxsw_reg_pplr_pack(char *payload, u8 local_port,
|
|
MLXSW_REG_PPLR_LB_TYPE_BIT_PHY_LOCAL : 0);
|
|
}
|
|
|
|
+/* PMECR - Ports Mapping event Configuration Register
|
|
+ * --------------------------------------------------
|
|
+ * The PMECR register use to enable/disable event trigger in case of
|
|
+ * local port mapping change.
|
|
+ */
|
|
+#define MLXSW_REG_PMECR_ID 0x501B
|
|
+#define MLXSW_REG_PMECR_LEN 0x20
|
|
+
|
|
+MLXSW_REG_DEFINE(pmecr, MLXSW_REG_PMECR_ID, MLXSW_REG_PMECR_LEN);
|
|
+
|
|
+/* reg_pmecr_local_port
|
|
+ * Local port number.
|
|
+ * Access: Index
|
|
+ */
|
|
+MLXSW_ITEM32(reg, pmecr, local_port, 0x00, 16, 8);
|
|
+
|
|
+/* reg_pmecr_ee
|
|
+ * Event update enable. If this bit is set, event generation will be updated
|
|
+ * based on the e field. Only relevant on Set operations.
|
|
+ * Access: WO
|
|
+ */
|
|
+MLXSW_ITEM32(reg, pmecr, ee, 0x04, 30, 1);
|
|
+
|
|
+/* reg_pmecr_eswi
|
|
+ * Software ignore enable bit. If this bit is set, the value if swi is used.
|
|
+ * If this bit is clear, the value of swi is ignored.
|
|
+ * Only relevant on Set operations.
|
|
+ * Access: WO
|
|
+ */
|
|
+MLXSW_ITEM32(reg, pmecr, eswi, 0x04, 24, 1);
|
|
+
|
|
+/* reg_pmecr_swi
|
|
+ * Software ignore. If this bit is set, the device shouldn't generate events
|
|
+ * in case of PMLP SET operation but only upon self local port mapping change
|
|
+ * (if applicable according to e configuration). This is supplementary
|
|
+ * configuration on top of e value.
|
|
+ * Access: RW
|
|
+ */
|
|
+MLXSW_ITEM32(reg, pmecr, swi, 0x04, 8, 1);
|
|
+
|
|
+enum mlxsw_reg_pmecr_e {
|
|
+ MLXSW_REG_PMECR_E_DO_NOT_GENERATE_EVENT,
|
|
+ MLXSW_REG_PMECR_E_GENERATE_EVENT,
|
|
+ MLXSW_REG_PMECR_E_GENERATE_SINGLE_EVENT,
|
|
+};
|
|
+
|
|
+/* reg_pmecr_e
|
|
+ * Event generation on local port mapping change.
|
|
+ * Access: RW
|
|
+ */
|
|
+MLXSW_ITEM32(reg, pmecr, e, 0x04, 0, 2);
|
|
+
|
|
+static inline void mlxsw_reg_pmecr_pack(char *payload, u8 local_port,
|
|
+ enum mlxsw_reg_pmecr_e e)
|
|
+{
|
|
+ MLXSW_REG_ZERO(pmecr, payload);
|
|
+ mlxsw_reg_pmecr_local_port_set(payload, local_port);
|
|
+ mlxsw_reg_pmecr_e_set(payload, e);
|
|
+ mlxsw_reg_pmecr_ee_set(payload, true);
|
|
+ mlxsw_reg_pmecr_swi_set(payload, true);
|
|
+ mlxsw_reg_pmecr_eswi_set(payload, true);
|
|
+}
|
|
+
|
|
/* PMPE - Port Module Plug/Unplug Event Register
|
|
* ---------------------------------------------
|
|
* This register reports any operational status change of a module.
|
|
@@ -11375,6 +11438,7 @@ static const struct mlxsw_reg_info *mlxsw_reg_infos[] = {
|
|
MLXSW_REG(pspa),
|
|
MLXSW_REG(pmaos),
|
|
MLXSW_REG(pplr),
|
|
+ MLXSW_REG(pmecr),
|
|
MLXSW_REG(pmpe),
|
|
MLXSW_REG(pddr),
|
|
MLXSW_REG(pmtm),
|
|
--
|
|
2.20.1
|
|
|