summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/si.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-05-05 17:09:04 +0000
committerpeter <peter@FreeBSD.org>1996-05-05 17:09:04 +0000
commit9785128d44ffe2d45a73db37a7fbcf2ae751baa6 (patch)
treef86754912d207e6f4d4b0d712b9f735d267673f6 /sys/i386/isa/si.c
parentbfed4e31e9e01282e9c03ffa90a60456deb852fb (diff)
downloadFreeBSD-src-9785128d44ffe2d45a73db37a7fbcf2ae751baa6.zip
FreeBSD-src-9785128d44ffe2d45a73db37a7fbcf2ae751baa6.tar.gz
Change the compiled-in polling parameters to a sysctl setting.
Diffstat (limited to 'sys/i386/isa/si.c')
-rw-r--r--sys/i386/isa/si.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/i386/isa/si.c b/sys/i386/isa/si.c
index faef542..e60a087 100644
--- a/sys/i386/isa/si.c
+++ b/sys/i386/isa/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.36 1996/01/25 07:21:33 phk Exp $
+ * $Id: si.c,v 1.37 1996/03/28 14:28:51 scrappy Exp $
*/
#ifndef lint
@@ -82,9 +82,10 @@ static char si_copyright1[] = "@(#) (C) Specialix International, 1990,1992",
*/
#define POLL /* turn on poller to generate buffer empty interrupt */
-#undef FASTPOLL /* turn on 100Hz poller, (XXX: NOTYET!) */
#define SI_DEF_HWFLOW /* turn on default CRTSCTS flow control */
#define SI_I_HIGH_WATER (TTYHOG - 2 * SI_BUFFERSIZE)
+#define INT_COUNT 25000 /* max of 125 ints per second */
+#define RXINT_COUNT 1 /* one rxint per 10 milliseconds */
enum si_mctl { GET, SET, BIS, BIC };
@@ -227,7 +228,10 @@ static int si_default_cflag = TTYDEF_CFLAG;
#endif
#ifdef POLL
-#define POLL_INTERVAL (hz/2)
+static int si_pollrate = (hz / 10); /* 10 per second, in addition to irq */
+
+SYSCTL_INT(_machdep, OID_AUTO, si_pollrate, CTLFLAG_RD, &si_pollrate, 0, "");
+
static int init_finished = 0;
static int fastpoll = 0;
static void si_poll __P((void *));
@@ -560,9 +564,9 @@ siattach(id)
return 0;
case 1:
/* set throttle to 125 intr per second */
- regp->int_count = 25000;
+ regp->int_count = INT_COUNT;
/* rx intr max of 25 timer per second */
- regp->rx_int_count = 4;
+ regp->rx_int_count = RXINT_COUNT;
regp->int_pending = 0; /* no intr pending */
regp->int_scounter = 0; /* reset counter */
break;
@@ -761,7 +765,7 @@ siopen(dev, flag, mode, p)
* We've now got a device, so start the poller.
*/
if (init_finished == 0) {
- timeout(si_poll, (caddr_t)0L, POLL_INTERVAL);
+ timeout(si_poll, (caddr_t)0L, si_pollrate);
init_finished = 1;
}
#endif
@@ -1733,7 +1737,7 @@ si_poll(void *nothing)
out:
splx(oldspl);
- timeout(si_poll, (caddr_t)0L, POLL_INTERVAL);
+ timeout(si_poll, (caddr_t)0L, si_pollrate);
}
#endif /* ifdef POLL */
OpenPOWER on IntegriCloud