From: adrian Date: Fri, 18 Sep 2015 17:39:31 +0000 (+0000) Subject: Ensure the ring state is also blanked upon reset, otherwise X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=45fe7b1fa02453ebd682dda558daee22c9ac31a1;p=people%2Fjulieng%2Ffreebsd.git Ensure the ring state is also blanked upon reset, otherwise duplicate rx events get handled during reset paths. Submitted by: Matthew Dillion Obtained from: DragonflyBSD --- diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index 46abd16ed613..cd2ccd2814f3 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -884,7 +884,9 @@ iwm_reset_rx_ring(struct iwm_softc *sc, struct iwm_rx_ring *ring) (void) iwm_pcie_rx_stop(sc); iwm_nic_unlock(sc); } + /* Reset the ring state */ ring->cur = 0; + memset(sc->rxq.stat, 0, sizeof(*sc->rxq.stat)); } static void