Skip to content

Commit

Permalink
hw-mgmt: patches: Update patches for kernel v6.1
Browse files Browse the repository at this point in the history
Signed-off-by: Vadim Pasternak <[email protected]>
Reviewed-by: Oleksandr Shamray <[email protected]>
  • Loading branch information
vadimp-nvidia committed Aug 21, 2023
1 parent df7fe34 commit 66b1fa0
Show file tree
Hide file tree
Showing 46 changed files with 774 additions and 356 deletions.
95 changes: 48 additions & 47 deletions recipes-kernel/linux/Patch_Status_Table.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
From e2db46ecf593790bffe28b1bb6adf63a0cd82044 Mon Sep 17 00:00:00 2001
From 257c3eaf7d68e1855ea9ac93298c5231db24e2e1 Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Sun, 23 Jul 2023 20:46:32 +0000
Subject: [PATCH backport 6.1.42 12/85] platform: mellanox: Fix order in exit
flow
Date: Sun, 13 Aug 2023 08:37:32 +0000
Subject: [PATH backport v6.1 12/32] platform: mellanox: Fix order in exit flow

Fix exit flow order: call mlxplat_post_exit() after
mlxplat_i2c_main_exit() in order to unregister main i2c driver before
Expand All @@ -11,6 +10,8 @@ to "mlxplat" driver.
Fixes: 0170f616f496 ("platform: mellanox: Split initialization procedure")
Signed-off-by: Vadim Pasternak <[email protected]>
Reviewed-by: Michael Shych <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Hans de Goede <[email protected]>
---
drivers/platform/x86/mlx-platform.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 56f33c48fa6e0972385c003dbe55efcce1d25482 Mon Sep 17 00:00:00 2001
From 3813bfae9b78253deff0007f75d5f25e16256888 Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Sun, 23 Jul 2023 21:36:05 +0000
Subject: [PATCH backport 6.1.42 18/85] platform: mellanox: mlx-platform: Fix
Date: Sun, 13 Aug 2023 08:37:33 +0000
Subject: [PATH backport v6.1 13/32] platform: mellanox: mlx-platform: Fix
signals polarity and latch mask

