path: root/drivers/scsi/megaraid/megaraid_sas_base.c
diff options
authorChristoph Hellwig <hch@lst.de>2019-06-17 14:20:00 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2019-07-16 23:02:11 -0400
commit07d9aa14346489d6facae5777ceb267a1dcadbc5 (patch)
treec9c41fa493ee288733a8603f34e67d936b9df471 /drivers/scsi/megaraid/megaraid_sas_base.c
parentscsi: mpt3sas: set an unlimited max_segment_size for SAS 3.0 HBAs (diff)
scsi: megaraid_sas: set an unlimited max_segment_size
When using a virt_boundary_mask, as done for NVMe devices attached to megaraid_sas 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 megaraid_sas 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 megaraid_sas 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> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 8b0dc0795f64..178f8e20ee9a 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -3356,6 +3356,7 @@ static struct scsi_host_template megasas_template = {
.shost_attrs = megaraid_host_attrs,
.bios_param = megasas_bios_param,
.change_queue_depth = scsi_change_queue_depth,
+ .max_segment_size = 0xffffffff,
.no_write_same = 1,