Skip to content

Commit 85a5eba

Browse files
Csókás, Bencesmb49
authored andcommitted
net: fec: Stop PPS on driver remove
BugLink: https://bugs.launchpad.net/bugs/2078428 [ Upstream commit 8fee6d5 ] 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. Fixes: 32cba57 ("net: fec: introduce fec_ptp_stop and use in probe fail path") Reviewed-by: Fabio Estevam <[email protected]> Link: https://lore.kernel.org/netdev/CAOMZO5BzcZR8PwKKwBssQq_wAGzVgf1ffwe_nhpQJjviTdxy-w@mail.gmail.com/T/#m01dcb810bfc451a492140f6797ca77443d0cb79f Signed-off-by: Csókás, Bence <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Frank Li <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Koichiro Den <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent 0f3eac1 commit 85a5eba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/freescale/fec_ptp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,9 @@ void fec_ptp_stop(struct platform_device *pdev)
640640
struct net_device *ndev = platform_get_drvdata(pdev);
641641
struct fec_enet_private *fep = netdev_priv(ndev);
642642

643+
if (fep->pps_enable)
644+
fec_ptp_enable_pps(fep, 0);
645+
643646
cancel_delayed_work_sync(&fep->time_keep);
644647
if (fep->ptp_clock)
645648
ptp_clock_unregister(fep->ptp_clock);

0 commit comments

Comments
 (0)