diff options
author | Jon Mason <jon@opengridcomputing.com> | 2008-07-15 02:48:49 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-07-15 02:48:49 -0400 |
commit | 52c8084b740c42af27d5bfa62cec7079d12fbc2b (patch) | |
tree | d6bbe61d127501b9d45a74fae7421c452cc2d084 /drivers/infiniband/hw | |
parent | 1ff66e8c1faee7c2711b84b9c89e1c5fcd767839 (diff) |
RDMA/cxgb3: Propagate HW page size capabilities
cxgb3 does not currently report the page size capabilities, and
incorrectly reports them internally.
This version changes the bit-shifting to a static value (per Steve's
request).
Signed-off-by: Jon Mason <jon@opengridcomputing.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/cxio_hal.h | 1 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_provider.c | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.h b/drivers/infiniband/hw/cxgb3/cxio_hal.h index a9ff32c36211..656fe47bc84f 100644 --- a/drivers/infiniband/hw/cxgb3/cxio_hal.h +++ b/drivers/infiniband/hw/cxgb3/cxio_hal.h | |||
@@ -55,6 +55,7 @@ | |||
55 | #define T3_MAX_CQ_DEPTH 8192 | 55 | #define T3_MAX_CQ_DEPTH 8192 |
56 | #define T3_MAX_NUM_STAG (1<<15) | 56 | #define T3_MAX_NUM_STAG (1<<15) |
57 | #define T3_MAX_MR_SIZE 0x100000000ULL | 57 | #define T3_MAX_MR_SIZE 0x100000000ULL |
58 | #define T3_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ | ||
58 | 59 | ||
59 | #define T3_STAG_UNSET 0xffffffff | 60 | #define T3_STAG_UNSET 0xffffffff |
60 | 61 | ||
diff --git a/drivers/infiniband/hw/cxgb3/iwch.c b/drivers/infiniband/hw/cxgb3/iwch.c index 06086256ca1d..4489c89d6710 100644 --- a/drivers/infiniband/hw/cxgb3/iwch.c +++ b/drivers/infiniband/hw/cxgb3/iwch.c | |||
@@ -80,7 +80,7 @@ static void rnic_init(struct iwch_dev *rnicp) | |||
80 | rnicp->attr.max_mem_regs = cxio_num_stags(&rnicp->rdev); | 80 | rnicp->attr.max_mem_regs = cxio_num_stags(&rnicp->rdev); |
81 | rnicp->attr.max_phys_buf_entries = T3_MAX_PBL_SIZE; | 81 | rnicp->attr.max_phys_buf_entries = T3_MAX_PBL_SIZE; |
82 | rnicp->attr.max_pds = T3_MAX_NUM_PD - 1; | 82 | rnicp->attr.max_pds = T3_MAX_NUM_PD - 1; |
83 | rnicp->attr.mem_pgsizes_bitmask = 0x7FFF; /* 4KB-128MB */ | 83 | rnicp->attr.mem_pgsizes_bitmask = T3_PAGESIZE_MASK; |
84 | rnicp->attr.max_mr_size = T3_MAX_MR_SIZE; | 84 | rnicp->attr.max_mr_size = T3_MAX_MR_SIZE; |
85 | rnicp->attr.can_resize_wq = 0; | 85 | rnicp->attr.can_resize_wq = 0; |
86 | rnicp->attr.max_rdma_reads_per_qp = 8; | 86 | rnicp->attr.max_rdma_reads_per_qp = 8; |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index 18a6609f5e01..249d99f4a3cb 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c | |||
@@ -1130,6 +1130,7 @@ static int iwch_query_device(struct ib_device *ibdev, | |||
1130 | props->hw_ver = dev->rdev.t3cdev_p->type; | 1130 | props->hw_ver = dev->rdev.t3cdev_p->type; |
1131 | props->fw_ver = fw_vers_string_to_u64(dev); | 1131 | props->fw_ver = fw_vers_string_to_u64(dev); |
1132 | props->device_cap_flags = dev->device_cap_flags; | 1132 | props->device_cap_flags = dev->device_cap_flags; |
1133 | props->page_size_cap = dev->attr.mem_pgsizes_bitmask; | ||
1133 | props->vendor_id = (u32)dev->rdev.rnic_info.pdev->vendor; | 1134 | props->vendor_id = (u32)dev->rdev.rnic_info.pdev->vendor; |
1134 | props->vendor_part_id = (u32)dev->rdev.rnic_info.pdev->device; | 1135 | props->vendor_part_id = (u32)dev->rdev.rnic_info.pdev->device; |
1135 | props->max_mr_size = dev->attr.max_mr_size; | 1136 | props->max_mr_size = dev->attr.max_mr_size; |