diff mbox series

net: fec: Stop PPS on driver remove

Message ID 20240805145735.2385752-1-csokas.bence@prolan.hu (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net: fec: Stop PPS on driver remove | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 29 this patch: 29
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 29 this patch: 29
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 29 this patch: 29
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 19 this patch: 19
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-08-06--00-00 (tests: 707)

Commit Message

Csókás Bence Aug. 5, 2024, 2:57 p.m. UTC
PPS was not stopped in `fec_ptp_stop()`, called when
the adapter was removed. Consequentially, you couldn't
safely reload the driver with the PPS signal on.

Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
---
 drivers/net/ethernet/freescale/fec_ptp.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Fabio Estevam Aug. 5, 2024, 3:04 p.m. UTC | #1
On Mon, Aug 5, 2024 at 11:59 AM Csókás, Bence <csokas.bence@prolan.hu> wrote:
>
> PPS was not stopped in `fec_ptp_stop()`, called when
> the adapter was removed. Consequentially, you couldn't
> safely reload the driver with the PPS signal on.
>
> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>

It seems this one deserves a Fixes tag.

Reviewed-by: Fabio Estevam <festevam@gmail.com>
Andrew Lunn Aug. 6, 2024, 11 p.m. UTC | #2
On Mon, Aug 05, 2024 at 12:04:35PM -0300, Fabio Estevam wrote:
> On Mon, Aug 5, 2024 at 11:59 AM Csókás, Bence <csokas.bence@prolan.hu> wrote:
> >
> > PPS was not stopped in `fec_ptp_stop()`, called when
> > the adapter was removed. Consequentially, you couldn't
> > safely reload the driver with the PPS signal on.
> >
> > Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
> 
> It seems this one deserves a Fixes tag.
> 
> Reviewed-by: Fabio Estevam <festevam@gmail.com>

And should be based on the correct tree, and indicate that tree in the
Subject: line:

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#netdev-faq

    Andrew

---
pw-bot: cr
diff mbox series

Patch

diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index c5b89352373a..93953d252d99 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -787,6 +787,9 @@  void fec_ptp_stop(struct platform_device *pdev)
 	struct net_device *ndev = platform_get_drvdata(pdev);
 	struct fec_enet_private *fep = netdev_priv(ndev);
 
+	if (fep->pps_enable)
+		fec_ptp_enable_pps(fep, 0);
+
 	cancel_delayed_work_sync(&fep->time_keep);
 	hrtimer_cancel(&fep->perout_timer);
 	if (fep->ptp_clock)