1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* Copyright(c) 2024 Intel Corporation. */ 3 4 #ifndef _IAVF_TYPES_H_ 5 #define _IAVF_TYPES_H_ 6 7 #include <linux/net/intel/virtchnl.h> 8 #include <linux/ptp_clock_kernel.h> 9 10 /* structure used to queue PTP commands for processing */ 11 struct iavf_ptp_aq_cmd { 12 struct list_head list; 13 enum virtchnl_ops v_opcode:16; 14 u16 msglen; 15 u8 msg[] __counted_by(msglen); 16 }; 17 18 struct iavf_ptp { 19 wait_queue_head_t phc_time_waitqueue; 20 struct virtchnl_ptp_caps hw_caps; 21 struct ptp_clock_info info; 22 struct ptp_clock *clock; 23 struct list_head aq_cmds; 24 u64 cached_phc_time; 25 unsigned long cached_phc_updated; 26 /* Lock protecting access to the AQ command list */ 27 struct mutex aq_cmd_lock; 28 struct kernel_hwtstamp_config hwtstamp_config; 29 bool phc_time_ready:1; 30 }; 31 32 #endif /* _IAVF_TYPES_H_ */ 33