Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 96 21:38:20 PST8PDT
From:      tedm@os2box
To:        bugs@FreeBSD.org
Subject:   sio.c and pppd problem
Message-ID:  <9603112223.AA0036@tedsbox.rdrop.com>

next in thread | raw e-mail | index | archive | help
Hi All,

  I have had the following odd problem with what I believe is an interaction
between crappy hardware, pppd, and sio.c  I fixed it by swapping around 
hardware, but whoever is maintaining sio.c should probably look at this.  I can
send you the problem card if you wish.

I am currently running 2 FreeBSD 2.1 machines set up as routers.  They connect 
2 offices together that are located within 2 miles of each other.  The 
connection is over 2 28.8K Motorola modems dialed into each other.  Since the 
entire thing is local, I don't have to worry about messy stuff like making the 
modems dial up when there are packets to be sent, etc.  I just leave the modems
connected together permanently, since the phone line is a fixed cost whether it
is used or not.  The machines are almost identical, the only difference is that
the disk in one is a 160MB connor, in the other is a 250MB Quantum.  They are 
both IDE disks.

Anyway, when I set the machines up, I used the following configuration:

486/33  8MB RAM
Trident VGA (garden variety VGA card)
integrated serial/parallel/IDE controller cards, no-name clones using 8250 
uarts (non-buffered)
Intel EtherExpress16 network cards

I use cu on one machine to dial the modem to connect to the other, once the 
modems are connected I exit cu and start up pppd.  The remote machine has pppd
set to run at startup.  When the pppd daemons are talking to each other, I 
telnet into the remote router and insert a static route, then return to the 
first and put in another static route.  It ain't elegant, but once the line is 
up it doesen't go down so who cares.

Anyway, when I first set up the connection, I was running the ports at 9600bps 
because I knew that without a buffered port card I wasn't going to get any more
throughput.  I actually had ordered buffered versions of the IDE combo cards, 
but they were slow getting in.

The line worked fine, round trip ping times were about 500ms.  I discovered 
that routed didn't like to send updates back and forth over a serial line, so
hence the need for the static routes. (I don't know if this is a bug or a 
feature)

Anyway, a week or so after the line was in the buffered port cards arrived.  I 
replaced the non-buffered cards, and raised the speed in /etc/ppp/options to 
38400 and turned on flow control.

I was never able to get it running with those cards.  Oh, I could talk to the 
modems fine with cu, get them connected, but the pppd's on each end refused to 
negotiate.

Finally I played musical chairs with the combo cards, and everything started 
working.  The only difference in configuration was the different 
serial/parallel/IDE controller cards.  Round trip ping times are now 200ms.

The broken buffered combo cards work fine under OS/2, Windoze, etc.  They just 
don't seem to work under FreeBSD.  Oh, it LOOKS like they work, at least if you
run cu they seem to work, but pppd WON'T work at all with them!

The following is what is on the bad card:

Winbond model W83777, FCC Identification ID2-W837787AA
There are 2 large chips on the card, they are marked:
Winbond W83787F and W83758F

I was able to get it running with the following cards:

card1)  Kowell model KW-557
The chip on this is:
SMC
FDC37C666GT
A9444-B247
6J74183-2

card2)  UMC something-or-other.  (sorry, if you really want the ID#'s I get 
them, but I didn't write them down)

At any rate, both the bad cards and the good cards are identified as 16550A's 
buffered serial ports by MSD.

Also, just for the RTFM types, yes I did make sure the little DB-25 pigtails 
went with the appropriate cards, the modem cables had all handshaking lines, 
the modems were properly programmed to pay attention to flow control lines, etc
etc, etc.  Also, the kernel does NOT emit overflow messages, and I DID change 
sio.c to raise the buffer size mentioned in a hardware FAQ message on 
www.freebsd.org.  Also, YES the kernel thinks the broken cards are 16550A 
cards.

I have one of these Winbond cards sitting on my desk, and if anyone wants to 
attempt to debug the serial driver I'll be happy to send them the card to test 
with.  It is quite obvious the problem is that the sio driver is dropping 
characters under heavy usage with this card.  I don't know why it is working 
with the SMC or UMC cards and not with the Winbond card.  I'd also suggest a 
notation on this be put into the hardware list warning people not to buy these 
combo cards.

Another thing I discovered that I think is a bug is with pppd.  When pppd 
starts up, it should send out a <cr> before sending out the PPP negotiation 
sequence.  The reason for this is that modems that lock their serial ports to 
the computer port use a <cr> character to determine the correct port speed to 
synchronize to.  If I reboot the remote machine and power cycle it's modem, 
pppd loads and sends out it's LCP string, since this doesen't contain a 
carriage return, the modem serial port will stay at whatever it's power-up 
default setting is. (definitely NOT 38400bps!!!)

One last thing I discovered with the SMC serial port card, is that if I set the
port speed to 57600 it sometimes locks up the machine.  This is probably 
because 57600 is too ambitious a speed for a 486/33 Unix box.

Ted Mittelstaedt
tedm%toybox@agora.rdrop.com
tedm@tview.com









Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9603112223.AA0036>