From patchwork Fri Jul 29 07:47:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arkadiusz Kusztal X-Patchwork-Id: 114427 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E3E78A04FD; Fri, 29 Jul 2022 09:47:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9319D4069C; Fri, 29 Jul 2022 09:47:43 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 0FB7D40151; Fri, 29 Jul 2022 09:47:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659080862; x=1690616862; h=from:to:cc:subject:date:message-id; bh=M15tahLStlB+35gP8fDnf22YyRM5JXwruS2L+z+Lq0o=; b=RLnAB0ImmtskxEyceS++5h9m+X5sV61QVxzEw2tQZ5X38Xg8fiVJ//bU dPkHlEXobNd7mNWgBM/cz6XmL285r3DNkVuI3K50gPcene3ObyUXytiVo Thg5x8IVApLDFZgqbqWoeww5rUquWJL2XSdm1D2it+Dg49NuY/ROWxGhS rE3JhSz/VygG+uKbRTXumM1+2YSo551tm48uwXuMhgcCy0Nn2KvfBr6hG v2KFXnID5tagmzqIYQgBLO64CgwAvQzEgqFcwjVmoAY1hK1Uv5Qd/nDA1 QEmWaC1QfesPr3rDPSCfB2EKE18PsYLVTh83nhMm3oIQjoSic6lhiS9BM Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10422"; a="268480185" X-IronPort-AV: E=Sophos;i="5.93,200,1654585200"; d="scan'208";a="268480185" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2022 00:47:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,200,1654585200"; d="scan'208";a="598180826" Received: from silpixa00400308.ir.intel.com ([10.237.214.95]) by orsmga007.jf.intel.com with ESMTP; 29 Jul 2022 00:47:38 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, Arek Kusztal , stable@dpdk.org Subject: [PATCH] common/qat: fix vf2pf answer Date: Fri, 29 Jul 2022 08:47:31 +0100 Message-Id: <20220729074731.5641-1-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This commit fixes answer sent to physical device in vf2pf communication. Fixes: b17d16fb47b4 ("common/qat: add PF to VF communication") Cc: stable@dpdk.org Signed-off-by: Arek Kusztal Acked-by: Fan Zhang --- drivers/common/qat/qat_pf2vf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/common/qat/qat_pf2vf.c b/drivers/common/qat/qat_pf2vf.c index 4e9ffc72fc..621f12fce2 100644 --- a/drivers/common/qat/qat_pf2vf.c +++ b/drivers/common/qat/qat_pf2vf.c @@ -59,7 +59,7 @@ int qat_pf2vf_exch_msg(struct qat_pci_device *qat_dev, * the message */ do { - rte_delay_us_sleep(5); + rte_delay_us_sleep(ADF_IOV_MSG_ACK_DELAY_US * 2); val = ADF_CSR_RD(pmisc_bar_addr, vf_csr_off); } while ((val & ADF_PFVF_INT) && (++count < ADF_IOV_MSG_ACK_MAX_RETRY)); @@ -70,6 +70,8 @@ int qat_pf2vf_exch_msg(struct qat_pci_device *qat_dev, } uint32_t pf_val = ADF_CSR_RD(pmisc_bar_addr, pf_csr_off); + msg &= ~ADF_PFVF_INT; + ADF_CSR_WR(pmisc_bar_addr, pf_csr_off, msg); *(ret + i) = (uint8_t)(pf_val >> (pf2vf_msg.block_hdr > 0 ? 10 : 8) & 0xff);