IB/mlx5: Verify that Q counters are supported
commitc8186699527b5b0ee080e510afac9a3db797aa1b
authorKamal Heib <kamalh@mellanox.com>
Wed, 18 Jan 2017 12:10:32 +0000 (18 14:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Mar 2017 11:14:35 +0000 (18 19:14 +0800)
tree261df9d0797806d4bd90337113093200be8908e1
parent8fed8fc18839d7aec7ea046d79eb814dce6255c3
IB/mlx5: Verify that Q counters are supported

commit 45bded2c216da6010184ac5ebe88c27f73439009 upstream.

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')
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx5/main.c