Commit 593d23ed authored by Mark Zhang's avatar Mark Zhang Committed by sanglipeng
Browse files

RDMA/mlx5: Use correct device num_ports when modify DC

stable inclusion
from stable-v5.10.180
commit 3bc78eddf0a054a24ea977df7add6f8671e456a9
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8FC2O

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3bc78eddf0a054a24ea977df7add6f8671e456a9

--------------------------------

[ Upstream commit 746aa3c8 ]

Just like other QP types, when modify DC, the port_num should be compared
with dev->num_ports, instead of HCA_CAP.num_ports.  Otherwise Multi-port
vHCA on DC may not work.

Fixes: 776a3906 ("IB/mlx5: Add support for DC target QP")
Link: https://lore.kernel.org/r/20230420013906.1244185-1-markzhang@nvidia.com


Signed-off-by: default avatarMark Zhang <markzhang@nvidia.com>
Reviewed-by: default avatarMaor Gottlieb <maorg@nvidia.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 199f3dad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment