From a96a3fa4ca1d0bd8a50bba12603805be55e455f4 Mon Sep 17 00:00:00 2001 From: augustss Date: Sun, 28 Jan 2001 16:18:09 +0000 Subject: [PATCH] Put a rate limiter on the scheduling overrun message. --- sys/dev/usb/ohci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 99334de1a53a..bc0c09b605be 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.99 2001/01/21 02:39:52 augustss Exp $ */ +/* $NetBSD: ohci.c,v 1.100 2001/01/28 16:18:09 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ /* @@ -1077,7 +1077,12 @@ ohci_intr1(ohci_softc_t *sc) (u_int)eintrs)); if (eintrs & OHCI_SO) { - printf("%s: scheduling overrun\n",USBDEVNAME(sc->sc_bus.bdev)); + sc->sc_overrun_cnt++; + if (usbd_ratecheck(&sc->sc_overrun_ntc)) { + printf("%s: %u scheduling overruns\n", + USBDEVNAME(sc->sc_bus.bdev), sc->sc_overrun_cnt); + sc->sc_overrun_cnt = 0; + } /* XXX do what */ intrs &= ~OHCI_SO; }