1 Star 0 Fork 76

mds.lanruo/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0219-linux-igb_uio-fix-build-with-kernel-5.18.patch 1.58 KB
一键复制 编辑 原始数据 按行查看 历史
jinag12 提交于 2023-02-06 10:00 . fix build with kernel 5.18+
From 29b1c1e43014099548bb9424749cbc062e16a087 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Georg=20M=C3=BCller?= <georgmueller@gmx.net>
Date: Thu, 6 Oct 2022 20:51:37 +0200
Subject: [PATCH] linux/igb_uio: fix build with kernel 5.18+
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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>
---
kernel/linux/igb_uio/igb_uio.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c
index 33e0e02..aea67da 100644
--- a/kernel/linux/igb_uio/igb_uio.c
+++ b/kernel/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.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mdslanruo/dpdk.git
git@gitee.com:mdslanruo/dpdk.git
mdslanruo
dpdk
dpdk
master

搜索帮助