]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/rds/ib.c
Merge tag 'powerpc-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
[linux.git] / net / rds / ib.c
index 3fd5f40189bd4ed908c5baeea5e0d83dc121e9b5..a792d8a3872aca5b835d7bca66cf12a6859cc7eb 100644 (file)
@@ -156,6 +156,13 @@ static void rds_ib_add_one(struct ib_device *device)
        has_fmr = (device->ops.alloc_fmr && device->ops.dealloc_fmr &&
                   device->ops.map_phys_fmr && device->ops.unmap_fmr);
        rds_ibdev->use_fastreg = (has_fr && !has_fmr);
+       rds_ibdev->odp_capable =
+               !!(device->attrs.device_cap_flags &
+                  IB_DEVICE_ON_DEMAND_PAGING) &&
+               !!(device->attrs.odp_caps.per_transport_caps.rc_odp_caps &
+                  IB_ODP_SUPPORT_WRITE) &&
+               !!(device->attrs.odp_caps.per_transport_caps.rc_odp_caps &
+                  IB_ODP_SUPPORT_READ);
 
        rds_ibdev->fmr_max_remaps = device->attrs.max_map_per_fmr?: 32;
        rds_ibdev->max_1m_mrs = device->attrs.max_mr ?