summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hosts.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-17 14:19:53 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2019-07-17 05:01:49 +0200
commit7ad388d8e4c703980b7018b938cdeec58832d78d (patch)
tree26c50ab746ca4a8139179ee043beaa413ffe0558 /drivers/scsi/hosts.c
parentscsi: core: Fix race on creating sense cache (diff)
downloadlinux-7ad388d8e4c703980b7018b938cdeec58832d78d.tar.xz
linux-7ad388d8e4c703980b7018b938cdeec58832d78d.zip
scsi: core: add a host / host template field for the virt boundary
This allows drivers setting it up easily instead of branching out to block layer calls in slave_alloc, and ensures the upgraded max_segment_size setting gets picked up by the DMA layer. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Kashyap Desai < kashyap.desai@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r--drivers/scsi/hosts.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 96ed24841c33..f98509d717a0 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -462,6 +462,9 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
else
shost->dma_boundary = 0xffffffff;
+ if (sht->virt_boundary_mask)
+ shost->virt_boundary_mask = sht->virt_boundary_mask;
+
device_initialize(&shost->shost_gendev);
dev_set_name(&shost->shost_gendev, "host%d", shost->host_no);
shost->shost_gendev.bus = &scsi_bus_type;