From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7FD6DA328D for ; Tue, 22 Oct 2019 04:30:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1D9761BE9C; Tue, 22 Oct 2019 04:30:08 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 119931BE95 for ; Tue, 22 Oct 2019 04:30:01 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Oct 2019 19:30:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,325,1566889200"; d="scan'208";a="397525816" Received: from skx-5gnr-sc12-4.sc.intel.com ([172.25.69.210]) by fmsmga005.fm.intel.com with ESMTP; 21 Oct 2019 19:30:00 -0700 From: Nicolas Chautru To: akhil.goyal@nxp.com, dev@dpdk.org Cc: ferruh.yigit@intel.com, thomas@monjalon.net, Nic Chautru Date: Mon, 21 Oct 2019 12:24:10 -0700 Message-Id: <1571685850-382423-3-git-send-email-nicolas.chautru@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1571685850-382423-1-git-send-email-nicolas.chautru@intel.com> References: <1571685850-382423-1-git-send-email-nicolas.chautru@intel.com> Subject: [dpdk-dev] [PATCH v1 2/2] baseband/fpga_lte_fec: fix to polling of MMIO register X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Nic Chautru Polling of a MMIO register could misreport the actual value set dynamically in hardware as the variable was not set explictly to volatile integer. Signed-off-by: Nic Chautru --- drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c index 2fc7f11..8bd10b4 100644 --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c @@ -889,7 +889,7 @@ struct __rte_cache_aligned fpga_queue { * completed. If completion flag is not updated within 1ms it is * considered as a failure. */ - while (!(*((uint8_t *)d->flush_queue_status + q->q_idx) & payload)) { + while (!(*((volatile uint8_t *)d->flush_queue_status + q->q_idx) & payload)) { if (counter > timeout) { rte_bbdev_log(ERR, "FPGA Queue Flush failed for queue %d", queue_id); -- 1.8.3.1