[PATCH net v3 0/2] net: ravb: fix PTP clock lifetime

[email protected] Thu, 6 Aug 2026 17:51:24 +0800
Newsgroups org.kernel.vger.linux-renesas-soc,org.kernel.vger.netdev,org.kernel.vger.stable
Message-ID <[email protected]>
From: Xuanqiang Luo <[email protected]>

This series fixes RAVB PTP clock lifetime handling. It handles unavailable
clocks and synchronizes clock access with publication and teardown.

Patch 1 handles unavailable PTP clocks.

Patch 2 synchronizes PTP clock access with publication and teardown.

---
Changes:
v3:
  Patch 1:
  - Omit Niklas Söderlund's Reviewed-by tag because the implementation he
    reviewed has changed.
  - Describe the NULL pointer dereference before the first open as the most
    likely failure mode in the commit message. (Jakub Kicinski, Sashiko)
  - Normalize PTP clock registration failures to NULL.
    (Jakub Kicinski, Sashiko)
  - Keep hardware timestamping capabilities independent of PHC
    availability. (Jakub Kicinski, Sashiko)
  Patch 2 (new):
  - Serialize PTP clock publication and access with priv->lock, and detach
    the clock before unregistering it. (Jakub Kicinski, Sashiko)

v2: https://lore.kernel.org/all/[email protected]/
  - Only advertise hardware timestamping support when a PHC is available
    (Niklas Söderlund).

v1: https://lore.kernel.org/all/[email protected]/

Xuanqiang Luo (2):
  net: ravb: handle unavailable PTP clock
  net: ravb: serialize PTP clock teardown

 drivers/net/ethernet/renesas/ravb_main.c | 15 +++++++++++---
 drivers/net/ethernet/renesas/ravb_ptp.c  | 25 ++++++++++++++++++++----
 2 files changed, 33 insertions(+), 7 deletions(-)


base-commit: 11028ab62899e4191e074ee364c712b77823a9c4
-- 
2.43.0