Subject: RE: [PATCH net-next v2 1/4] net: wangxun: Add support for PTP clock

From: Jiawen Wu <[email-masked]>
Date: Tue, 7 Jan 2025 10:01:03 +0800

> > +/**
> > + * wx_ptp_create_clock
> > + * @wx: the private board structure
> > + *
> > + * Returns 0 on success, negative value on failure
> > + *
> > + * This function performs setup of the user entry point function table and
> > + * initalizes the PTP clock device used by userspace to access the clock-like
> > + * features of the PTP core. It will be called by wx_ptp_init, and may
> > + * re-use a previously initialized clock (such as during a suspend/resume
> > + * cycle).
> > + */
> > +static long wx_ptp_create_clock(struct wx *wx)
> > +{
> > +	struct net_device *netdev = wx->netdev;
> > +	long err;
> > +
> > +	/* do nothing if we already have a clock device */
> > +	if (!IS_ERR_OR_NULL(wx->ptp_clock))
> > +		return 0;
> > +
> > +	snprintf(wx->ptp_caps.name, sizeof(wx->ptp_caps.name),
> > +		 "%s", netdev->name);
> > +	wx->ptp_caps.owner = THIS_MODULE;
> > +	wx->ptp_caps.n_alarm = 0;
> > +	wx->ptp_caps.n_ext_ts = 0;
> > +	wx->ptp_caps.n_per_out = 0;
> > +	wx->ptp_caps.pps = 0;
> > +	wx->ptp_caps.adjfine = wx_ptp_adjfine;
> > +	wx->ptp_caps.adjtime = wx_ptp_adjtime;
> > +	wx->ptp_caps.gettimex64 = wx_ptp_gettimex64;
> > +	wx->ptp_caps.settime64 = wx_ptp_settime64;
> > +	wx->ptp_caps.do_aux_work = wx_ptp_do_aux_work;
> 
> wx_ptp_do_aux_work is not defined in this patch, it appears in patch 3
> only. did you compile test your code patch by patch?

I think I may have created some confusion between the coding and testing
machines...
Thanks for your careful review.