From: Doug Ledford Date: Tue, 22 Dec 2015 22:03:15 +0000 (-0500) Subject: Merge branches '4.5/Or-cleanup' and '4.5/rdma-cq' into k.o/for-4.5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=882f3b3b916a01c703bf7516800a0dca741cd3e7;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge branches '4.5/Or-cleanup' and '4.5/rdma-cq' into k.o/for-4.5 Signed-off-by: Doug Ledford Conflicts: drivers/infiniband/ulp/iser/iser_verbs.c --- 882f3b3b916a01c703bf7516800a0dca741cd3e7 diff --cc drivers/infiniband/ulp/iser/iser_memory.c index 47b47615acc5,76ca09bac806..e64cfa148e64 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c @@@ -67,16 -67,22 +67,21 @@@ static struct iser_reg_ops fmr_ops = .reg_desc_put = iser_reg_desc_put_fmr, }; + void iser_reg_comp(struct ib_cq *cq, struct ib_wc *wc) + { + iser_err_comp(wc, "memreg"); + } + int iser_assign_reg_ops(struct iser_device *device) { - struct ib_device_attr *dev_attr = &device->dev_attr; + struct ib_device *ib_dev = device->ib_device; /* Assign function handles - based on FMR support */ - if (device->ib_device->alloc_fmr && device->ib_device->dealloc_fmr && - device->ib_device->map_phys_fmr && device->ib_device->unmap_fmr) { + if (ib_dev->alloc_fmr && ib_dev->dealloc_fmr && + ib_dev->map_phys_fmr && ib_dev->unmap_fmr) { iser_info("FMR supported, using FMR for registration\n"); device->reg_ops = &fmr_ops; - } else - if (dev_attr->device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS) { + } else if (ib_dev->attrs.device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS) { iser_info("FastReg supported, using FastReg for registration\n"); device->reg_ops = &fastreg_ops; } else { diff --cc drivers/infiniband/ulp/iser/iser_verbs.c index 84b7b07170c7,2f2fc42ca836..5fe40abae3d0 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c @@@ -104,17 -99,10 +93,10 @@@ static int iser_create_device_ib_res(st goto pd_err; for (i = 0; i < device->comps_used; i++) { - struct ib_cq_init_attr cq_attr = {}; struct iser_comp *comp = &device->comps[i]; - comp->device = device; - cq_attr.cqe = max_cqe; - cq_attr.comp_vector = i; - comp->cq = ib_create_cq(ib_dev, - iser_cq_callback, - iser_cq_event_callback, - (void *)comp, - &cq_attr); - comp->cq = ib_alloc_cq(device->ib_device, comp, max_cqe, i, - IB_POLL_SOFTIRQ); ++ comp->cq = ib_alloc_cq(ib_dev, comp, max_cqe, i, ++ IB_POLL_SOFTIRQ); if (IS_ERR(comp->cq)) { comp->cq = NULL; goto cq_err; @@@ -134,11 -116,11 +110,11 @@@ device->mr = ib_get_dma_mr(device->pd, access); if (IS_ERR(device->mr)) - goto dma_mr_err; + goto cq_err; } -- INIT_IB_EVENT_HANDLER(&device->event_handler, device->ib_device, -- iser_event_handler); ++ INIT_IB_EVENT_HANDLER(&device->event_handler, ib_dev, ++ iser_event_handler); if (ib_register_event_handler(&device->event_handler)) goto handler_err; @@@ -455,10 -433,9 +427,9 @@@ void iser_free_fastreg_pool(struct ib_c */ static int iser_create_ib_conn_res(struct ib_conn *ib_conn) { - struct iser_conn *iser_conn = container_of(ib_conn, struct iser_conn, - ib_conn); + struct iser_conn *iser_conn = to_iser_conn(ib_conn); struct iser_device *device; - struct ib_device_attr *dev_attr; + struct ib_device *ib_dev; struct ib_qp_init_attr init_attr; int ret = -ENOMEM; int index, min_index = 0;