Patch "mlxsw: core_hwmon: Adjust module label names based on MTCAP sensor counter" has been added to the 6.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mlxsw: core_hwmon: Adjust module label names based on MTCAP sensor counter

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mlxsw-core_hwmon-adjust-module-label-names-based-on-.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 82627f163ab133bd9bbd5d8233a5203b90138ea3
Author: Vadim Pasternak <vadimp@xxxxxxxxxx>
Date:   Thu Aug 24 15:43:10 2023 +0200

    mlxsw: core_hwmon: Adjust module label names based on MTCAP sensor counter
    
    [ Upstream commit 3fc134a07438055fc93ce1bbacf2702ddd09500c ]
    
    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 <vadimp@xxxxxxxxxx>
    Reviewed-by: Ido Schimmel <idosch@xxxxxxxxxx>
    Signed-off-by: Petr Machata <petrm@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
index 70735068cf292..0fd290d776ffe 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
@@ -405,7 +405,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",
-		       mlxsw_hwmon_attr->type_index);
+		       mlxsw_hwmon_attr->type_index + 1 -
+		       mlxsw_hwmon_attr->mlxsw_hwmon_dev->sensor_count);
 }
 
 static ssize_t



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux