diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2012-02-27 03:59:26 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2012-02-27 03:59:26 -0500 |
commit | 4e1939d38305581b6c488f5685ed8b2ed0ca4ac5 (patch) | |
tree | 123caee5aae8b90cb39248e3fc135540d78f2d70 /gpsd.c | |
parent | 630f106ae23a1c31306a088c36ef42ead95a675c (diff) | |
download | gpsd-4e1939d38305581b6c488f5685ed8b2ed0ca4ac5.tar.gz |
Don't makr PPS thread activation depenent on the socket transport.
All regression tests pass.
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) { |