]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/scsi/scsi_lib.c
iommu sg merging: call blk_queue_segment_boundary in __scsi_alloc_queue
[karo-tx-linux.git] / drivers / scsi / scsi_lib.c
index b12fb310e3999af497c21778b62f40c46892e8fd..68e424f09acb567caa8fba80ebe7e37abc8c7f12 100644 (file)
@@ -1569,6 +1569,7 @@ struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost,
                                         request_fn_proc *request_fn)
 {
        struct request_queue *q;
+       struct device *dev = shost->shost_gendev.parent;
 
        q = blk_init_queue(request_fn, NULL);
        if (!q)
@@ -1584,6 +1585,8 @@ struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost,
        blk_queue_bounce_limit(q, scsi_calculate_bounce_limit(shost));
        blk_queue_segment_boundary(q, shost->dma_boundary);
 
+       blk_queue_max_segment_size(q, dma_get_max_seg_size(dev));
+
        if (!shost->use_clustering)
                clear_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);