Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp179320pxb; Thu, 12 Aug 2021 13:44:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZYXF1jYnjbnJ0g6CKnw1MKPnk8seN3S5FeT0IqGKvbixHHYPWyrz4GqlDxFnhdA+9ygV7 X-Received: by 2002:a6b:6d02:: with SMTP id a2mr4402654iod.93.1628801092523; Thu, 12 Aug 2021 13:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628801092; cv=none; d=google.com; s=arc-20160816; b=IVDt5e0X2bKyR63dSvL0oOiL/H9lBG08+xY2rDJwT5PWX3874qkRaU+Ty2DbcKUg47 THwPnNiVkxM03eDRkt36vxIZlBdQzZH4nVOL8K8i3RPj7rDYKzIOrnR+W3PzIyLh3T93 gY9Zb1rOadNrHGUiz5kqf13ivymGvNaaDSYSiAg1CI+Un9EghdE/JwQvykujPBA8Opu6 5jUQt2hwktfognY1Pf3jld3I6LkrmOVVJFUBqx6w1WhksK3r3BC5CF/pAJYQqxzqVZtC gDkvsvIbgJ9bapXQsLFirhSrYLqx2XktWjdaWRQrwB+XmDERko5dBlBUx7FBwswTllb5 rwmw== 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=FkPn8neo9zZ3VDEtYPchxul5P49dUmt30CeZehWbaOs=; b=KYAYUnBhDyLHT0VvZU4fQq2ydtnUo3yYCmHtvKBefIvLxjvvMn7ZR50vu1WRs89PVE ETkEH5eQQyXY2xTzHFK0d/M+V7tQ7AJ+uPTlla2W9Hsvzgu3Lv6MZ9ZLouN0zakk6RUC vEIWn10mywGb5tzR+jYN9cCoHyoXfFgKXzcdL108sC72EXcv+QwQapkcq3uDr1kBZs9x J07X6Ybl+fKY0zW99IhgeeqWWmyt7sixvKg1P0m0Zqa/DTl1KJmc/9ePk0BYa1+HuAwF RzWvhSHPr4BYC3IyzG7MGlUobWU1AX1/6onqakGEp0rmOB885bVMmHsOTq4+ZwSp2Atg 6BPg== 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 t9si4232766jaj.82.2021.08.12.13.44.41; Thu, 12 Aug 2021 13:44:52 -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 S237066AbhHLUW0 (ORCPT + 99 others); Thu, 12 Aug 2021 16:22:26 -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 S236922AbhHLUWZ (ORCPT ); Thu, 12 Aug 2021 16:22:25 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10074"; a="215474036" X-IronPort-AV: E=Sophos;i="5.84,316,1620716400"; d="scan'208";a="215474036" 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:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,316,1620716400"; d="scan'208";a="517608627" 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:55 -0700 From: Giovanni Cabiddu To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Marco Chiappero , Giovanni Cabiddu , Fiona Trahe Subject: [PATCH 10/20] crypto: qat - fix reuse of completion variable Date: Thu, 12 Aug 2021 21:21:19 +0100 Message-Id: <20210812202129.18831-11-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 From: Marco Chiappero Use reinit_completion() to set to a clean state a completion variable, used to coordinate the VF to PF request-response flow, before every new VF request. Signed-off-by: Marco Chiappero Co-developed-by: Giovanni Cabiddu Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe --- drivers/crypto/qat/qat_common/adf_pf2vf_msg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c index e29f5f1dc806..d42461cb611f 100644 --- a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c +++ b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c @@ -316,6 +316,8 @@ static int adf_vf2pf_request_version(struct adf_accel_dev *accel_dev) msg |= ADF_PFVF_COMPAT_THIS_VERSION << ADF_VF2PF_COMPAT_VER_REQ_SHIFT; BUILD_BUG_ON(ADF_PFVF_COMPAT_THIS_VERSION > 255); + reinit_completion(&accel_dev->vf.iov_msg_completion); + /* Send request from VF to PF */ ret = adf_iov_putmsg(accel_dev, msg, 0); if (ret) { -- 2.31.1