Skip to content

Commit 5920869

Browse files
Jack MorgensteinRoland Dreier
authored andcommitted
mlx4_core: Fix max_eqs masking in QUERY_DEV_CAP
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 <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
1 parent 3c84508 commit 5920869

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/mlx4

1 file changed

+1
-1
lines changed

drivers/net/mlx4/fw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
202202
MLX4_GET(field, outbox, QUERY_DEV_CAP_RSVD_EQ_OFFSET);
203203
dev_cap->reserved_eqs = 1 << (field & 0xf);
204204
MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_EQ_OFFSET);
205-
dev_cap->max_eqs = 1 << (field & 0x7);
205+
dev_cap->max_eqs = 1 << (field & 0xf);
206206
MLX4_GET(field, outbox, QUERY_DEV_CAP_RSVD_MTT_OFFSET);
207207
dev_cap->reserved_mtts = 1 << (field >> 4);
208208
MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MRW_SZ_OFFSET);

0 commit comments

Comments
 (0)