*BSD News Article 79535


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.mel.connect.com.au!news.syd.connect.com.au!phaedrus.kralizec.net.au!not-for-mail
From: bde@zeta.org.au (Bruce Evans)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: UUCP on ASUS P55TP4N
Date: 30 Sep 1996 17:49:17 +1000
Organization: Kralizec Dialup Unix
Lines: 45
Message-ID: <52nu1t$8cc@godzilla.zeta.org.au>
References: <DyEyAF.8I@acme1.ruhr.de>
NNTP-Posting-Host: godzilla.zeta.org.au

In article <DyEyAF.8I@acme1.ruhr.de>,
Christoph Haas <chris@acme1.ruhr.de> wrote:
>I'm succesfully running FreeBSD 2.1.5-STABLE on my old 486/100. Taylor UUCP can use the modem on /dev/cuaa1 (which is an onboard multi-i/o chip) without any problems. Now I moved to a new system based on an ASUS P55TP4N. The kernel detects 2 serial ports and I can use both of them with a mouse in X11 (so the hardware seems to be ok). When I start a ppp session with a modem conected to one of the ports, everything seems to be allright, but when I try to use UUCP on this port, I get tons of errors (bad chec
k
>sums, missing packets etc.). Is there a known bug in the sources (maybe the sio drivers) or on the board ? 

This is a known bug in the UART used on some ASUS P55TP boards.  It shows
up mainly under uccp and gdb-remote because they make (usually null) changes
to the UART settings while data is arriving.  Try the enclosed work-around.
It makes null changes harmless.

diff -c2 sio.c~ sio.c
*** sio.c~	Sat Sep 14 19:30:41 1996
--- sio.c	Mon Sep 30 15:26:21 1996
***************
*** 1937,1943 ****
  
  	if (divisor != 0) {
  		outb(iobase + com_cfcr, cfcr | CFCR_DLAB);
! 		outb(iobase + com_dlbl, divisor & 0xFF);
! 		outb(iobase + com_dlbh, (u_int) divisor >> 8);
  	}
  	outb(iobase + com_cfcr, com->cfcr_image = cfcr);
--- 1956,1975 ----
  
  	if (divisor != 0) {
+ 		u_char dlbh;
+ 		u_char dlbl;
+ 
  		outb(iobase + com_cfcr, cfcr | CFCR_DLAB);
! 		/*
! 		 * Only set the divisor registers if they would change,
! 		 * since on some 16550 incompatibles (UMC8669F), setting
! 		 * them while input is arriving them loses sync until
! 		 * data stops arriving.
! 		 */
! 		dlbl = divisor & 0xFF;
! 		if (inb(iobase + com_dlbl) != dlbl)
! 			outb(iobase + com_dlbl, dlbl);
! 		dlbh = (u_int) divisor >> 8;
! 		if (inb(iobase + com_dlbh) != dlbh)
! 			outb(iobase + com_dlbh, dlbh);
  	}
  	outb(iobase + com_cfcr, com->cfcr_image = cfcr);
-- 
Bruce Evans  bde@zeta.org.au