kern/109232: [sio][patch] ibufsize calculation wrong causing data loss

Greg Ansley gja at
Fri Feb 16 15:20:09 UTC 2007

>Number:         109232
>Category:       kern
>Synopsis:       [sio][patch] ibufsize calculation wrong causing data loss
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 16 15:20:05 GMT 2007
>Originator:     Greg Ansley
>Release:        6.1-RELEASE
Ansley & Associates, Inc.
FreeBSD 6.1-RELEASE-p2 FreeBSD 6.1-RELEASE-p2 #7: Mon Sep 25 13:20:44 EDT 2006     gja at  i386
sio comwakeup time (sio_timeout) is limited to 200 hz (see siosettimeout())  but calculation for sio ibufsize uses hz which is now >> 200 hz causing insufficiently sized interrupt level sio buffers.  This in turn causes lost incoming data and the kernel issues the "interrupt-level buffer overflow" message when receiving long strings of high speed (baud > 19200) data.

Probalby has bearing on kern/26261 although I don't know when hz was raised above 200.

Open serial port at > 19200 baud and recieve long (> 128 bytes) of continuous full speed data.
Index: sio.c

       cp4ticks = speed / 10 / hz * 4;
       cp4ticks = speed / 10 / (hz > 200 ? 200 : hz)  * 4;

More information about the freebsd-bugs mailing list