Skip to content
Commit 346ea7cc authored by Eli Cohen's avatar Eli Cohen Committed by Greg Kroah-Hartman
Browse files

vdpa/mlx5: Restore the hardware used index after change map

[ Upstream commit b35ccebe ]

When a change of memory map occurs, the hardware resources are destroyed
and then re-created again with the new memory map. In such case, we need
to restore the hardware available and used indices. The driver failed to
restore the used index which is added here.

Also, since the driver also fails to reset the available and used
indices upon device reset, fix this here to avoid regression caused by
the fact that used index may not be zero upon device reset.

Fixes: 1a86b377

 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: default avatarEli Cohen <elic@nvidia.com>
Link: https://lore.kernel.org/r/20210204073618.36336-1-elic@nvidia.com
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c1debbaf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment