net/mlx4: Check if Granular QoS per VF has been enabled before updating QP qos_vport
authorIdo Shamay <idos@mellanox.com>
Mon, 5 Jun 2017 07:44:56 +0000 (10:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:48:19 +0000 (19:48 +0200)
commit5366c5ff9e13d6362408e25ced761f3228de7b60
tree2cb2f67ae0c3737b06b462ebad8195384894c1f7
parenteec6e0a4b168b26f99b91c58dc17f948deaa9d9f
net/mlx4: Check if Granular QoS per VF has been enabled before updating QP qos_vport

[ Upstream commit 269f9883fe254d109afdfc657875c456d6fabb08 ]

The Granular QoS per VF feature must be enabled in FW before it can be
used.

Thus, the driver cannot modify a QP's qos_vport value (via the UPDATE_QP FW
command) if the feature has not been enabled -- the FW returns an error if
this is attempted.

Fixes: 08068cd5683f ("net/mlx4: Added qos_vport QP configuration in VST mode")
Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx4/qp.c
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c