summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtrdma/fmr_ops.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2016-06-29 19:53:27 +0200
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-07-11 21:50:43 +0200
commitb54054ca5590f59469437fc4a78a978edcb01c31 (patch)
tree2523f55eee453aa189fa0fa8a482ee1ab35f695c /net/sunrpc/xprtrdma/fmr_ops.c
parentxprtrdma: Remove rpcrdma_map_one() and friends (diff)
downloadlinux-b54054ca5590f59469437fc4a78a978edcb01c31.tar.xz
linux-b54054ca5590f59469437fc4a78a978edcb01c31.zip
xprtrdma: Clean up device capability detection
Clean up: Move device capability detection into memreg-specific source files. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/fmr_ops.c')
-rw-r--r--net/sunrpc/xprtrdma/fmr_ops.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/sunrpc/xprtrdma/fmr_ops.c b/net/sunrpc/xprtrdma/fmr_ops.c
index 6c4527b6c3ca..8b6ce8ebe60f 100644
--- a/net/sunrpc/xprtrdma/fmr_ops.c
+++ b/net/sunrpc/xprtrdma/fmr_ops.c
@@ -34,6 +34,17 @@ enum {
IB_ACCESS_REMOTE_READ,
};
+bool
+fmr_is_supported(struct rpcrdma_ia *ia)
+{
+ if (!ia->ri_device->alloc_fmr) {
+ pr_info("rpcrdma: 'fmr' mode is not supported by device %s\n",
+ ia->ri_device->name);
+ return false;
+ }
+ return true;
+}
+
static int
__fmr_init(struct rpcrdma_mw *mw, struct ib_pd *pd)
{