Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp180213pxb; Thu, 12 Aug 2021 13:46:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDBbqXDc+OifG32t2cY9Ba2a+S4HM1dpCAzao/hW4a21Ax+0fSzpgaplNuJ+8zQ48WizWL X-Received: by 2002:a05:6402:384:: with SMTP id o4mr7893631edv.128.1628801173586; Thu, 12 Aug 2021 13:46:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628801173; cv=none; d=google.com; s=arc-20160816; b=oRLr9bsDGH5o/GaiPzURDrlHYC5wGUfQOLo9gjbbPlsCDYNu6WWHDLRrUpjiWJ40Uq qlnbHe8qnVJc+7tILzBgx8fvz9e34MNrDyMivlE8tY+QTjYV33AdOqUiRBwQBRD2pUVu 2hGdL+DxRwaKI7fV5qmwd+mLje3U3IJL8sWK2/SI6Tp1AZbrY2ZubxUZ6ZXL3SqmGXQL PuLphKQXC0ylWnEquXUeNroSMFbmgo5YhLH+bGlJ83VBJZGLfz6RFM2+hRlI8Oodvj3j TrhkYaDm31FIKNZvSrMsr4bRYIVAz2Ix285mipzJqx7ulSpR9xr3KRW93BH37YfmWddh fqYQ== 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=dkzO1kd75rH6ebcm24BrgN+YAQnuay26fJTqNTFFdtE=; b=uy8S7uy6p5y1z+B+BJ3zV/LO53OXmcpsOuKO6qJWwr/TF/L6see6AmJh6WbxSM0z6D B5w+03pVA0mSXjl4mR5NJ4nPK3G6SgC38jwWNCLxMnajSa2E2yUsrNR94TDRB3xg2zTW yUGH6zj4o070auVnH8V7a/eUadNB+ysqYwjslOtKZRqJjyc6sVRJdgkvmyIG5nyEV1Tv O3gmQkeBSAmrGxpSBqYZu/i/hj8He9z6nIgXTrzOK5oO3O3RfaFeDpUF0Of1GwYsoOOR Ac3WNderL704MbdPTn763Wr+swfJVzPQtRbpremYLh09Zl/4t9PS5bWDZfIE08TtXblo 3+3w== 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 m5si3750374eds.430.2021.08.12.13.45.49; Thu, 12 Aug 2021 13:46:13 -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 S237238AbhHLUWs (ORCPT + 99 others); Thu, 12 Aug 2021 16:22:48 -0400 Received: from mga03.intel.com ([134.134.136.65]:4173 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237312AbhHLUWk (ORCPT ); Thu, 12 Aug 2021 16:22:40 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10074"; a="215474080" X-IronPort-AV: E=Sophos;i="5.84,316,1620716400"; d="scan'208";a="215474080" 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:22:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,316,1620716400"; d="scan'208";a="517608747" 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:22:13 -0700 From: Giovanni Cabiddu To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Giovanni Cabiddu , Fiona Trahe Subject: [PATCH 20/20] crypto: qat - store vf.compatible flag Date: Thu, 12 Aug 2021 21:21:29 +0100 Message-Id: <20210812202129.18831-21-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 If the VF is newer than the PF, it decides whether it is compatible or not. In case it is compatible, store that information in the vf.compatible flag in the accel_dev structure. Signed-off-by: Giovanni Cabiddu Suggested-by: Fiona Trahe --- drivers/crypto/qat/qat_common/adf_pf2vf_msg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c index 2670995b097f..976b9ab7617c 100644 --- a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c +++ b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c @@ -346,8 +346,10 @@ static int adf_vf2pf_request_version(struct adf_accel_dev *accel_dev) break; case ADF_PF2VF_VF_COMPAT_UNKNOWN: /* VF is newer than PF and decides whether it is compatible */ - if (accel_dev->vf.pf_version >= hw_data->min_iov_compat_ver) + if (accel_dev->vf.pf_version >= hw_data->min_iov_compat_ver) { + accel_dev->vf.compatible = ADF_PF2VF_VF_COMPATIBLE; break; + } fallthrough; case ADF_PF2VF_VF_INCOMPATIBLE: dev_err(&GET_DEV(accel_dev), -- 2.31.1