Date: Fri, 16 Feb 2007 15:13:52 GMT From: Greg Ansley<gja@ansley.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/109232: [sio][patch] ibufsize calculation wrong causing data loss Message-ID: <200702161513.l1GFDqi5006017@www.freebsd.org> Resent-Message-ID: <200702161520.l1GFK5Og038217@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 109232
>Category: kern
>Synopsis: [sio][patch] ibufsize calculation wrong causing data loss
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Feb 16 15:20:05 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Greg Ansley
>Release: 6.1-RELEASE
>Organization:
Ansley & Associates, Inc.
>Environment:
FreeBSD anakin.telecine.com 6.1-RELEASE-p2 FreeBSD 6.1-RELEASE-p2 #7: Mon Sep 25 13:20:44 EDT 2006 gja@anakin.telecine.com:/usr/src/sys/i386/compile/ANAKIN i386
>Description:
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.
>How-To-Repeat:
Open serial port at > 19200 baud and recieve long (> 128 bytes) of continuous full speed data.
>Fix:
Index: sio.c
sio.c:1929
Change:
cp4ticks = speed / 10 / hz * 4;
to
cp4ticks = speed / 10 / (hz > 200 ? 200 : hz) * 4;
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702161513.l1GFDqi5006017>
