diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2012-08-15 16:30:26 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2012-08-15 16:30:26 +0000 |
commit | e473196e5cc5f1135d277703239ce272506eed45 (patch) | |
tree | 77111e5f40218e7f1bc522cdc70ad9a9c7a6462b | |
parent | 2a98afab0b631cba796e2c63f470b91bf9da56de (diff) |
we're not going to loop in rxeof here as well so remove the leftovers
from brad, ok jsg
-rw-r--r-- | sys/dev/pci/if_em.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index 15c11cb439e..d69e8c7fbfb 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.264 2012/05/17 10:45:17 jsg Exp $ */ +/* $OpenBSD: if_em.c,v 1.265 2012/08/15 16:30:25 mikeb Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include <dev/pci/if_em.h> @@ -2534,6 +2534,8 @@ em_allocate_receive_structures(struct em_softc *sc) sc->sc_dv.dv_xname); return (ENOMEM); } + printf("%s: allocated rx_buffer_area at %p (for %d)\n", + sc->sc_dv.dv_xname, sc->rx_buffer_area, sc->num_rx_desc); sc->rxtag = sc->osdep.em_pa.pa_dmat; @@ -2719,6 +2721,8 @@ em_free_receive_structures(struct em_softc *sc) } } if (sc->rx_buffer_area != NULL) { + printf("%s: deallocated rx_buffer_area at %p\n", + sc->sc_dv.dv_xname, sc->rx_buffer_area); free(sc->rx_buffer_area, M_DEVBUF); sc->rx_buffer_area = NULL; } @@ -2783,7 +2787,7 @@ int em_rxfill(struct em_softc *sc) { int post = 0; - int i; + int i, iter = 0; i = sc->last_rx_desc_filled; @@ -2791,6 +2795,14 @@ em_rxfill(struct em_softc *sc) if (++i == sc->num_rx_desc) i = 0; + if (&sc->rx_buffer_area[i] == NULL) + panic("%s: rxfill(%d): null pkt at %p[%d], " + "last %d ndescs %d/%d\n", sc->sc_dv.dv_xname, + iter, sc->rx_buffer_area, i, + sc->last_rx_desc_filled, sc->rx_ndescs, + sc->num_rx_desc); + iter++; + if (em_get_buf(sc, i) != 0) break; |