Date: Tue, 17 Dec 1996 02:35:18 -0800 (PST) From: John-Mark Gurney <jmg@nike.efn.org> To: FreeBSD-gnats@freefall.FreeBSD.org Subject: i386/2239: some interrupts take too long and cause a sio buffer overflow (i.e. the bt946) Message-ID: <199612171035.CAA10283@nike.efn.org> Resent-Message-ID: <199612180130.RAA06637@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 2239
>Category: i386
>Synopsis: some interrupts take too long (i.e. BT946) and can cause a sio buffer overflow
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Dec 17 17:30:01 PST 1996
>Last-Modified:
>Originator: John-Mark Gurney
>Organization:
Cu Networking
>Release: FreeBSD 2.2-960801-SNAP i386
>Environment:
sources checked out as of tonight (i.e. diff'd against current)
my machine is a amd5x86/133 w/ 48megs ram, a BT946 scsi card, and a couple 16550s...
>Description:
the bt946 if you hit a bunch of transfers it will hog the bus longer than the time it takes to recieve 2 chars at 115200... which will than cause an overflow... easy fix is to increase the buffer from 2 to 8 chars...
this patch adds an option SIOBIGBUFF, which will increase the 16550's buffer from 2 to 8 chars...
I made this a system wide option as I assume that you will be running 115200 on most if not all your 16550 ports... if you want I could modify this to be a flags option for a per port basis...
>How-To-Repeat:
do a big transfer with data coming in at 115200 on a sio port...
>Fix:
apply this patch and recompile your kernel with options SIOBIGBUF:
Index: isa/sio.c
===================================================================
RCS file: /usr/cvs/src/sys/i386/isa/sio.c,v
retrieving revision 1.154
diff -c -r1.154 sio.c
*** sio.c 1996/11/30 15:52:56 1.154
--- sio.c 1996/12/17 10:29:10
***************
*** 862,867 ****
--- 862,871 ----
} else {
com->hasfifo = TRUE;
com->tx_fifo_size = 16;
+ #ifdef SIOBIGBUF
+ outb(iobase + com_fifo, FIFO_ENABLE | FIFO_RX_MEDH);
+ printf(" fifo set to 8 chars");
+ #endif
#ifdef COM_ESP
for (espp = likely_esp_ports; *espp != 0; espp++)
if (espattach(isdp, com, *espp)) {
Index: conf/LINT
===================================================================
RCS file: /usr/cvs/src/sys/i386/conf/LINT,v
retrieving revision 1.297
diff -c -r1.297 LINT
*** LINT 1996/11/29 07:08:48 1.297
--- LINT 1996/12/17 10:33:26
***************
*** 673,678 ****
--- 673,679 ----
options COM_ESP #code for Hayes ESP
options COM_MULTIPORT #code for some cards with shared IRQs
options DSI_SOFT_MODEM #code for DSI Softmodems
+ options SIOBIGBUF #increase default buf from 2 to 8 chars on 16550s
options BREAK_TO_DEBUGGER #a BREAK on a comconsole goes to
#DDB, if available.
Index: conf/options.i386
===================================================================
RCS file: /usr/cvs/src/sys/i386/conf/options.i386,v
retrieving revision 1.31
diff -c -r1.31 options.i386
*** options.i386 1996/11/16 01:09:20 1.31
--- options.i386 1996/12/17 10:18:32
***************
*** 21,26 ****
--- 21,27 ----
COM_ESP opt_sio.h
COM_MULTIPORT opt_sio.h
DSI_SOFT_MODEM opt_sio.h
+ SIOBIGBUF opt_sio.h
I586_CTR_GUPROF opt_i586_guprof.h
I586_PMC_GUPROF opt_i586_guprof.h
FAT_CURSOR opt_pcvt.h
>Audit-Trail:
>Unformatted:
John-Mark Gurney
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612171035.CAA10283>
