From patchwork Fri Sep 11 19:26:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tadeusz Struk X-Patchwork-Id: 7163111 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 296C3BEEC1 for ; Fri, 11 Sep 2015 19:27:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ECC6D20812 for ; Fri, 11 Sep 2015 19:27:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D87102080C for ; Fri, 11 Sep 2015 19:27:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752125AbbIKT1q (ORCPT ); Fri, 11 Sep 2015 15:27:46 -0400 Received: from mga03.intel.com ([134.134.136.65]:25012 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751749AbbIKT1p (ORCPT ); Fri, 11 Sep 2015 15:27:45 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 11 Sep 2015 12:27:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,512,1437462000"; d="scan'208";a="767242071" Received: from tstruk-mobl1.jf.intel.com (HELO tstruk-mobl1.intel.com) ([134.134.171.166]) by orsmga001.jf.intel.com with ESMTP; 11 Sep 2015 12:27:47 -0700 Subject: Re: [PATCH] crypto: qat - don't check for iommu To: herbert@gondor.apana.org.au References: <20150910183657.26171.65960.stgit@tstruk-mobl1> Cc: linux-crypto@vger.kernel.org, john.griffin@intel.com, qat-linux@intel.com From: Tadeusz Struk Message-ID: <55F32AC8.1090502@intel.com> Date: Fri, 11 Sep 2015 12:26:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150910183657.26171.65960.stgit@tstruk-mobl1> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 09/10/2015 11:36 AM, Tadeusz Struk wrote: > From: John Griffin > > In some cases we don't want iommu to be enabled but still we want enable VFs. > > Signed-off-by: John Griffin > Signed-off-by: Tadeusz Struk > --- > drivers/crypto/qat/qat_common/adf_sriov.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/crypto/qat/qat_common/adf_sriov.c b/drivers/crypto/qat/qat_common/adf_sriov.c > index 2f77a4a..fb5a53d 100644 > --- a/drivers/crypto/qat/qat_common/adf_sriov.c > +++ b/drivers/crypto/qat/qat_common/adf_sriov.c > @@ -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) { > Again after checkpatch fixes. ---8<--- From: John Griffin In some cases we don't want iommu to be enabled but still we want to enable VFs. Signed-off-by: John Griffin Signed-off-by: Tadeusz Struk --- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/crypto/qat/qat_common/adf_sriov.c b/drivers/crypto/qat/qat_common/adf_sriov.c index 2f77a4a..1117a8b 100644 --- a/drivers/crypto/qat/qat_common/adf_sriov.c +++ b/drivers/crypto/qat/qat_common/adf_sriov.c @@ -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");