summaryrefslogtreecommitdiffstats
path: root/sys/dev/si
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-08-12 17:12:07 +0000
committerpeter <peter@FreeBSD.org>1996-08-12 17:12:07 +0000
commitbfb5d5b14dc304ccee64fd8c6fd1202f4d001d8d (patch)
tree83468a1370e54c01ddcb569428699806bfdd8c6b /sys/dev/si
parent4485ba15572bfb57c5d32b1c2610d78bf969f5e2 (diff)
downloadFreeBSD-src-bfb5d5b14dc304ccee64fd8c6fd1202f4d001d8d.zip
FreeBSD-src-bfb5d5b14dc304ccee64fd8c6fd1202f4d001d8d.tar.gz
Extend the poll code so that it can periodically scan the host cards
for work regardless of whether there was an interrupt. This needs more work, it should be able to run better when there are more than 3 host cards present, ie: all cards in polling-only mode with no IRQ. (The host cards have a choice of 3 irq's, 11, 12, or 15, or just polling)
Diffstat (limited to 'sys/dev/si')
-rw-r--r--sys/dev/si/si.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index a92ab4a..bcb301d 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/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.49 1996/07/26 16:55:37 peter Exp $
+ * $Id: si.c,v 1.50 1996/08/03 00:21:44 peter Exp $
*/
#ifndef lint
@@ -82,7 +82,9 @@ static const char si_copyright1[] = "@(#) (C) Specialix International, 1990,199
* and a (programmable - SIHOST2) interrupt at IRQ 11,12 or 15.
*/
-#define POLL /* turn on poller to generate buffer empty interrupt */
+#define POLL /* turn on poller to scan for lost interrupts */
+#define REALPOLL /* on each poll, scan for work regardless */
+#define POLLHZ (hz/10) /* 10 times per second */
#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 */
@@ -230,8 +232,10 @@ static int si_default_cflag = TTYDEF_CFLAG;
#ifdef POLL
static int si_pollrate; /* in addition to irq */
+static int si_realpoll; /* poll HW on timer */
SYSCTL_INT(_machdep, OID_AUTO, si_pollrate, CTLFLAG_RW, &si_pollrate, 0, "");
+SYSCTL_INT(_machdep, OID_AUTO, si_realpoll, CTLFLAG_RW, &si_realpoll, 0, "");
static int init_finished = 0;
static void si_poll __P((void *));
@@ -288,7 +292,10 @@ siprobe(id)
si_registerdev(id);
- si_pollrate = (hz / 10); /* 10 per second */
+ si_pollrate = POLLHZ; /* default 10 per second */
+#ifdef REALPOLL
+ si_realpoll = 1; /* scan always */
+#endif
maddr = id->id_maddr; /* virtual address... */
paddr = (caddr_t)vtophys(id->id_maddr); /* physical address... */
@@ -1737,7 +1744,7 @@ si_poll(void *nothing)
}
}
}
- if (lost)
+ if (lost || si_realpoll)
siintr(-1); /* call intr with fake vector */
out:
splx(oldspl);
OpenPOWER on IntegriCloud