summaryrefslogtreecommitdiff
path: root/include/scsi
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-12-13 18:17:03 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-12-19 07:13:12 +0300
commit50c2e9107f176a82e14567b39c5d0f2a208cc82c (patch)
tree94cdec8e5724b7fb66f0781bcf6a4360653b097e /include/scsi
parent2a3d4eb8e228061c09d5ca8bf39e7f00c2091213 (diff)
downloadlinux-50c2e9107f176a82e14567b39c5d0f2a208cc82c.tar.xz
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>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_host.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 7dc534c794dc..834204681ca3 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -365,6 +365,11 @@ struct scsi_host_template {
unsigned int max_sectors;
/*
+ * Maximum size in bytes of a single segment.
+ */
+ unsigned int max_segment_size;
+
+ /*
* DMA scatter gather segment boundary limit. A segment crossing this
* boundary will be split in two.
*/
@@ -603,6 +608,7 @@ struct Scsi_Host {
short unsigned int sg_tablesize;
short unsigned int sg_prot_tablesize;
unsigned int max_sectors;
+ unsigned int max_segment_size;
unsigned long dma_boundary;
/*
* In scsi-mq mode, the number of hardware queues supported by the LLD.