aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-05-13 19:31:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-13 19:31:12 -0400
commitc98861f7de20fa982de0b5bbe01628414d7a7fbf (patch)
treee93ad89fbe9eb136867670e7368aeba6ebd1fb2e /drivers/infiniband/hw
parent0a40a55fd1fde3875769025ee8a4a7059c7a042d (diff)
parent8be741b0ac8e8857fb64da269e81da8a131377bb (diff)
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: IB/mlx4: Don't overwrite fast registration page list when posting work request RDMA/cxgb3: Don't complete flushed send work requests twice
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/cxgb3/cxio_hal.c1
-rw-r--r--drivers/infiniband/hw/mlx4/mlx4_ib.h1
-rw-r--r--drivers/infiniband/hw/mlx4/mr.c10
-rw-r--r--drivers/infiniband/hw/mlx4/qp.c2
4 files changed, 11 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.c b/drivers/infiniband/hw/cxgb3/cxio_hal.c
index 8d71086f5a1c..62f9cf2f94ec 100644
--- a/drivers/infiniband/hw/cxgb3/cxio_hal.c
+++ b/drivers/infiniband/hw/cxgb3/cxio_hal.c
@@ -410,6 +410,7 @@ int cxio_flush_sq(struct t3_wq *wq, struct t3_cq *cq, int count)
410 ptr = wq->sq_rptr + count; 410 ptr = wq->sq_rptr + count;
411 sqp = wq->sq + Q_PTR2IDX(ptr, wq->sq_size_log2); 411 sqp = wq->sq + Q_PTR2IDX(ptr, wq->sq_size_log2);
412 while (ptr != wq->sq_wptr) { 412 while (ptr != wq->sq_wptr) {
413 sqp->signaled = 0;
413 insert_sq_cqe(wq, cq, sqp); 414 insert_sq_cqe(wq, cq, sqp);
414 ptr++; 415 ptr++;
415 sqp = wq->sq + Q_PTR2IDX(ptr, wq->sq_size_log2); 416 sqp = wq->sq + Q_PTR2IDX(ptr, wq->sq_size_log2);
diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h
index 9974e886b8de..8a7dd6795fa0 100644
--- a/drivers/infiniband/hw/mlx4/mlx4_ib.h
+++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h
@@ -86,6 +86,7 @@ struct mlx4_ib_mr {
86 86
87struct mlx4_ib_fast_reg_page_list { 87struct mlx4_ib_fast_reg_page_list {
88 struct ib_fast_reg_page_list ibfrpl; 88 struct ib_fast_reg_page_list ibfrpl;
89 __be64 *mapped_page_list;
89 dma_addr_t map; 90 dma_addr_t map;
90}; 91};
91 92
diff --git a/drivers/infiniband/hw/mlx4/mr.c b/drivers/infiniband/hw/mlx4/mr.c
index 8e4d26d56a95..8f3666b20ea4 100644
--- a/drivers/infiniband/hw/mlx4/mr.c
+++ b/drivers/infiniband/hw/mlx4/mr.c
@@ -231,7 +231,11 @@ struct ib_fast_reg_page_list *mlx4_ib_alloc_fast_reg_page_list(struct ib_device
231 if (!mfrpl) 231 if (!mfrpl)
232 return ERR_PTR(-ENOMEM); 232 return ERR_PTR(-ENOMEM);
233 233
234 mfrpl->ibfrpl.page_list = dma_alloc_coherent(&dev->dev->pdev->dev, 234 mfrpl->ibfrpl.page_list = kmalloc(size, GFP_KERNEL);
235 if (!mfrpl->ibfrpl.page_list)
236 goto err_free;
237
238 mfrpl->mapped_page_list = dma_alloc_coherent(&dev->dev->pdev->dev,
235 size, &mfrpl->map, 239 size, &mfrpl->map,
236 GFP_KERNEL); 240 GFP_KERNEL);
237 if (!mfrpl->ibfrpl.page_list) 241 if (!mfrpl->ibfrpl.page_list)
@@ -242,6 +246,7 @@ struct ib_fast_reg_page_list *mlx4_ib_alloc_fast_reg_page_list(struct ib_device
242 return &mfrpl->ibfrpl; 246 return &mfrpl->ibfrpl;
243 247
244err_free: 248err_free:
249 kfree(mfrpl->ibfrpl.page_list);
245 kfree(mfrpl); 250 kfree(mfrpl);
246 return ERR_PTR(-ENOMEM); 251 return ERR_PTR(-ENOMEM);
247} 252}
@@ -252,8 +257,9 @@ void mlx4_ib_free_fast_reg_page_list(struct ib_fast_reg_page_list *page_list)
252 struct mlx4_ib_fast_reg_page_list *mfrpl = to_mfrpl(page_list); 257 struct mlx4_ib_fast_reg_page_list *mfrpl = to_mfrpl(page_list);
253 int size = page_list->max_page_list_len * sizeof (u64); 258 int size = page_list->max_page_list_len * sizeof (u64);
254 259
255 dma_free_coherent(&dev->dev->pdev->dev, size, page_list->page_list, 260 dma_free_coherent(&dev->dev->pdev->dev, size, mfrpl->mapped_page_list,
256 mfrpl->map); 261 mfrpl->map);
262 kfree(mfrpl->ibfrpl.page_list);
257 kfree(mfrpl); 263 kfree(mfrpl);
258} 264}
259 265
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index f385a24d31d2..20724aee76f4 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1365,7 +1365,7 @@ static void set_fmr_seg(struct mlx4_wqe_fmr_seg *fseg, struct ib_send_wr *wr)
1365 int i; 1365 int i;
1366 1366
1367 for (i = 0; i < wr->wr.fast_reg.page_list_len; ++i) 1367 for (i = 0; i < wr->wr.fast_reg.page_list_len; ++i)
1368 wr->wr.fast_reg.page_list->page_list[i] = 1368 mfrpl->mapped_page_list[i] =
1369 cpu_to_be64(wr->wr.fast_reg.page_list->page_list[i] | 1369 cpu_to_be64(wr->wr.fast_reg.page_list->page_list[i] |
1370 MLX4_MTT_FLAG_PRESENT); 1370 MLX4_MTT_FLAG_PRESENT);
1371 1371