gianfar: Add I/O barriers when touching buffer descriptor ownership.
The hardware must not see that is given ownership of a buffer until it is completely written, and when the driver receives ownership of a buffer, it must ensure that any other reads to the buffer reflect its final state. Thus, I/O barriers are added where required. Without this patch, I have observed GCC reordering the setting of bdp->length and bdp->status in gfar_new_skb. Hardware reordering was also theoretically possible. Signed-off-by: NScott Wood <scottwood@freescale.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
Showing
想要评论请 注册 或 登录