Hi Martin, On Wed, Mar 08, 2023 at 02:05:01PM -0500, Martin K. Petersen wrote: > > Salvatore, > > > So I believe the right thing would be to revert first in the stable > > series where it was applied (5.10.y, 5.15.y) the commit e0e0747de0ea > > ("scsi: mpt3sas: Fix return value check of dma_get_required_mask()") > > and then on top of this revert apply the patches: > > > > 9df650963bf6 ("scsi: mpt3sas: Don't change DMA mask while reallocating pools") > > 1a2dcbdde82e ("scsi: mpt3sas: re-do lost mpt3sas DMA mask fix") > > 06e472acf964 ("scsi: mpt3sas: Remove usage of dma_get_required_mask() API") > > > > Attached mbox file implements this. > > > > Does that looks now good for resolving the regression? > > Yes, that's one way to resolve it. > > At a quick glance your mbox looks fine. Best way to validate would be to > compare the resulting _base_config_dma_addressing() function between > your tree and upstream. I don't believe we have had additional changes > here so there should be no delta. Yes, the resulting _base_config_dma_addressing() function is the same after applying the series of commits. In both cases it will be: /** * _base_config_dma_addressing - set dma addressing * @ioc: per adapter object * @pdev: PCI device struct * * Return: 0 for success, non-zero for failure. */ static int _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev) { struct sysinfo s; u64 coherent_dma_mask, dma_mask; if (ioc->is_mcpu_endpoint || sizeof(dma_addr_t) == 4) { ioc->dma_mask = 32; coherent_dma_mask = dma_mask = DMA_BIT_MASK(32); /* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */ } else if (ioc->hba_mpi_version_belonged > MPI2_VERSION) { ioc->dma_mask = 63; coherent_dma_mask = dma_mask = DMA_BIT_MASK(63); } else { ioc->dma_mask = 64; coherent_dma_mask = dma_mask = DMA_BIT_MASK(64); } if (ioc->use_32bit_dma) coherent_dma_mask = DMA_BIT_MASK(32); if (dma_set_mask(&pdev->dev, dma_mask) || dma_set_coherent_mask(&pdev->dev, coherent_dma_mask)) return -ENODEV; if (ioc->dma_mask > 32) { ioc->base_add_sg_single = &_base_add_sg_single_64; ioc->sge_size = sizeof(Mpi2SGESimple64_t); } else { ioc->base_add_sg_single = &_base_add_sg_single_32; ioc->sge_size = sizeof(Mpi2SGESimple32_t); } si_meminfo(&s); ioc_info(ioc, "%d BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (%ld kB)\n", ioc->dma_mask, convert_to_kb(s.totalram)); return 0; } Regards, Salvatore