提交 c4193a12 编写于 作者: Y Yevgeny Kliteynik 提交者: Saeed Mahameed

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: NYevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: NAlex Vesker <valex@nvidia.com>
Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
上级 14335d54
...@@ -271,6 +271,13 @@ int mlx5dr_cmd_sync_steering(struct mlx5_core_dev *mdev) ...@@ -271,6 +271,13 @@ int mlx5dr_cmd_sync_steering(struct mlx5_core_dev *mdev)
{ {
u32 in[MLX5_ST_SZ_DW(sync_steering_in)] = {}; 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); MLX5_SET(sync_steering_in, in, opcode, MLX5_CMD_OP_SYNC_STEERING);
return mlx5_cmd_exec_in(mdev, sync_steering, in); return mlx5_cmd_exec_in(mdev, sync_steering, in);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册