scsi: mpt3sas: set an unlimited max_segment_size for SAS 3.0 HBAs

When using a virt_boundary_mask, as done for NVMe devices attached to
mpt3sas controllers, we require an unlimited max_segment_size as the virt
boundary merging code assumes that.  But we also need to propagate that to
the DMA mapping layer to make dma-debug happy.  The SCSI layer takes care
of that when using the per-host virt_boundary setting, but given that
mpt3sas only wants to set the virt_boundary for actual NVMe devices, we
can't rely on that.  The DMA layer maximum segment is global to the HBA
however, so we have to set it explicitly.  This patch assumes that mpt3sas
does not have a segment size limitation, which seems true based on the SGL
format, but will need to be verified.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Christoph Hellwig 2019-06-17 14:19:59 +02:00 committed by Martin K. Petersen
parent 8c175d3131
commit ce0ad85310
1 changed files with 1 additions and 0 deletions

View File

@ -10238,6 +10238,7 @@ static struct scsi_host_template mpt3sas_driver_template = {
.this_id = -1, .this_id = -1,
.sg_tablesize = MPT3SAS_SG_DEPTH, .sg_tablesize = MPT3SAS_SG_DEPTH,
.max_sectors = 32767, .max_sectors = 32767,
.max_segment_size = 0xffffffff,
.cmd_per_lun = 7, .cmd_per_lun = 7,
.shost_attrs = mpt3sas_host_attrs, .shost_attrs = mpt3sas_host_attrs,
.sdev_attrs = mpt3sas_dev_attrs, .sdev_attrs = mpt3sas_dev_attrs,