linux/igb_uio: Adjust functions to the current kernel API
PATCH 1/1 linux/igb_uio: Adjust functions to the current kernel API
After commit 7968778914e53788a01c2dee2692cab157de9ac0 in the upstream kernel (v5.18+) The functions pci_set_dma_mask() and pci_set_consistent_dma_mask() are deprecated. Replacing them with the new substitute (to avoid a compilation error).
--- linux/igb_uio/igb_uio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
linux/igb_uio/igb_uio.c +2 -2
@@ -512,13 +512,13 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) goto fail_release_iomem;/* set 64-bit DMA mask */ - err =pci_set_dma_mask (dev,DMA_BIT_MASK (64 )); + err =dma_set_mask (&dev->dev,DMA_BIT_MASK (64 ));if (err !=0 ) {dev_err (&dev->dev,"Cannot set DMA mask\n" ); goto fail_release_iomem; } - err =pci_set_consistent_dma_mask (dev,DMA_BIT_MASK (64 )); + err =dma_set_coherent_mask (&dev->dev,DMA_BIT_MASK (64 ));if (err !=0 ) {dev_err (&dev->dev,"Cannot set consistent DMA mask\n" ); goto fail_release_iomem;
Signature · 1 line
2.38.1
20/10/2022 15:00, Leonid Bloch:
Quoted 9 lines
After commit
7968778914e53788a01c2dee2692cab157de9ac0in the upstream kernel (v5.18+) The functionspci_set_dma_mask()andpci_set_consistent_dma_mask()are deprecated. Replacing them with the new substitute (to avoid a compilation error).Signed-off-by Leonid Bloch <[email protected]>---
linux/igb_uio/igb_uio.c +1
-1- err =pci_set_dma_mask (dev,DMA_BIT_MASK (64 )); + err =dma_set_mask (&dev->dev,DMA_BIT_MASK (64 ));
[...]
linux/igb_uio/igb_uio.c igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · line 521
Quoted 2 lines
linux/igb_uio/igb_uio.c +1
-1- err =pci_set_consistent_dma_mask (dev,DMA_BIT_MASK (64 )); + err =dma_set_coherent_mask (&dev->dev,DMA_BIT_MASK (64 ));
The patch from Ferruh is simplifying the code:
https://patches.dpdk.org/project/dpdk/patch/[email protected]/