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:41:34 +0000 (13:41 +0100)
commit18d971f84c849fff0c51b95b6661b1fd836d8711
tree092d1daf10ab80d300accb9b3a480a9ecdd78fbb
parent3f2847608cb9fc710bc43a9715334d3f32a808c3
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