]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mlx4_core: Fix max_eqs masking in QUERY_DEV_CAP
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Mon, 10 Dec 2007 03:25:23 +0000 (05:25 +0200)
committerRoland Dreier <rolandd@cisco.com>
Fri, 25 Jan 2008 22:15:29 +0000 (14:15 -0800)
log_max_eqs is a 4-bit field, not a 3-bit field in the response to the
QUERY_DEV_CAP FW command, so we should mask with 0xf instead of 0x7
when reading it.

Found by Yossi Leybovitch of Mellanox.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/net/mlx4/fw.c

index 50648738d679b7e60aeb720eb8e6ba161c6d02a2..535a4461d88c6d720758e15d7fd21a67676a0fd9 100644 (file)
@@ -202,7 +202,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
        MLX4_GET(field, outbox, QUERY_DEV_CAP_RSVD_EQ_OFFSET);
        dev_cap->reserved_eqs = 1 << (field & 0xf);
        MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_EQ_OFFSET);
-       dev_cap->max_eqs = 1 << (field & 0x7);
+       dev_cap->max_eqs = 1 << (field & 0xf);
        MLX4_GET(field, outbox, QUERY_DEV_CAP_RSVD_MTT_OFFSET);
        dev_cap->reserved_mtts = 1 << (field >> 4);
        MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MRW_SZ_OFFSET);