]> git.karo-electronics.de Git - karo-tx-linux.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)
commit3b6330ce2a3e1f152f79a6203f73d23356e243a7
tree3325c488b05be904ecddd176a1eea3cb3fe2e6a1
parentdbf2e8585971f2a8b1f60a188dc245fd2f8f81b3
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