]> git.itanic.dy.fi Git - linux-stable/commit
scsi: mpt3sas: Force PCIe scatterlist allocations to be within same 4 GB region
authorSuganath Prabu S <suganath-prabu.subramani@broadcom.com>
Fri, 5 Mar 2021 10:28:58 +0000 (15:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:10:31 +0000 (11:10 +0200)
commite7fafef9830c4a01e60f76e3860a9bef0262378d
tree09d049675517daee4ddbff541e3e035cab275e6b
parent351f2d2c357f3470044c482bf30043c79c7bd174
scsi: mpt3sas: Force PCIe scatterlist allocations to be within same 4 GB region

[ Upstream commit d6adc251dd2fede6aaaf6c39f7e4ad799eda3758 ]

According to the MPI specification, PCIe SGL buffers can not cross a 4 GB
boundary.

While allocating, if any buffer crosses the 4 GB boundary, then:

 - Release the already allocated memory pools; and

 - Reallocate them by changing the DMA coherent mask to 32-bit

Link: https://lore.kernel.org/r/20210305102904.7560-2-suganath-prabu.subramani@broadcom.com
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: e0e0747de0ea ("scsi: mpt3sas: Fix return value check of dma_get_required_mask()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/mpt3sas/mpt3sas_base.c
drivers/scsi/mpt3sas/mpt3sas_base.h