Merge branch 'support-one-ptp-device-per-hardware-clock'
authorPaolo Abeni <pabeni@redhat.com>
Thu, 6 Feb 2025 09:14:03 +0000 (10:14 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 6 Feb 2025 09:14:04 +0000 (10:14 +0100)
commit5f9e5d20ee730254386746359fdb7fc352a5bdb3
treea30d198f57f498add96c36db22e3c365b6c1d076
parent3924fa995cdf3752f2f89f8de72834c4638c5ebf
parent689805dcc474c2accb5cffbbcea1c06ee4a54570
Merge branch 'support-one-ptp-device-per-hardware-clock'

Tariq Toukan says:

====================
Support one PTP device per hardware clock

This series contains two features from Jianbo, followed by simple
cleanups.

Patches 1-9 by Jianbo add support for one PTP device per hardware clock,
described below [1].

Patches 10-12 by Jianbo add support for 200Gbps per-lane link modes in
kernel and mlx5 driver.

Patches 13-15 are simple cleanups by Gal and Carolina.

[1]
PHC (PTP hardware clock) is normally shared by multiple functions
(PF/VF/SF). mlx5 driver currently creates a separate PTP device for each
network interface that shares one PHC.

PHC can be configured to work as free running mode or real time mode.
In this series, only one PTP device is created for the shared PHC when
it is running in real time mode.

To support this feature,
* Firmware needs to support clock identity. When functions share a
  PHC, the clock identities they query are same.
* Driver dynamically allocates mlx5_clock to represent a PHC.
* New devcom component is added for hardware clock. Functions are
  grouped by the identity, and one mlx5_clock is allocated and shared
  by the functions with the same identity.
* When PTP device accesses PHC by its callbacks, the first function
  in the clock devcom list is selected to send commands to firmware.
* PPS IN event is armed on one function. It should be re-armed on
  the other one when current is unloaded.
====================

Link: https://patch.msgid.link/20250203213516.227902-1-tariqt@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>