Subject: kern/19243: pps/ntp support is incomplete
To: None <gnats-bugs@gnats.netbsd.org>
From: None <wolfgang@wsrcc.com>
List: netbsd-bugs
Date: 12/02/2002 14:22:56
>Number:         19243
>Category:       kern
>Synopsis:       pps/ntp support is incomplete
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 02 14:23:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Wolfgang Rupprecht
>Release:        NetBSD 1.6K
>Organization:
W S Rupprecht Computer Consulting, Fremont CA
>Environment:
	
	
System: NetBSD capsicum.wsrcc.com 1.6K NetBSD 1.6K (WSRCC_ATHLON) #13: Sat Nov 30 18:13:16 PST 2002 wolfgang@capsicum.wsrcc.com:/v/src/netbsd/src/sys/arch/i386/compile/WSRCC_ATHLON i386
Architecture: i386
Machine: i386
>Description:
	<submitting this so that it won't get forgotten>

	Even though the distributed ntpd contains hooks for
	running a Motorola oncore m12 refclock,  the kernel pps
	support is incomplete and ntp rejects the oncore.

>How-To-Repeat:
	
	cd /dev/
	ln -s gps ttyN
	ln -s oncore.serial.0 gps
	ln -s oncore.pps.0 gps

	/etc/ntp.conf:
	# oncore-m12 sets the neg-edge at 0-second roll-over
	pps /dev/gps clear hardpps
	server 127.127.30.0 prefer
	# end

	ntpd

	Dec  2 13:24:43 scoville ntpd[530]: precision = 9 usec
	Dec  2 13:24:43 scoville ntpd[530]: kernel time discipline status 0040
	Dec  2 13:24:43 scoville ntpd[530]: refclock_ioctl: time_pps_kcbind failed: Bad address
	Dec  2 13:24:43 scoville ntpd[530]: internal error: refclockio structure not found
	Dec  2 13:24:43 scoville ntpd[530]: configuration of 127.127.30.0 failed


	The problem boils down to lack of kernel support for PPS_KC_HARDPPS.

	    from src/dist/ntp/ntpd/refclock_oncore.c:

	    if (time_pps_kcbind(instance->pps_h, PPS_KC_HARDPPS, i,
		 PPS_TSFMT_TSPEC) < 0) {

	This problem exists with both the old ntpd supplied in /usr/src and
	with the newer one in /usr/pkgsrc/net/ntp4 .

>Fix:
	
	none.
>Release-Note:
>Audit-Trail:
>Unformatted: