diff options
Diffstat (limited to 'recipes-extended/dpdk/dpdk-kmods')
-rw-r--r-- | recipes-extended/dpdk/dpdk-kmods/fix-build-with-5-18-kernel.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/recipes-extended/dpdk/dpdk-kmods/fix-build-with-5-18-kernel.patch b/recipes-extended/dpdk/dpdk-kmods/fix-build-with-5-18-kernel.patch new file mode 100644 index 0000000..0327d4d --- /dev/null +++ b/recipes-extended/dpdk/dpdk-kmods/fix-build-with-5-18-kernel.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 29b1c1e43014099548bb9424749cbc062e16a087 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Georg=20M=C3=BCller?= <georgmueller@gmx.net> | ||
3 | Date: Thu, 6 Oct 2022 20:51:37 +0200 | ||
4 | Subject: linux/igb_uio: fix build with kernel 5.18+ | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | pci_set_dma_mask() and pci_set_consistent_dma_mask() were removed with | ||
10 | kernel 5.18. They both were just wrappers for dma_set_mask() and | ||
11 | dma_set_coherent_mask(). | ||
12 | |||
13 | Instead, use dma_set_mask_and_coherent(), which is a combination of | ||
14 | dma_set_mask() and dma_set_coherent_mask(). | ||
15 | |||
16 | dma_set_mask_and_coherent() exists since kernel 3.13. | ||
17 | |||
18 | Signed-off-by: Georg Müller <georgmueller@gmx.net> | ||
19 | |||
20 | Upstream-Status: Backport | ||
21 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
22 | --- | ||
23 | linux/igb_uio/igb_uio.c | 8 +------- | ||
24 | 1 file changed, 1 insertion(+), 7 deletions(-) | ||
25 | |||
26 | diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c | ||
27 | index 33e0e02..aea67da 100644 | ||
28 | --- a/linux/igb_uio/igb_uio.c | ||
29 | +++ b/linux/igb_uio/igb_uio.c | ||
30 | @@ -512,18 +512,12 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | ||
31 | goto fail_release_iomem; | ||
32 | |||
33 | /* set 64-bit DMA mask */ | ||
34 | - err = pci_set_dma_mask(dev, DMA_BIT_MASK(64)); | ||
35 | + err = dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(64)); | ||
36 | if (err != 0) { | ||
37 | dev_err(&dev->dev, "Cannot set DMA mask\n"); | ||
38 | goto fail_release_iomem; | ||
39 | } | ||
40 | |||
41 | - err = pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64)); | ||
42 | - if (err != 0) { | ||
43 | - dev_err(&dev->dev, "Cannot set consistent DMA mask\n"); | ||
44 | - goto fail_release_iomem; | ||
45 | - } | ||
46 | - | ||
47 | /* fill uio infos */ | ||
48 | udev->info.name = "igb_uio"; | ||
49 | udev->info.version = "0.1"; | ||
50 | -- | ||
51 | cgit v1.2.1 | ||
52 | |||