Commit c79c09ad authored by Robin Murphy's avatar Robin Murphy Committed by Herbert Xu
Browse files

crypto: qat - stop using iommu_present()



Even if an IOMMU might be present for some PCI segment in the system,
that doesn't necessarily mean it provides translation for the device
we care about. Replace iommu_present() with a more appropriate check.

Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Acked-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 7b2206d8
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
#include <linux/workqueue.h>
#include <linux/pci.h>
#include <linux/device.h>
#include <linux/iommu.h>
#include "adf_common_drv.h"
#include "adf_cfg.h"
#include "adf_pfvf_pf_msg.h"
@@ -176,7 +175,7 @@ int adf_sriov_configure(struct pci_dev *pdev, int numvfs)
		return -EFAULT;
	}

	if (!iommu_present(&pci_bus_type))
	if (!device_iommu_mapped(&pdev->dev))
		dev_warn(&pdev->dev, "IOMMU should be enabled for SR-IOV to work correctly\n");

	if (accel_dev->pf.vf_info) {