Date: Mon, 29 Jul 1996 19:31:53 +0200 (MET DST) From: Mark Huizer <xaa@xaa.stack.urc.tue.nl> To: freebsd-current@freebsd.org Subject: kernel patch for sio.c (fwd) It helped for me... Message-ID: <199607291731.TAA00426@xaa.stack.urc.tue.nl>
next in thread | raw e-mail | index | archive | help
well well, at last I could use UUCP without PPP :-) Perhaps something to add to the current kernel? Mark ----- Forwarded message from Mark Huizer ----- |Newsgroups: comp.mail.uucp,comp.unix.bsd.freebsd.misc |Path: tuegate.tue.nl!surfnet.nl!swsbe6.switch.ch!swidir.switch.ch!01-newsfeed.univie.ac.at!news.iif.hu!isyshu!hole.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.mathworks.com!news.kei.com!wang!uunet!in3.uu.net!DIALix!melbourne.DIALix.oz.au!seeware!usenet |From: mark@putte.seeware.DIALix.oz.au (Mark Hannon) |Subject: Re: Strange Taylor UUCP problem on Freebsd 2.1.0 |Content-Type: text/plain; charset=us-ascii |Sender: usenet@seeware.DIALix.oz.au (Charlie Root) |Nntp-Posting-Host: putte.seeware.dialix.oz.au |Organization: Private FreeBSD site |Message-ID: <Dv9Lpq.H5@seeware.DIALix.oz.au> |References: <4ta4qr$80f@itesec.hsc.fr> |Mime-Version: 1.0 |Date: Sun, 28 Jul 1996 17:53:50 GMT |Lines: 116 |Xref: tuegate.tue.nl comp.mail.uucp:12172 comp.unix.bsd.freebsd.misc:26581 In article <4ta4qr$80f@itesec.hsc.fr>, archer@hsc.fr (Vincent Archer) writes: > Got a strange problem using Taylor UUCP 1.06 (coming straight out of the > FreeBSD 2.1 cdrom). I'm supposed to call from a Solaris 2.4 (HDB UUCP), > so I'm stuck to protocol "g". The BSD machine reported all kind of checksum > errors, ending the transfer after 10mn (for a single remote command!). > > I tried to recompile UUCP 1.06.1, and ended having two BSD machines, using > both the same uucico binary, and still gets the checksum errors on each > "g" protocol packet. > Hi, There is a problem with some 16550a serial controllers. It manifests itself in a failure to run UUCP whilst PPP/serial logins etc work fine. I have been using the following kernel patch for some months and all works well now. (Prior to that I had resorted to using and old 16450 ISA card prior to the patch). *** sio.c.orig Tue Jun 25 21:27:34 1996 --- sio.c Tue Jun 25 21:28:30 1996 *************** *** 211,216 **** --- 211,220 ---- struct termios lt_in; /* should be in struct tty */ struct termios lt_out; + #ifdef BROKEN_UART + speed_t current_ospeed; + #endif + bool_t do_timestamp; struct timeval timestamp; *************** *** 626,631 **** --- 630,639 ---- com->it_in.c_ispeed = com->it_in.c_ospeed = comdefaultrate; com->it_out = com->it_in; + #ifdef BROKEN_UART + com->current_ospeed = comdefaultrate; + #endif + /* attempt to determine UART type */ printf("sio%d: type", unit); *************** *** 1624,1629 **** --- 1632,1641 ---- int unit; int txtimeout; + #ifdef BROKEN_UART + bool_t setspeed; + #endif + /* do historical conversions */ if (t->c_ispeed == 0) t->c_ispeed = t->c_ospeed; *************** *** 1637,1642 **** --- 1649,1669 ---- unit = DEV_TO_UNIT(tp->t_dev); com = com_addr(unit); iobase = com->iobase; + + #ifdef BROKEN_UART + /* + * check if the baud rate is different from the currently + * selected one, if so then set new rate. If it is the same, + * don't touch the speed, it confuses the UMC chip heavily + */ + + if (com->current_ospeed != t->c_ospeed) { + setspeed = TRUE; + com->current_ospeed = t->c_ospeed; + } else + setspeed = FALSE; + #endif + s = spltty(); if (divisor == 0) (void)commctl(com, TIOCM_DTR, DMBIC); /* hang up line */ *************** *** 1727,1733 **** != (LSR_TSRE | LSR_TXRDY)) goto retry; ! if (divisor != 0) { outb(iobase + com_cfcr, cfcr | CFCR_DLAB); outb(iobase + com_dlbl, divisor & 0xFF); outb(iobase + com_dlbh, (u_int) divisor >> 8); --- 1754,1764 ---- != (LSR_TSRE | LSR_TXRDY)) goto retry; ! #ifdef BROKEN_UART ! if (divisor != 0 && setspeed) { ! #else ! if (divisor != 0) { ! #endif outb(iobase + com_cfcr, cfcr | CFCR_DLAB); outb(iobase + com_dlbl, divisor & 0xFF); outb(iobase + com_dlbh, (u_int) divisor >> 8); Regards, Mark -- +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ | Mark Hannon,| FreeBSD - Free Unix for your PC| mark@seeware.DIALix.oz.au| | Melbourne, | PGP key available by fingering | epamha@epa.ericsson.se | | Australia | seeware@melbourne.DIALix.oz.au | | +-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ ----- End of forwarded message from Mark Huizer ----- ------------------------------------------------------------------------- - Mark Huizer - xaa@stack.urc.tue.nl - huizer@circlesoft.nl - ------------------------------------------------------------------------- - this is the end, my only friend the end - - it hurts to set you free, but you'll never follow me - -------------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607291731.TAA00426>