Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1838499pxb; Mon, 13 Sep 2021 06:40:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMoGTxkJa9wBFsT2RkuQKIZhsvqB8rXqRTOTKEkKPb+Pi7zkkiH3/ixXw/9RBgML9MAJsL X-Received: by 2002:a50:9fcf:: with SMTP id c73mr13071091edf.308.1631540412118; Mon, 13 Sep 2021 06:40:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631540412; cv=none; d=google.com; s=arc-20160816; b=LJPJ7j6gzwB5S6pBaPM9BOWbAYbdqQsiWf3QSO2ePL+VJYOoHYJWls2Sl7VMqEBXN9 ocbnnd9x5UOw5ym4JVBoMEH9n2oNvfFCvTX1MS8xAHwIe/XeZihorHzkOD9neCGb1q8P 8yNkKZpDMaOY5xh876EFblycr2RDhtdhmiSfDHhB+rWhLd3GAUCKvReiIUArtIqD6U90 E1/XZiWu3KpYmuCav3n0Zjwgp3UbvlT4WnKuUwcRlwbyKv8Enbh5Ie4a1VxN6ZbKToPI FTVZbsArGUkacZ2f+necMFC9C58DYgDZxSbcI729Ak0Ij4hF6CWKtQQMUTwfyGgPQ6AR SNYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=puVIipJFYSMwWV4idumzwLmmdnuIE6KDgLQTO+JLqhE=; b=fFIPhjDbjyCBm/XAxG7O+63i4BIDKLlwyn8/OXeyEcbOaEjZcg7YC38wgjzFWJpV6Z YwkZBlQLlHOtxOMBx3qkBtyG1fMedQzCB4spBlh2ZCCL71+HtbkW1lLc+P4nzzIo2alY qaSzzo+PXNBVkbKNADP2tFz4bI8E+CJzeovjlhw43f1SXdsXUYAumAz9y2YIUhZPxGKw g7Ut1Vd+7zlJ6OYo0BXt7cjdOc4kgmBIs9amURr+4+NJiVQ/LLJS0VPDa7BcWUKAz2pT e20aWJGAzOqCo6cQLscZSBO9nsfaUQbCdmbSDu0xFzNzhSo8gnIHOtT42G6O+XfcC6k6 0qlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XM9+meQo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o4si7300342edc.363.2021.09.13.06.39.45; Mon, 13 Sep 2021 06:40:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XM9+meQo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242684AbhIMNhL (ORCPT + 99 others); Mon, 13 Sep 2021 09:37:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:49590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242614AbhIMNby (ORCPT ); Mon, 13 Sep 2021 09:31:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 226A961155; Mon, 13 Sep 2021 13:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539536; bh=rZsRONI12SjSzXOZg7QF6TGdVrcr2bfAjtFda7Btl1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XM9+meQovdksqiUcpTI0owr2V5PqzBSUGzvQmZSPwjXTHtjvKxARUEqwLep93/akX ofdBYV9PIJcutvfI3XpiiaTow8VLnanzMFIQDnSECXYwFU4NotdsRKZhA7lqx6mGy1 b7OKbYmKXI8V0UW/xCDGREAEaMa+8LFx7gXt2P5g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marco Chiappero , Giovanni Cabiddu , Fiona Trahe , Herbert Xu , Sasha Levin Subject: [PATCH 5.10 030/236] crypto: qat - fix reuse of completion variable Date: Mon, 13 Sep 2021 15:12:15 +0200 Message-Id: <20210913131101.369421368@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marco Chiappero [ Upstream commit 3d655732b0199562267a05c7ff69ecdd11632939 ] 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 Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- 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 8b090b7ae8c6..4c39731c51c8 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_COMPATIBILITY_VERSION << ADF_VF2PF_COMPAT_VER_REQ_SHIFT; BUILD_BUG_ON(ADF_PFVF_COMPATIBILITY_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.30.2