Subject: com.c patch to track PPS
To: None <tech-kern@netbsd.org>
From: Jonathan Stone <jonathan@Cuisinart.DSG.Stanford.EDU>
List: tech-kern
Date: 02/05/2000 23:25:32
Is there anyone with a PPS source (GPS clock, or even a lashup with
back-to-back machines) and ntp4 who who can test the following patch?
I can  also supply a non-NTP test harness to monitor the DCD line.

(thanks to Tom Javen for the  original suggestion).


--- sys/dev/ic/com.c.DIST	Mon Jan 24 04:34:02 2000
+++ sys/dev/ic/com.c	Sat Feb  5 23:21:26 2000
@@ -1346,10 +1346,11 @@
 	sc->sc_lcr = lcr;
 
 	/*
-	 * If we're not in a mode that assumes a connection is present, then
+	 * If we're not in a mode that assumes a connection is present, 
+	 * and if we're not using carrier for PPS signals, then
 	 * ignore carrier changes.
 	 */
-	if (ISSET(t->c_cflag, CLOCAL | MDMBUF))
+	if (ISSET(t->c_cflag, CLOCAL | MDMBUF) && sc->sc_ppsmask == 0)
 		sc->sc_msr_dcd = 0;
 	else
 		sc->sc_msr_dcd = MSR_DCD;