[Linuxptp-devel] [PATCH v3 2/3] lstab: move update_leapsecond_table function to lstab

2023-02-08 Thread Maciek Machnikowski
To enable handling lstab in the same way by different pps sources, move update_leapsecond_table function from the nmea_pps_source to the generic lstab file. This also required moving leapfile filename and its modification time to the struct lstab. Signed-off-by: Maciek Machnikowski Reviewed-by: J

[Linuxptp-devel] [PATCH v3 3/3] ts2phc: Fix generic pps source when tai offset is not set in OS

2023-02-08 Thread Maciek Machnikowski
This patch adds support for the leapfile in the generic pps source. Such implementations prevents situtation when TAI offset is not set in the system (which is true when there is no NTP daemon running that sets it) from setting the UTC time in the disciplined PHC. Leapfile and lstab will only be u

[Linuxptp-devel] [PATCH v3 1/3] lstab: Add LSTAB_EXPIRED result

2023-02-08 Thread Maciek Machnikowski
LSTAB_UNKNOWN is too generic, add LSTAB_EXPIRED result to return the latest lstab correction and indicate that the tab used to resolve it is expired. This is useful for more precise reporting of lstab file state and will enable an override of expired table. Signed-off-by: Maciek Machnikowski Rev

[Linuxptp-devel] [PATCH v3 0/3] Fix TAI offset in generic pps source

2023-02-08 Thread Maciek Machnikowski
Current implementation of generic pps source relies on the UTC-TAI offset read from system. Some OSes don't set that offset by default and return 0. In such case ts2phc sets PHC time to UTC timescale without notifying user. This patch series moves leapfile handling to lstab and reuses the logic th