From 50c2e9107f176a82e14567b39c5d0f2a208cc82c Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 13 Dec 2018 16:17:03 +0100 Subject: 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 Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen --- include/scsi/scsi_host.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') 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 @@ -364,6 +364,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. -- cgit v1.2.3