[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZrN+7GtjxXa7tZ7g@lizhi-Precision-Tower-5810>
Date: Wed, 7 Aug 2024 10:04:28 -0400
From: Frank Li <Frank.li@....com>
To: Csókás, Bence <csokas.bence@...lan.hu>
Cc: Fugang Duan <B38611@...escale.com>,
"David S. Miller" <davem@...emloft.net>,
Lucas Stach <l.stach@...gutronix.de>, imx@...ts.linux.dev,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Fabio Estevam <festevam@...il.com>, Wei Fang <wei.fang@....com>,
Shenwei Wang <shenwei.wang@....com>,
Clark Wang <xiaoning.wang@....com>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Richard Cochran <richardcochran@...il.com>
Subject: Re: [PATCH resubmit net] net: fec: Stop PPS on driver remove
On Wed, Aug 07, 2024 at 10:09:56AM +0200, Csókás, Bence 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.
>
> Fixes: 32cba57ba74b ("net: fec: introduce fec_ptp_stop and use in probe fail path")
>
> Reviewed-by: Fabio Estevam <festevam@...il.com>
> Link: https://lore.kernel.org/netdev/CAOMZO5BzcZR8PwKKwBssQq_wAGzVgf1ffwe_nhpQJjviTdxy-w@mail.gmail.com/T/#m01dcb810bfc451a492140f6797ca77443d0cb79f
> Signed-off-by: Csókás, Bence <csokas.bence@...lan.hu>
Reviewed-by: Frank Li <Frank.Li@....com>
> ---
> drivers/net/ethernet/freescale/fec_ptp.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
> index e32f6724f568..2e4f3e1782a2 100644
> --- a/drivers/net/ethernet/freescale/fec_ptp.c
> +++ b/drivers/net/ethernet/freescale/fec_ptp.c
> @@ -775,6 +775,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)
> --
> 2.34.1
>
>
Powered by blists - more mailing lists