Netdev List
 help / color / mirror / Atom feed
From: Wei Fang <wei.fang@nxp.com>
To: "phucduc.bui@gmail.com" <phucduc.bui@gmail.com>,
	Frank Li <frank.li@nxp.com>, Shenwei Wang <shenwei.wang@nxp.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"davem@davemloft.net" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Richard Cochran <richardcochran@gmail.com>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [PATCH net] net: fec: only stop PTP if it was initialized
Date: Tue, 25 Aug 2026 02:03:59 +0000	[thread overview]
Message-ID: <GV2PR04MB11739802F62258CA8CB02BAE088AF2@GV2PR04MB11739.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20260824100834.31655-1-phucduc.bui@gmail.com>

> fec_ptp_init() is only called when fep->bufdesc_ex is available.
> However, fec_probe() unconditionally calls fec_ptp_stop() on the failed_init
> path.
>
> Check fep->bufdesc_ex before calling fec_ptp_stop() to avoid stopping PTP when
> it was not initialized.
>
> Fixes: 32cba57ba74b ("net: fec: introduce fec_ptp_stop and use in probe fail
> path")
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> index ced4dbf8cd90..7a87f40d12d9 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -5457,7 +5457,8 @@ fec_probe(struct platform_device *pdev)
>  failed_irq:
>       fec_enet_deinit(ndev);
>  failed_init:
> -     fec_ptp_stop(pdev);
> +     if (fep->bufdesc_ex)
> +             fec_ptp_stop(pdev);
>  failed_reset:
>       pm_runtime_put_noidle(&pdev->dev);
>       pm_runtime_disable(&pdev->dev);
> --
> 2.43.0

Thanks for fixing this issue.

Reviewed-by: Wei Fang <wei.fang@nxp.com>


NXP Confidential

  parent reply	other threads:[~2026-08-25  2:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24 10:08 [PATCH net] net: fec: only stop PTP if it was initialized phucduc.bui
2026-08-24 14:57 ` Frank Li
2026-08-25  2:03 ` Wei Fang [this message]
2026-08-25  2:06 ` Wei Fang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=GV2PR04MB11739802F62258CA8CB02BAE088AF2@GV2PR04MB11739.eurprd04.prod.outlook.com \
    --to=wei.fang@nxp.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=frank.li@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=phucduc.bui@gmail.com \
    --cc=richardcochran@gmail.com \
    --cc=shenwei.wang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox