From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6B8BEA0540 for ; Fri, 29 Jul 2022 09:47:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6830842C0B; Fri, 29 Jul 2022 09:47:44 +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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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 --- 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); -- 2.25.1