From: thib Date: Fri, 8 Aug 2008 12:20:24 +0000 (+0000) Subject: if we fail to extract the mbuf in the Rx routine, increment X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=255388bf917981e2c676c7026d72035ff1e3f6ba;p=openbsd 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@ --- 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 @@ -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);