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 |
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>
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 --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)
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(+)