disable PHC switch with vclocks (#2066452)

Resolves: #2066452
This commit is contained in:
Miroslav Lichvar 2022-07-28 12:36:59 +02:00
parent 30b597fe18
commit c9a9833432

View File

@ -1,3 +1,5 @@
Patches backported from the upstream repository.
commit 6d2e07353d042b845da60dc6e3a20a71932678d0 commit 6d2e07353d042b845da60dc6e3a20a71932678d0
Author: Miroslav Lichvar <mlichvar@redhat.com> Author: Miroslav Lichvar <mlichvar@redhat.com>
Date: Tue Mar 8 11:46:58 2022 +0100 Date: Tue Mar 8 11:46:58 2022 +0100
@ -1505,3 +1507,32 @@ index 1fbadcb..287d77c 100644
if (section_name) if (section_name)
free(section_name); free(section_name);
commit 5f402a959959edc7248415a98581f3eaab3c9735
Author: Miroslav Lichvar <mlichvar@redhat.com>
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 <mlichvar@redhat.com>
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)) {