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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Dec 2016 19:36:50 +0000 (14:36 -0500)
commit883371c453b937f9eb581fb4915210865982736f
tree6be4419a466b81dd6076798e71074bd625fd3843
parent9da34cd34e85aacc55af8774b81b1f23e86014f9
net/mlx5: Check FW limitations on log_max_qp before setting it

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>
drivers/net/ethernet/mellanox/mlx5/core/main.c