Subject: Re: Serial console hangs
To: Martin Husemann <martin@rumolt.teuto.de>
From: Bill Studenmund <skippy@macro.stanford.edu>
List: port-i386
Date: 08/13/1998 13:40:32
On Thu, 13 Aug 1998, Martin Husemann wrote:

> There is a race condition somewhere between kernel output and normal
> output when you use a serial console. This is a long standing bug, and
> I vaguely remember seeing an analysis of the race here quite some time ago.

Do you remember more about the analysis?

> The symptoms are: as soon as the init process starts, the console hangs
> completely.
> 
> I can reproduce this about 4 out of 5 times I reboot a machine running
> -current, with ISDN4BSD added (which outputs a lot of information at pseudo-
> device attach time) and using a serial console at 19200 bps.

What happens if you run at 38400 bps? The 4 out of 5 times makes it sound
like a timing problem.

> As soon as I comment out the printf's in I4B the boot always succeeds.
> 
> I would spent some work on fixing this, but don't have any idea where
> to start looking. Any hints?

I've encountered a problem I've not solved in the M.I. z8530 driver. If
you go to set up the chip parameters (like the baud rate,etc) while a
character is in transmission, you hang the computer. The driver works very
hard to make sure that it won't do this. But it assumes it is the only
thing writing to the chip. Serial console output isn't taken into account.

You might be having the same problem. Try sticking a delay(600); before
the com driver calls its param routine. If it works, try sticking it
after. If it then doesn't work, that narrows things down to being the
param call.

I'm not sure what to do next, though. :-)

Take care,

Bill