]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/infiniband/ulp/srp/ib_srp.c
IB/SRP: Avoid using IB_MR_TYPE_SG_GAPS
[linux.git] / drivers / infiniband / ulp / srp / ib_srp.c
index 79bf48477ddb104097471a7a6040bcef2dfa0533..6e4467150049365c2bad34b9e2a1bd37692f552d 100644 (file)
@@ -371,7 +371,6 @@ static struct srp_fr_pool *srp_create_fr_pool(struct ib_device *device,
        struct srp_fr_desc *d;
        struct ib_mr *mr;
        int i, ret = -EINVAL;
-       enum ib_mr_type mr_type;
 
        if (pool_size <= 0)
                goto err;
@@ -385,13 +384,9 @@ static struct srp_fr_pool *srp_create_fr_pool(struct ib_device *device,
        spin_lock_init(&pool->lock);
        INIT_LIST_HEAD(&pool->free_list);
 
-       if (device->attrs.device_cap_flags & IB_DEVICE_SG_GAPS_REG)
-               mr_type = IB_MR_TYPE_SG_GAPS;
-       else
-               mr_type = IB_MR_TYPE_MEM_REG;
-
        for (i = 0, d = &pool->desc[0]; i < pool->size; i++, d++) {
-               mr = ib_alloc_mr(pd, mr_type, max_page_list_len);
+               mr = ib_alloc_mr(pd, IB_MR_TYPE_MEM_REG,
+                                max_page_list_len);
                if (IS_ERR(mr)) {
                        ret = PTR_ERR(mr);
                        if (ret == -ENOMEM)
@@ -2664,9 +2659,8 @@ static int srp_slave_alloc(struct scsi_device *sdev)
        struct Scsi_Host *shost = sdev->host;
        struct srp_target_port *target = host_to_target(shost);
        struct srp_device *srp_dev = target->srp_host->srp_dev;
-       struct ib_device *ibdev = srp_dev->dev;
 
-       if (!(ibdev->attrs.device_cap_flags & IB_DEVICE_SG_GAPS_REG))
+       if (true)
                blk_queue_virt_boundary(sdev->request_queue,
                                        ~srp_dev->mr_page_mask);