linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Tucker <tom@ogc.us>
To: trond.myklebust@netapp.com, bfields@fieldses.org
Cc: linux-nfs@vger.kernel.org, swise@ogc.us, tom@ogc.us
Subject: [PATCH 1/4] xprtrdma: Do not truncate iova_start values in frmr registrations.
Date: Tue, 03 Aug 2010 11:45:01 -0500	[thread overview]
Message-ID: <20100803164501.2567.8549.stgit@build.ogc.int> (raw)
In-Reply-To: <20100803164411.2567.31416.stgit@build.ogc.int>

From: Steve Wise <swise@opengridcomputing.com>

A bad cast causes the iova_start, which in this case is a 64b DMA
bus address, to be truncated on 32b systems.  This breaks frmrs on
32b systems.  No cast is needed.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
---

 net/sunrpc/xprtrdma/verbs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 27015c6..3bdbd9f 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -1490,7 +1490,7 @@ rpcrdma_register_frmr_external(struct rpcrdma_mr_seg *seg,
 	memset(&frmr_wr, 0, sizeof frmr_wr);
 	frmr_wr.opcode = IB_WR_FAST_REG_MR;
 	frmr_wr.send_flags = 0;			/* unsignaled */
-	frmr_wr.wr.fast_reg.iova_start = (unsigned long)seg1->mr_dma;
+	frmr_wr.wr.fast_reg.iova_start = seg1->mr_dma;
 	frmr_wr.wr.fast_reg.page_list = seg1->mr_chunk.rl_mw->r.frmr.fr_pgl;
 	frmr_wr.wr.fast_reg.page_list_len = i;
 	frmr_wr.wr.fast_reg.page_shift = PAGE_SHIFT;


  reply	other threads:[~2010-08-03 16:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03 16:44 [PATCH 0/4] nfsrdma: Miscellanseous Bug Fixes Tom Tucker
2010-08-03 16:45 ` Tom Tucker [this message]
2010-08-03 16:45 ` [PATCH 2/4] svcrdma: Change DMA mapping logic to avoid the page_address kernel API Tom Tucker
2010-08-03 16:45 ` [PATCH 3/4] svcrdma: Cleanup DMA unmapping in error paths Tom Tucker
2010-08-03 16:45 ` [PATCH 4/4] rpcrdma: Fix SQ size calculation when memreg is FRMR Tom Tucker
     [not found]   ` <20100803164517.2567.50208.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
2010-08-04  2:40     ` Trond Myklebust
2010-08-04  3:21       ` Tom Tucker
2010-08-04  2:42 ` [PATCH 0/4] nfsrdma: Miscellanseous Bug Fixes Trond Myklebust
2010-08-04  3:24   ` Tom Tucker
2010-08-04  3:26   ` Tom Tucker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100803164501.2567.8549.stgit@build.ogc.int \
    --to=tom@ogc.us \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=swise@ogc.us \
    --cc=trond.myklebust@netapp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).