[Intel-wired-lan] [PATCH iwl-net 04/10] idpf: negotiate PTP capabilies and get PTP clock

Willem de Bruijn willemdebruijn.kernel at gmail.com
Thu Nov 14 20:20:03 UTC 2024


Milena Olech wrote:
> PTP capabilities are negotiated using virtchnl command. Add get
> capabilities function, direct access to read the PTP clock time and
> direct access to read the cross timestamp - system time and PTP clock
> time. Set initial PTP capabilities exposed to the stack.
> 
> Reviewed-by: Alexander Lobakin <aleksander.lobakin at intel.com>
> Signed-off-by: Milena Olech <milena.olech at intel.com>

Tested-by: Willem de Bruijn <willemb at google.com>

>  /**
>   * struct idpf_ptp - PTP parameters
>   * @info: structure defining PTP hardware capabilities
>   * @clock: pointer to registered PTP clock device
>   * @adapter: back pointer to the adapter
> + * @cmd: HW specific command masks
> + * @dev_clk_regs: the set of registers to access the device clock
> + * @caps: PTP capabilities negotiated with the Control Plane
> + * @get_dev_clk_time_access: access type for getting the device clock time
> + * @get_cross_tstamp_access: access type for the cross timestamping
>   */
>  struct idpf_ptp {
>  	struct ptp_clock_info info;
>  	struct ptp_clock *clock;
>  	struct idpf_adapter *adapter;
> +	struct idpf_ptp_cmd cmd;
> +	struct idpf_ptp_dev_clk_regs dev_clk_regs;
> +	u32 caps;
> +	enum idpf_ptp_access get_dev_clk_time_access:16;
> +	enum idpf_ptp_access get_cross_tstamp_access:16;

why are these 16 bit fields, when they are only ternary options?


More information about the Intel-wired-lan mailing list