From 413bae20bb475f5cfd6049fd6d9a87b5100d0470 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Fri, 18 Sep 2015 17:39:31 +0000 Subject: [PATCH] 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 --- sys/dev/iwm/if_iwm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index 46abd16ed61..cd2ccd2814f 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