Re: [PATCH] net: lan743x: disconnect the PHY when PTP setup fails

From: Wentao Liang

Date: Tue Nov 10 2026 - 04:15:46 EST


Hi Simon,

Sorry for the slow follow-up on this patch, and thanks for reviewing it.

I checked a5f199a8d8a0 again. Before the conversion, a failure in
lan743x_ptp_open() went to close_phy. The conversion redirected that
failure to close_mac, while the RX and TX setup failure paths still
reach lan743x_phylink_disconnect(). I also agree about the NULL check.
Probe creates phylink before registering the netdev, and this error
path is reached only after lan743x_phylink_connect() succeeds.

I missed Chris Babroski's earlier patch, which covers the same failure
path by connecting and starting phylink after PTP and the rings are set
up:

https://lore.kernel.org/netdev/84c495b24206953fb799d4070c4d99ff27efb829.1792008404.git.cbabroski@xxxxxxxxxx/

Please drop my standalone patch. I also withdraw the stable backport
request for it.

To answer the discovery and testing questions, static analysis flagged
this error path as a candidate. We used DeepSeek and GPT-6.1 Sol to
assist with reviewing the candidate and preparing the fix. The finding
is based on source inspection. I did not reproduce the PTP initialization
failure or test the patch on real LAN743x hardware.

Thanks,
Wentao