From owner-freebsd-mobile Mon Jul 3 8:27:33 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from horizon.barak-online.net (horizon.barak.net.il [206.49.94.218]) by hub.freebsd.org (Postfix) with ESMTP id 95D7637B55D for ; Mon, 3 Jul 2000 08:27:25 -0700 (PDT) (envelope-from bk532@iname.com) Received: from localhost.local.net (pop09-1-ras1-p225.barak.net.il [212.150.107.225]) by horizon.barak-online.net (8.9.3/8.9.1) with ESMTP id SAA09622 for ; Mon, 3 Jul 2000 18:26:33 +0300 (IDT) Received: from iname.com (localhost.local.net [127.0.0.1]) by localhost.local.net (8.9.3/8.9.3) with ESMTP id SAA00523 for ; Mon, 3 Jul 2000 18:24:27 +0300 (IDT) (envelope-from bk532@iname.com) Message-ID: <3960B028.1AE4DC34@iname.com> Date: Mon, 03 Jul 2000 18:24:24 +0300 From: Boris Karnaukh Organization: Private person X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.0-STABLE i386) X-Accept-Language: en, ru MIME-Version: 1.0 Cc: freebsd-mobile@FreeBSD.ORG Subject: Re: "interrupt-level buffer overflows" with Xircom RealPort Modem 56 References: <38A44C3D.6B2B39A6@we.lc.ehu.es> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org "Jose M. Alcaide" wrote: > > Hello, > > I have just purchased a Xircom RealPort Modem 56 (PCMCIA). I easily > got it working as sio1 adding an entry to pccard.conf. However, > messages like these appeared on the console while I was testing > the modem from user-ppp (term), typing commands such as "AT&V" or > "ATI11", which give some lines of output: > > 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. > > After reading the sio(4) manpage and briefly examining sio.c, I disabled > the FIFO with sio flags 0x20, and the messages went away. However, > this modem supposedly has (or emulates) a 16550A, which has a 16-byte FIFO. > I also tried sio flags 0x08 (polled output) and 0x08000000 (8-byte FIFO) > to no avail. Only disabling the FIFO works, but this could affect > performance. > > The laptop is new, a Dell Inspiron 3700 with a Celeron 433, so that > this is not a CPU speed problem. And a PCMCIA Ethernet card works > fine, so that this is not a general interrupt processing problem. > > A final note: I had "AUTO_EOI1" enabled in the kernel, but removing it > did not make any effect on the buffer overflows. > > Any ideas? Is anyone using other similar Xircom modems, and having this > same problem? > As you can see in sio.c, size of input buffer for com port is determined using simple formula: cp4ticks = speed / 10 / hz * 4; for (ibufsize = 128; ibufsize < cp4ticks;) ibufsize <<= 1; According to this formula we find 512 byte buffer for serial port on 115200. I think it's slightly overoptimistic. According to my own experience from DOS era, sometimes I had to setup buffers in FOSSIL driver (anyone knows what it was?-) to 4096 bytes. So i've replaced in mentioned above formula 4 with 8 and these "interrupt-level overflows" gone away. Maybe someone will apply similar change to source tree. -- Boris Karnaukh (mailto:bk532@iname.com) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message