diff options
author | Steve Wise <swise@opengridcomputing.com> | 2008-04-29 16:46:52 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-29 16:46:52 -0400 |
commit | ccaf10d0ad17bf755750160ebe594de7261a893e (patch) | |
tree | 74c49b7d303cac5b7a25afd6cfb7859cc379ec68 /drivers/infiniband | |
parent | 989a1780698c65dfe093a6aa89ceeff84c31f528 (diff) |
RDMA/cxgb3: Set the max_mr_size device attribute correctly
cxgb3 only supports 4GB memory regions. The lustre RDMA code uses
this attribute and currently has to code around our bad setting.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/cxio_hal.h | 1 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch.c | 1 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch.h | 1 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 |
4 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.h b/drivers/infiniband/hw/cxgb3/cxio_hal.h index 99543d634704..2bcff7f5046e 100644 --- a/drivers/infiniband/hw/cxgb3/cxio_hal.h +++ b/drivers/infiniband/hw/cxgb3/cxio_hal.h | |||
@@ -53,6 +53,7 @@ | |||
53 | #define T3_MAX_PBL_SIZE 256 | 53 | #define T3_MAX_PBL_SIZE 256 |
54 | #define T3_MAX_RQ_SIZE 1024 | 54 | #define T3_MAX_RQ_SIZE 1024 |
55 | #define T3_MAX_NUM_STAG (1<<15) | 55 | #define T3_MAX_NUM_STAG (1<<15) |
56 | #define T3_MAX_MR_SIZE 0x100000000ULL | ||
56 | 57 | ||
57 | #define T3_STAG_UNSET 0xffffffff | 58 | #define T3_STAG_UNSET 0xffffffff |
58 | 59 | ||
diff --git a/drivers/infiniband/hw/cxgb3/iwch.c b/drivers/infiniband/hw/cxgb3/iwch.c index 6ba4138c8ec3..71554eacb13c 100644 --- a/drivers/infiniband/hw/cxgb3/iwch.c +++ b/drivers/infiniband/hw/cxgb3/iwch.c | |||
@@ -83,6 +83,7 @@ static void rnic_init(struct iwch_dev *rnicp) | |||
83 | rnicp->attr.max_phys_buf_entries = T3_MAX_PBL_SIZE; | 83 | rnicp->attr.max_phys_buf_entries = T3_MAX_PBL_SIZE; |
84 | rnicp->attr.max_pds = T3_MAX_NUM_PD - 1; | 84 | rnicp->attr.max_pds = T3_MAX_NUM_PD - 1; |
85 | rnicp->attr.mem_pgsizes_bitmask = 0x7FFF; /* 4KB-128MB */ | 85 | rnicp->attr.mem_pgsizes_bitmask = 0x7FFF; /* 4KB-128MB */ |
86 | rnicp->attr.max_mr_size = T3_MAX_MR_SIZE; | ||
86 | rnicp->attr.can_resize_wq = 0; | 87 | rnicp->attr.can_resize_wq = 0; |
87 | rnicp->attr.max_rdma_reads_per_qp = 8; | 88 | rnicp->attr.max_rdma_reads_per_qp = 8; |
88 | rnicp->attr.max_rdma_read_resources = | 89 | rnicp->attr.max_rdma_read_resources = |
diff --git a/drivers/infiniband/hw/cxgb3/iwch.h b/drivers/infiniband/hw/cxgb3/iwch.h index 9ad9b1e7c8c1..d2409a505e8d 100644 --- a/drivers/infiniband/hw/cxgb3/iwch.h +++ b/drivers/infiniband/hw/cxgb3/iwch.h | |||
@@ -66,6 +66,7 @@ struct iwch_rnic_attributes { | |||
66 | * size (4k)^i. Phys block list mode unsupported. | 66 | * size (4k)^i. Phys block list mode unsupported. |
67 | */ | 67 | */ |
68 | u32 mem_pgsizes_bitmask; | 68 | u32 mem_pgsizes_bitmask; |
69 | u64 max_mr_size; | ||
69 | u8 can_resize_wq; | 70 | u8 can_resize_wq; |
70 | 71 | ||
71 | /* | 72 | /* |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index e343e9e64844..d07d3a377b5f 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c | |||
@@ -998,7 +998,7 @@ static int iwch_query_device(struct ib_device *ibdev, | |||
998 | props->device_cap_flags = dev->device_cap_flags; | 998 | props->device_cap_flags = dev->device_cap_flags; |
999 | props->vendor_id = (u32)dev->rdev.rnic_info.pdev->vendor; | 999 | props->vendor_id = (u32)dev->rdev.rnic_info.pdev->vendor; |
1000 | props->vendor_part_id = (u32)dev->rdev.rnic_info.pdev->device; | 1000 | props->vendor_part_id = (u32)dev->rdev.rnic_info.pdev->device; |
1001 | props->max_mr_size = ~0ull; | 1001 | props->max_mr_size = dev->attr.max_mr_size; |
1002 | props->max_qp = dev->attr.max_qps; | 1002 | props->max_qp = dev->attr.max_qps; |
1003 | props->max_qp_wr = dev->attr.max_wrs; | 1003 | props->max_qp_wr = dev->attr.max_wrs; |
1004 | props->max_sge = dev->attr.max_sge_per_wr; | 1004 | props->max_sge = dev->attr.max_sge_per_wr; |