DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH dpdk-kmods] linux/igb_uio: Adjust functions to the current kernel API
@ 2022-10-20 13:00 Leonid Bloch
  2023-02-05 17:36 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Leonid Bloch @ 2022-10-20 13:00 UTC (permalink / raw)
  To: dev

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).

Signed-off-by: Leonid Bloch <lb.workbox@gmail.com>
---
 linux/igb_uio/igb_uio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c
index 33e0e02..a9db90d 100644
--- a/linux/igb_uio/igb_uio.c
+++ b/linux/igb_uio/igb_uio.c
@@ -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;
-- 
2.38.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-05 17:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20 13:00 [PATCH dpdk-kmods] linux/igb_uio: Adjust functions to the current kernel API Leonid Bloch
2023-02-05 17:36 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).