block: Consolidate phys_segment and hw_segment limits
Except for SCSI no device drivers distinguish between physical and hardware segment limits. Consolidate the two into a single segment limit. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:

committed by
Jens Axboe

parent
086fa5ff08
commit
8a78362c4e
@@ -1624,8 +1624,8 @@ struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost,
|
||||
/*
|
||||
* this limit is imposed by hardware restrictions
|
||||
*/
|
||||
blk_queue_max_hw_segments(q, shost->sg_tablesize);
|
||||
blk_queue_max_phys_segments(q, SCSI_MAX_SG_CHAIN_SEGMENTS);
|
||||
blk_queue_max_segments(q, min_t(unsigned short, shost->sg_tablesize,
|
||||
SCSI_MAX_SG_CHAIN_SEGMENTS));
|
||||
|
||||
blk_queue_max_hw_sectors(q, shost->max_sectors);
|
||||
blk_queue_bounce_limit(q, scsi_calculate_bounce_limit(shost));
|
||||
|
Reference in New Issue
Block a user