This is a note to let you know that I've just added the patch titled net: phy: nxp-c45-tja11xx: add remove callback to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-phy-nxp-c45-tja11xx-add-remove-callback.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From a4506722dc39ca840593f14e3faa4c9ba9408211 Mon Sep 17 00:00:00 2001 From: "Radu Pirea (OSS)" <radu-nicolae.pirea@xxxxxxxxxxx> Date: Thu, 6 Apr 2023 12:59:04 +0300 Subject: net: phy: nxp-c45-tja11xx: add remove callback From: Radu Pirea (OSS) <radu-nicolae.pirea@xxxxxxxxxxx> commit a4506722dc39ca840593f14e3faa4c9ba9408211 upstream. Unregister PTP clock when the driver is removed. Purge the RX and TX skb queues. Fixes: 514def5dd339 ("phy: nxp-c45-tja11xx: add timestamping support") CC: stable@xxxxxxxxxxxxxxx # 5.15+ Signed-off-by: Radu Pirea (OSS) <radu-nicolae.pirea@xxxxxxxxxxx> Reviewed-by: Andrew Lunn <andrew@xxxxxxx> Link: https://lore.kernel.org/r/20230406095904.75456-1-radu-nicolae.pirea@xxxxxxxxxxx Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/phy/nxp-c45-tja11xx.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/drivers/net/phy/nxp-c45-tja11xx.c +++ b/drivers/net/phy/nxp-c45-tja11xx.c @@ -1117,6 +1117,17 @@ no_ptp_support: return ret; } +static void nxp_c45_remove(struct phy_device *phydev) +{ + struct nxp_c45_phy *priv = phydev->priv; + + if (priv->ptp_clock) + ptp_clock_unregister(priv->ptp_clock); + + skb_queue_purge(&priv->tx_queue); + skb_queue_purge(&priv->rx_queue); +} + static struct phy_driver nxp_c45_driver[] = { { PHY_ID_MATCH_MODEL(PHY_ID_TJA_1103), @@ -1139,6 +1150,7 @@ static struct phy_driver nxp_c45_driver[ .set_loopback = genphy_c45_loopback, .get_sqi = nxp_c45_get_sqi, .get_sqi_max = nxp_c45_get_sqi_max, + .remove = nxp_c45_remove, }, }; Patches currently in stable-queue which might be from radu-nicolae.pirea@xxxxxxxxxxx are queue-5.15/net-phy-nxp-c45-tja11xx-add-remove-callback.patch queue-5.15/net-phy-nxp-c45-tja11xx-fix-unsigned-long-multiplication-overflow.patch