Skip to content

Commit 6b768b2

Browse files
committed
hw-mgmt: patches: 5.10/6.1: Add kernel new kernel version support
Add kernel 5.10.226/6.1.123 support Signed-off-by: Oleksandr Shamray <[email protected]>
1 parent af83550 commit 6b768b2

6 files changed

+74
-24
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ For detailed information, see the documentation [here](https://github.com/Mellan
4343
- P4300-A00
4444

4545
## Supported Kernel versions:
46-
- 5.10.218
47-
- 6.1.38
46+
- 5.10.103, 5.10.140, 5.10.179, 5.10.218, 5.10.226
47+
- 5.14 all up to 5.14.21
48+
- 6.1.38, 6.1.90, ,6.1.94, 6.1.119, 6.1.123
4849

4950
## Sysfs attributes:
5051
The thermal control operates over sysfs attributes.

recipes-kernel/linux/Patch_Status_Table.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,7 @@ Kernel-6.1
635635
|0027-platform-mellanox-mlx-platform-Get-interrupt-line-th.patch | | Feature pending | | |
636636
|0028-platform-mellanox-Add-initial-support-for-PCIe-based.patch | | Feature pending | | |
637637
|0029-platform-mellanox-mlxreg-hotplug-Extend-condition-fo.patch | | Feature pending | | |
638+
|0030-1-platform-mellanox-nvsw-sn2201-Add-check-for-platform.patch| d56fbfbaf592 | Bugfix accepted | v6.1.101 | |
638639
|0030-platform-mellanox-nvsw-sn2201-change-fans-i2c-busses.patch | | Feature pending | | |
639640
|0032-platform_data-mlxreg-Add-field-with-mapped-resource-.patch | 26917eab144c | Feature upstream | | |
640641
|0033-i2c-mlxcpld-Allow-driver-to-run-on-ARM64-architectur.patch | | Feature pending | | |
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
From d065f198bf6eb0431c124589efbcbf2b54ae0303 Mon Sep 17 00:00:00 2001
2+
From: Chen Ni <[email protected]>
3+
Date: Wed, 5 Jun 2024 11:27:45 +0800
4+
Subject: [PATCH] platform/mellanox: nvsw-sn2201: Add check for
5+
platform_device_add_resources
6+
7+
[ Upstream commit d56fbfbaf592a115b2e11c1044829afba34069d2 ]
8+
9+
Add check for the return value of platform_device_add_resources() and
10+
return the error if it fails in order to catch the error.
11+
12+
Signed-off-by: Chen Ni <[email protected]>
13+
Link: https://lore.kernel.org/r/[email protected]
14+
Reviewed-by: Hans de Goede <[email protected]>
15+
Signed-off-by: Hans de Goede <[email protected]>
16+
Signed-off-by: Sasha Levin <[email protected]>
17+
---
18+
drivers/platform/mellanox/nvsw-sn2201.c | 5 ++++-
19+
1 file changed, 4 insertions(+), 1 deletion(-)
20+
21+
diff --git a/drivers/platform/mellanox/nvsw-sn2201.c b/drivers/platform/mellanox/nvsw-sn2201.c
22+
index 7b9c107..f53baf7 100644
23+
--- a/drivers/platform/mellanox/nvsw-sn2201.c
24+
+++ b/drivers/platform/mellanox/nvsw-sn2201.c
25+
@@ -1194,6 +1194,7 @@ static int nvsw_sn2201_config_pre_init(struct nvsw_sn2201 *nvsw_sn2201)
26+
static int nvsw_sn2201_probe(struct platform_device *pdev)
27+
{
28+
struct nvsw_sn2201 *nvsw_sn2201;
29+
+ int ret;
30+
31+
nvsw_sn2201 = devm_kzalloc(&pdev->dev, sizeof(*nvsw_sn2201), GFP_KERNEL);
32+
if (!nvsw_sn2201)
33+
@@ -1201,8 +1202,10 @@ static int nvsw_sn2201_probe(struct platform_device *pdev)
34+
35+
nvsw_sn2201->dev = &pdev->dev;
36+
platform_set_drvdata(pdev, nvsw_sn2201);
37+
- platform_device_add_resources(pdev, nvsw_sn2201_lpc_io_resources,
38+
+ ret = platform_device_add_resources(pdev, nvsw_sn2201_lpc_io_resources,
39+
ARRAY_SIZE(nvsw_sn2201_lpc_io_resources));
40+
+ if (ret)
41+
+ return ret;
42+
43+
nvsw_sn2201->main_mux_deferred_nr = NVSW_SN2201_MAIN_MUX_DEFER_NR;
44+
nvsw_sn2201->main_mux_devs = nvsw_sn2201_main_mux_brdinfo;
45+
--
46+
2.8.4
47+

recipes-kernel/linux/linux-6.1/0030-platform-mellanox-nvsw-sn2201-change-fans-i2c-busses.patch

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
From ddec9cfeb44ed194cadee824f3f49c057bf7a560 Mon Sep 17 00:00:00 2001
1+
From ac10df67c019b8ee1c80b46390759669cd69862f Mon Sep 17 00:00:00 2001
22
From: Michael Shych <[email protected]>
33
Date: Wed, 12 Jul 2023 14:26:38 +0000
4-
Subject: [PATH backport v6.1 30/32] platform: mellanox: nvsw-sn2201: change
5-
fans i2c busses.
4+
Subject: [PATCH 2/4] platform: mellanox: nvsw-sn2201: change fans i2c busses.
65

76
Link: https://www.spinics.net/lists/platform-driver-x86/msg39647.html
87

@@ -18,7 +17,7 @@ Signed-off-by: Vadim Pasternak <[email protected]>
1817
1 file changed, 8 insertions(+), 4 deletions(-)
1918

2019
diff --git a/drivers/platform/mellanox/nvsw-sn2201.c b/drivers/platform/mellanox/nvsw-sn2201.c
21-
index 7b9c107c17ce..75b699676ca6 100644
20+
index f53baf7e7..1a7c45aa4 100644
2221
--- a/drivers/platform/mellanox/nvsw-sn2201.c
2322
+++ b/drivers/platform/mellanox/nvsw-sn2201.c
2423
@@ -84,6 +84,10 @@

recipes-kernel/linux/linux-6.1/0087-platform-mellanox-indicate-deferred-I2C-bus-creation.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From ab5040e2b99cc3eb57eaa266b90877bcc38c28ed Mon Sep 17 00:00:00 2001
1+
From 1c43cf584d3fd62823dd3b28018481f15a8836c7 Mon Sep 17 00:00:00 2001
22
From: Michael Shych <[email protected]>
33
Date: Wed, 29 Nov 2023 13:12:38 +0000
4-
Subject: [PATCH v1 1/1] platform: mellanox: indicate deferred I2C bus creation
4+
Subject: [PATCH 3/4] platform: mellanox: indicate deferred I2C bus creation
55
for a hot-plug driver
66

77
It fixes timing issue when during initialization hot-plug driver
@@ -15,7 +15,7 @@ Signed-off-by: Michael Shych <[email protected]>
1515
1 file changed, 1 insertion(+)
1616

1717
diff --git a/drivers/platform/mellanox/nvsw-sn2201.c b/drivers/platform/mellanox/nvsw-sn2201.c
18-
index 65b677690..79e4d0619 100644
18+
index 1a7c45aa4..a3e2bc6d6 100644
1919
--- a/drivers/platform/mellanox/nvsw-sn2201.c
2020
+++ b/drivers/platform/mellanox/nvsw-sn2201.c
2121
@@ -520,6 +520,7 @@ struct mlxreg_core_hotplug_platform_data nvsw_sn2201_hotplug = {
@@ -27,5 +27,5 @@ index 65b677690..79e4d0619 100644
2727

2828
/* SN2201 static devices. */
2929
--
30-
2.14.1
30+
2.20.1
3131

recipes-kernel/linux/linux-6.1/0095-platform-mellanox-nvsw-sn2201-Add-support-for-new-sy.patch

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
From 693ea1c72c6f1b83232c043fdb1b175a450bc172 Mon Sep 17 00:00:00 2001
2-
From: Vadim Pasternak <vadimp@nvidia.com>
3-
Date: Wed, 7 Aug 2024 00:09:11 +0000
4-
Subject: [PATCH backport 6.1 1/1] platform: mellanox: nvsw-sn2200: Add support
5-
for new system flavour
1+
From 13e4e0e5b566a116e2107a0a959d2b294b388b42 Mon Sep 17 00:00:00 2001
2+
From: Oleksandr Shamray <oleksandrs@nvidia.com>
3+
Date: Wed, 11 Dec 2024 17:49:45 +0200
4+
Subject: [PATCH 4/4] platform: mellanox: nvsw-sn2200: Add support for new
5+
system flavour
66

77
Add support for SN2201 system flavour, which is fitting OCP rack
88
form-factor and feeded from external power source through the rack
@@ -15,11 +15,11 @@ For new system flavour:
1515

1616
Signed-off-by: Vadim Pasternak <[email protected]>
1717
---
18-
drivers/platform/mellanox/nvsw-sn2201.c | 111 +++++++++++++++++++++++-
19-
1 file changed, 108 insertions(+), 3 deletions(-)
18+
drivers/platform/mellanox/nvsw-sn2201.c | 112 +++++++++++++++++++++++-
19+
1 file changed, 109 insertions(+), 3 deletions(-)
2020

2121
diff --git a/drivers/platform/mellanox/nvsw-sn2201.c b/drivers/platform/mellanox/nvsw-sn2201.c
22-
index 2612bb5f82a3..d604069e3313 100644
22+
index a3e2bc6d6..64c705f3b 100644
2323
--- a/drivers/platform/mellanox/nvsw-sn2201.c
2424
+++ b/drivers/platform/mellanox/nvsw-sn2201.c
2525
@@ -6,6 +6,7 @@
@@ -103,7 +103,7 @@ index 2612bb5f82a3..d604069e3313 100644
103103
};
104104

105105
/* SN2201 default static board info. */
106-
@@ -608,6 +647,58 @@ static struct mlxreg_hotplug_device nvsw_sn2201_static_brdinfo[] = {
106+
@@ -608,6 +647,59 @@ static struct mlxreg_hotplug_device nvsw_sn2201_static_brdinfo[] = {
107107
},
108108
};
109109

@@ -158,11 +158,12 @@ index 2612bb5f82a3..d604069e3313 100644
158158
+ .nr = NVSW_SN2201_MAIN_MUX_CH1_NR,
159159
+ },
160160
+};
161+
+
161162
+
162163
/* LED default data. */
163164
static struct mlxreg_core_data nvsw_sn2201_led_data[] = {
164165
{
165-
@@ -982,7 +1073,10 @@ static int nvsw_sn2201_config_init(struct nvsw_sn2201 *nvsw_sn2201, void *regmap
166+
@@ -982,7 +1074,10 @@ static int nvsw_sn2201_config_init(struct nvsw_sn2201 *nvsw_sn2201, void *regmap
166167
nvsw_sn2201->io_data = &nvsw_sn2201_regs_io;
167168
nvsw_sn2201->led_data = &nvsw_sn2201_led;
168169
nvsw_sn2201->wd_data = &nvsw_sn2201_wd;
@@ -174,11 +175,12 @@ index 2612bb5f82a3..d604069e3313 100644
174175

175176
/* Register IO access driver. */
176177
if (nvsw_sn2201->io_data) {
177-
@@ -1199,11 +1293,17 @@ static int nvsw_sn2201_config_pre_init(struct nvsw_sn2201 *nvsw_sn2201)
178+
@@ -1199,12 +1294,18 @@ static int nvsw_sn2201_config_pre_init(struct nvsw_sn2201 *nvsw_sn2201)
178179
static int nvsw_sn2201_probe(struct platform_device *pdev)
179180
{
180181
struct nvsw_sn2201 *nvsw_sn2201;
181182
+ const char *sku;
183+
int ret;
182184

183185
nvsw_sn2201 = devm_kzalloc(&pdev->dev, sizeof(*nvsw_sn2201), GFP_KERNEL);
184186
if (!nvsw_sn2201)
@@ -191,8 +193,8 @@ index 2612bb5f82a3..d604069e3313 100644
191193
+
192194
nvsw_sn2201->dev = &pdev->dev;
193195
platform_set_drvdata(pdev, nvsw_sn2201);
194-
platform_device_add_resources(pdev, nvsw_sn2201_lpc_io_resources,
195-
@@ -1212,8 +1312,13 @@ static int nvsw_sn2201_probe(struct platform_device *pdev)
196+
ret = platform_device_add_resources(pdev, nvsw_sn2201_lpc_io_resources,
197+
@@ -1215,8 +1316,13 @@ static int nvsw_sn2201_probe(struct platform_device *pdev)
196198
nvsw_sn2201->main_mux_deferred_nr = NVSW_SN2201_MAIN_MUX_DEFER_NR;
197199
nvsw_sn2201->main_mux_devs = nvsw_sn2201_main_mux_brdinfo;
198200
nvsw_sn2201->cpld_devs = nvsw_sn2201_cpld_brdinfo;
@@ -209,5 +211,5 @@ index 2612bb5f82a3..d604069e3313 100644
209211
return nvsw_sn2201_config_pre_init(nvsw_sn2201);
210212
}
211213
--
212-
2.44.0
214+
2.20.1
213215

0 commit comments

Comments
 (0)