net/mlx5: Check firmware sync reset requested is set before trying to abort it
authorMoshe Shemesh <moshe@nvidia.com>
Thu, 8 Apr 2021 04:30:57 +0000 (07:30 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jun 2021 11:39:18 +0000 (13:39 +0200)
commit730700337593b41551e17427bc33edcbd95d3f05
treed8c26ac8468bfda30d86e45600eaf45dfa9241f8
parentc1ea8c0e71ead1efaaba33e241c1e7d35e9cbf51
net/mlx5: Check firmware sync reset requested is set before trying to abort it

[ Upstream commit 5940e64281c09976ce2b560244217e610bf9d029 ]

In case driver sent NACK to firmware on sync reset request, it will get
sync reset abort event while it didn't set sync reset requested mode.
Thus, on abort sync reset event handler, driver should check reset
requested is set before trying to stop sync reset poll.

Fixes: 7dd6df329d4c ("net/mlx5: Handle sync reset abort event")
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c