DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Georg Müller" <georgmueller@gmx.net>
To: dev@dpdk.org
Cc: "Georg Müller" <georgmueller@gmx.net>
Subject: [PATCH v2] linux/igb_uio: fix build with kernel 5.18+
Date: Thu,  6 Oct 2022 20:51:37 +0200	[thread overview]
Message-ID: <20221006185136.1634218-1-georgmueller@gmx.net> (raw)
In-Reply-To: <20221006093730.1602342-1-georgmueller@gmx.net>

pci_set_dma_mask() and pci_set_consistent_dma_mask() were removed with
kernel 5.18. They both were just wrappers for dma_set_mask() and
dma_set_coherent_mask().

Instead, use dma_set_mask_and_coherent(), which is a combination of
dma_set_mask() and dma_set_coherent_mask().

dma_set_mask_and_coherent() exists since kernel 3.13.

Signed-off-by: Georg Müller <georgmueller@gmx.net>
---
v2: - add Signed-off-by
---
 linux/igb_uio/igb_uio.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c
index 33e0e02..aea67da 100644
--- a/linux/igb_uio/igb_uio.c
+++ b/linux/igb_uio/igb_uio.c
@@ -512,18 +512,12 @@ 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_and_coherent(&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));
-	if (err != 0) {
-		dev_err(&dev->dev, "Cannot set consistent DMA mask\n");
-		goto fail_release_iomem;
-	}
-
 	/* fill uio infos */
 	udev->info.name = "igb_uio";
 	udev->info.version = "0.1";
--
2.37.3


  reply	other threads:[~2022-10-09 17:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06  9:37 [PATCH] " Georg Müller
2022-10-06 18:51 ` Georg Müller [this message]
2023-02-05 17:59   ` [PATCH v2] " 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=20221006185136.1634218-1-georgmueller@gmx.net \
    --to=georgmueller@gmx.net \
    --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 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).