Skip to content

Commit fb8d5ea

Browse files
tititiou36martinkpetersen
authored andcommitted
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/[email protected]/#t Link: https://lore.kernel.org/r/dbbe8671ca760972d80f8d35f3170b4609bee368.1642236763.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 847f9ea commit fb8d5ea

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/scsi/3w-sas.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,8 +1567,6 @@ static int twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
15671567
pci_try_set_mwi(pdev);
15681568

15691569
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));
15721570
if (retval) {
15731571
TW_PRINTK(host, TW_DRIVER, 0x18, "Failed to set dma mask");
15741572
retval = -ENODEV;
@@ -1786,8 +1784,6 @@ static int __maybe_unused twl_resume(struct device *dev)
17861784
pci_try_set_mwi(pdev);
17871785

17881786
retval = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
1789-
if (retval)
1790-
retval = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
17911787
if (retval) {
17921788
TW_PRINTK(host, TW_DRIVER, 0x25, "Failed to set dma mask during resume");
17931789
retval = -ENODEV;

0 commit comments

Comments
 (0)