[rtems-libbsd commit] ffec: Add wmb() to descriptor updates
Sebastian Huber
sebh at rtems.org
Wed Sep 27 09:13:03 UTC 2017
Module: rtems-libbsd
Branch: master
Commit: a70edfc49a469645cac275b5f2b0d69ca8219aa8
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=a70edfc49a469645cac275b5f2b0d69ca8219aa8
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Sep 27 09:37:38 2017 +0200
ffec: Add wmb() to descriptor updates
---
freebsd/sys/dev/ffec/if_ffec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/freebsd/sys/dev/ffec/if_ffec.c b/freebsd/sys/dev/ffec/if_ffec.c
index e0dff34..1173663 100644
--- a/freebsd/sys/dev/ffec/if_ffec.c
+++ b/freebsd/sys/dev/ffec/if_ffec.c
@@ -593,6 +593,7 @@ ffec_setup_txdesc(struct ffec_softc *sc, int idx, bus_addr_t paddr,
* significant bits.
*/
sc->txdesc_ring[idx].buf_paddr = (uint32_t)paddr;
+ wmb();
sc->txdesc_ring[idx].flags_len = flags | len; /* Must be set last! */
return (nidx);
@@ -739,6 +740,7 @@ ffec_setup_rxdesc(struct ffec_softc *sc, int idx, bus_addr_t paddr)
*/
nidx = next_rxidx(sc, idx);
sc->rxdesc_ring[idx].buf_paddr = (uint32_t)paddr;
+ wmb();
sc->rxdesc_ring[idx].flags_len = FEC_RXDESC_EMPTY |
((nidx == 0) ? FEC_RXDESC_WRAP : 0);
More information about the vc
mailing list