From owner-freebsd-hardware Sun Feb 13 9:15:55 2000 Delivered-To: freebsd-hardware@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by builder.freebsd.org (Postfix) with ESMTP id B8C954174 for ; Sun, 13 Feb 2000 09:15:51 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id EAA25661; Mon, 14 Feb 2000 04:18:50 +1100 Date: Mon, 14 Feb 2000 04:15:41 +1100 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: "Jose M. Alcaide" Cc: freebsd-hardware@FreeBSD.ORG Subject: Re: [fix and RFC] interrupt-level buffer overflows with Xircom PCMCIAmodem In-Reply-To: <38A5E94B.397E77BC@we.lc.ehu.es> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, 13 Feb 2000, Jose M. Alcaide wrote: > Bruce Evans wrote: > > > > On Sat, 12 Feb 2000, Jose M. Alcaide wrote: > > > > > 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 > > > > Too large for devices with broken 16550 emulation. > > Uh? Are you saying that I should decrement RS_IBUFSIZE instead of > incrementing it? I could test this, but I don't see how a shorter buffer > could help to avoid buffer overruns... Oops, I meant "too low". > > RTS emulation is probably also broken for there to be a problem. Ideally, > > the sender should check its version of RTS (i.e., CTS) before sending > > each character. For bug for bug compatibility with 16550 senders, the > > sender only needs to check it every 16th character. > > I could insert some "probes" in sio.c to see what happens with RTS/CTS, > but I am not a 16550 expert, so I need some advice :-) Maybe you aren't actually using RTS/CTS. RTS is mostly for the termios line discipline. For slip and ppp, it is only deasserted when the interrupt-level buffer is more than 3/4 full, not when buffers in higher layers are almost full. However that should be enough to stop an emulator. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message