net/mlx5: Update log_max_qp value to be 17 at most
authorMaher Sanalla <msanalla@nvidia.com>
Wed, 16 Feb 2022 09:01:04 +0000 (11:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Mar 2022 10:48:01 +0000 (11:48 +0100)
commit2378f94c8d9b887cb4c016fb6d7d55313e67a2c4
tree7f42e3be37454943b70ab9ce0fb19552427b7c80
parent6e94d28633842fafaeddbc16b7d4503d8dfdbfcc
net/mlx5: Update log_max_qp value to be 17 at most

commit 7f839965b2d77e1926ad08b23c51d60988f10a99 upstream.

Currently, log_max_qp value is dependent on what FW reports as its max capability.
In reality, due to a bug, some FWs report a value greater than 17, even though they
don't support log_max_qp > 17.

This FW issue led the driver to exhaust memory on startup.
Thus, log_max_qp value is set to be no more than 17 regardless
of what FW reports, as it was before the cited commit.

Fixes: f79a609ea6bf ("net/mlx5: Update log_max_qp value to FW max capability")
Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Reviewed-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/main.c