Skip to content

Commit dcf469b

Browse files
authored
[Mellanox] Add kernel patches with hw-mgmt V.7.0010.1300 (sonic-net#161)
Add new kernel patches for mlxsw driver: - Move PSU EEPROM configuration from kerenl to user space for SPC2 / SPC3 system official commit ID c071afcea6ecf24a3c119f25ce9f71ffd55b5dc2 torvalds/linux@c071afc - mlxsw: core: thermal: Enable thermal zones by default these codes are already in upstream, previously when backporting to SONiC this was set to disable, here we just restore it back, no new code added here comparing to the upstream.
1 parent 27db670 commit dcf469b

File tree

3 files changed

+114
-1
lines changed

3 files changed

+114
-1
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
From 21833c9ab0b71b921f830e9a338b2084a0787a7e Mon Sep 17 00:00:00 2001
2+
From: Vadim Pasternak <[email protected]>
3+
Date: Thu, 21 May 2020 13:41:23 +0300
4+
Subject: [backport 4.19 3/3] mlxsw: core: thermal: Enable thermal zones by
5+
default
6+
7+
Change default setting for the all thermal zones from "disabled" to
8+
"enabled"
9+
10+
Signed-off-by: Vadim Pasternak <[email protected]>
11+
---
12+
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 6 +++---
13+
1 file changed, 3 insertions(+), 3 deletions(-)
14+
15+
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
16+
index 775343a25..d77c4c82b 100644
17+
--- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
18+
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
19+
@@ -807,7 +807,7 @@ mlxsw_thermal_module_tz_init(struct mlxsw_thermal_module *module_tz)
20+
return err;
21+
}
22+
23+
- module_tz->mode = THERMAL_DEVICE_DISABLED;
24+
+ module_tz->mode = THERMAL_DEVICE_ENABLED;
25+
return 0;
26+
}
27+
28+
@@ -925,7 +925,7 @@ mlxsw_thermal_gearbox_tz_init(struct mlxsw_thermal_module *gearbox_tz)
29+
if (IS_ERR(gearbox_tz->tzdev))
30+
return PTR_ERR(gearbox_tz->tzdev);
31+
32+
- gearbox_tz->mode = THERMAL_DEVICE_DISABLED;
33+
+ gearbox_tz->mode = THERMAL_DEVICE_ENABLED;
34+
return 0;
35+
}
36+
37+
@@ -1095,7 +1095,7 @@ int mlxsw_thermal_init(struct mlxsw_core *core,
38+
if (err)
39+
goto err_unreg_modules_tzdev;
40+
41+
- thermal->mode = THERMAL_DEVICE_DISABLED;
42+
+ thermal->mode = THERMAL_DEVICE_ENABLED;
43+
thermal->initializing = false;
44+
*p_thermal = thermal;
45+
return 0;
46+
--
47+
2.11.0
48+
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
From e480c548db43d81659874c4fa89eeda9f4096e5c Mon Sep 17 00:00:00 2001
2+
From: Vadim Pasternak <[email protected]>
3+
Date: Wed, 3 Jun 2020 10:59:20 +0300
4+
Subject: [backport bugfix] platform/x86: mlx-platform: Remove PSU EEPROM
5+
configuration
6+
7+
Remove PSU EEPROM configuration for systems class equipped with
8+
Mellanox chip Spectrume-2. Till now all the systems from this class
9+
used few types of power units, all equipped with EEPROM device with
10+
address space two bytes. Thus, all these devices have been handled by
11+
EEPROM driver "24c32".
12+
There is a new requirement is to support power unit replacement by "off
13+
the shelf" device, matching electrical required parameters. Such device
14+
could be equpped with different EEPROM type, which could be one byte
15+
address space adressing or even could be not equipped with EEPROM.
16+
In such case "24c32" will not work.
17+
18+
Fixes: 1bd42d94ccab ("platform/x86: mlx-platform: Add support for new 200G IB and Ethernet systems")
19+
Signed-off-by: Vadim Pasternak <[email protected]>
20+
---
21+
drivers/platform/x86/mlx-platform.c | 15 ++-------------
22+
1 file changed, 2 insertions(+), 13 deletions(-)
23+
24+
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
25+
index 208f4a476..d6c87fb88 100644
26+
--- a/drivers/platform/x86/mlx-platform.c
27+
+++ b/drivers/platform/x86/mlx-platform.c
28+
@@ -329,15 +329,6 @@ static struct i2c_board_info mlxplat_mlxcpld_psu[] = {
29+
},
30+
};
31+
32+
-static struct i2c_board_info mlxplat_mlxcpld_ng_psu[] = {
33+
- {
34+
- I2C_BOARD_INFO("24c32", 0x51),
35+
- },
36+
- {
37+
- I2C_BOARD_INFO("24c32", 0x50),
38+
- },
39+
-};
40+
-
41+
static struct i2c_board_info mlxplat_mlxcpld_pwr[] = {
42+
{
43+
I2C_BOARD_INFO("dps460", 0x59),
44+
@@ -762,15 +753,13 @@ static struct mlxreg_core_data mlxplat_mlxcpld_default_ng_psu_items_data[] = {
45+
.label = "psu1",
46+
.reg = MLXPLAT_CPLD_LPC_REG_PSU_OFFSET,
47+
.mask = BIT(0),
48+
- .hpdev.brdinfo = &mlxplat_mlxcpld_ng_psu[0],
49+
- .hpdev.nr = MLXPLAT_CPLD_PSU_MSNXXXX_NR,
50+
+ .hpdev.nr = MLXPLAT_CPLD_NR_NONE,
51+
},
52+
{
53+
.label = "psu2",
54+
.reg = MLXPLAT_CPLD_LPC_REG_PSU_OFFSET,
55+
.mask = BIT(1),
56+
- .hpdev.brdinfo = &mlxplat_mlxcpld_ng_psu[1],
57+
- .hpdev.nr = MLXPLAT_CPLD_PSU_MSNXXXX_NR,
58+
+ .hpdev.nr = MLXPLAT_CPLD_NR_NONE,
59+
},
60+
};
61+
62+
--
63+
2.11.0
64+

patch/series

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,5 @@ driver-ixgbe-external-phy.patch
6262
0011-mlxsw-core-thermal-Separate-temperature-trend-read-c.patch
6363
0012-Add-support-for-new-transceivers-types-QSFP-DD-and-Q.patch
6464
0013-watchdog-mlx-wdt-support-new-watchdog-type-with-long.patch
65-
65+
0021-mlxsw-core-thermal-Enable-thermal-zones-by-default.patch
66+
0022-platform-x86-mlx-platform-Remove-PSU-EEPROM-configur.patch

0 commit comments

Comments
 (0)