diff options
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -908,9 +908,6 @@ static bool awaken(struct gps_device_t *device) device->gpsdata.gps_fd); FD_SET(device->gpsdata.gps_fd, &all_fds); adjust_max_fd(device->gpsdata.gps_fd, true); -#ifdef NTPSHM_ENABLE - pps_thread_activate(device); -#endif /* NTPSHM_ENABLE */ return true; } } @@ -1487,6 +1484,17 @@ static void consume_packets(struct gps_device_t *device) device->gpsdata.dev.path, gps_maskdump(device->gpsdata.set)); +#ifdef NTPSHM_ENABLE + /* + * This has to be called late becvause of a Linux kernel bug + * in 2.6; the PPS thread will hang if a baud rate change + * happens while it's waiting on the PPS strobe. + */ + if ((changed & DRIVER_IS) != 0) + pps_thread_activate(device); +#endif /* NTPSHM_ENABLE */ + + #ifdef SOCKET_EXPORT_ENABLE /* add any just-identified device to watcher lists */ if ((changed & DRIVER_IS) != 0) { |