diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_mr.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_mr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_mr.c b/drivers/infiniband/hw/ipath/ipath_mr.c index a0673c1eef71..8cc8598d6c69 100644 --- a/drivers/infiniband/hw/ipath/ipath_mr.c +++ b/drivers/infiniband/hw/ipath/ipath_mr.c | |||
@@ -54,6 +54,8 @@ static inline struct ipath_fmr *to_ifmr(struct ib_fmr *ibfmr) | |||
54 | * @acc: access flags | 54 | * @acc: access flags |
55 | * | 55 | * |
56 | * Returns the memory region on success, otherwise returns an errno. | 56 | * Returns the memory region on success, otherwise returns an errno. |
57 | * Note that all DMA addresses should be created via the | ||
58 | * struct ib_dma_mapping_ops functions (see ipath_dma.c). | ||
57 | */ | 59 | */ |
58 | struct ib_mr *ipath_get_dma_mr(struct ib_pd *pd, int acc) | 60 | struct ib_mr *ipath_get_dma_mr(struct ib_pd *pd, int acc) |
59 | { | 61 | { |
@@ -149,8 +151,7 @@ struct ib_mr *ipath_reg_phys_mr(struct ib_pd *pd, | |||
149 | m = 0; | 151 | m = 0; |
150 | n = 0; | 152 | n = 0; |
151 | for (i = 0; i < num_phys_buf; i++) { | 153 | for (i = 0; i < num_phys_buf; i++) { |
152 | mr->mr.map[m]->segs[n].vaddr = | 154 | mr->mr.map[m]->segs[n].vaddr = (void *) buffer_list[i].addr; |
153 | phys_to_virt(buffer_list[i].addr); | ||
154 | mr->mr.map[m]->segs[n].length = buffer_list[i].size; | 155 | mr->mr.map[m]->segs[n].length = buffer_list[i].size; |
155 | mr->mr.length += buffer_list[i].size; | 156 | mr->mr.length += buffer_list[i].size; |
156 | n++; | 157 | n++; |
@@ -347,7 +348,7 @@ int ipath_map_phys_fmr(struct ib_fmr *ibfmr, u64 * page_list, | |||
347 | n = 0; | 348 | n = 0; |
348 | ps = 1 << fmr->page_shift; | 349 | ps = 1 << fmr->page_shift; |
349 | for (i = 0; i < list_len; i++) { | 350 | for (i = 0; i < list_len; i++) { |
350 | fmr->mr.map[m]->segs[n].vaddr = phys_to_virt(page_list[i]); | 351 | fmr->mr.map[m]->segs[n].vaddr = (void *) page_list[i]; |
351 | fmr->mr.map[m]->segs[n].length = ps; | 352 | fmr->mr.map[m]->segs[n].length = ps; |
352 | if (++n == IPATH_SEGSZ) { | 353 | if (++n == IPATH_SEGSZ) { |
353 | m++; | 354 | m++; |