if the lld does not explicitly sets this, scsi takes BLK_MAX_SEGMENT_SIZE and sets it using dma_set_max_seg_size(). In our case, this will affect all the rdma device consumers. Fix it by setting shost max_segment_size according to the device capability. Reported-by: Jason Gunthorpe <jgg@xxxxxxxx> Signed-off-by: Sagi Grimberg <sagi@xxxxxxxxxxx> --- This goes on top of hch patchset: "properly communicate queue limits to the DMA layer" Normally this should go through the rdma tree, so we can either get it through jens with hch patchset. Alternatively this is a fix that should go to rc anyways? drivers/infiniband/ulp/iser/iscsi_iser.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.17.1