Skip to content

Commit 8fee6d5

Browse files
Csókás, Bencekuba-moo
authored andcommitted
net: fec: Stop PPS on driver remove
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]>
1 parent 9ee09ed commit 8fee6d5

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
@@ -775,6 +775,9 @@ void fec_ptp_stop(struct platform_device *pdev)
775775
struct net_device *ndev = platform_get_drvdata(pdev);
776776
struct fec_enet_private *fep = netdev_priv(ndev);
777777

778+
if (fep->pps_enable)
779+
fec_ptp_enable_pps(fep, 0);
780+
778781
cancel_delayed_work_sync(&fep->time_keep);
779782
hrtimer_cancel(&fep->perout_timer);
780783
if (fep->ptp_clock)

0 commit comments

Comments
 (0)