mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-16 12:32:13 +08:00
ffec: Add wmb() to descriptor updates
This commit is contained in:
@@ -593,6 +593,7 @@ ffec_setup_txdesc(struct ffec_softc *sc, int idx, bus_addr_t paddr,
|
|||||||
* significant bits.
|
* significant bits.
|
||||||
*/
|
*/
|
||||||
sc->txdesc_ring[idx].buf_paddr = (uint32_t)paddr;
|
sc->txdesc_ring[idx].buf_paddr = (uint32_t)paddr;
|
||||||
|
wmb();
|
||||||
sc->txdesc_ring[idx].flags_len = flags | len; /* Must be set last! */
|
sc->txdesc_ring[idx].flags_len = flags | len; /* Must be set last! */
|
||||||
|
|
||||||
return (nidx);
|
return (nidx);
|
||||||
@@ -739,6 +740,7 @@ ffec_setup_rxdesc(struct ffec_softc *sc, int idx, bus_addr_t paddr)
|
|||||||
*/
|
*/
|
||||||
nidx = next_rxidx(sc, idx);
|
nidx = next_rxidx(sc, idx);
|
||||||
sc->rxdesc_ring[idx].buf_paddr = (uint32_t)paddr;
|
sc->rxdesc_ring[idx].buf_paddr = (uint32_t)paddr;
|
||||||
|
wmb();
|
||||||
sc->rxdesc_ring[idx].flags_len = FEC_RXDESC_EMPTY |
|
sc->rxdesc_ring[idx].flags_len = FEC_RXDESC_EMPTY |
|
||||||
((nidx == 0) ? FEC_RXDESC_WRAP : 0);
|
((nidx == 0) ? FEC_RXDESC_WRAP : 0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user