Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3648731pxb; Mon, 24 Jan 2022 14:23:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOARo46AAy7xPzk91BtvjSM3gNE/MemeFGqHWS8bOCoYSs8/BfobcRjOXcnJgGcv1/Jb0E X-Received: by 2002:a17:902:7b93:b0:14a:c443:bb28 with SMTP id w19-20020a1709027b9300b0014ac443bb28mr2966403pll.94.1643063013585; Mon, 24 Jan 2022 14:23:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643063013; cv=none; d=google.com; s=arc-20160816; b=pLMmNt4kOVzD/wOrglZRTUSU6YDU0YbXCqIwTi7rHRsR8WrUdXGIpQ3eTr9GlkXrhD bHgqYP2u4GTN97pTZutNFZ1rGD6FDlIHKaPgB7i0CGZfjfdemXW8CeYquN4LaELU4D24 ytGV8vnU/QKR+K/uaEdn/jNJjZOPRfXRC1kMdYN3ypvmiPqvd+PI1HiWiYiIxUx9cyD9 e7pjGdl19TTv+x3qYbUfCl5RsU0ToYv1RnL4pxiClNhsDYtYzJJHxwM7FRTzFrdqwg/n 69KpzY+BOQS3M18qasrZzuMpcqAM3eLSGdHnNnam53dnQYbfdEjmZYYSvj09rTP7BlsM VS8g== 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=tLUBr2+rBJulvUO62C6qN/rrKcmSzKTevtQcGeQGxNM=; b=g0H+DppcM4OGUn2sW57xoFZCzJgI4fCB0K8EVPdgHAy3Jqzu17lM3qFDiInWVOtYNI E6hW9z4H89MxuQikoQXMXd7rDPpf3OPFAtNdEIJpI2vxD7lmfPmGUj6T6vsz++1csOGG vxcDRxzDchs1ZMpZiErw8Awy4tXTkB1ihxn/WiPHb+AHtlPBITG6fjcVSWFlOZsh0RQT eRX1E5/bebLgIy87wPPznMBCLk1j08sDKd94HdoGNxGsEeTIF9cElrkiRLl9IM0zRp9A uhWHncFPBZoYuzopLKzMgYt9KnMSoBwtYZk2KJLHNG5FiHZWzuFJ/lz0vQROX8zqxYxG aXIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IGBsOVLB; 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 i1si14529466pgm.277.2022.01.24.14.23.21; Mon, 24 Jan 2022 14:23:33 -0800 (PST) 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=IGBsOVLB; 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 S1378191AbiAXWOS (ORCPT + 99 others); Mon, 24 Jan 2022 17:14:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1391084AbiAXV1j (ORCPT ); Mon, 24 Jan 2022 16:27:39 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D5D3C073237; Mon, 24 Jan 2022 12:18:37 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A5E6CB8121A; Mon, 24 Jan 2022 20:18:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D18F2C340E7; Mon, 24 Jan 2022 20:18:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055515; bh=NuK78AgEPPXwPDmJW6dh2JNWyYPSk501rOialbEenj0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IGBsOVLBFRRNuPhvGFB/P54xQzy154eHUdN5R0JDJ2ntznbfEE3Qdt5Y5cFlzodAH e2VNpfTRUUMNCk9RYc4jObv7qpdDGSMvVPgoPncSOx3o2bapETruy/5igDJIe5wJF3 KgH0zOjjwlthNQEAJsBwWKLo4tOcRwbjD0fRyHfE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marco Chiappero , Giovanni Cabiddu , Herbert Xu , Sasha Levin Subject: [PATCH 5.15 149/846] crypto: qat - remove unnecessary collision prevention step in PFVF Date: Mon, 24 Jan 2022 19:34:26 +0100 Message-Id: <20220124184106.128886461@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 e17f49bb244a281fe39bfdad0306a38b3a02e7bf ] The initial version of the PFVF protocol included an initial "carrier sensing" to get ownership of the channel. Collisions can happen anyway, the extra wait and test does not prevent collisions, it instead slows the communication down, so remove it. Signed-off-by: Marco Chiappero Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/qat/qat_common/adf_pf2vf_msg.c | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c index 5a41beb8f20f6..d3f6ff68d45d9 100644 --- a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c +++ b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c @@ -126,28 +126,10 @@ static int __adf_iov_putmsg(struct adf_accel_dev *accel_dev, u32 msg, u8 vf_nr) goto out; } - /* Attempt to get ownership of PF2VF CSR */ msg &= ~local_in_use_mask; msg |= local_in_use_pattern; - ADF_CSR_WR(pmisc_bar_addr, pf2vf_offset, msg); - /* Wait in case remote func also attempting to get ownership */ - msleep(ADF_IOV_MSG_COLLISION_DETECT_DELAY); - - val = ADF_CSR_RD(pmisc_bar_addr, pf2vf_offset); - if ((val & local_in_use_mask) != local_in_use_pattern) { - dev_dbg(&GET_DEV(accel_dev), - "PF2VF CSR in use by remote - collision detected\n"); - ret = -EBUSY; - goto out; - } - - /* - * This function now owns the PV2VF CSR. The IN_USE_BY pattern must - * remain in the PF2VF CSR for all writes including ACK from remote - * until this local function relinquishes the CSR. Send the message - * by interrupting the remote. - */ + /* Attempt to get ownership of the PF2VF CSR */ ADF_CSR_WR(pmisc_bar_addr, pf2vf_offset, msg | int_bit); /* Wait for confirmation from remote func it received the message */ -- 2.34.1