From owner-freebsd-hardware Sat Feb 12 6:15: 0 2000 Delivered-To: freebsd-hardware@freebsd.org Received: from polaris.we.lc.ehu.es (polaris.we.lc.ehu.es [158.227.6.43]) by builder.freebsd.org (Postfix) with ESMTP id 81C3B3E85; Sat, 12 Feb 2000 06:14:54 -0800 (PST) Received: from we.lc.ehu.es (lxpxdo.lx.ehu.es [158.227.99.192]) by polaris.we.lc.ehu.es (8.9.1/8.9.1) with ESMTP id PAA06288; Sat, 12 Feb 2000 15:14:49 +0100 (MET) Message-ID: <38A56AD6.8C3E1A97@we.lc.ehu.es> Date: Sat, 12 Feb 2000 15:14:46 +0100 From: "Jose M. Alcaide" Organization: Universidad del =?iso-8859-1?Q?Pa=EDs?= Vasco - Dpto. de Electricidad y =?iso-8859-1?Q?Electr=F3nica?= X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.4-RELEASE i386) X-Accept-Language: es-ES, es, en-US, en MIME-Version: 1.0 To: freebsd-hardware@FreeBSD.org Cc: freebsd-mobile@FreeBSD.org Subject: [fix and RFC] interrupt-level buffer overflows with Xircom PCMCIA modem Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I have just purchased a Xircom RealPort Modem 56, which I easily got working as sio1 after adding an entry to pccard.conf (the laptop runs 3.4-RELEASE). However, I was getting many messages like these on the console: sio1: 31 more interrupt-level buffer overflows (total 31) sio1: 273 more interrupt-level buffer overflows (total 273) sio1: 437 more interrupt-level buffer overflows (total 710) ... and so on. I tested this problem simply using the user-ppp's terminal, and typing modem commands such as "AT&V" or "ATI11", which give several lines of output. I must clearly state that the modem has RTS/CTS flow control enabled (AT&K3). And the laptop is new: a Dell Inspiron 3700 with a Celeron-433 processor, so that the system speed or load are not the causes of this problem. The first "solution" I tried was to disable the 16550A's FIFO using the sio(4) flag "0x02". The messages went away, indeed, but I was seeing ~3000 interrupts/second for sio1, and this is very bad. Then, I thought that increasing the sio's receive and/or send buffer sizes could be a better solution, so that after reading sys/i386/isa/sio.c I found the RS_IBUFSIZE macro, #defined to 256, and I incremented its value to 1024. This means that the memory dedicated to sio buffers grow from 1 Kbyte to 4 Kbyte for each sio device. Anyway, I compiled a new kernel and the buffer overflows dissapeared (with the 16550A's FIFO re-enabled, of course). Now, the conclusions: perhaps RS_IBUFSIZE=256 is too low for some devices (notably internal modems); it's only a theory. Or perhaps some devices have problems with RTS/CTS flow control. In any case, I suggest the addition of a new kernel configuration option for permitting to change RS_IBUFSIZE to any desired value. Any comments or ideas? -- JMA ----------------------------------------------------------------------- José Mª Alcaide | mailto:jose@we.lc.ehu.es Universidad del País Vasco | mailto:jmas@FreeBSD.org Dpto. de Electricidad y Electrónica | http://www.we.lc.ehu.es/~jose Facultad de Ciencias - Campus de Lejona | Tel.: +34-946012479 48940 Lejona (Vizcaya) - SPAIN | Fax: +34-946013071 ----------------------------------------------------------------------- "Beware of Programmers who carry screwdrivers" -- Leonard Brandwein To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message