scsi: introduce a max_segment_size host_template parameters
This allows the host driver to indicate the maximum supported segment size in a nice an easy way, so that the driver doesn't have to worry about DMA-layer imposed limitations. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
2a3d4eb8e2
commit
50c2e9107f
@@ -464,6 +464,11 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
|
||||
else
|
||||
shost->max_sectors = SCSI_DEFAULT_MAX_SECTORS;
|
||||
|
||||
if (sht->max_segment_size)
|
||||
shost->max_segment_size = sht->max_segment_size;
|
||||
else
|
||||
shost->max_segment_size = BLK_MAX_SEGMENT_SIZE;
|
||||
|
||||
/*
|
||||
* assume a 4GB boundary, if not set
|
||||
*/
|
||||
|
Reference in New Issue
Block a user