net/mlx5: Fix access to a non-supported register
authorAya Levin <ayal@nvidia.com>
Sun, 7 Nov 2021 15:21:45 +0000 (17:21 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 1 Dec 2021 06:35:06 +0000 (22:35 -0800)
commit502e82b91361955c66c8453b5b7a905b0b5bd5a1
treeb15cc686551f1224d3244944f2af5149dabc49c6
parent924cc4633f048b4fb4af3d1f9a51d10867625339
net/mlx5: Fix access to a non-supported register

Validate MRTC register is supported before triggering a delayed work
which accesses it.

Fixes: 5a1023deeed0 ("net/mlx5: Add periodic update of host time to firmware")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/health.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
include/linux/mlx5/mlx5_ifc.h