Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp179276pxb; Thu, 12 Aug 2021 13:44:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZpTLnHNA7jNjg8U5sg7KvdZUFjMEn5EZRhIt465l/WlVmrBnYuI8PuQxej2Nclu7Wxlj5 X-Received: by 2002:a17:906:b0c5:: with SMTP id bk5mr5434984ejb.428.1628801088135; Thu, 12 Aug 2021 13:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628801088; cv=none; d=google.com; s=arc-20160816; b=y7i5s/1psQA1RXONVQGMyj72LU7hvHMQfQj23TcUDgHfx7NUgqXHxdSs6QmT6O4RC6 /9dSIlLqoE/oVYYrw0BSkj+aZxPnr3nRDVkH6ymUj3TkUXqlNG0cBOOhuYSx4ymWJBCB 7BWuwKvq/0nO7TEf0s5C+w7Gb1OYmPahVg5rw1tZ6XIQuWsTx0qbMFe97T11uRygM6cF E+4P+FjHjDctuWgVxFhnOblM9Yk2FNFwhcjwk86gPPCaujlYuUyRswLcMySBKTv1/wGn 3WlwMEwry8KOQH5eh5iwLHrlzy7oqsKVz1EZoRMZskdpEZtSeuDJyd7y9gP8OTO/W6Pr +ajg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Mtut0ibwvz53p77sy431DeWL2jVd2BnmZVAGLNIMRc8=; b=MOulbLnpDxTxzoVfhq1O5B67MpSgDUJi6duQZa8369JoJ4J0sqQMwdmsI+SGvxFkwt xCVi7dlCIfBlDWuasmTi7q2dQi0CUZmRCVip5T2FBG9tBxi+mhfGuwm2RtIP4HMayC1I G0YXYdjEN1E6y0bFv19jVY2qAGS/HZxng9jhEoX3ZCdGglE2m9DvcJ6F5dG/RBX1YnNW hecKRqAAyeLkTXN8wb4G167IoN/z2VtBJr/oJtbJW9fPc06pcQU4VGXfsKDA4ad4b/1E Eiju6Ml35M8SZaIbi7XpSHfSFhwO+31/uVBGmZgFeN100bQsCpBDOtxzHkEjDatVP7P9 cykQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p12si3780206ejj.2.2021.08.12.13.44.23; Thu, 12 Aug 2021 13:44:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237108AbhHLUWY (ORCPT + 99 others); Thu, 12 Aug 2021 16:22:24 -0400 Received: from mga03.intel.com ([134.134.136.65]:4146 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236584AbhHLUWV (ORCPT ); Thu, 12 Aug 2021 16:22:21 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10074"; a="215474014" X-IronPort-AV: E=Sophos;i="5.84,316,1620716400"; d="scan'208";a="215474014" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2021 13:21:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,316,1620716400"; d="scan'208";a="517608574" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314.ger.corp.intel.com) ([10.237.222.51]) by FMSMGA003.fm.intel.com with ESMTP; 12 Aug 2021 13:21:44 -0700 From: Giovanni Cabiddu To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Giovanni Cabiddu , Marco Chiappero , Fiona Trahe Subject: [PATCH 04/20] crypto: qat - do not ignore errors from enable_vf2pf_comms() Date: Thu, 12 Aug 2021 21:21:13 +0100 Message-Id: <20210812202129.18831-5-giovanni.cabiddu@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210812202129.18831-1-giovanni.cabiddu@intel.com> References: <20210812202129.18831-1-giovanni.cabiddu@intel.com> MIME-Version: 1.0 Organization: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare - Ireland Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The function adf_dev_init() ignores the error code reported by enable_vf2pf_comms(). If the latter fails, e.g. the VF is not compatible with the pf, then the load of the VF driver progresses. This patch changes adf_dev_init() so that the error code from enable_vf2pf_comms() is returned to the caller. Signed-off-by: Giovanni Cabiddu Reviewed-by: Marco Chiappero Reviewed-by: Fiona Trahe --- drivers/crypto/qat/qat_common/adf_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_init.c b/drivers/crypto/qat/qat_common/adf_init.c index 14e9f3b22c60..346dcb8bcca5 100644 --- a/drivers/crypto/qat/qat_common/adf_init.c +++ b/drivers/crypto/qat/qat_common/adf_init.c @@ -61,6 +61,7 @@ int adf_dev_init(struct adf_accel_dev *accel_dev) struct service_hndl *service; struct list_head *list_itr; struct adf_hw_device_data *hw_data = accel_dev->hw_device; + int ret; if (!hw_data) { dev_err(&GET_DEV(accel_dev), @@ -127,9 +128,9 @@ int adf_dev_init(struct adf_accel_dev *accel_dev) } hw_data->enable_error_correction(accel_dev); - hw_data->enable_vf2pf_comms(accel_dev); + ret = hw_data->enable_vf2pf_comms(accel_dev); - return 0; + return ret; } EXPORT_SYMBOL_GPL(adf_dev_init); -- 2.31.1