Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F16D0361DDC; Sat, 12 Sep 2026 15:20:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789226410; cv=none; b=rR19PCim4+cUU6qiVEj7vkqrCPrS/EVwpYAKTH4f1JNcNJY9eLOfPOblTg8pdF4sW1eI2RS/MHwJFJu4z+0LVAgnRT3AVinDIKgv+BoqVl8iaNXgg0y5qPfJec2qfeGGTnb+iIUr7XwLdCwWag6qSbYvhiDcDsK/mUc0im97uP8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789226410; c=relaxed/simple; bh=v9IIDkc7iYSYI2XjuBtNDAn3fzjBgsGOBD6o2Y4ClcA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ujelkcjHWZxkXL5YMxbeWPxXKKnCU72Ct2AxfdIzdp3axbuj7pcEbZ1sCJd40O0SQH2yEglkbP4IEk8eRazgTo7jFanGwr9RopH5TDWkXuVPgw/unbmxqT7FSBbU0G3rF3MfQKqU5K7LLbQy/PnJNUjI5Unq+qiqmNmFCU9ciMw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=x52HHZGV; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="x52HHZGV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D5D11F00893; Sat, 12 Sep 2026 15:20:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789226405; bh=pCX4bRNLJzB2+BU5kECurh8TlIaRhHdZadl+Xwgo6W8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=x52HHZGVcPgknxz4UPoqX8TSCeN4/zxLTPd29DP6VkhupRWoLwr01GwJQQ1jzoooE zT3SJgcw82Wq7QskPj3juhDImO0ZdJmlF7w1cziq3rLNKbUnI8YhKRNSuNv8bSthOS gcxUHYiFRb2lnkk3aI/L3u+FP1rDjKmgCWO5mCa8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wei Fang , Frank Li , bui duc phuc , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.6 1394/1424] net: fec: only stop PTP if it was initialized Date: Sat, 12 Sep 2026 09:03:46 +0200 Message-ID: <20260912065638.479673248@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.279695368@linuxfoundation.org> References: <20260912065607.279695368@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: bui duc phuc [ Upstream commit dd890ae29299636fb037276fc1b5238698d08b03 ] 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, and fec_drv_remove() unconditionally calls fec_ptp_stop() during device removal. Check fep->bufdesc_ex before calling fec_ptp_stop() in both paths to avoid stopping PTP when it was not initialized. Fixes: 32cba57ba74b ("net: fec: introduce fec_ptp_stop and use in probe fail path") Reviewed-by: Wei Fang Reviewed-by: Frank Li Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260826103428.32807-1-phucduc.bui@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/fec_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index ec7fe943e5682..dd977b45f6d0c 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -4604,7 +4604,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); @@ -4646,7 +4647,8 @@ fec_drv_remove(struct platform_device *pdev) ERR_PTR(ret)); cancel_work_sync(&fep->tx_timeout_work); - fec_ptp_stop(pdev); + if (fep->bufdesc_ex) + fec_ptp_stop(pdev); unregister_netdev(ndev); fec_enet_mii_remove(fep); if (fep->reg_phy) -- 2.53.0