diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2015-09-23 17:22:19 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2015-09-23 17:22:19 +0000 |
commit | 12dbae63f6aefaf219154a1a9aebe3d907472e65 (patch) | |
tree | 08a87c6a42bec41415a8bb7d7ea2de2883bd1bcb /sys/dev/pci/if_iwm.c | |
parent | 27ae27b74d32649651bdc9ab15402abd4acfed19 (diff) |
In iwm(4), properly reset the RX ring by clearing RX buffer status memory.
Found by Matthew Dillon (Dragonfly). DMA sync hint from tedu@, ok mpi@
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 6410f7fced2..06db4443fb8 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.47 2015/09/23 17:21:50 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.48 2015/09/23 17:22:18 stsp Exp $ */ /* * Copyright (c) 2014 genua mbh <info@genua.de> @@ -1046,6 +1046,12 @@ iwm_reset_rx_ring(struct iwm_softc *sc, struct iwm_rx_ring *ring) iwm_nic_unlock(sc); } ring->cur = 0; + bus_dmamap_sync(sc->sc_dmat, ring->stat_dma.map, 0, + ring->stat_dma.size, BUS_DMASYNC_PREWRITE); + memset(ring->stat, 0, sizeof(*ring->stat)); + bus_dmamap_sync(sc->sc_dmat, ring->stat_dma.map, 0, + ring->stat_dma.size, BUS_DMASYNC_POSTWRITE); + } void |