Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iavf: Implement settime64 with -EOPNOTSUPP

ptp_clock_settime() assumes every ptp_clock has implemented settime64().
Stub it with -EOPNOTSUPP to prevent a NULL dereference.

The fix is similar to commit 329d050bbe63 ("gve: Implement settime64
with -EOPNOTSUPP").

Fixes: d734223b2f0d ("iavf: add initial framework for registering PTP clock")
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Tim Hostetler <thostet@google.com>
Link: https://patch.msgid.link/20251126094850.2842557-1-mschmidt@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Michal Schmidt and committed by
Jakub Kicinski
1e43ebcd 1f5e808a

+7
+7
drivers/net/ethernet/intel/iavf/iavf_ptp.c
··· 252 252 return iavf_read_phc_indirect(adapter, ts, sts); 253 253 } 254 254 255 + static int iavf_ptp_settime64(struct ptp_clock_info *info, 256 + const struct timespec64 *ts) 257 + { 258 + return -EOPNOTSUPP; 259 + } 260 + 255 261 /** 256 262 * iavf_ptp_cache_phc_time - Cache PHC time for performing timestamp extension 257 263 * @adapter: private adapter structure ··· 326 320 KBUILD_MODNAME, dev_name(dev)); 327 321 ptp_info->owner = THIS_MODULE; 328 322 ptp_info->gettimex64 = iavf_ptp_gettimex64; 323 + ptp_info->settime64 = iavf_ptp_settime64; 329 324 ptp_info->do_aux_work = iavf_ptp_do_aux_work; 330 325 331 326 clock = ptp_clock_register(ptp_info, dev);