{IB,net}/mlx5: Setup mkey variant before mr create command invocation
authorSaeed Mahameed <saeedm@mellanox.com>
Tue, 10 Mar 2020 08:22:27 +0000 (10:22 +0200)
committerLeon Romanovsky <leonro@mellanox.com>
Fri, 13 Mar 2020 13:48:00 +0000 (15:48 +0200)
commit54c62e13ad765a346d220b2566f84c6092cf3564
tree003cc0ee15907029d1a372a777ff672064e0ad9d
parente0ebd8eb36ed850a22a9a0ca83edc4a40ad67c16
{IB,net}/mlx5: Setup mkey variant before mr create command invocation

On reg_mr_callback() mlx5_ib is recalculating the mkey variant which is
wrong and will lead to using a different key variant than the one
submitted to firmware on create mkey command invocation.

To fix this, we store the mkey variant before invoking the firmware
command and use it later on completion (reg_mr_callback).

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/infiniband/hw/mlx5/mr.c
drivers/net/ethernet/mellanox/mlx5/core/mr.c