diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-23 12:56:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-23 12:56:11 -0400 |
commit | 0b776eb5426752d4e53354ac89e3710d857e09a7 (patch) | |
tree | 1eebeeaabab90de5834b32e72d2e259dc8a4a635 /drivers/infiniband/hw/ehca/ehca_main.c | |
parent | 0d6810091cdbd05efeb31654c6a41a6cbdfdd2c8 (diff) | |
parent | 77109cc2823f025ccd66ebd9b88fbab90437b2d8 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
mlx4_core: Increase command timeout for INIT_HCA to 10 seconds
IPoIB/cm: Use common CQ for CM send completions
IB/uverbs: Fix checking of userspace object ownership
IB/mlx4: Sanity check userspace send queue sizes
IPoIB: Rewrite "if (!likely(...))" as "if (unlikely(!(...)))"
IB/ehca: Enable large page MRs by default
IB/ehca: Change meaning of hca_cap_mr_pgsize
IB/ehca: Fix ehca_encode_hwpage_size() and alloc_fmr()
IB/ehca: Fix masking error in {,re}reg_phys_mr()
IB/ehca: Supply QP token for SRQ base QPs
IPoIB: Use round_jiffies() for ah_reap_task
RDMA/cma: Fix deadlock destroying listen requests
RDMA/cma: Add locking around QP accesses
IB/mthca: Avoid alignment traps when writing doorbells
mlx4_core: Kill mlx4_write64_raw()
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_main.c')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_main.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index 7a7dab890f6d..c6cd38c5321f 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
@@ -65,7 +65,7 @@ int ehca_port_act_time = 30; | |||
65 | int ehca_poll_all_eqs = 1; | 65 | int ehca_poll_all_eqs = 1; |
66 | int ehca_static_rate = -1; | 66 | int ehca_static_rate = -1; |
67 | int ehca_scaling_code = 0; | 67 | int ehca_scaling_code = 0; |
68 | int ehca_mr_largepage = 0; | 68 | int ehca_mr_largepage = 1; |
69 | 69 | ||
70 | module_param_named(open_aqp1, ehca_open_aqp1, int, S_IRUGO); | 70 | module_param_named(open_aqp1, ehca_open_aqp1, int, S_IRUGO); |
71 | module_param_named(debug_level, ehca_debug_level, int, S_IRUGO); | 71 | module_param_named(debug_level, ehca_debug_level, int, S_IRUGO); |
@@ -260,13 +260,20 @@ static struct cap_descr { | |||
260 | { HCA_CAP_MINI_QP, "HCA_CAP_MINI_QP" }, | 260 | { HCA_CAP_MINI_QP, "HCA_CAP_MINI_QP" }, |
261 | }; | 261 | }; |
262 | 262 | ||
263 | int ehca_sense_attributes(struct ehca_shca *shca) | 263 | static int ehca_sense_attributes(struct ehca_shca *shca) |
264 | { | 264 | { |
265 | int i, ret = 0; | 265 | int i, ret = 0; |
266 | u64 h_ret; | 266 | u64 h_ret; |
267 | struct hipz_query_hca *rblock; | 267 | struct hipz_query_hca *rblock; |
268 | struct hipz_query_port *port; | 268 | struct hipz_query_port *port; |
269 | 269 | ||
270 | static const u32 pgsize_map[] = { | ||
271 | HCA_CAP_MR_PGSIZE_4K, 0x1000, | ||
272 | HCA_CAP_MR_PGSIZE_64K, 0x10000, | ||
273 | HCA_CAP_MR_PGSIZE_1M, 0x100000, | ||
274 | HCA_CAP_MR_PGSIZE_16M, 0x1000000, | ||
275 | }; | ||
276 | |||
270 | rblock = ehca_alloc_fw_ctrlblock(GFP_KERNEL); | 277 | rblock = ehca_alloc_fw_ctrlblock(GFP_KERNEL); |
271 | if (!rblock) { | 278 | if (!rblock) { |
272 | ehca_gen_err("Cannot allocate rblock memory."); | 279 | ehca_gen_err("Cannot allocate rblock memory."); |
@@ -329,8 +336,15 @@ int ehca_sense_attributes(struct ehca_shca *shca) | |||
329 | if (EHCA_BMASK_GET(hca_cap_descr[i].mask, shca->hca_cap)) | 336 | if (EHCA_BMASK_GET(hca_cap_descr[i].mask, shca->hca_cap)) |
330 | ehca_gen_dbg(" %s", hca_cap_descr[i].descr); | 337 | ehca_gen_dbg(" %s", hca_cap_descr[i].descr); |
331 | 338 | ||
332 | shca->hca_cap_mr_pgsize = rblock->memory_page_size_supported; | 339 | /* translate supported MR page sizes; always support 4K */ |
340 | shca->hca_cap_mr_pgsize = EHCA_PAGESIZE; | ||
341 | if (ehca_mr_largepage) { /* support extra sizes only if enabled */ | ||
342 | for (i = 0; i < ARRAY_SIZE(pgsize_map); i += 2) | ||
343 | if (rblock->memory_page_size_supported & pgsize_map[i]) | ||
344 | shca->hca_cap_mr_pgsize |= pgsize_map[i + 1]; | ||
345 | } | ||
333 | 346 | ||
347 | /* query max MTU from first port -- it's the same for all ports */ | ||
334 | port = (struct hipz_query_port *)rblock; | 348 | port = (struct hipz_query_port *)rblock; |
335 | h_ret = hipz_h_query_port(shca->ipz_hca_handle, 1, port); | 349 | h_ret = hipz_h_query_port(shca->ipz_hca_handle, 1, port); |
336 | if (h_ret != H_SUCCESS) { | 350 | if (h_ret != H_SUCCESS) { |