[LinuxPPS] PPS/ntpd fails on fresh startup

Rodolfo Giometti giometti at enneenne.com
Wed Oct 15 12:08:41 CEST 2008


On Wed, Oct 15, 2008 at 09:02:56PM +1100, Cirilo Bernardo wrote:
> On Wed, Oct 15, 2008 at 8:57 PM, Luca Bertagnolio <time at berta.com> wrote:
> > If I may... in the refclock_nmea.c source, I find only one single reference to
> > LDISC, here is the relevant part of the code:
> >
> >        /*
> >         * Open serial port. Use CLK line discipline, if available.
> >         */
> >        (void)sprintf(device, DEVICE, unit);
> >
> >        /*
> >         * Opening the serial port with appropriate baudrate
> >         * based on the value of bit 4.
> >         */
> >        if ( peer->ttl & 0x10 ) {
> >                fd = refclock_open(device, 2*SPEED232, LDISC_CLK);
> >                msyslog(LOG_NOTICE,
> >                                "refclock_nmea : serial port baudrate
> > set to 9600");
> >        } else {
> >                fd = refclock_open(device, SPEED232, LDISC_CLK);
> >                msyslog(LOG_NOTICE,
> >                                "refclock_nmea : serial port baudrate
> > set to 4800");
> >        }
> >
> > Are you trying to tell me that the issues we are facing might be related to that
> > *one* single refclock_open call with the LDISC_CLK parameter set?
> >
> > Forgive me for the dumb question...  --Luca
> >
> 
> You need to look at the logic to see what conditions would cause that
> line to be executed; if it is executed then yes, linuxpps will lose
> control.

Luca, what exactly the refclock_open() does with such parameter? And
how it is defined inside the code?

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti at enneenne.com
Linux Device Driver                          giometti at linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti



More information about the LinuxPPS mailing list