net/mlx4_core: Fix wrong reading of reserved_eqs
authorMatan Barak <matanb@mellanox.com>
Thu, 13 Nov 2014 12:45:27 +0000 (14:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Nov 2014 20:16:15 +0000 (15:16 -0500)
We mistakenly read the reserved_eqs field as a standard
numeric value rather than a log2 value.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/fw.c

index d6dba77ae4ba1eae6ffb30e4b9c8892b1892d758..9051b36cdad6d851d00b0dfcfdf428d376eb646a 100644 (file)
@@ -611,7 +611,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
        MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MPT_OFFSET);
        dev_cap->max_mpts = 1 << (field & 0x3f);
        MLX4_GET(field, outbox, QUERY_DEV_CAP_RSVD_EQ_OFFSET);
-       dev_cap->reserved_eqs = field & 0xf;
+       dev_cap->reserved_eqs = 1 << (field & 0xf);
        MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_EQ_OFFSET);
        dev_cap->max_eqs = 1 << (field & 0xf);
        MLX4_GET(field, outbox, QUERY_DEV_CAP_RSVD_MTT_OFFSET);