summaryrefslogtreecommitdiffstats
path: root/sys/dev/sio/sio.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-01-31 06:12:18 +0000
committerdg <dg@FreeBSD.org>1994-01-31 06:12:18 +0000
commit4aadf8a7c8066d03ccd20bd3bd753f920df6a482 (patch)
treebeeba8dbc36782e11c5c087407c26165e193d87f /sys/dev/sio/sio.c
parent34c281958ff83b024679e26b1d02389e0b96b937 (diff)
downloadFreeBSD-src-4aadf8a7c8066d03ccd20bd3bd753f920df6a482.zip
FreeBSD-src-4aadf8a7c8066d03ccd20bd3bd753f920df6a482.tar.gz
Patch from Brian Smith (modified a little by me) to allow kernel config
file override to disable fifo on 16550s: I bought a board with two 16550's, but one of those ports has a mouse on it. The sio driver always enables the fifo, which is a bad thing for mice and X. The mouse is jerky and hard to use. The simple thing is be to treat one of the ports as a non-fifo'ed UART, and I use the flags option in my config file. So, my config file has: device sio0 at isa? port "IO_COM1" tty irq 4 flags 0x2 vector siointr device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr (patch deleted)
Diffstat (limited to 'sys/dev/sio/sio.c')
-rw-r--r--sys/dev/sio/sio.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 9b2ddfe..21c9f90 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.21 1994/01/02 10:17:29 ache Exp $
+ * $Id: sio.c,v 1.22 1994/01/11 18:31:45 ache Exp $
*/
#include "sio.h"
@@ -83,6 +83,7 @@
#define COM_ISMULTIPORT(dev) ((dev)->id_flags & 0x01)
#define COM_MPMASTER(dev) (((dev)->id_flags >> 8) & 0x0ff)
#endif /* COM_MULTIPORT */
+#define COM_NOFIFO(dev) ((dev)->id_flags & 0x02)
#ifndef FIFO_TRIGGER
/*
@@ -475,8 +476,12 @@ sioattach(isdp)
printf(" 16550?");
break;
case FIFO_TRIGGER_14:
- com->hasfifo = TRUE;
printf(" 16550A");
+ if (COM_NOFIFO(isdp)) {
+ printf(" fifo software disabled");
+ } else {
+ com->hasfifo = TRUE;
+ }
break;
}
outb(iobase + com_fifo, 0);
OpenPOWER on IntegriCloud