diff mbox

mlx4_core: num reserved eqs presented as log and actual

Message ID 4B790CAD.2070007@mellanox.co.il (mailing list archive)
State New, archived
Headers show

Commit Message

Yevgeny Petrilin Feb. 15, 2010, 8:58 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c
index 04f42ae..b5b4799 100644
--- a/drivers/net/mlx4/fw.c
+++ b/drivers/net/mlx4/fw.c
@@ -155,11 +155,12 @@  int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
 #define QUERY_DEV_CAP_MAX_SRQ_OFFSET		0x15
 #define QUERY_DEV_CAP_RSVD_EEC_OFFSET		0x16
 #define QUERY_DEV_CAP_MAX_EEC_OFFSET		0x17
+#define QUERY_DEV_CAP_RSVD_EQ_OFFSET		0x18
 #define QUERY_DEV_CAP_MAX_CQ_SZ_OFFSET		0x19
 #define QUERY_DEV_CAP_RSVD_CQ_OFFSET		0x1a
 #define QUERY_DEV_CAP_MAX_CQ_OFFSET		0x1b
 #define QUERY_DEV_CAP_MAX_MPT_OFFSET		0x1d
-#define QUERY_DEV_CAP_RSVD_EQ_OFFSET		0x1e
+#define QUERY_DEV_CAP_LOG_RSVD_EQ_OFFSET	0x1e
 #define QUERY_DEV_CAP_MAX_EQ_OFFSET		0x1f
 #define QUERY_DEV_CAP_RSVD_MTT_OFFSET		0x20
 #define QUERY_DEV_CAP_MAX_MRW_SZ_OFFSET		0x21
@@ -236,7 +237,11 @@  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;
+	if (!field) {
+		MLX4_GET(field, outbox, QUERY_DEV_CAP_LOG_RSVD_EQ_OFFSET);
+		dev_cap->reserved_eqs = 1 << (field & 0xf);
+	} else
+		dev_cap->reserved_eqs = field;
 	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);