Commit f2e9bd70 authored by Marciniszyn, Mike's avatar Marciniszyn, Mike Committed by David S. Miller

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: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent af9b078e
...@@ -339,8 +339,8 @@ static int rds_ib_recv_refill_one(struct rds_connection *conn, ...@@ -339,8 +339,8 @@ static int rds_ib_recv_refill_one(struct rds_connection *conn,
sge->length = sizeof(struct rds_header); sge->length = sizeof(struct rds_header);
sge = &recv->r_sge[1]; sge = &recv->r_sge[1];
sge->addr = sg_dma_address(&recv->r_frag->f_sg); sge->addr = ib_sg_dma_address(ic->i_cm_id->device, &recv->r_frag->f_sg);
sge->length = sg_dma_len(&recv->r_frag->f_sg); sge->length = ib_sg_dma_len(ic->i_cm_id->device, &recv->r_frag->f_sg);
ret = 0; ret = 0;
out: out:
...@@ -381,7 +381,10 @@ void rds_ib_recv_refill(struct rds_connection *conn, int prefill) ...@@ -381,7 +381,10 @@ void rds_ib_recv_refill(struct rds_connection *conn, int prefill)
ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, &failed_wr); ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, &failed_wr);
rdsdebug("recv %p ibinc %p page %p addr %lu ret %d\n", recv, rdsdebug("recv %p ibinc %p page %p addr %lu ret %d\n", recv,
recv->r_ibinc, sg_page(&recv->r_frag->f_sg), recv->r_ibinc, sg_page(&recv->r_frag->f_sg),
(long) sg_dma_address(&recv->r_frag->f_sg), ret); (long) ib_sg_dma_address(
ic->i_cm_id->device,
&recv->r_frag->f_sg),
ret);
if (ret) { if (ret) {
rds_ib_conn_error(conn, "recv post on " rds_ib_conn_error(conn, "recv post on "
"%pI4 returned %d, disconnecting and " "%pI4 returned %d, disconnecting and "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment