Target/iser: Use Fastreg only if device supports signature
authorSagi Grimberg <sagig@mellanox.com>
Thu, 27 Mar 2014 17:22:25 +0000 (19:22 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 7 Apr 2014 08:48:52 +0000 (01:48 -0700)
Fastreg is mandatory for signature, so if the
device doesn't support it we don't need to use it.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/infiniband/ulp/isert/ib_isert.c

index f7801aeb7628799aae0001c87beb4c775cfe55b9..f5cc4affaeb4d573c506f9aec26c2968346d9140 100644 (file)
@@ -231,7 +231,8 @@ isert_create_device_ib_res(struct isert_device *device)
                return ret;
 
        /* asign function handlers */
-       if (dev_attr->device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS) {
+       if (dev_attr->device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS &&
+           dev_attr->device_cap_flags & IB_DEVICE_SIGNATURE_HANDOVER) {
                device->use_fastreg = 1;
                device->reg_rdma_mem = isert_reg_rdma;
                device->unreg_rdma_mem = isert_unreg_rdma;