提交 ab6d7cc3 编写于 作者: M Maya Erez 提交者: Kalle Valo

wil6210: guarantee safe access to rx descriptors shared memory

add memory barrier after allocating new rx descriptors, before
updating the hwtail.
This will guarantee that all writes to descriptors (shared memory)
are done before committing them to HW.
Signed-off-by: NMaya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 eb26cff1
...@@ -544,6 +544,12 @@ static int wil_rx_refill(struct wil6210_priv *wil, int count) ...@@ -544,6 +544,12 @@ static int wil_rx_refill(struct wil6210_priv *wil, int count)
break; break;
} }
} }
/* make sure all writes to descriptors (shared memory) are done before
* committing them to HW
*/
wmb();
wil_w(wil, v->hwtail, v->swtail); wil_w(wil, v->hwtail, v->swtail);
return rc; return rc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册