Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ptp: netc: only enable periodic pulse event interrupts for PPS

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>
Link: https://patch.msgid.link/20250915082528.1616361-1-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Wei Fang and committed by
Jakub Kicinski
2479cba2 a09655dd

+5 -4
+5 -4
drivers/ptp/ptp_netc.c
··· 305 305 fiper_ctrl |= FIPER_CTRL_SET_PW(channel, fiper_pw); 306 306 fiper_ctrl |= alarm_id ? FIPER_CTRL_FS_ALARM(channel) : 0; 307 307 308 - priv->tmr_emask |= TMR_TEVNET_PPEN(channel) | 309 - TMR_TEVENT_ALMEN(alarm_id); 308 + priv->tmr_emask |= TMR_TEVENT_ALMEN(alarm_id); 310 309 311 - if (pp->type == NETC_PP_PPS) 310 + if (pp->type == NETC_PP_PPS) { 311 + priv->tmr_emask |= TMR_TEVNET_PPEN(channel); 312 312 netc_timer_set_pps_alarm(priv, channel, integral_period); 313 - else 313 + } else { 314 314 netc_timer_set_perout_alarm(priv, channel, integral_period); 315 + } 315 316 316 317 netc_timer_wr(priv, NETC_TMR_TEMASK, priv->tmr_emask); 317 318 netc_timer_wr(priv, NETC_TMR_FIPER(channel), fiper);