IB/mlx5: Verify that Q counters are supported
authorKamal Heib <kamalh@mellanox.com>
Wed, 18 Jan 2017 12:10:32 +0000 (14:10 +0200)
committerDoug Ledford <dledford@redhat.com>
Tue, 14 Feb 2017 15:14:25 +0000 (10:14 -0500)
commit45bded2c216da6010184ac5ebe88c27f73439009
tree7910d9250962b3a1ad704702c28129c1fffeb0b8
parent12bbf1ea7e3b35892dbb8636b978160bc9576b61
IB/mlx5: Verify that Q counters are supported

Make sure that the Q counters are supported by the FW before trying
to allocate/deallocte them, this will avoid driver load failure when
they aren't supported by the FW.

Fixes: 0837e86a7a34 ('IB/mlx5: Add per port counters')
Cc: <stable@vger.kernel.org> # v4.7+
Signed-off-by: Kamal Heib <kamalh@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c