[LinuxPPS] pps stops when ntpd starts?

Rodolfo Giometti giometti at enneenne.com
Wed Jun 10 13:31:45 CEST 2009


On Wed, Jun 10, 2009 at 05:57:13AM -0500, William S. Brasher wrote:
> 
> Ok:  Since I'm playing in a place I haven't been, I rebuilt the kernel and 
> tried again.  And, of course, the functions are being called:
> 
> First, the diff:
> 
> --- drivers/serial/8250.c.org   2009-05-20 19:11:06.000000000 -0500
> +++ drivers/serial/8250.c       2009-06-10 05:18:41.000000000 -0500
> @@ -1360,6 +1360,10 @@
>  {
>         struct uart_8250_port *up = (struct uart_8250_port *)port;
>  
> +
> +printk("serial8250_enable_ms %p\n",port);
> +
> +
>         /* no MSR capabilities */
>         if (up->bugs & UART_BUG_NOMSR)
>                 return;
> @@ -2401,6 +2405,9 @@
>  {
>         int line = port->line;
>  
> +printk("serial8250_set_ldisc %p  line = %d",port,line);
> +
> +
>         if (line >= port->info->port.tty->driver->num)
>                 return;
>  
> 
> Generates this:
> 
> The first time is from running "/usr/sbin/ppsldisc /dev/ttyS0" and the 
> second time is from running "ldattach 18 /dev/ttyS0".
> 
> ppstest works after ntpd was started in the first case, and timed out 
> after ntpd was started in the second case.
> 
> 
> Jun 10 05:37:36 tara kernel: PPS source #0 "/dev/ttyS0" added
> Jun 10 05:37:36 tara kernel: serial8250_set_ldisc c04688d4  line = 0serial8250_enable_ms c04688d4
> Jun 10 05:39:34 tara kernel: PPS source #0 removed
> Jun 10 05:40:02 tara kernel: new PPS source serial0 at ID 0
> Jun 10 05:40:02 tara kernel: PPS source #0 "/dev/ttyS0" added
> Jun 10 05:40:02 tara kernel: serial8250_set_ldisc c04688d4  line = 0serial8250_enable_ms c04688d4

Ok, they are calling the same functions... so the only differences
should be into ioctl() FLAGS parameters. Can you check them into
ldattach sourc code? You may also disable the ioctl() calls and then
retry setting ldisc.

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