]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Ensure the ring state is also blanked upon reset, otherwise
authoradrian <adrian@FreeBSD.org>
Fri, 18 Sep 2015 17:39:31 +0000 (17:39 +0000)
committeradrian <adrian@FreeBSD.org>
Fri, 18 Sep 2015 17:39:31 +0000 (17:39 +0000)
duplicate rx events get handled during reset paths.

Submitted by: Matthew Dillion <dillon@apollo.backplane.com>
Obtained from: DragonflyBSD

sys/dev/iwm/if_iwm.c

index 46abd16ed613253d7ae79abe212367165abff378..cd2ccd2814f3ac4564f01c5874b5c827442a146e 100644 (file)
@@ -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