diff options
author | Amit Cohen <amcohen@nvidia.com> | 2020-09-27 10:50:11 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-27 13:27:00 -0700 |
commit | 943585c9eec32135750226e42d3c3510f079bd5e (patch) | |
tree | ee160752cc6c6f032f89256eb75ecabd7e665de9 /drivers/net/ethernet/mellanox/mlxsw/core.c | |
parent | 0652ac07756588d6f1aa8419f569b5894a149d6e (diff) |
mlxsw: Update transceiver_overheat counter according to MTWE
MTWE (Management Temperature Warning Event) is triggered when module's
temperature is higher than its threshold.
Register for MTWE events and increase the module's overheat counter when
its corresponding sensor goes above the configured threshold.
Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/core.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c index 916c641b02e2..a21afa56e3f7 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core.c @@ -136,6 +136,11 @@ bool mlxsw_core_res_query_enabled(const struct mlxsw_core *mlxsw_core) } EXPORT_SYMBOL(mlxsw_core_res_query_enabled); +bool mlxsw_core_temp_warn_enabled(const struct mlxsw_core *mlxsw_core) +{ + return mlxsw_core->driver->temp_warn_enabled; +} + bool mlxsw_core_fw_rev_minor_subminor_validate(const struct mlxsw_fw_rev *rev, const struct mlxsw_fw_rev *req_rev) |