*BSD News Article 8253


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!metro!ipso!runxtsa!bde
From: bde@runx.oz.au (Bruce Evans)
Subject: Re: [386BSD] 16550 Not Resetting.
Message-ID: <1992Nov28.115716.8219@runx.oz.au>
Organization: RUNX Un*x Timeshare.  Sydney, Australia.
References: <By8FAD.KAo@ucunix.san.uc.edu> <CGD.92Nov26175845@toe.CS.Berkeley.EDU>
Date: Sat, 28 Nov 92 11:57:16 GMT
Lines: 35

In article <CGD.92Nov26175845@toe.CS.Berkeley.EDU> cgd@toe.CS.Berkeley.EDU (Chris G. Demetriou) writes:
>In article <By8FAD.KAo@ucunix.san.uc.edu> pmartin@eniac.san.uc.edu (Paul Martin) writes:
>> [ ... ] I appears that the
>>16550 uarts are left in some weird state. [ ... ]
>
>Sounds like the DOS drivers for your mouse:
>	(1) don't initialize the 550 properly (i.e. don't reset it!) 
>	(2) don't know how to deal with the fifo...
>...
>... and i'd *hope* that mouse drivers
>would actually reset the serial chip before using it...

There is no way that the BIOS or a DOS driver can fully initialize an
unsupported chip.  Some of the bits to initialize a 16550 are in a register
that doesn't need initializing for 8250-16450's.  Control-Alt-Del doesn't
reset the chip because the reset is soft.

There aren't many ways for a driver to fail because it doesn't support the
FIFO, but it might get confused by the FIFO timeout buts in the interrupt id
register or the FIFO full bit in the line status register.  These bits are
documented to be 0 for 8250-16450 chips.

>more than that...  your best bet to get it working would be to
>write a little piece of code for DOS that explicitly resets your UART...
>the code to do the actual reset could be pulled out of the probe/attach
>routines of the serial driver, almost verbatim...

Essentially this: for each port in 0x3f8, 0x2f8, ...

	outportb(port + 2, 4 | 2 | 1);	/* reset FIFO (xmt | recv | enable) */
	outportb(port + 2, 0);		/* turn FIFO off */

The first step might be optional.
-- 
Bruce Evans  (bde@runx.oz.au)