]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: Skip clock update work when device is in error state
authorMoshe Shemesh <moshe@nvidia.com>
Wed, 19 Jul 2023 08:33:44 +0000 (11:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2023 16:22:02 +0000 (18:22 +0200)
commit27e8db8380eb82220725ab9725eccb835ab1655f
tree1302286df76b55c6cfcea8eb16ba17498ce998ac
parentf638fc2f737766936196f535b20659c47200838f
net/mlx5: Skip clock update work when device is in error state

commit d006207625657322ba8251b6e7e829f9659755dc upstream.

When device is in error state, marked by the flag
MLX5_DEVICE_STATE_INTERNAL_ERROR, the HW and PCI may not be accessible
and so clock update work should be skipped. Furthermore, such access
through PCI in error state, after calling mlx5_pci_disable_device() can
result in failing to recover from pci errors.

Fixes: ef9814deafd0 ("net/mlx5e: Add HW timestamping (TS) support")
Reported-and-tested-by: Ganesh G R <ganeshgr@linux.ibm.com>
Closes: https://lore.kernel.org/netdev/9bdb9b9d-140a-7a28-f0de-2e64e873c068@nvidia.com
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Aya Levin <ayal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c