diff --git a/linuxptp-vclock.patch b/linuxptp-vclock.patch index daf970b..3c87694 100644 --- a/linuxptp-vclock.patch +++ b/linuxptp-vclock.patch @@ -1,3 +1,5 @@ +Patches backported from the upstream repository. + commit 6d2e07353d042b845da60dc6e3a20a71932678d0 Author: Miroslav Lichvar Date: Tue Mar 8 11:46:58 2022 +0100 @@ -1505,3 +1507,32 @@ index 1fbadcb..287d77c 100644 if (section_name) free(section_name); +commit 5f402a959959edc7248415a98581f3eaab3c9735 +Author: Miroslav Lichvar +Date: Thu Jul 14 17:06:15 2022 +0200 + + port: Disable PHC switch with vclocks. + + With a virtual PHC, don't try to switch to the physical PHC after a + link-state change. JBOD and other multi-PHC configurations are not + supported with vclocks yet. + + Fixes: 9b9c2c58e6ed ("port: Check for virtual clocks.") + + Signed-off-by: Miroslav Lichvar + +diff --git a/port.c b/port.c +index e309b98..70b6e60 100644 +--- a/port.c ++++ b/port.c +@@ -2591,8 +2591,9 @@ void port_link_status(void *ctx, int linkup, int ts_index) + (p->link_status & LINK_STATE_CHANGED || p->link_status & TS_LABEL_CHANGED)) { + interface_get_tsinfo(p->iface); + +- /* Only switch phc with HW time stamping mode */ ++ /* Only switch a non-vclock PHC with HW time stamping. */ + if (interface_tsinfo_valid(p->iface) && ++ interface_get_vclock(p->iface) < 0 && + interface_phc_index(p->iface) >= 0) { + required_modes = clock_required_modes(p->clock); + if (!interface_tsmodes_supported(p->iface, required_modes)) {