Skip to content

Commit e0e0747

Browse files
sreekanthbrcmmartinkpetersen
authored andcommitted
scsi: mpt3sas: Fix return value check of dma_get_required_mask()
Fix the incorrect return value check of dma_get_required_mask(). Due to this incorrect check, the driver was always setting the DMA mask to 63 bit. Link: https://lore.kernel.org/r/[email protected] Fixes: ba27c5c ("scsi: mpt3sas: Don't change the DMA coherent mask after allocations") Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 601be20 commit e0e0747

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/mpt3sas/mpt3sas_base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2993,7 +2993,7 @@ _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev)
29932993

29942994
if (ioc->is_mcpu_endpoint ||
29952995
sizeof(dma_addr_t) == 4 || ioc->use_32bit_dma ||
2996-
dma_get_required_mask(&pdev->dev) <= 32)
2996+
dma_get_required_mask(&pdev->dev) <= DMA_BIT_MASK(32))
29972997
ioc->dma_mask = 32;
29982998
/* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */
29992999
else if (ioc->hba_mpi_version_belonged > MPI2_VERSION)

0 commit comments

Comments
 (0)