Change polarity of chassis health and power signals and fix latch reset
Expand All @@ -10,24 +10,26 @@ mask for L1 switch.
Fixes: dd635e33b5c9 ("platform: mellanox: Introduce support of new Nvidia L1 switch")
Signed-off-by: Vadim Pasternak <[email protected]>
Reviewed-by: Michael Shych <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Hans de Goede <[email protected]>
---
drivers/platform/x86/mlx-platform.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index a919660b4493..5b0579752afb 100644
index 5fb3348023a7..69256af04f05 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -239,7 +239,7 @@
@@ -237,7 +237,7 @@
#define MLXPLAT_CPLD_GWP_MASK GENMASK(0, 0)
#define MLXPLAT_CPLD_EROT_MASK GENMASK(1, 0)
#define MLXPLAT_CPLD_FU_CAP_MASK GENMASK(1, 0)
#define MLXPLAT_CPLD_PWR_BUTTON_MASK BIT(0)
-#define MLXPLAT_CPLD_LATCH_RST_MASK BIT(5)
+#define MLXPLAT_CPLD_LATCH_RST_MASK BIT(6)
#define MLXPLAT_CPLD_THERMAL1_PDB_MASK BIT(3)
#define MLXPLAT_CPLD_THERMAL2_PDB_MASK BIT(4)
#define MLXPLAT_CPLD_INTRUSION_MASK BIT(6)
@@ -2477,7 +2477,7 @@ static struct mlxreg_core_item mlxplat_mlxcpld_l1_switch_events_items[] = {
@@ -2475,7 +2475,7 @@ static struct mlxreg_core_item mlxplat_mlxcpld_l1_switch_events_items[] = {
.reg = MLXPLAT_CPLD_LPC_REG_PWRB_OFFSET,
.mask = MLXPLAT_CPLD_PWR_BUTTON_MASK,
.count = ARRAY_SIZE(mlxplat_mlxcpld_l1_switch_pwr_events_items_data),
Expand All @@ -36,7 +38,7 @@ index a919660b4493..5b0579752afb 100644
.health = false,
},
{
@@ -2486,7 +2486,7 @@ static struct mlxreg_core_item mlxplat_mlxcpld_l1_switch_events_items[] = {
@@ -2484,7 +2484,7 @@ static struct mlxreg_core_item mlxplat_mlxcpld_l1_switch_events_items[] = {
.reg = MLXPLAT_CPLD_LPC_REG_BRD_OFFSET,
.mask = MLXPLAT_CPLD_L1_CHA_HEALTH_MASK,
.count = ARRAY_SIZE(mlxplat_mlxcpld_l1_switch_health_events_items_data),
Expand All @@ -45,7 +47,7 @@ index a919660b4493..5b0579752afb 100644
.health = false,
.ind = 8,
},
@@ -3679,7 +3679,7 @@ static struct mlxreg_core_data mlxplat_mlxcpld_default_ng_regs_io_data[] = {
@@ -3677,7 +3677,7 @@ static struct mlxreg_core_data mlxplat_mlxcpld_default_ng_regs_io_data[] = {
{
.label = "latch_reset",
.reg = MLXPLAT_CPLD_LPC_REG_GP1_OFFSET,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
From 622f0c48aa3acbe10fac6c45f72423221c4caa9b Mon Sep 17 00:00:00 2001
From e36789aba49f2728284d169c67162a7075f9931c Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Sun, 23 Jul 2023 21:30:20 +0000
Subject: [PATCH backport 6.1.42 17/85] platform: mellanox: mlx-platform:
Modify graceful shutdown callback and power down mask
Date: Sun, 13 Aug 2023 08:37:34 +0000
Subject: [PATH backport v6.1 14/32] platform: mellanox: mlx-platform: Modify
graceful shutdown callback and power down mask

Use kernel_power_off() instead of kernel_halt() to pass through
machine_power_off() -> pm_power_off(), otherwise axillary power does
not go off.

Change "power down" bitmask.

Fixes: dd635e33b5c9 ("platform: mellanox: Introduce support of new Nvidia L1 switch")
Signed-off-by: Vadim Pasternak <[email protected]>
Reviewed-by: Michael Shych <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Hans de Goede <[email protected]>
---
drivers/platform/x86/mlx-platform.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index a8b2bf17dae9..a919660b4493 100644
index 69256af04f05..240bc3174caf 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -223,7 +223,7 @@
@@ -222,7 +222,7 @@
MLXPLAT_CPLD_AGGR_MASK_LC_SDWN)
#define MLXPLAT_CPLD_LOW_AGGR_MASK_LOW 0xc1
#define MLXPLAT_CPLD_LOW_AGGR_MASK_ASIC2 BIT(2)
Expand All @@ -29,7 +32,7 @@ index a8b2bf17dae9..a919660b4493 100644
#define MLXPLAT_CPLD_LOW_AGGR_MASK_I2C BIT(6)
#define MLXPLAT_CPLD_PSU_MASK GENMASK(1, 0)
#define MLXPLAT_CPLD_PWR_MASK GENMASK(1, 0)
@@ -2358,7 +2358,7 @@ mlxplat_mlxcpld_l1_switch_pwr_events_handler(void *handle, enum mlxreg_hotplug_k
@@ -2356,7 +2356,7 @@ mlxplat_mlxcpld_l1_switch_pwr_events_handler(void *handle, enum mlxreg_hotplug_k
u8 action)
{
dev_info(&mlxplat_dev->dev, "System shutdown due to short press of power button");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
From eef4b86f6ad2a220547851e39571bd7663d9f669 Mon Sep 17 00:00:00 2001
From 3c3fbec3ebc2df518c0e1db05a7f14b3f39ef25f Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Sun, 23 Jul 2023 21:08:38 +0000
Subject: [PATCH backport 6.1.42 14/85] platform: mellanox: Change register
offset addresses
Date: Sun, 13 Aug 2023 08:37:35 +0000
Subject: [PATH backport v6.1 15/32] platform: mellanox: Change register offset
addresses

Move debug register offsets to different location due to hardware changes.

Fixes: dd635e33b5c9 ("platform: mellanox: Introduce support of new Nvidia L1 switch")
Signed-off-by: Vadim Pasternak <[email protected]>
Reviewed-by: Michael Shych <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Hans de Goede <[email protected]>
---
drivers/platform/x86/mlx-platform.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 9d060a04e6ec..4da81628314a 100644
index 240bc3174caf..7d33977d9c60 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -62,10 +62,6 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
From 5a62b06d78f9055a0899ec31e32094d21f701a72 Mon Sep 17 00:00:00 2001
From 65441ac095819a650d3197f750b6c04a734abdc3 Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Sun, 23 Jul 2023 21:05:12 +0000
Subject: [PATCH backport 6.1.42 13/85] platform: mellanox: Add new attributes
Subject: [PATH backport v6.1 16/32] platform: mellanox: Add new attributes

Link: https://www.spinics.net/lists/platform-driver-x86/msg39632.html

Add new attribute:
"lid_open" - to indicate system intrusion detection.
Expand All @@ -15,7 +17,7 @@ Reviewed-by: Michael Shych <[email protected]>
1 file changed, 12 insertions(+)

diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 5fb3348023a7..9d060a04e6ec 100644
index 7d33977d9c60..26748c285ddc 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -3792,6 +3792,12 @@ static struct mlxreg_core_data mlxplat_mlxcpld_default_ng_regs_io_data[] = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
From dafc342bb8331196ff3af236246920dbf3ab50d4 Mon Sep 17 00:00:00 2001
From 02ec65e86e92d25eaf0280db68cc045a97e70ea5 Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Sun, 23 Jul 2023 21:13:52 +0000
Subject: [PATCH backport 6.1.42 15/85] platform: mellanox: Add field upgrade
Subject: [PATH backport v6.1 17/32] platform: mellanox: Add field upgrade
capability register

Link: https://www.spinics.net/lists/platform-driver-x86/msg39635.html

Add new register to indicate the method of FPGA/CPLD field upgrade
supported on the specific system.
Currently two masks are available:
Expand All @@ -18,7 +20,7 @@ Reviewed-by: Michael Shych <[email protected]>
1 file changed, 12 insertions(+)

diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 4da81628314a..bba7c13ab78d 100644
index 26748c285ddc..647a10252c2f 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -62,6 +62,7 @@
Expand All @@ -35,10 +37,10 @@ index 4da81628314a..bba7c13ab78d 100644
#define MLXPLAT_CPLD_EROT_MASK GENMASK(1, 0)
+#define MLXPLAT_CPLD_FU_CAP_MASK GENMASK(1, 0)
#define MLXPLAT_CPLD_PWR_BUTTON_MASK BIT(0)
#define MLXPLAT_CPLD_LATCH_RST_MASK BIT(5)
#define MLXPLAT_CPLD_LATCH_RST_MASK BIT(6)
#define MLXPLAT_CPLD_THERMAL1_PDB_MASK BIT(3)
@@ -3680,6 +3682,13 @@ static struct mlxreg_core_data mlxplat_mlxcpld_default_ng_regs_io_data[] = {
.mask = GENMASK(7, 0) & ~BIT(5),
.mask = GENMASK(7, 0) & ~BIT(6),
.mode = 0200,
},
+ {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
From e721a2e3e859f8e6e45ae3cef2faa514c44ef196 Mon Sep 17 00:00:00 2001
From 153daa685be413192d55d015d8387becaa6b58b2 Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Sun, 23 Jul 2023 21:25:49 +0000
Subject: [PATCH backport 6.1.42 16/85] platform: mellanox: Modify reset causes
Subject: [PATH backport v6.1 18/32] platform: mellanox: Modify reset causes
description

Link: https://www.spinics.net/lists/platform-driver-x86/msg39636.html

For system of classes VMOD0005, VMOD0010:
- remove "reset_from_comex", since this cause doesn't define specific
reason.
- add more speicific reason "reset_sw_reset", which is set along with
- add more specific reason "reset_sw_reset", which is set along with
removed "reset_from_comex".

Signed-off-by: Vadim Pasternak <[email protected]>
Expand All @@ -17,7 +19,7 @@ Reviewed-by: Michael Shych <[email protected]>
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index bba7c13ab78d..a8b2bf17dae9 100644
index 647a10252c2f..5b0579752afb 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -3556,12 +3556,6 @@ static struct mlxreg_core_data mlxplat_mlxcpld_default_ng_regs_io_data[] = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
From 102d8f12f50954e6ddee769ff1e0b6d10acc4199 Mon Sep 17 00:00:00 2001
From 05834de8484930c01d705e078e63eb44fbacd362 Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Sun, 23 Jul 2023 21:42:37 +0000
Subject: [PATCH backport 6.1.42 20/85] platform: mellanox: mlx-platform:
Modify health and power hotplug action
Subject: [PATH backport v6.1 19/32] platform: mellanox: mlx-platform: Modify
health and power hotplug action

Link: https://www.spinics.net/lists/platform-driver-x86/msg39634.html

Set explicitly hotplug event action for health and power signals for
L1 switch as "MLXREG_HOTPLUG_DEVICE_NO_ACTION" in order to allow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
From ad8766186b391364fc372a9142962df352148ac2 Mon Sep 17 00:00:00 2001
From 9a981f2c8011e3840eb126404cb77a476f77e2c7 Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Mon, 24 Jul 2023 05:20:15 +0000
Subject: [PATCH backport 6.1.42 21/85] platform: mellanox: mlx-platform: Add
Subject: [PATH backport v6.1 20/32] platform: mellanox: mlx-platform: Add
reset cause attribute

Link: https://www.spinics.net/lists/platform-driver-x86/msg39638.html

Extend IO registers description for some system types with reset cause
attribute "reset_swb_dc_dc_pwr_fail" to indicate reset caused by switch
board DC-DC power failure.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
From b1173f3820b65816fd434ca04d97e7f8eb75f3ef Mon Sep 17 00:00:00 2001
From baa136fc6b3c26501c77070a73abd2d6f95b462a Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Mon, 24 Jul 2023 05:54:47 +0000
Subject: [PATCH backport 6.1.42 22/85] platform: mellanox: mlx-platform: add
Subject: [PATH backport v6.1 21/32] platform: mellanox: mlx-platform: add
support for additional CPLD

Link: https://www.spinics.net/lists/platform-driver-x86/msg39641.html

Extend to support 5-th CPLD version, PN and minimal version registers.

Signed-off-by: Vadim Pasternak <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
From b993c66ac934bf8b8d0e7749b5bee1dc8ca4e29d Mon Sep 17 00:00:00 2001
From cca82c5a6efc06d8d9b5c7b8b83054ff09363bc4 Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Mon, 24 Jul 2023 06:22:13 +0000
Subject: [PATCH backport 6.1.42 23/85] platform: mellanox: mlx-platform:
Modify power off callback
Subject: [PATH backport v6.1 22/32] platform: mellanox: mlx-platform: Modify
power off callback

Link: https://www.spinics.net/lists/platform-driver-x86/msg39639.html

Extend platform power off callback with kernel_halt() call.

When powering off, the process involves setting a halt bit in the
register space, which is then activated after a certain delay and
power off auxiliary power. By invoking `kernel_halt()` within this
timeframe, the intention is to facilitate a clean system power-off
sequence.

Signed-off-by: Vadim Pasternak <[email protected]>
Reviewed-by: Michael Shych <[email protected]>
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
From 6eab8b9a86035c3f2a9ce953d172c78ce6f5d2e9 Mon Sep 17 00:00:00 2001
From 851d7b63b861b5f042ec40ee148c7a4503cdee0e Mon Sep 17 00:00:00 2001
From: Vadim Pasternak <[email protected]>
Date: Sun, 30 Jul 2023 20:35:23 +0000
Subject: [PATCH backport 6.1.42 24/85] platform: mellanox: Cosmetic changes
Subject: [PATH backport v6.1 23/32] platform: mellanox: Cosmetic changes

Fix routines and labels names by s/topology/topology.
Link: https://www.spinics.net/lists/platform-driver-x86/msg39637.html

Fix routines and labels names by s/topolgy/topology.

Signed-off-by: Vadim Pasternak <[email protected]>
Reviewed-by: Michael Shych <[email protected]>
Expand Down
Loading

0 comments on commit 66b1fa0

Please sign in to comment.