diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-08-08 12:20:25 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-08-08 12:20:25 +0000 |
commit | 08cefe2891aaaea5e801226c69b338f09fa3de7e (patch) | |
tree | a5693219a2a5edc1e0e7b6ffd6cdcc4239f5b87b | |
parent | 5f56f7e8f69c70da3b2bf519691a1bd19ef805eb (diff) |
if we fail to extract the mbuf in the Rx routine, increment
the if_ierrors before bailing out;
Turn a printf() that fires in this case too a DPRINTF since we
the interface error counters now reflect this.
OK mglocker@
-rw-r--r-- | sys/dev/usb/if_upgt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/if_upgt.c b/sys/dev/usb/if_upgt.c index 7efb28a69c0..71dc2102db4 100644 --- a/sys/dev/usb/if_upgt.c +++ b/sys/dev/usb/if_upgt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_upgt.c,v 1.36 2008/07/21 18:43:19 damien Exp $ */ +/* $OpenBSD: if_upgt.c,v 1.37 2008/08/08 12:20:24 thib Exp $ */ /* * Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org> @@ -1783,7 +1783,8 @@ upgt_rx(struct upgt_softc *sc, uint8_t *data, int pkglen) m = m_devget(rxdesc->data - ETHER_ALIGN, pkglen + ETHER_ALIGN, 0, ifp, NULL); if (m == NULL) { - printf("%s: could not create RX mbuf!\n", sc->sc_dev.dv_xname); + DPRINTF(1, "%s: could not create RX mbuf!\n", sc->sc_dev.dv_xname); + ifp->if_ierrors++; return; } m_adj(m, ETHER_ALIGN); |