diff options
author | Eran Ben Elisha <eranbe@mellanox.com> | 2015-04-21 15:46:34 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-21 17:36:08 -0400 |
commit | fab9adfb71fc8690e20c3c280d39d49c8f4a3f0a (patch) | |
tree | 7fdb13f079be6b3b73ec8118aae3b475ae88e457 /drivers/net/ethernet/mellanox/mlx4/fw.c | |
parent | 3c7151275c0c9a80c3375f9874b1c7129a105eea (diff) | |
download | op-kernel-dev-fab9adfb71fc8690e20c3c280d39d49c8f4a3f0a.zip op-kernel-dev-fab9adfb71fc8690e20c3c280d39d49c8f4a3f0a.tar.gz |
net/mlx4_core: Fix reading HCA max message size in mlx4_QUERY_DEV_CAP
Currently we parse max_msg_sz from the wrong offset in QUERY_DEV_CAP,
fix to use the right offset.
Fixes: 0b131561a7d6 ('net/mlx4_en: Add Flow control statistics [..]')
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/fw.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/fw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index b9881fc..a407981 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c @@ -781,10 +781,10 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) MLX4_GET(field, outbox, QUERY_DEV_CAP_VL_PORT_OFFSET); dev_cap->num_ports = field & 0xf; MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MSG_SZ_OFFSET); + dev_cap->max_msg_sz = 1 << (field & 0x1f); MLX4_GET(field, outbox, QUERY_DEV_CAP_PORT_FLOWSTATS_COUNTERS_OFFSET); if (field & 0x10) dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN; - dev_cap->max_msg_sz = 1 << (field & 0x1f); MLX4_GET(field, outbox, QUERY_DEV_CAP_FLOW_STEERING_RANGE_EN_OFFSET); if (field & 0x80) dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_FS_EN; |