Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: 3w-sas: Remove useless DMA-32 fallback configuration

As stated in [1], dma_set_mask() with a 64-bit mask never fails if
dev->dma_mask is non-NULL. So, if it fails, the 32-bit case will also fail
for the same reason.

Simplify code and remove some dead code accordingly.

[1]: https://lore.kernel.org/linux-kernel/YL3vSPK5DXTNvgdx@infradead.org/#t

Link: https://lore.kernel.org/r/dbbe8671ca760972d80f8d35f3170b4609bee368.1642236763.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Christophe JAILLET and committed by
Martin K. Petersen
fb8d5ea8 847f9ea4

-4
-4
drivers/scsi/3w-sas.c
··· 1567 1567 pci_try_set_mwi(pdev); 1568 1568 1569 1569 retval = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); 1570 - if (retval) 1571 - retval = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); 1572 1570 if (retval) { 1573 1571 TW_PRINTK(host, TW_DRIVER, 0x18, "Failed to set dma mask"); 1574 1572 retval = -ENODEV; ··· 1784 1786 pci_try_set_mwi(pdev); 1785 1787 1786 1788 retval = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); 1787 - if (retval) 1788 - retval = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); 1789 1789 if (retval) { 1790 1790 TW_PRINTK(host, TW_DRIVER, 0x25, "Failed to set dma mask during resume"); 1791 1791 retval = -ENODEV;