]> git.baikalelectronics.ru Git - kernel.git/commit
gianfar: Add I/O barriers when touching buffer descriptor ownership.
authorScott Wood <scottwood@freescale.com>
Wed, 16 May 2007 20:06:59 +0000 (15:06 -0500)
committerJeff Garzik <jeff@garzik.org>
Fri, 18 May 2007 00:43:15 +0000 (20:43 -0400)
commitfd199699ec4f449344ec6656a563c8379212eff7
tree3325c488b05be904ecddd176a1eea3cb3fe2e6a1
parent7f576fe32f0963c291c2603954c5b04c4a4a9b05
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: Scott Wood <scottwood@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/gianfar.c