summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2009-04-03 15:18:24 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-04-25 18:11:14 -0400
commitd0687be7c7ae21461da4438d5fd059b48487bfe1 (patch)
tree06036d8b604f6470a52a121aecd41f6e4a4cec23 /net
parent091069740304c979f957ceacec39c461d0192158 (diff)
downloadlinux-d0687be7c7ae21461da4438d5fd059b48487bfe1.tar.gz
linux-d0687be7c7ae21461da4438d5fd059b48487bfe1.tar.bz2
linux-d0687be7c7ae21461da4438d5fd059b48487bfe1.zip
svcrdma: Fix dma map direction for rdma read targets
The nfs server rdma transport was mapping rdma read target pages for TO_DEVICE instead of FROM_DEVICE. This causes data corruption on non cache-coherent systems if frmrs are used. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_recvfrom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
index 629a28764da9..42a6f9f20285 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
@@ -265,7 +265,7 @@ static int fast_reg_read_chunks(struct svcxprt_rdma *xprt,
frmr->page_list->page_list[page_no] =
ib_dma_map_single(xprt->sc_cm_id->device,
page_address(rqstp->rq_arg.pages[page_no]),
- PAGE_SIZE, DMA_TO_DEVICE);
+ PAGE_SIZE, DMA_FROM_DEVICE);
if (ib_dma_mapping_error(xprt->sc_cm_id->device,
frmr->page_list->page_list[page_no]))
goto fatal_err;