-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hw-mgmt: patches: kernel 5.10: SONiC upstream rebase
This patchset fixes the issues with SONiC canonical build. Signed-off-by: Ciju Rajan K <[email protected]> Signed-off-by: Vadim Paternak <[email protected]>
- Loading branch information
1 parent
81d094b
commit ea5c261
Showing
12 changed files
with
1,977 additions
and
189 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
784 changes: 784 additions & 0 deletions
784
recipes-kernel/linux/linux-5.10/0097-1-mlxsw-Use-u16-for-local_port-field.patch
Large diffs are not rendered by default.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
recipes-kernel/linux/linux-5.10/0097-2-mlxsw-i2c-Fix-chunk-size-setting.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
From ac91378962238d34030bb4035308f88ba173165f Mon Sep 17 00:00:00 2001 | ||
From: Vadim Pasternak <[email protected]> | ||
Date: Tue, 15 Aug 2023 09:22:01 +0000 | ||
Subject: mlxsw: i2c: Fix chunk size setting in output mailbox buffer | ||
|
||
Links: https://github.com/jpirko/linux_mlxsw/commit/e4f63bb2ded0b1c812ef5cea900124b756837071 | ||
http://patchwork.mtl.labs.mlnx/patch/4591830/ | ||
|
||
The driver reads commands output from the output mailbox. If the size | ||
of the output mailbox is not a multiple of the transaction / | ||
block size, then the driver will not issue enough read transactions | ||
to read the entire output, which can result in driver initialization | ||
errors. | ||
|
||
Fix by determining the number of transactions using DIV_ROUND_UP(). | ||
|
||
Fixes: 3029a69 ("mlxsw: i2c: Allow flexible setting of I2C transactions size") | ||
Signed-off-by: Vadim Pasternak <[email protected]> | ||
Reviewed-by: Ido Schimmel <[email protected]> | ||
--- | ||
drivers/net/ethernet/mellanox/mlxsw/i2c.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/drivers/net/ethernet/mellanox/mlxsw/i2c.c b/drivers/net/ethernet/mellanox/mlxsw/i2c.c | ||
index b8a5c0cbb6b5..cc99ec3f4e96 100644 | ||
--- a/drivers/net/ethernet/mellanox/mlxsw/i2c.c | ||
+++ b/drivers/net/ethernet/mellanox/mlxsw/i2c.c | ||
@@ -447,7 +447,7 @@ mlxsw_i2c_cmd(struct device *dev, u16 opcode, u32 in_mod, size_t in_mbox_size, | ||
} else { | ||
/* No input mailbox is case of initialization query command. */ | ||
reg_size = MLXSW_I2C_MAX_DATA_SIZE; | ||
- num = reg_size / mlxsw_i2c->block_size; | ||
+ num = DIV_ROUND_UP(reg_size, mlxsw_i2c->block_size); | ||
|
||
if (mutex_lock_interruptible(&mlxsw_i2c->cmd.lock) < 0) { | ||
dev_err(&client->dev, "Could not acquire lock"); | ||
-- | ||
2.14.1 | ||
|
58 changes: 58 additions & 0 deletions
58
recipes-kernel/linux/linux-5.10/0097-3-mlxsw-core_hwmon-Adjust-module-label-names.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
From 33aa62a331425d5828d417eeac7fab697eb45286 Mon Sep 17 00:00:00 2001 | ||
From: Vadim Pasternak <[email protected]> | ||
Date: Wed, 16 Aug 2023 11:56:51 +0000 | ||
Subject: mlxsw: core_hwmon: Adjust module label names based on MTCAP sensor | ||
counter | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
Link: https://github.com/jpirko/linux_mlxsw/commit/0c604fbc8916ce220b2d30f0f75aa9566b18f496 | ||
|
||
Transceiver module temperature sensors are indexed after ASIC and | ||
platform sensors. The current label printing method does not take this | ||
into account and simply prints the index of the transceiver module | ||
sensor. | ||
|
||
On new systems that have platform sensors this results in incorrect | ||
(shifted) transceiver module labels being printed: | ||
|
||
$ sensors | ||
[...] | ||
front panel 002: +37.0°C (crit = +70.0°C, emerg = +75.0°C) | ||
front panel 003: +47.0°C (crit = +70.0°C, emerg = +75.0°C) | ||
[...] | ||
|
||
Fix by taking the sensor count into account. After the fix: | ||
|
||
$ sensors | ||
[...] | ||
front panel 001: +37.0°C (crit = +70.0°C, emerg = +75.0°C) | ||
front panel 002: +47.0°C (crit = +70.0°C, emerg = +75.0°C) | ||
[...] | ||
|
||
Fixes: a53779de6a0e ("mlxsw: core: Add QSFP module temperature label attribute to hwmon") | ||
Signed-off-by: Vadim Pasternak <[email protected]> | ||
Reviewed-by: Ido Schimmel <[email protected]> | ||
Signed-off-by: Ciju Rajan K <[email protected]> | ||
--- | ||
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | ||
index d41afdfbd085..464787b10b73 100644 | ||
--- a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | ||
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | ||
@@ -377,7 +377,8 @@ mlxsw_hwmon_module_temp_label_show(struct device *dev, | ||
container_of(attr, struct mlxsw_hwmon_attr, dev_attr); | ||
|
||
return sprintf(buf, "front panel %03u\n", | ||
- mlwsw_hwmon_attr->type_index); | ||
+ mlwsw_hwmon_attr->type_index + 1 - | ||
+ mlwsw_hwmon_attr->hwmon->sensor_count); | ||
} | ||
|
||
static ssize_t | ||
-- | ||
2.14.1 | ||
|
Oops, something went wrong.