]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mlxsw: core: Add validation of transceiver temperature thresholds
authorVadim Pasternak <vadimp@nvidia.com>
Fri, 8 Jan 2021 14:52:09 +0000 (16:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jan 2021 14:57:57 +0000 (15:57 +0100)
commit7680783452ceef2a74f707d48a71fe76ac5cd598
treec2a77913c144c7d54baa1a388fd47b785a71b900
parentff6d4e8da7c65c999aca8ea2529e6a3ba6d820b8
mlxsw: core: Add validation of transceiver temperature thresholds

[ Upstream commit 57726ebe2733891c9f59105eff028735f73d05fb ]

Validate thresholds to avoid a single failure due to some transceiver
unreliability. Ignore the last readouts in case warning temperature is
above alarm temperature, since it can cause unexpected thermal
shutdown. Stay with the previous values and refresh threshold within
the next iteration.

This is a rare scenario, but it was observed at a customer site.

Fixes: 6a79507cfe94 ("mlxsw: core: Extend thermal module with per QSFP module thermal zones")
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c