Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma

Pull rdma fixes from Jason Gunthorpe:
"First RDMA subsystem updates for 5.5-rc. A very small set of fixes,
most people seem to still be recovering from December!

Five small driver fixes:

- Fix error flow with MR allocation in bnxt_re

- An errata work around for bnxt_re

- Misuse of the workqueue API in hfi1

- Protocol error in hfi1

- Regression in 5.5 related to the mmap rework with i40iw"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
i40iw: Remove setting of VMA private data and use rdma_user_mmap_io
IB/hfi1: Adjust flow PSN with the correct resync_psn
IB/hfi1: Don't cancel unused work item
RDMA/bnxt_re: Fix Send Work Entry state check while polling completions
RDMA/bnxt_re: Avoid freeing MR resources if dereg fails

+27 -16
+3 -1
drivers/infiniband/hw/bnxt_re/ib_verbs.c
··· 3305 3305 int rc; 3306 3306 3307 3307 rc = bnxt_qplib_free_mrw(&rdev->qplib_res, &mr->qplib_mr); 3308 - if (rc) 3308 + if (rc) { 3309 3309 dev_err(rdev_to_dev(rdev), "Dereg MR failed: %#x\n", rc); 3310 + return rc; 3311 + } 3310 3312 3311 3313 if (mr->pages) { 3312 3314 rc = bnxt_qplib_free_fast_reg_page_list(&rdev->qplib_res,
+6 -6
drivers/infiniband/hw/bnxt_re/qplib_fp.c
··· 2283 2283 /* Add qp to flush list of the CQ */ 2284 2284 bnxt_qplib_add_flush_qp(qp); 2285 2285 } else { 2286 + /* Before we complete, do WA 9060 */ 2287 + if (do_wa9060(qp, cq, cq_cons, sw_sq_cons, 2288 + cqe_sq_cons)) { 2289 + *lib_qp = qp; 2290 + goto out; 2291 + } 2286 2292 if (swq->flags & SQ_SEND_FLAGS_SIGNAL_COMP) { 2287 - /* Before we complete, do WA 9060 */ 2288 - if (do_wa9060(qp, cq, cq_cons, sw_sq_cons, 2289 - cqe_sq_cons)) { 2290 - *lib_qp = qp; 2291 - goto out; 2292 - } 2293 2293 cqe->status = CQ_REQ_STATUS_OK; 2294 2294 cqe++; 2295 2295 (*budget)--;
+3 -1
drivers/infiniband/hw/hfi1/iowait.c
··· 81 81 void iowait_cancel_work(struct iowait *w) 82 82 { 83 83 cancel_work_sync(&iowait_get_ib_work(w)->iowork); 84 - cancel_work_sync(&iowait_get_tid_work(w)->iowork); 84 + /* Make sure that the iowork for TID RDMA is used */ 85 + if (iowait_get_tid_work(w)->iowork.func) 86 + cancel_work_sync(&iowait_get_tid_work(w)->iowork); 85 87 } 86 88 87 89 /**
+9
drivers/infiniband/hw/hfi1/tid_rdma.c
··· 4633 4633 */ 4634 4634 fpsn = full_flow_psn(flow, flow->flow_state.spsn); 4635 4635 req->r_ack_psn = psn; 4636 + /* 4637 + * If resync_psn points to the last flow PSN for a 4638 + * segment and the new segment (likely from a new 4639 + * request) starts with a new generation number, we 4640 + * need to adjust resync_psn accordingly. 4641 + */ 4642 + if (flow->flow_state.generation != 4643 + (resync_psn >> HFI1_KDETH_BTH_SEQ_SHIFT)) 4644 + resync_psn = mask_psn(fpsn - 1); 4636 4645 flow->resync_npkts += 4637 4646 delta_psn(mask_psn(resync_psn + 1), fpsn); 4638 4647 /*
+6 -8
drivers/infiniband/hw/i40iw/i40iw_verbs.c
··· 169 169 static int i40iw_mmap(struct ib_ucontext *context, struct vm_area_struct *vma) 170 170 { 171 171 struct i40iw_ucontext *ucontext; 172 - u64 db_addr_offset; 173 - u64 push_offset; 172 + u64 db_addr_offset, push_offset, pfn; 174 173 175 174 ucontext = to_ucontext(context); 176 175 if (ucontext->iwdev->sc_dev.is_pf) { ··· 188 189 189 190 if (vma->vm_pgoff == (db_addr_offset >> PAGE_SHIFT)) { 190 191 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); 191 - vma->vm_private_data = ucontext; 192 192 } else { 193 193 if ((vma->vm_pgoff - (push_offset >> PAGE_SHIFT)) % 2) 194 194 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); ··· 195 197 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); 196 198 } 197 199 198 - if (io_remap_pfn_range(vma, vma->vm_start, 199 - vma->vm_pgoff + (pci_resource_start(ucontext->iwdev->ldev->pcidev, 0) >> PAGE_SHIFT), 200 - PAGE_SIZE, vma->vm_page_prot)) 201 - return -EAGAIN; 200 + pfn = vma->vm_pgoff + 201 + (pci_resource_start(ucontext->iwdev->ldev->pcidev, 0) >> 202 + PAGE_SHIFT); 202 203 203 - return 0; 204 + return rdma_user_mmap_io(context, vma, pfn, PAGE_SIZE, 205 + vma->vm_page_prot, NULL); 204 206 } 205 207 206 208 /**