i40iw: Correct and use size parameter to i40iw_reg_phys_mr
authorMustafa Ismail <mustafa.ismail@intel.com>
Tue, 12 Jul 2016 16:48:40 +0000 (11:48 -0500)
committerDoug Ledford <dledford@redhat.com>
Tue, 2 Aug 2016 18:17:38 +0000 (14:17 -0400)
Fix size parameter passed to i40iw_reg_phys_mr and use it to
register memory.

Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/i40iw/i40iw_verbs.c

index 86c387a2cf4fceda5d02a8db2d4c07e1f101f58f..73c441bbf6acc954c9ced8fe9dda9e979b46adb5 100644 (file)
@@ -1838,6 +1838,7 @@ struct ib_mr *i40iw_reg_phys_mr(struct ib_pd *pd,
        iwmr->ibmr.lkey = stag;
        iwmr->page_cnt = 1;
        iwmr->pgaddrmem[0]  = addr;
+       iwmr->length = size;
        status = i40iw_hwreg_mr(iwdev, iwmr, access);
        if (status) {
                i40iw_free_stag(iwdev, stag);
@@ -1861,7 +1862,7 @@ static struct ib_mr *i40iw_get_dma_mr(struct ib_pd *pd, int acc)
 {
        u64 kva = 0;
 
-       return i40iw_reg_phys_mr(pd, 0, 0xffffffffffULL, acc, &kva);
+       return i40iw_reg_phys_mr(pd, 0, 0, acc, &kva);
 }
 
 /**