[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1022126: mpt3sas broken with xen dom0



Tags: patch

Dear maintainers,

after the discussion about the root cause of this issue on the linux-scsi
mailing list[1] there was one simple patch submitted to this list[2] that
just changes the logic of the selection of the dma mask: in case of a 64bit
host operating system, the driver chooses a 63/64bit mask.

We backported and tested this patch on our systems and everything works
just fine. Find our backported patch for 5.10 kernels attached. We tested
that patch with 5.10.149-2/5.10.0-19 and 5.10.158-2/5.10.0-20.

Note, however, this patch has not yet been merged upstream and thus there
is no backport of this to the lts kernels. I am pretty unsure about how to
proceed: currently we're using dkms to build binary module packages with
the attached patch (dkms mkbmdeb) and do deploy these to our servers but
we'd really love to see this patch upstream and downstream! :)

all the best,
    Adi

[1] https://lore.kernel.org/linux-scsi/Y1JkuKTjVYrOWbvm@eldamar.lan/T/
[2] https://lore.kernel.org/linux-scsi/20221028091655.17741-2-sreekanth.reddy@broadcom.com/T/
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c	2022-12-14 18:08:44.136490166 +0100
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c	2022-12-14 18:15:16.682042992 +0100
@@ -2823,9 +2823,7 @@
 {
 	struct sysinfo s;
 
-	if (ioc->is_mcpu_endpoint ||
-	    sizeof(dma_addr_t) == 4 || ioc->use_32bit_dma ||
-	    dma_get_required_mask(&pdev->dev) <= DMA_BIT_MASK(32))
+	if (ioc->is_mcpu_endpoint || sizeof(dma_addr_t) == 4)
 		ioc->dma_mask = 32;
 	/* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */
 	else if (ioc->hba_mpi_version_belonged > MPI2_VERSION)

Attachment: signature.asc
Description: PGP signature


Reply to: