diff options
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 9381171c2fc0..11e64b50497f 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -1784,8 +1784,10 @@ void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q) | |||
1784 | blk_queue_max_integrity_segments(q, shost->sg_prot_tablesize); | 1784 | blk_queue_max_integrity_segments(q, shost->sg_prot_tablesize); |
1785 | } | 1785 | } |
1786 | 1786 | ||
1787 | shost->max_sectors = min_t(unsigned int, shost->max_sectors, | 1787 | if (dev->dma_mask) { |
1788 | dma_max_mapping_size(dev) << SECTOR_SHIFT); | 1788 | shost->max_sectors = min_t(unsigned int, shost->max_sectors, |
1789 | dma_max_mapping_size(dev) >> SECTOR_SHIFT); | ||
1790 | } | ||
1789 | blk_queue_max_hw_sectors(q, shost->max_sectors); | 1791 | blk_queue_max_hw_sectors(q, shost->max_sectors); |
1790 | if (shost->unchecked_isa_dma) | 1792 | if (shost->unchecked_isa_dma) |
1791 | blk_queue_bounce_limit(q, BLK_BOUNCE_ISA); | 1793 | blk_queue_bounce_limit(q, BLK_BOUNCE_ISA); |