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

dmaengine: ioat: switch from 'pci_' to 'dma_' API

The wrappers in include/linux/pci-dma-compat.h should go away.

pci_set_dma_mask()/pci_set_consistent_dma_mask() should be
replaced with dma_set_mask()/dma_set_coherent_mask(),
and use dma_set_mask_and_coherent() for both.

Signed-off-by: Qing Wang <wangqing@vivo.com>
Link: https://lore.kernel.org/r/1633663733-47199-3-git-send-email-wangqing@vivo.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Qing Wang and committed by
Vinod Koul
0c5afef7 bec897e0

+2 -8
+2 -8
drivers/dma/ioat/init.c
··· 1363 1363 if (!iomap) 1364 1364 return -ENOMEM; 1365 1365 1366 - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); 1366 + err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); 1367 1367 if (err) 1368 - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); 1369 - if (err) 1370 - return err; 1371 - 1372 - err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); 1373 - if (err) 1374 - err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); 1368 + err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); 1375 1369 if (err) 1376 1370 return err; 1377 1371