mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
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: Robin Murphy <robin.murphy@arm.com> Acked-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
7b2206d880
commit
c79c09ad31
1 changed files with 1 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue