diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c 
b/drivers/infiniband/ulp/iser/iscsi_iser.c
index 56848232eb81..2984a366dd7d 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -653,6 +653,7 @@ iscsi_iser_session_create(struct iscsi_endpoint *ep,
                                                   SHOST_DIX_GUARD_CRC);
                }
+ shost->max_segment_size = ib_dma_max_seg_size(ib_dev);
                if (!(ib_dev->attrs.device_cap_flags & IB_DEVICE_SG_GAPS_REG))
                        shost->virt_boundary_mask = ~MASK_4K;

We only really need this settings in the IB_DEVICE_SG_GAPS_REG case,
as the segement size is unlimited on the PRP-like scheme used by the
other MR types anyway, and set as such by the block layer.  I.e.g this
should become:

                if (ib_dev->attrs.device_cap_flags & IB_DEVICE_SG_GAPS_REG)
                        shost->max_segment_size = ib_dma_max_seg_size(ib_dev);
                else
                        shost->virt_boundary_mask = ~MASK_4K;

Not sure I understand.

max_segment_size and virt_boundary_mask are related how?

Reply via email to