Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Feb 2000 15:14:46 +0100
From:      "Jose M. Alcaide" <jose@we.lc.ehu.es>
To:        freebsd-hardware@FreeBSD.org
Cc:        freebsd-mobile@FreeBSD.org
Subject:   [fix and RFC] interrupt-level buffer overflows with Xircom PCMCIA modem
Message-ID:  <38A56AD6.8C3E1A97@we.lc.ehu.es>

next in thread | raw e-mail | index | archive | help
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-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38A56AD6.8C3E1A97>