]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
{net, RDMA}/mlx5: Fix override of log_max_qp by other device
authorMaor Gottlieb <maorg@nvidia.com>
Wed, 12 May 2021 10:52:27 +0000 (13:52 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 15 Jul 2021 17:23:08 +0000 (19:23 +0200)
commit3916b063ba5bad8c1087632b539db67b730d4dd9
treeacd7d49378cfb0088ce25b0fa1b97649c0d43c3e
parentba12d2e87216f7effe686cf9c354fb642df27fb4
{net, RDMA}/mlx5: Fix override of log_max_qp by other device

BugLink: https://bugs.launchpad.net/bugs/1931896
commit 3410fbcd47dc6479af4309febf760ccaa5efb472 upstream.

mlx5_core_dev holds pointer to static profile, hence when the
log_max_qp of the profile is override by some device, then it
effect all other mlx5 devices that share the same profile.
Fix it by having a profile instance for every mlx5 device.

Fixes: 883371c453b9 ("net/mlx5: Check FW limitations on log_max_qp before setting it")
Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/infiniband/hw/mlx5/mr.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
include/linux/mlx5/driver.h