net/mlx5: DR, Fix the SMFS sync_steering for fast teardown

If sync happens when the device is in fast teardown, just bail
and don't do anything, because the PCI device is not there any more.

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
Yevgeny Kliteynik
2022-10-27 15:50:37 +01:00
committed by Saeed Mahameed
parent 14335d54e7
commit c4193a1281
@@ -271,6 +271,13 @@ int mlx5dr_cmd_sync_steering(struct mlx5_core_dev *mdev)
{
u32 in[MLX5_ST_SZ_DW(sync_steering_in)] = {};
/* Skip SYNC in case the device is internal error state.
* Besides a device error, this also happens when we're
* in fast teardown
*/
if (mdev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR)
return 0;
MLX5_SET(sync_steering_in, in, opcode, MLX5_CMD_OP_SYNC_STEERING);
return mlx5_cmd_exec_in(mdev, sync_steering, in);