]> git.ipfire.org Git - thirdparty/linux.git/commit
gve: Move ptp_schedule_worker to gve_init_clock
authorTim Hostetler <thostet@google.com>
Fri, 14 Nov 2025 21:11:43 +0000 (13:11 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 18 Nov 2025 14:52:42 +0000 (15:52 +0100)
commit46e7860ef941fa92fcc61c79caac315839f86df5
treef97f03e8a2170e44a2de062f8025120bea67853d
parent19f1d6c7230b7da3775a2db915dc8eb9d3151658
gve: Move ptp_schedule_worker to gve_init_clock

Previously, gve had been only initializing ptp aux work when
hardware timestamping was initialized through ndo_hwtsatmp_set. As this
patch series introduces XDP hardware timestamp metadata which will
require the ptp aux work, the work can't be gated on the
kernel_hwtstamp_config being set and must be initialized elsewhere.

For simplicity, ptp_schedule_worker is invoked right after the ptp_clock
is registered with the kernel (which happens during gve_probe or
following reset). The worker is scheduled in GVE_NIC_TS_SYNC_INTERVAL_MS
as the synchronous call to gve_clock_nic_ts_read makes the worker
redundant if scheduled immediately.

If gve cannot read the device clock immediately, it errors out of
gve_init_clock.

Signed-off-by: Tim Hostetler <thostet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
Link: https://patch.msgid.link/20251114211146.292068-2-joshwash@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/google/gve/gve_main.c
drivers/net/ethernet/google/gve/gve_ptp.c