From: Wei Fang <wei.fang@nxp.com>
To: xiaoning.wang@nxp.com, richardcochran@gmail.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, Frank.Li@nxp.com
Cc: imx@lists.linux.dev, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next] ptp: netc: only enable periodic pulse event interrupts for PPS
Date: Mon, 15 Sep 2025 16:25:28 +0800 [thread overview]
Message-ID: <20250915082528.1616361-1-wei.fang@nxp.com> (raw)
The periodic pulse event interrupts are used to register the PPS events
into the system, so it is only applicable to PTP_CLK_REQ_PPS request.
However, these interrupts are mistakenly enabled in PTP_CLK_REQ_PEROUT
request, so fix this error.
Fixes: 671e266835b8 ("ptp: netc: add periodic pulse output support")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
---
This issue currently only exists in net-next tree, so the target tree
is net-next.
---
---
drivers/ptp/ptp_netc.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/ptp/ptp_netc.c b/drivers/ptp/ptp_netc.c
index 8c5fea1f43fa..4fefb5ef3685 100644
--- a/drivers/ptp/ptp_netc.c
+++ b/drivers/ptp/ptp_netc.c
@@ -304,13 +304,14 @@ static void netc_timer_enable_periodic_pulse(struct netc_timer *priv,
fiper_ctrl |= FIPER_CTRL_SET_PW(channel, fiper_pw);
fiper_ctrl |= alarm_id ? FIPER_CTRL_FS_ALARM(channel) : 0;
- priv->tmr_emask |= TMR_TEVNET_PPEN(channel) |
- TMR_TEVENT_ALMEN(alarm_id);
+ priv->tmr_emask |= TMR_TEVENT_ALMEN(alarm_id);
- if (pp->type == NETC_PP_PPS)
+ if (pp->type == NETC_PP_PPS) {
+ priv->tmr_emask |= TMR_TEVNET_PPEN(channel);
netc_timer_set_pps_alarm(priv, channel, integral_period);
- else
+ } else {
netc_timer_set_perout_alarm(priv, channel, integral_period);
+ }
netc_timer_wr(priv, NETC_TMR_TEMASK, priv->tmr_emask);
netc_timer_wr(priv, NETC_TMR_FIPER(channel), fiper);
--
2.34.1
next reply other threads:[~2025-09-15 8:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 8:25 Wei Fang [this message]
2025-09-17 22:30 ` [PATCH net-next] ptp: netc: only enable periodic pulse event interrupts for PPS patchwork-bot+netdevbpf
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=20250915082528.1616361-1-wei.fang@nxp.com \
--to=wei.fang@nxp.com \
--cc=Frank.Li@nxp.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imx@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=xiaoning.wang@nxp.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.