public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Wei Fang <wei.fang@nxp.com>
To: claudiu.manoil@nxp.com, vladimir.oltean@nxp.com,
	xiaoning.wang@nxp.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com
Cc: ioana.ciornei@nxp.com, yangbo.lu@nxp.com,
	michal.swiatkowski@linux.intel.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	stable@vger.kernel.org
Subject: [PATCH v3 net 6/8] net: enetc: add missing enetc4_link_deinit()
Date: Mon, 24 Feb 2025 19:12:49 +0800	[thread overview]
Message-ID: <20250224111251.1061098-7-wei.fang@nxp.com> (raw)
In-Reply-To: <20250224111251.1061098-1-wei.fang@nxp.com>

The enetc4_link_init() is called when the PF driver probes to create
phylink and MDIO bus, but we forgot to call enetc4_link_deinit() to
free the phylink and MDIO bus when the driver was unbound. so add
missing enetc4_link_deinit() to enetc4_pf_netdev_destroy().

Fixes: 99100d0d9922 ("net: enetc: add preliminary support for i.MX95 ENETC PF")
Cc: stable@vger.kernel.org
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/ethernet/freescale/enetc/enetc4_pf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/freescale/enetc/enetc4_pf.c b/drivers/net/ethernet/freescale/enetc/enetc4_pf.c
index fc41078c4f5d..48861c8b499a 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc4_pf.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc4_pf.c
@@ -684,6 +684,7 @@ static void enetc4_pf_netdev_destroy(struct enetc_si *si)
 	struct net_device *ndev = si->ndev;
 
 	unregister_netdev(ndev);
+	enetc4_link_deinit(priv);
 	enetc_free_msix(priv);
 	free_netdev(ndev);
 }
-- 
2.34.1


  parent reply	other threads:[~2025-02-24 11:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 11:12 [PATCH v3 net 0/8] net: enetc: fix some known issues Wei Fang
2025-02-24 11:12 ` [PATCH v3 net 1/8] net: enetc: fix the off-by-one issue in enetc_map_tx_buffs() Wei Fang
2025-02-24 16:43   ` Vladimir Oltean
2025-02-24 17:24   ` Claudiu Manoil
2025-02-24 11:12 ` [PATCH v3 net 2/8] net: enetc: keep track of correct Tx BD count in enetc_map_tx_tso_buffs() Wei Fang
2025-02-24 16:44   ` Vladimir Oltean
2025-02-24 17:27   ` Claudiu Manoil
2025-02-24 11:12 ` [PATCH v3 net 3/8] net: enetc: correct the xdp_tx statistics Wei Fang
2025-02-24 11:12 ` [PATCH v3 net 4/8] net: enetc: VFs do not support HWTSTAMP_TX_ONESTEP_SYNC Wei Fang
2025-02-24 11:12 ` [PATCH v3 net 5/8] net: enetc: update UDP checksum when updating originTimestamp field Wei Fang
2025-02-24 11:12 ` Wei Fang [this message]
2025-02-24 11:12 ` [PATCH v3 net 7/8] net: enetc: remove the mm_lock from the ENETC v4 driver Wei Fang
2025-02-24 11:12 ` [PATCH v3 net 8/8] net: enetc: fix the off-by-one issue in enetc_map_tx_tso_buffs() Wei Fang
2025-02-24 16:47   ` Vladimir Oltean
2025-02-24 17:37   ` Claudiu Manoil
2025-02-26  3:20 ` [PATCH v3 net 0/8] net: enetc: fix some known issues patchwork-bot+netdevbpf

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=20250224111251.1061098-7-wei.fang@nxp.com \
    --to=wei.fang@nxp.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=imx@lists.linux.dev \
    --cc=ioana.ciornei@nxp.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=vladimir.oltean@nxp.com \
    --cc=xiaoning.wang@nxp.com \
    --cc=yangbo.lu@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