Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vfio/mlx5: Handle the EREMOTEIO error upon the SAVE command

The SAVE command uses the async command interface over the PF.

Upon a failure in the firmware -EREMOTEIO is returned.

In that case call mlx5_cmd_out_err() to let it print the command failure
details including the firmware syndrome.

Note:
The other commands in the driver use the sync command interface in a way
that a firmware syndrome is printed upon an error inside mlx5_core.

Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Leon Romanovsky <leon@kernel.org>
Link: https://lore.kernel.org/r/20240205124828.232701-4-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

authored by

Yishai Hadas and committed by
Alex Williamson
793d4bfa f8864730

+6 -1
+6 -1
drivers/vfio/pci/mlx5/cmd.c
··· 614 614 615 615 err: 616 616 /* The error flow can't run from an interrupt context */ 617 - if (status == -EREMOTEIO) 617 + if (status == -EREMOTEIO) { 618 618 status = MLX5_GET(save_vhca_state_out, async_data->out, status); 619 + /* Failed in FW, print cmd out failure details */ 620 + mlx5_cmd_out_err(migf->mvdev->mdev, MLX5_CMD_OP_SAVE_VHCA_STATE, 0, 621 + async_data->out); 622 + } 623 + 619 624 async_data->status = status; 620 625 queue_work(migf->mvdev->cb_wq, &async_data->work); 621 626 }