]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
phy: mscc: Fix PTP for VSC8574 and VSC8572
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Thu, 23 Oct 2025 19:13:50 +0000 (21:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 12:54:48 +0000 (13:54 +0100)
commita720fb15bd06acb12556d015799e7797f04dbd3c
tree71626e160bc750cc6a26d51ddb901757954d21ae
parent41d2074ca8689b5c7ffc2f9b49cc4a836d60d1af
phy: mscc: Fix PTP for VSC8574 and VSC8572

[ Upstream commit ea5df88aeca112aac69e6c32e3dd1433a113b0c9 ]

The PTP initialization is two-step. First part are the function
vsc8584_ptp_probe_once() and vsc8584_ptp_probe() at probe time which
initialize the locks, queues, creates the PTP device. The second part is
the function vsc8584_ptp_init() at config_init() time which initialize
PTP in the HW.

For VSC8574 and VSC8572, the PTP initialization is incomplete. It is
missing the first part but it makes the second part. Meaning that the
ptp_clock_register() is never called.

There is no crash without the first part when enabling PTP but this is
unexpected because some PHys have PTP functionality exposed by the
driver and some don't even though they share the same PTP clock PTP.

Fixes: 774626fa440e ("net: phy: mscc: Add PTP support for 2 more VSC PHYs")
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Link: https://patch.msgid.link/20251023191350.190940-3-horatiu.vultur@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/mscc/mscc_main.c