]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: fec: do not register PPS event for PEROUT
authorWei Fang <wei.fang@nxp.com>
Tue, 25 Nov 2025 08:52:10 +0000 (16:52 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:24:56 +0000 (06:24 +0900)
commit4c6c2cf74053282e42e285c9b440cd9785d9b56a
tree94e51c5328cf911bb2a4ecf87ec34e0eb8831972
parentca2964a7cb1ee87d4663cf4d40cfc506283c4fe4
net: fec: do not register PPS event for PEROUT

[ Upstream commit 9a060d0fac9e75524f72864adec6d8cdb70a5bca ]

There are currently two situations that can trigger the PTP interrupt,
one is the PPS event, the other is the PEROUT event. However, the irq
handler fec_pps_interrupt() does not check the irq event type and
directly registers a PPS event into the system, but the event may be
a PEROUT event. This is incorrect because PEROUT is an output signal,
while PPS is the input of the kernel PPS system. Therefore, add a check
for the event type, if pps_enable is true, it means that the current
event is a PPS event, and then the PPS event is registered.

Fixes: 350749b909bf ("net: fec: Add support for periodic output signal of PPS")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20251125085210.1094306-5-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/freescale/fec_ptp.c