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()
This commit is contained in:
@ -65,7 +65,7 @@ int ehca_port_act_time = 30;
|
||||
int ehca_poll_all_eqs = 1;
|
||||
int ehca_static_rate = -1;
|
||||
int ehca_scaling_code = 0;
|
||||
int ehca_mr_largepage = 0;
|
||||
int ehca_mr_largepage = 1;
|
||||
|
||||
module_param_named(open_aqp1, ehca_open_aqp1, int, S_IRUGO);
|
||||
module_param_named(debug_level, ehca_debug_level, int, S_IRUGO);
|
||||
@ -260,13 +260,20 @@ static struct cap_descr {
|
||||
{ HCA_CAP_MINI_QP, "HCA_CAP_MINI_QP" },
|
||||
};
|
||||
|
||||
int ehca_sense_attributes(struct ehca_shca *shca)
|
||||
static int ehca_sense_attributes(struct ehca_shca *shca)
|
||||
{
|
||||
int i, ret = 0;
|
||||
u64 h_ret;
|
||||
struct hipz_query_hca *rblock;
|
||||
struct hipz_query_port *port;
|
||||
|
||||
static const u32 pgsize_map[] = {
|
||||
HCA_CAP_MR_PGSIZE_4K, 0x1000,
|
||||
HCA_CAP_MR_PGSIZE_64K, 0x10000,
|
||||
HCA_CAP_MR_PGSIZE_1M, 0x100000,
|
||||
HCA_CAP_MR_PGSIZE_16M, 0x1000000,
|
||||
};
|
||||
|
||||
rblock = ehca_alloc_fw_ctrlblock(GFP_KERNEL);
|
||||
if (!rblock) {
|
||||
ehca_gen_err("Cannot allocate rblock memory.");
|
||||
@ -329,8 +336,15 @@ int ehca_sense_attributes(struct ehca_shca *shca)
|
||||
if (EHCA_BMASK_GET(hca_cap_descr[i].mask, shca->hca_cap))
|
||||
ehca_gen_dbg(" %s", hca_cap_descr[i].descr);
|
||||
|
||||
shca->hca_cap_mr_pgsize = rblock->memory_page_size_supported;
|
||||
/* translate supported MR page sizes; always support 4K */
|
||||
shca->hca_cap_mr_pgsize = EHCA_PAGESIZE;
|
||||
if (ehca_mr_largepage) { /* support extra sizes only if enabled */
|
||||
for (i = 0; i < ARRAY_SIZE(pgsize_map); i += 2)
|
||||
if (rblock->memory_page_size_supported & pgsize_map[i])
|
||||
shca->hca_cap_mr_pgsize |= pgsize_map[i + 1];
|
||||
}
|
||||
|
||||
/* query max MTU from first port -- it's the same for all ports */
|
||||
port = (struct hipz_query_port *)rblock;
|
||||
h_ret = hipz_h_query_port(shca->ipz_hca_handle, 1, port);
|
||||
if (h_ret != H_SUCCESS) {
|
||||
|
Reference in New Issue
Block a user