qcacld-3.0: Add mb before updating the write index of remote ring
When replenishing Rx buffers driver updates the address of the buffer and the index of rx buffer in rx ring to the firmware. Make sure alloc index write is reflected in the memory before FW polls the remote ring write index as compiler can reorder the instructions based on optimizations. Disable compile time reorder by adding a write memory barrier. Change-Id: Icb37598e6c36b4a128b1bcd91bfb9d643bf083e2 CRs-Fixed: 2084210
This commit is contained in:
@@ -541,6 +541,12 @@ moretofill:
|
||||
}
|
||||
|
||||
fail:
|
||||
/*
|
||||
* Make sure alloc index write is reflected correctly before FW polls
|
||||
* remote ring write index as compiler can reorder the instructions
|
||||
* based on optimizations.
|
||||
*/
|
||||
qdf_mb();
|
||||
*(pdev->rx_ring.alloc_idx.vaddr) = idx;
|
||||
htt_rx_dbg_rxbuf_indupd(pdev, idx);
|
||||
|
||||
|
Reference in New Issue
Block a user