scsi_add_host sets shost_gendev.parent->max_segment_size to enables iommu code to merge sg lists properly about lld's max segment size limit. Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> --- drivers/scsi/hosts.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 22877d3..a71a836 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -206,6 +206,9 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev) if (!shost->shost_gendev.parent) shost->shost_gendev.parent = dev ? dev : &platform_bus; + if (dev) + dev->max_segment_size = shost->dma_max_segment_size; + error = device_add(&shost->shost_gendev); if (error) goto out; -- 1.5.2.4 - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html