From f61b3fddf03348caac39fff13a1b8eeab7285982 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Thu, 23 Jul 2020 15:17:19 +0200 Subject: [PATCH] pkgdep/git: [QAT] Patch use of PCI/AER related function The pci_cleanup_aer_uncorrect_error_status() was renamed to pci_aer_clear_nonfatal_status() in kernel 5.7, details here: git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=894020fdd88c1e9a74c60b67c0f19f1c7696ba2f Change-Id: I233718e02d95f46ccef4d78a4d1f626950cd8503 Signed-off-by: Michal Berger Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3506 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Reviewed-by: Paul Luse Reviewed-by: Maciej Wawryk --- test/common/config/pkgdep/git | 5 +++++ .../pkgdep/patches/qat/0001-pci_aer.patch | 20 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 test/common/config/pkgdep/patches/qat/0001-pci_aer.patch diff --git a/test/common/config/pkgdep/git b/test/common/config/pkgdep/git index fd3ee4adf..d66f938d2 100644 --- a/test/common/config/pkgdep/git +++ b/test/common/config/pkgdep/git @@ -96,6 +96,11 @@ function install_qat() { patch --dir="$GIT_REPOS/QAT" -p1 < "$rootdir/test/common/config/pkgdep/patches/qat/0001-timespec.patch" fi + # Patch name of the pci_aer function which was renamed in kernels >= 5.7.1. See .patch for details + if ((kernel_ver >= 0x050701)); then + patch --dir="$GIT_REPOS/QAT" -p1 < "$rootdir/test/common/config/pkgdep/patches/qat/0001-pci_aer.patch" + fi + (cd "$GIT_REPOS/QAT" && sudo ./configure --enable-icp-sriov=host && sudo make install) if sudo service qat_service start; then diff --git a/test/common/config/pkgdep/patches/qat/0001-pci_aer.patch b/test/common/config/pkgdep/patches/qat/0001-pci_aer.patch new file mode 100644 index 000000000..7516ac4fe --- /dev/null +++ b/test/common/config/pkgdep/patches/qat/0001-pci_aer.patch @@ -0,0 +1,20 @@ +In kernel 5.7 the pci_cleanup_aer_uncorrect_error_status() function was +renamed with the following commit: + +git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=894020fdd88c1e9a74c60b67c0f19f1c7696ba2f + +This simply updates the function call with the proper name (pci_aer_clear_nonfatal_status()). + +--- +diff --git a/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c b/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c +index a6ce6df..545bb79 100644 +--- a/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c ++++ b/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c +@@ -304,7 +304,7 @@ static pci_ers_result_t adf_slot_reset(struct pci_dev *pdev) + pr_err("QAT: Can't find acceleration device\n"); + return PCI_ERS_RESULT_DISCONNECT; + } +- pci_cleanup_aer_uncorrect_error_status(pdev); ++ pci_aer_clear_nonfatal_status(pdev); + if (adf_dev_aer_schedule_reset(accel_dev, ADF_DEV_RESET_SYNC)) + return PCI_ERS_RESULT_DISCONNECT;