Commit c63b32e1 authored by Patrisious Haddad's avatar Patrisious Haddad Committed by Peng Zhang
Browse files

RDMA/mlx5: Change the key being sent for MPV device affiliation

stable inclusion
from stable-v6.6.8
commit 885faf3c7e5f53561c34104d140f2e321ea305a6
bugzilla: https://gitee.com/openeuler/kernel/issues/I99K53

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



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

commit 02e7d139e5e24abb5fde91934fc9dc0344ac1926 upstream.

Change the key that we send from IB driver to EN driver regarding the
MPV device affiliation, since at that stage the IB device is not yet
initialized, so its index would be zero for different IB devices and
cause wrong associations between unrelated master and slave devices.

Instead use a unique value from inside the core device which is already
initialized at this stage.

Fixes: 0d293714ac32 ("RDMA/mlx5: Send events from IB driver about device affiliation state")
Signed-off-by: default avatarPatrisious Haddad <phaddad@nvidia.com>
Link: https://lore.kernel.org/r/ac7e66357d963fc68d7a419515180212c96d137d.1697705185.git.leon@kernel.org


Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZhangPeng <zhangpeng362@huawei.com>
parent 72de776f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3263,7 +3263,7 @@ static bool mlx5_ib_bind_slave_port(struct mlx5_ib_dev *ibdev,

	mlx5_ib_init_cong_debugfs(ibdev, port_num);

	key = ibdev->ib_dev.index;
	key = mpi->mdev->priv.adev_idx;
	mlx5_core_mp_event_replay(mpi->mdev,
				  MLX5_DRIVER_EVENT_AFFILIATION_DONE,
				  &key);