0df155b014
- Why I did it Currently, non upstream patches are applied only after upstream patches. Depends on sonic-net/sonic-linux-kernel#313. Can be merged in any order, preferably together - What I did it Non upstream Patches that reside in the sonic repo will not be saved in a tar file bur rather in a folder pointed out by EXTERNAL_KERNEL_PATCH_LOC. This is to make changes to the non upstream patches easily traceable. The build variable name is also updated to INCLUDE_EXTERNAL_PATCHES Files/folders expected under EXTERNAL_KERNEL_PATCH_LOC EXTERNAL_KERNEL_PATCH_LOC/ ├──── patches/ ├── 0001-xxxxx.patch ├── 0001-yyyyyyyy.patch ├── ............. ├──── series.patch series.patch should contain a diff that is applied on the sonic-linux-kernel/patch/series file. The diff should include all the non-upstream patches. How to verify it Build the Kernel and verified if all the patches are applied properly Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
62 lines
2.2 KiB
Diff
62 lines
2.2 KiB
Diff
From b526413a86afcd1d6bd3f4e05f25631c8103f617 Mon Sep 17 00:00:00 2001
|
|
From: Vadim Pasternak <vadimp@nvidia.com>
|
|
Date: Sun, 19 Dec 2021 09:25:35 +0000
|
|
Subject: [PATCH] mlxsw: minimal: Add system event handler
|
|
|
|
Add system event handler for treating line card specific signals on
|
|
modular system. These signals indicate line card state changes, like
|
|
line card activation or de-activation.
|
|
When such signals are received, driver should create or destroy "hwmon"
|
|
"thermal" and module info objects, associated with line card in a slot,
|
|
for which signal has been received.
|
|
|
|
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
|
|
---
|
|
drivers/net/ethernet/mellanox/mlxsw/minimal.c | 23 +++++++++++++++++++
|
|
1 file changed, 23 insertions(+)
|
|
|
|
diff --git a/drivers/net/ethernet/mellanox/mlxsw/minimal.c b/drivers/net/ethernet/mellanox/mlxsw/minimal.c
|
|
index 59c5053dc..27afb28e4 100644
|
|
--- a/drivers/net/ethernet/mellanox/mlxsw/minimal.c
|
|
+++ b/drivers/net/ethernet/mellanox/mlxsw/minimal.c
|
|
@@ -527,6 +527,28 @@ static void mlxsw_m_line_cards_free(struct mlxsw_m *mlxsw_m)
|
|
kfree(mlxsw_m->line_cards);
|
|
}
|
|
|
|
+static void mlxsw_m_sys_event_handler(struct mlxsw_core *mlxsw_core)
|
|
+{
|
|
+ struct mlxsw_linecards *linecards = mlxsw_core_linecards(mlxsw_core);
|
|
+ struct mlxsw_m *mlxsw_m = mlxsw_core_driver_priv(mlxsw_core);
|
|
+ char mddq_pl[MLXSW_REG_MDDQ_LEN];
|
|
+ int i, err;
|
|
+
|
|
+ if (!linecards)
|
|
+ return;
|
|
+
|
|
+ /* Handle line cards, for which active status has been changed. */
|
|
+ for (i = 1; i <= linecards->count; i++) {
|
|
+ mlxsw_reg_mddq_slot_info_pack(mddq_pl, i, false);
|
|
+ err = mlxsw_reg_query(mlxsw_m->core, MLXSW_REG(mddq), mddq_pl);
|
|
+ if (err)
|
|
+ dev_err(mlxsw_m->bus_info->dev, "Fail to query MDDQ register for slot %d\n",
|
|
+ i);
|
|
+
|
|
+ mlxsw_linecard_status_process(mlxsw_m->core, mddq_pl);
|
|
+ }
|
|
+}
|
|
+
|
|
static int mlxsw_m_init(struct mlxsw_core *mlxsw_core,
|
|
const struct mlxsw_bus_info *mlxsw_bus_info,
|
|
struct netlink_ext_ack *extack)
|
|
@@ -587,6 +609,7 @@ static struct mlxsw_driver mlxsw_m_driver = {
|
|
.priv_size = sizeof(struct mlxsw_m),
|
|
.init = mlxsw_m_init,
|
|
.fini = mlxsw_m_fini,
|
|
+ .sys_event_handler = mlxsw_m_sys_event_handler,
|
|
.profile = &mlxsw_m_config_profile,
|
|
.res_query_enabled = true,
|
|
};
|
|
--
|
|
2.30.2
|
|
|