[ntp:hackers] FreeBSD and serial port cards

M. Warner Losh imp at bsdimp.com
Wed Feb 21 22:29:15 PST 2007


In message: <20070222053415.5615439CB2 at ntp1.ntp.isc.org>
            Harlan Stenn <stenn at ntp.isc.org> writes:
: And it only happens on the line that has the PPS signal.  OK, I can run
: another test with another PPS-generating refclock, which I will do after
: I get back in the office.

This is suggestive of a flow control problem.  This is one of the
areas that I think the defaults changed between 4.x and 6.x.

: > What type of refclocks do you have?  Can you talk to them from cu?
: 
: I can talk to them with cu if I use the mobo serial port.
: 
: The refclocks are:
: 
:  ttyd4: RIPE refclock
:  ttyd5: COM 0 port of a Meinberg GPS167BGT
:  ttyU0: Meinberg DCF77 C51

Hmmm.  USB for that DCF77 whatsit.

: > Do the sentences look OK?  Most NMEA devices put a checksum on each line.  
: > You can probably sanity check for dropped characters by just eyeballing a 
: > sequence of lines.
: 
: I saw normal looking data when I ran FreeBSD4 (indeed, ntpd connected
: and sync'd to them) and I see normal looking data over the serial port
: on the mobo.
: 
: I see *nothing* from any of these devices now.

Is there ever a <CR>?  Can you verify that they are in raw mode using
stty?  Does vmstat -i show interrupt activity on irq 18?  The 'silo'
level overflows indicate that you are overruning the FIFOs.  Since you
aren't using FAST interrupts, you may be running into the increased
system latency for FreeBSD 6.x compared to 4.x.  If that's really the
case, the following patch to sio.c might help:

Index: sio.c
===================================================================
RCS file: /cache/ncvs/src/sys/dev/sio/sio.c,v
retrieving revision 1.469
diff -u -r1.469 sio.c
--- sio.c	17 Jul 2006 03:47:18 -0000	1.469
+++ sio.c	22 Feb 2007 06:28:15 -0000
@@ -1818,7 +1818,7 @@
 		 */
 		com->fifo_image = com->unit == siotsunit ? 0
 				  : t->c_ispeed <= 4800
-				  ? FIFO_ENABLE : FIFO_ENABLE | FIFO_RX_MEDH;
+				  ? FIFO_ENABLE : FIFO_ENABLE | FIFO_RX_LOW;
 #ifdef COM_ESP
 		/*
 		 * The Hayes ESP card needs the fifo DMA mode bit set

It is against current, but should be the same for 6.2 (maybe with a
different line).

Warner


More information about the hackers mailing list