]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_ptp: Add helper functions to configure PTP traps
authorAmit Cohen <amcohen@nvidia.com>
Wed, 27 Jul 2022 06:23:20 +0000 (09:23 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Jul 2022 10:02:23 +0000 (11:02 +0100)
commit771cc8ab377e582e77fd58d351c5ee0a85d08abf
treea0156e33b71d69a0e4c2ba1fa6a8c2b6ebc42143
parent7c6dd209c18738551c1842a2a2ef83ceb331d3a9
mlxsw: spectrum_ptp: Add helper functions to configure PTP traps

MTPTPT register is used to set which message types should arrive under
which PTP trap. Currently, PTP0 is used for event message types, which
means that the packets require time stamp. PTP1 is used for other packets.

This configuration will be same for Spectrum-2 and newer ASICs. In
preparation for Spectrum-2 PTP support, add helper functions to
configure PTP traps and use them for Spectrum-1. These functions will be
used later also for Spectrum-2.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c