Skip to contentSkip to conversation

crypto: qat - don't check for iommu

PATCH In review Tadeusz Struk 2 participants 3 messages Sep 10, 2015 – Sep 18, 2015 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: qat - don't check for iommu

From: John Griffin <[email protected]>

In some cases we don't want iommu to be enabled but still we want enable VFs.

---
 drivers/crypto/qat/qat_common/adf_sriov.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/crypto/qat/qat_common/adf_sriov.c +2 -3
index 2f77a4a..fb5a53d 100644
@@ -245,9 +245,8 @@ int adf_sriov_configure(struct pci_dev *pdev, int numvfs)
 	}
 
 	if (!iommu_present(&pci_bus_type)) {
-		dev_err(&pdev->dev,
-			"IOMMU must be enabled for SR-IOV to work\n");
-		return -EINVAL;
+		dev_warn(&pdev->dev,
+			"IOMMU should be enabled for SR-IOV to work correctly\n");
 	}
 
 	if (accel_dev->pf.vf_info) {
#1 lore raw
Quoted 17 lines · Tadeusz Struk

From: John Griffin <[email protected]>

In some cases we don't want iommu to be enabled but still we want enable VFs.

---
 drivers/crypto/qat/qat_common/adf_sriov.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/crypto/qat/qat_common/adf_sriov.c +0 -0
index 2f77a4a..fb5a53d 100644
@@ -245,9 +245,8 @@ int adf_sriov_configure(struct pci_dev *pdev, int numvfs)
 	}

drivers/crypto/qat/qat_common/adf_sriov.c int adf_sriov_configure(struct pci_dev *pdev, int numvfs) · line 252

Quoted 10 lines
drivers/crypto/qat/qat_common/adf_sriov.c +2 -3
 
 	if (!iommu_present(&pci_bus_type)) {
-		dev_err(&pdev->dev,
-			"IOMMU must be enabled for SR-IOV to work\n");
-		return -EINVAL;
+		dev_warn(&pdev->dev,
+			"IOMMU should be enabled for SR-IOV to work correctly\n");
 	}
 
 	if (accel_dev->pf.vf_info) {

Again after checkpatch fixes.

---8<---
From: John Griffin <[email protected]>

In some cases we don't want iommu to be enabled but still we want to enable VFs.

drivers/crypto/qat/qat_common/adf_sriov.c +2 -5
index 2f77a4a..1117a8b 100644
@@ -244,11 +244,8 @@ int adf_sriov_configure(struct pci_dev *pdev, int numvfs)
 		return -EFAULT;
 	}
 
-	if (!iommu_present(&pci_bus_type)) {
-		dev_err(&pdev->dev,
-			"IOMMU must be enabled for SR-IOV to work\n");
-		return -EINVAL;
-	}
+	if (!iommu_present(&pci_bus_type))
+		dev_warn(&pdev->dev, "IOMMU should be enabled for SR-IOV to work correctly\n");
 
 	if (accel_dev->pf.vf_info) {
 		dev_info(&pdev->dev, "Already enabled for this device\n");
maintainer
#2 lore raw
Quoted 2 lines · Tadeusz Struk

Again after checkpatch fixes.

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt