net/mlx5: Check FW limitations on log_max_qp before setting it
authorNoa Osherovich <noaos@mellanox.com>
Wed, 28 Dec 2016 12:58:32 +0000 (14:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Jan 2017 12:42:53 +0000 (13:42 +0100)
commit7bf1de7f2749ad858c33d3133240d5c3df046658
tree27f4d3dc49681a8143ea34b88e6eb6f89f21a9d3
parent9b4a34ff89878abbab4e22efaf7c2c683664304f
net/mlx5: Check FW limitations on log_max_qp before setting it

[ Upstream commit 883371c453b937f9eb581fb4915210865982736f ]

When setting HCA capabilities, set log_max_qp to be the minimum
between the selected profile's value and the HCA limitation.

Fixes: 938fe83c8dcb ('net/mlx5_core: New device capabilities...')
Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/main.c