diff options
author | Marciniszyn, Mike <mike.marciniszyn@intel.com> | 2012-12-21 03:01:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-26 18:17:37 -0500 |
commit | f2e9bd70327d788011cf787a51ceba5925bbc63a (patch) | |
tree | af2b58950283f0bf49b9f725dd30ab306d28a610 /net | |
parent | af9b078e354614fad1e2e0cef04e216ae37cc389 (diff) |
IB/rds: Correct ib_api use with gs_dma_address/sg_dma_len
0b088e00 ("RDS: Use page_remainder_alloc() for recv bufs")
added uses of sg_dma_len() and sg_dma_address(). This makes
RDS DOA with the qib driver.
IB ulps should use ib_sg_dma_len() and ib_sg_dma_address
respectively since some HCAs overload ib_sg_dma* operations.
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/rds/ib_recv.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c index 8c5bc857f04d..8eb9501e3d60 100644 --- a/net/rds/ib_recv.c +++ b/net/rds/ib_recv.c | |||
@@ -339,8 +339,8 @@ static int rds_ib_recv_refill_one(struct rds_connection *conn, | |||
339 | sge->length = sizeof(struct rds_header); | 339 | sge->length = sizeof(struct rds_header); |
340 | 340 | ||
341 | sge = &recv->r_sge[1]; | 341 | sge = &recv->r_sge[1]; |
342 | sge->addr = sg_dma_address(&recv->r_frag->f_sg); | 342 | sge->addr = ib_sg_dma_address(ic->i_cm_id->device, &recv->r_frag->f_sg); |
343 | sge->length = sg_dma_len(&recv->r_frag->f_sg); | 343 | sge->length = ib_sg_dma_len(ic->i_cm_id->device, &recv->r_frag->f_sg); |
344 | 344 | ||
345 | ret = 0; | 345 | ret = 0; |
346 | out: | 346 | out: |
@@ -381,7 +381,10 @@ void rds_ib_recv_refill(struct rds_connection *conn, int prefill) | |||
381 | ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, &failed_wr); | 381 | ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, &failed_wr); |
382 | rdsdebug("recv %p ibinc %p page %p addr %lu ret %d\n", recv, | 382 | rdsdebug("recv %p ibinc %p page %p addr %lu ret %d\n", recv, |
383 | recv->r_ibinc, sg_page(&recv->r_frag->f_sg), | 383 | recv->r_ibinc, sg_page(&recv->r_frag->f_sg), |
384 | (long) sg_dma_address(&recv->r_frag->f_sg), ret); | 384 | (long) ib_sg_dma_address( |
385 | ic->i_cm_id->device, | ||
386 | &recv->r_frag->f_sg), | ||
387 | ret); | ||
385 | if (ret) { | 388 | if (ret) { |
386 | rds_ib_conn_error(conn, "recv post on " | 389 | rds_ib_conn_error(conn, "recv post on " |
387 | "%pI4 returned %d, disconnecting and " | 390 | "%pI4 returned %d, disconnecting and " |