All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leonid Bloch <lb.workbox@gmail.com>
To: dev@dpdk.org
Subject: [PATCH dpdk-kmods] linux/igb_uio: Adjust functions to the current kernel API
Date: Thu, 20 Oct 2022 16:00:44 +0300	[thread overview]
Message-ID: <20221020130044.17710-1-lb.workbox@gmail.com> (raw)

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


             reply	other threads:[~2022-10-24 15:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 13:00 Leonid Bloch [this message]
2023-02-05 17:36 ` [PATCH dpdk-kmods] linux/igb_uio: Adjust functions to the current kernel API Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221020130044.17710-1-lb.workbox@gmail.com \
    --to=lb.workbox@gmail.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.