aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 56977097de9f..1646fe7cbd4b 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1630,10 +1630,10 @@ struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost,
1630 /* 1630 /*
1631 * this limit is imposed by hardware restrictions 1631 * this limit is imposed by hardware restrictions
1632 */ 1632 */
1633 blk_queue_max_hw_segments(q, shost->sg_tablesize); 1633 blk_queue_max_segments(q, min_t(unsigned short, shost->sg_tablesize,
1634 blk_queue_max_phys_segments(q, SCSI_MAX_SG_CHAIN_SEGMENTS); 1634 SCSI_MAX_SG_CHAIN_SEGMENTS));
1635 1635
1636 blk_queue_max_sectors(q, shost->max_sectors); 1636 blk_queue_max_hw_sectors(q, shost->max_sectors);
1637 blk_queue_bounce_limit(q, scsi_calculate_bounce_limit(shost)); 1637 blk_queue_bounce_limit(q, scsi_calculate_bounce_limit(shost));
1638 blk_queue_segment_boundary(q, shost->dma_boundary); 1638 blk_queue_segment_boundary(q, shost->dma_boundary);
1639 dma_set_seg_boundary(dev, shost->dma_boundary); 1639 dma_set_seg_boundary(dev, shost->dma_boundary);