pkgdep/git: [dpdk_kmods] Patch for changes in use of pci_ API
Signed-off-by: Michal Berger <michal.berger@intel.com> Change-Id: I202d60bcd721c11d1729731f01e1a4133e0c1a24 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13450 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
8d29a9b701
commit
2c65d55675
@ -388,6 +388,11 @@ function install_vagrant() {
|
|||||||
|
|
||||||
function install_igb_uio() {
|
function install_igb_uio() {
|
||||||
git clone "${GIT_REPO_DPDK_KMODS}" "$GIT_REPOS/dpdk-kmods"
|
git clone "${GIT_REPO_DPDK_KMODS}" "$GIT_REPOS/dpdk-kmods"
|
||||||
|
|
||||||
|
if ge "$kernel_ver" 5.16.0; then
|
||||||
|
patch --dir="$GIT_REPOS/dpdk-kmods" -p1
|
||||||
|
fi < "$rootdir/test/common/config/pkgdep/patches/dpdk_kmods/0001-dma-mask.patch"
|
||||||
|
|
||||||
(cd "$GIT_REPOS/dpdk-kmods/linux/igb_uio" && make -j ${jobs})
|
(cd "$GIT_REPOS/dpdk-kmods/linux/igb_uio" && make -j ${jobs})
|
||||||
sudo mkdir -p "/lib/modules/$(uname -r)/extra/dpdk"
|
sudo mkdir -p "/lib/modules/$(uname -r)/extra/dpdk"
|
||||||
sudo cp "$GIT_REPOS/dpdk-kmods/linux/igb_uio/igb_uio.ko" "/lib/modules/$(uname -r)/extra/dpdk"
|
sudo cp "$GIT_REPOS/dpdk-kmods/linux/igb_uio/igb_uio.ko" "/lib/modules/$(uname -r)/extra/dpdk"
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
pci_set_dma_mask() and pci_set_consistent_dma_mask() got deprecated in
|
||||||
|
favor of dma_set_mask_and_coherent(). See:
|
||||||
|
|
||||||
|
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=c726c62db857d375800af7e82eb1c6f639e87631
|
||||||
|
|
||||||
|
---
|
||||||
|
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..353b322 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_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));
|
||||||
|
+ err = dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(64));
|
||||||
|
if (err != 0) {
|
||||||
|
dev_err(&dev->dev, "Cannot set consistent DMA mask\n");
|
||||||
|
goto fail_release_iomem;
|
||||||
|
--
|
||||||
|
|
Loading…
Reference in New Issue
Block a user