Poll the interrupt pipe every 100 ms instead of every 1 ms. The interrupt

pipe is only used to collect statistics so it seems rather stupid to bog
down the processor by doing this every ms.
This commit is contained in:
augustss 2000-01-19 00:25:23 +00:00
parent c3716a6bb9
commit 8d1b47c24d
2 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_aue.c,v 1.13 2000/01/18 19:46:55 augustss Exp $ */
/* $NetBSD: if_aue.c,v 1.14 2000/01/19 00:25:23 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@ -156,6 +156,10 @@ int auedebug = 0;
#define DPRINTFN(n,x)
#endif
int aue_cutoff = AUE_CUTOFF;
#undef AUE_CUTOFF
#define AUE_CUTOFF aue_cutoff
/*
* Various supported device vendors/products.
*/
@ -1521,7 +1525,8 @@ aue_init(xsc)
}
err = usbd_open_pipe_intr(sc->aue_iface, sc->aue_ed[AUE_ENDPT_INTR],
USBD_EXCLUSIVE_USE, &sc->aue_ep[AUE_ENDPT_INTR], sc,
&sc->aue_cdata.aue_ibuf, AUE_INTR_PKTLEN, aue_intr);
&sc->aue_cdata.aue_ibuf, AUE_INTR_PKTLEN, aue_intr,
AUE_INTR_INTERVAL);
if (err) {
printf("%s: open intr pipe failed: %s\n",
USBDEVNAME(sc->aue_dev), usbd_errstr(err));

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_auereg.h,v 1.1 2000/01/16 13:45:57 augustss Exp $ */
/* $NetBSD: if_auereg.h,v 1.2 2000/01/19 00:25:23 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@ -263,3 +263,4 @@ struct aue_softc {
//#define AUE_CUTOFF 1536
#define AUE_MIN_FRAMELEN 60
#define AUE_TX_TIMEOUT 10000 /* ms */
#define AUE_INTR_INTERVAL 100 /* ms */