diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2016-02-29 20:07:34 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-04 19:59:35 +0300 |
commit | 318d311e8f016dbbf22160d7b1c19a290a95ad9d (patch) | |
tree | 478975535990d19af8c5da05469acea3a2c49d0e /drivers/infiniband/ulp/iser/iscsi_iser.c | |
parent | b005d316471374b1ff26df8c8460cc1ea9186647 (diff) | |
download | linux-318d311e8f016dbbf22160d7b1c19a290a95ad9d.tar.xz |
iser: Accept arbitrary sg lists mapping if the device supports it
If the device support arbitrary sg list mapping (device cap
IB_DEVICE_SG_GAPS_REG set) we allocate the memory regions with
IB_MR_TYPE_SG_GAPS and allow the block layer to pass us
gaps by skip setting the queue virt_boundary.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iscsi_iser.c')
-rw-r--r-- | drivers/infiniband/ulp/iser/iscsi_iser.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index c827c93f46c5..80b6bedc172f 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c @@ -969,7 +969,16 @@ static umode_t iser_attr_is_visible(int param_type, int param) static int iscsi_iser_slave_alloc(struct scsi_device *sdev) { - blk_queue_virt_boundary(sdev->request_queue, ~MASK_4K); + struct iscsi_session *session; + struct iser_conn *iser_conn; + struct ib_device *ib_dev; + + session = starget_to_session(scsi_target(sdev))->dd_data; + iser_conn = session->leadconn->dd_data; + ib_dev = iser_conn->ib_conn.device->ib_device; + + if (!(ib_dev->attrs.device_cap_flags & IB_DEVICE_SG_GAPS_REG)) + blk_queue_virt_boundary(sdev->request_queue, ~MASK_4K); return 0; } |