Skip to contentSkip to conversation

scsi_add_host sets device max_segment_size

PATCH In review FUJITA Tomonori 1 participant 1 message Sep 26, 2007 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 4/5 scsi_add_host sets device max_segment_size

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.

---
 drivers/scsi/hosts.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/scsi/hosts.c +3 -0
index 22877d3..a71a836 100644
@@ -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;
Signature · 1 line
1.5.2.4