diff options
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_cmd.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c index 9ed34587fc5c..22ac72bc20c3 100644 --- a/drivers/infiniband/hw/mthca/mthca_cmd.c +++ b/drivers/infiniband/hw/mthca/mthca_cmd.c | |||
@@ -937,10 +937,6 @@ int mthca_QUERY_DEV_LIM(struct mthca_dev *dev, | |||
937 | if (err) | 937 | if (err) |
938 | goto out; | 938 | goto out; |
939 | 939 | ||
940 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_SRQ_SZ_OFFSET); | ||
941 | dev_lim->max_srq_sz = (1 << field) - 1; | ||
942 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_QP_SZ_OFFSET); | ||
943 | dev_lim->max_qp_sz = (1 << field) - 1; | ||
944 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSVD_QP_OFFSET); | 940 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSVD_QP_OFFSET); |
945 | dev_lim->reserved_qps = 1 << (field & 0xf); | 941 | dev_lim->reserved_qps = 1 << (field & 0xf); |
946 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_QP_OFFSET); | 942 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_QP_OFFSET); |
@@ -1056,6 +1052,10 @@ int mthca_QUERY_DEV_LIM(struct mthca_dev *dev, | |||
1056 | mthca_dbg(dev, "Flags: %08x\n", dev_lim->flags); | 1052 | mthca_dbg(dev, "Flags: %08x\n", dev_lim->flags); |
1057 | 1053 | ||
1058 | if (mthca_is_memfree(dev)) { | 1054 | if (mthca_is_memfree(dev)) { |
1055 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_SRQ_SZ_OFFSET); | ||
1056 | dev_lim->max_srq_sz = 1 << field; | ||
1057 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_QP_SZ_OFFSET); | ||
1058 | dev_lim->max_qp_sz = 1 << field; | ||
1059 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSZ_SRQ_OFFSET); | 1059 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSZ_SRQ_OFFSET); |
1060 | dev_lim->hca.arbel.resize_srq = field & 1; | 1060 | dev_lim->hca.arbel.resize_srq = field & 1; |
1061 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_SG_RQ_OFFSET); | 1061 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_SG_RQ_OFFSET); |
@@ -1087,6 +1087,10 @@ int mthca_QUERY_DEV_LIM(struct mthca_dev *dev, | |||
1087 | mthca_dbg(dev, "Max ICM size %lld MB\n", | 1087 | mthca_dbg(dev, "Max ICM size %lld MB\n", |
1088 | (unsigned long long) dev_lim->hca.arbel.max_icm_sz >> 20); | 1088 | (unsigned long long) dev_lim->hca.arbel.max_icm_sz >> 20); |
1089 | } else { | 1089 | } else { |
1090 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_SRQ_SZ_OFFSET); | ||
1091 | dev_lim->max_srq_sz = (1 << field) - 1; | ||
1092 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_QP_SZ_OFFSET); | ||
1093 | dev_lim->max_qp_sz = (1 << field) - 1; | ||
1090 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_AV_OFFSET); | 1094 | MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_AV_OFFSET); |
1091 | dev_lim->hca.tavor.max_avs = 1 << (field & 0x3f); | 1095 | dev_lim->hca.tavor.max_avs = 1 << (field & 0x3f); |
1092 | dev_lim->mpt_entry_sz = MTHCA_MPT_ENTRY_SIZE; | 1096 | dev_lim->mpt_entry_sz = MTHCA_MPT_ENTRY_SIZE; |