netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Keller, Jacob E'" <jacob.e.keller@intel.com>,
	"'Richard Cochran'" <richardcochran@gmail.com>
Cc: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<linux@armlinux.org.uk>, <horms@kernel.org>,
	<netdev@vger.kernel.org>, <vadim.fedorenko@linux.dev>,
	<mengyuanlou@net-swift.com>
Subject: RE: [PATCH net-next v2 3/4] net: wangxun: Implement do_aux_work of ptp_clock_info
Date: Wed, 8 Jan 2025 14:28:20 +0800	[thread overview]
Message-ID: <03e001db6196$82ad8480$88088d80$@trustnetic.com> (raw)
In-Reply-To: <03ce01db6178$581f2ed0$085d8c70$@trustnetic.com>

> > > > > > +static int wx_ptp_feature_enable(struct ptp_clock_info *ptp,
> > > > > > +				 struct ptp_clock_request *rq, int on)
> > > > > > +{
> > > > > > +	struct wx *wx = container_of(ptp, struct wx, ptp_caps);
> > > > > > +
> > > > > > +	/**
> > > > > > +	 * When PPS is enabled, unmask the interrupt for the ClockOut
> > > > > > +	 * feature, so that the interrupt handler can send the PPS
> > > > > > +	 * event when the clock SDP triggers. Clear mask when PPS is
> > > > > > +	 * disabled
> > > > > > +	 */
> > > > > > +	if (rq->type != PTP_CLK_REQ_PPS || !wx->ptp_setup_sdp)
> > > > > > +		return -EOPNOTSUPP;
> > > > >
> > > > > NAK.
> > > > >
> > > > > The logic that you added in patch #4 is a periodic output signal, so
> > > > > your driver will support PTP_CLK_REQ_PEROUT and not PTP_CLK_REQ_PPS.
> > > > >
> > > > > Please change the driver to use that instead.
> > > > >
> > > > > Thanks,
> > > > > Richard
> > > >
> > > > This is a common misconception because the industry lingo uses PPS to mean
> > > > periodic output. I wonder if there's a place we can put an obvious warning
> > > > about checking if you meant PEROUT... I've had this issue pop up with
> > > > colleagues many times.
> > >
> > > Does a periodic output signal mean that a signal is output every second,
> > > whenever the start time is? But I want to implement that a signal is
> > > output when an integer number of seconds for the clock time.
> > >
> >
> > The periodic output can be configured in a bunch of ways, including periods that
> > are not a full second, when the signal should start, as well as in "one shot" mode
> > where it will only trigger once. You should check the possible flags in
> > <uapi/linux/ptp_clock.h> for the various options.
> 
> Looks like I need to configure perout.phase {0, 0} to output signal at the closest next
> second. And configure perout.period {0, 120 * 1000000} to keep the signal 120ms.
> 
> But where should I put these configuration? It used to be:
> 
> echo 1 > /sys/class/ptp/ptp0/pps_enable

I see. Thanks for your suggestion.


  reply	other threads:[~2025-01-08  6:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-06  8:45 [PATCH net-next v2 0/4] Support PTP clock for Wangxun NICs Jiawen Wu
2025-01-06  8:45 ` [PATCH net-next v2 1/4] net: wangxun: Add support for PTP clock Jiawen Wu
2025-01-06 10:35   ` Vadim Fedorenko
2025-01-07  2:01     ` Jiawen Wu
2025-01-06  8:45 ` [PATCH net-next v2 2/4] net: wangxun: Implement get_ts_info Jiawen Wu
2025-01-06 10:28   ` Vadim Fedorenko
2025-01-06  8:45 ` [PATCH net-next v2 3/4] net: wangxun: Implement do_aux_work of ptp_clock_info Jiawen Wu
2025-01-06 10:36   ` Vadim Fedorenko
2025-01-06 15:16   ` Richard Cochran
2025-01-06 21:35     ` Keller, Jacob E
2025-01-07  5:59       ` Jiawen Wu
2025-01-08  0:33         ` Keller, Jacob E
2025-01-08  2:52           ` Jiawen Wu
2025-01-08  6:28             ` Jiawen Wu [this message]
2025-01-08 18:09             ` Keller, Jacob E
2025-01-07  1:50     ` Jiawen Wu
2025-01-06  8:45 ` [PATCH net-next v2 4/4] net: ngbe: Add support for 1PPS and TOD Jiawen Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='03e001db6196$82ad8480$88088d80$@trustnetic.com' \
    --to=jiawenwu@trustnetic.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=vadim.fedorenko@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).