linux/drivers/vdpa/mlx5
Alok Tiwari ba8a48b7be vdpa/mlx5: Fix incorrect error code reporting in query_virtqueues
[ Upstream commit f0ea2e9109 ]

When query_virtqueues() fails, the error log prints the variable err
instead of cmd->err. Since err may still be zero at this point, the
log message can misleadingly report a success value 0 even though the
command actually failed.

Even worse, once err is set to the first failure, subsequent logs
print that same stale value. This makes the error reporting appear
one step behind the actual failing queue index, which is confusing
and misleading.

Fix the log to report cmd->err, which reflects the real failure code
returned by the firmware.

Fixes: 1fcdf43ea6 ("vdpa/mlx5: Use async API for vq query command")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20250929134258.80956-1-alok.a.tiwari@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-12-18 14:03:24 +01:00
..
core vdpa: support virtio_map 2025-10-01 07:24:43 -04:00
net vdpa/mlx5: Fix incorrect error code reporting in query_virtqueues 2025-12-18 14:03:24 +01:00
Makefile vdpa/mlx5: Add debugfs subtree 2023-02-20 19:26:54 -05:00