[v1,2/2] baseband/fpga_lte_fec: fix to polling of MMIO register

Message ID 1571685850-382423-3-git-send-email-nicolas.chautru@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series baseband/fpga_lte_fec: bug fixes from HW validation |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK

Commit Message

Chautru, Nicolas Oct. 21, 2019, 7:24 p.m. UTC
  From: Nic Chautru <nicolas.chautru@intel.com>

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 <nicolas.chautru@intel.com>
---
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

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);