Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2319154pxb; Mon, 20 Sep 2021 18:42:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy46R7vFlXc4mAMuktqsAj2wFeBWO0RTXmgqhcvYtp/lxTAtvGyzdFh/A9Ic078KBtEVWwL X-Received: by 2002:a05:6638:1e2:: with SMTP id t2mr12833199jaq.21.1632188522393; Mon, 20 Sep 2021 18:42:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188522; cv=none; d=google.com; s=arc-20160816; b=iiUzT8pFbFIMweLSEHHiB4EsxTRMp1vhYhPcLm0SsYLWsf72sTz2eION8VrmjmJ3cv EY/wwo7yeOWDCgSJloLyNuBSAerRORDYnO9BLBaJ8lJ+M8qhzwg04Jw7xO066ku6664j OtUER65o3po9mtQFWo//ZZfuyhNeMJDEM+1D0ODBf7ebGojR8aPBJ6GsfSEOSfAaNA7u AZRQa5jAICLZCon8HXjOfKmpz7yMAAyqx0KNo1EIlmkrPSsecfk70ZidfnQfulErcUo4 QiI2YyO9q/j4jkvV/hHUlCqqRX40G2itL7t3wr1i684Bn8JbHJ7DfL2cxjCPx8Co0wKi PDvw== 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=9kEovAEJLBBCOSkl43VUGu8beBUcGGE01cA9kHZVOCw=; b=rNfjzb4LPPDoZXXuUIvjqxz3STv3tqU95ZB1NvuXgNbjiG5A1Tms3Fbr9wW2VEZLqj G2sVXW7Q979c/dau/5wEi4JS3gkP9RMQSdpBCW/K1yHlwQo3P2HjyAiSFzbQly5j+aNd wrA66yxQAEqkRsSCxekpgUUhkIIonNLx54+vwAVuhPJ33afuaUmFS0UFB23sGZntE5Te pKk2kwtX5TWgGdh7w7Ok7NquxXjyGeO0S/WnfeQ+iVpmzGtSzlIEbp8osUjJTj7zUgIB ktdwmOyrJ5EE9VeC64elbTXfh3aJemNdzIlWSFVyYQ3iXqjDRSRVV80Z2SeVQpgk1/A+ tgXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0kpVvEP2; 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 f8si4650296ilu.129.2021.09.20.18.41.51; Mon, 20 Sep 2021 18:42:02 -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=0kpVvEP2; 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 S243823AbhITQs2 (ORCPT + 99 others); Mon, 20 Sep 2021 12:48:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:35806 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243025AbhITQrt (ORCPT ); Mon, 20 Sep 2021 12:47:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3E217611AE; Mon, 20 Sep 2021 16:46:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156382; bh=6iTU7lGJM32Aa0d+IJG1BTR+lZTC4LxxCYjNTs5nnMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0kpVvEP2LYrvc+QEiKRtP6mszpGF0wPEz59NU++ZmxKX+i1whgxnNp0foErGEIqCJ pfMUKK6s6mrs0kIr41eDo/xbah6i39Q1kPebYDvwgFUlLw4g1A0wImHYN1OW8B2FfA 5U5lOmfdHcV6GyO3WZbLiEkpAL6uTL0YsDO/cxLw= 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 4.4 034/133] crypto: qat - fix reuse of completion variable Date: Mon, 20 Sep 2021 18:41:52 +0200 Message-Id: <20210920163913.739944789@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163912.603434365@linuxfoundation.org> References: <20210920163912.603434365@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 5fdbad809343..711706819b05 100644 --- a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c +++ b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c @@ -384,6 +384,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