diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2013-03-06 22:46:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-07 15:52:03 -0500 |
commit | 0081c8f3814a8344ca975c085d987ec6c90499ae (patch) | |
tree | 1be0a1a1c9bc6380e655b580d8236c9ea3c16fc2 /drivers/net/ethernet | |
parent | 3fb817f1cd54bedd23e8913051473d574a0f1717 (diff) |
net/mlx4_core: Turn off device-managed FS bit in dev-cap wrapper if DMFS is not enabled
Older kernels detect DMFS (device-managed flow steering) from the HCA
device capability directly, regardless of whether the capability was
enabled in INIT_HCA, this is fixed by commit 7b8157bed "mlx4_core: Adjustments
to Flow Steering activation logic for SR-IOV"
To protect against guests running kernels without this fix, the host driver
should turn off the DMFS capability bit in mlx4_QUERY_DEV_CAP_wrapper.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/fw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index 50917eb3013e..f6245579962d 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c | |||
@@ -787,6 +787,14 @@ int mlx4_QUERY_DEV_CAP_wrapper(struct mlx4_dev *dev, int slave, | |||
787 | bmme_flags &= ~MLX4_BMME_FLAG_TYPE_2_WIN; | 787 | bmme_flags &= ~MLX4_BMME_FLAG_TYPE_2_WIN; |
788 | MLX4_PUT(outbox->buf, bmme_flags, QUERY_DEV_CAP_BMME_FLAGS_OFFSET); | 788 | MLX4_PUT(outbox->buf, bmme_flags, QUERY_DEV_CAP_BMME_FLAGS_OFFSET); |
789 | 789 | ||
790 | /* turn off device-managed steering capability if not enabled */ | ||
791 | if (dev->caps.steering_mode != MLX4_STEERING_MODE_DEVICE_MANAGED) { | ||
792 | MLX4_GET(field, outbox->buf, | ||
793 | QUERY_DEV_CAP_FLOW_STEERING_RANGE_EN_OFFSET); | ||
794 | field &= 0x7f; | ||
795 | MLX4_PUT(outbox->buf, field, | ||
796 | QUERY_DEV_CAP_FLOW_STEERING_RANGE_EN_OFFSET); | ||
797 | } | ||
790 | return 0; | 798 | return 0; |
791 | } | 799 | } |
792 | 800 | ||