]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
IB/mlx5: Return failure when rts2rts_qp_counters_set_id is not supported
authorMark Zhang <markz@mellanox.com>
Sun, 26 Jan 2020 17:17:08 +0000 (19:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2020 18:53:05 +0000 (19:53 +0100)
commite30e30c042fe6018a46275f2b62b63694c02af33
tree683a568d47e8baf30ae9442bd10c7284297c106a
parentcf0ea974b6a2c9308149f747db0ab30de1b5d36b
IB/mlx5: Return failure when rts2rts_qp_counters_set_id is not supported

commit 10189e8e6fe8dcde13435f9354800429c4474fb1 upstream.

When binding a QP with a counter and the QP state is not RESET, return
failure if the rts2rts_qp_counters_set_id is not supported by the
device.

This is to prevent cases like manual bind for Connect-IB devices from
returning success when the feature is not supported.

Fixes: d14133dd4161 ("IB/mlx5: Support set qp counter")
Link: https://lore.kernel.org/r/20200126171708.5167-1-leon@kernel.org
Signed-off-by: Mark Zhang <markz@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx5/qp.c