From owner-freebsd-bugs Tue Dec 17 17:30:04 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id RAA06643 for bugs-outgoing; Tue, 17 Dec 1996 17:30:04 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id RAA06637; Tue, 17 Dec 1996 17:30:02 -0800 (PST) Resent-Date: Tue, 17 Dec 1996 17:30:02 -0800 (PST) Resent-Message-Id: <199612180130.RAA06637@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, gurney_j@efn.org Received: from mail.webspan.net (mail.webspan.net [206.154.70.7]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id RAA06160 for ; Tue, 17 Dec 1996 17:20:12 -0800 (PST) Received: from orion.webspan.net (orion.webspan.net [206.154.70.5]) by mail.webspan.net (8.7.5/8.7.3) with ESMTP id UAA18240 for ; Tue, 17 Dec 1996 20:19:27 -0500 (EST) Received: from orion.webspan.net (localhost [127.0.0.1]) by orion.webspan.net (8.8.3/8.7.3) with ESMTP id UAA29471 for ; Tue, 17 Dec 1996 20:19:27 -0500 (EST) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.18]) by mail.webspan.net (8.7.5/8.7.3) with ESMTP id FAA24941 for ; Tue, 17 Dec 1996 05:35:26 -0500 (EST) Received: from nike.efn.org (resnet.uoregon.edu [128.223.170.28]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id CAA13937 for ; Tue, 17 Dec 1996 02:35:19 -0800 (PST) Received: (from jmg@localhost) by nike.efn.org (8.8.3/8.8.3) id CAA10283; Tue, 17 Dec 1996 02:35:18 -0800 (PST) Message-Id: <199612171035.CAA10283@nike.efn.org> Date: Tue, 17 Dec 1996 02:35:18 -0800 (PST) From: John-Mark Gurney Reply-To: gurney_j@efn.org To: FreeBSD-gnats@freefall.FreeBSD.org X-Send-Pr-Version: 3.2 Subject: i386/2239: some interrupts take too long and cause a sio buffer overflow (i.e. the bt946) Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >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