Return to BSD News archive
Newsgroups: comp.os.386bsd.questions Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!swrinde!pipex!uknet!cf-cm!isl-gate.elsy.cf.ac.uk!paul From: paul@isl-gate.elsy.cf.ac.uk (Paul) Subject: Re: SIO/COM driver 16550A limitations? Message-ID: <1994Jul8.130349.11260@cm.cf.ac.uk> Sender: paul@isl-gate.elsy.cf.ac.uk (Paul) Organization: ELSYM, University of Wales, College of Cardiff, UK. References: <1994Jul4.130216.19263@bruce.cs.monash.edu.au> <PHILS.94Jul7114917@satori.tv.tek.com> Date: Fri, 8 Jul 1994 13:03:47 +0000 Lines: 77 In article <PHILS.94Jul7114917@satori.tv.tek.com>, Phil Staub <phils@tv.tek.com> wrote: >In article <1994Jul4.130216.19263@bruce.cs.monash.edu.au> maurice@bruce.cs.monash.edu.au writes: > >> From article <2v1kdv$qal@lastactionhero.rs.itd.umich.edu>, by pha@umich.edu (Paul Anderson): >> > I just installed FreeBSD 1.1.5R (what a phenomenal job, folks). >> > >> > The man pages for SIO and COM both allude to problems with cheap >> > clone 16550A serial boards (which I have). What is the failure >> > mode for these? When I do: "cat </dev/tty00" on a stock system, >> > the consoles freeze (no keystrokes do anything), and it appears >> > that the system goes dead (I don't actually know what the CPU >> > is doing, since I have no bus analyzer). >> > >> >> Before concluding that your serial card is at fault use kermit to >> try and set the line. If your system does not quickly respond > ^^^^^^^^^^^^^^^ >Can you say "hangs completely"? > > >> try the following: >> >> /bin/stty -f /dev/tty00 clocal > >I am having the same problem. In fact any attempt to access /dev/tty0* >in any way (even the "stty -f /dev/tty00 clocal" suggested above) >results in the frozen console that Paul reported. Accessing >/dev/ttyi00 seems to work ok (i.e., I can successfully do the stty), >but it doesn't prevent the hanging when I then try to touch tty00. > >What's worse, I've further noted that if this happens with dirty disk >buffers, upon reboot it is obvious that disk updates have not taken >place, because I get fsck errors, even if I let the system sit for >long enough that the buffers should be stable. Needless to say, this >has caused me considerable grief. > >It appears that the driver is stuck in an interrupt service routine with >interrupts disabled. > yes, this is exactly what seems to be happening. Do you have an SMC chip on your board? There's a lot of these around and they have a nasty bug that causes a lockup when you try to enable the FIFO. Since the interrupt level is raised when trying to open the serial port this causes a total lockup of the machine and generally results in a inconsistent filesystem (although I've never seen it in such a state that it won;t get fixed at boot). Anyway, we've been playing around with a fix in FreeBSD ad we have one that works but we're still looking at exactly what's happening. It's a pity the fix we had didn't get into 1.1.5, I did suggest that it should! Here's a fix from Christian that solved the problem for me but there seems to be more to the story than this so we're still looking into the correct fix. From: cg@FIMP01.fim.uni-linz.ac.at (DI. Christian Gusenbauer) *** sio.c.orig Wed Jun 22 19:44:07 1994 --- sio.c Tue Jun 28 22:56:01 1994 *************** *** 745,750 **** --- 745,751 ---- commctl(com, MCR_DTR | MCR_RTS, DMSET); com->ftl_max = com->ftl_init; ++com->wopeners; + (void) inb(com->data_port); error = comparam(tp, &tp->t_termios); --com->wopeners; if (error != 0) -- Paul Richards, FreeBSD core team member. Intelligent Systems Laboratory, ELSYM ,University of Wales, College Cardiff Internet: paul@isl.cf.ac.uk, JANET(UK): RICHARDSDP@CARDIFF.AC.UK