]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: Change the API of PHY default timestamp to MAC
authorKory Maincent <kory.maincent@bootlin.com>
Tue, 9 Jul 2024 13:53:36 +0000 (15:53 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Jul 2024 15:02:26 +0000 (08:02 -0700)
commit2dd35600590148d843367c04975acad3c1a527c3
tree3133e7a29bd2cf1511c7a6c7889bc79fe4b8c964
parente50bfd6bb231a6e2b7221ad78dce294330238c76
net: Change the API of PHY default timestamp to MAC

Change the API to select MAC default time stamping instead of the PHY.
Indeed the PHY is closer to the wire therefore theoretically it has less
delay than the MAC timestamping but the reality is different. Due to lower
time stamping clock frequency, latency in the MDIO bus and no PHC hardware
synchronization between different PHY, the PHY PTP is often less precise
than the MAC. The exception is for PHY designed specially for PTP case but
these devices are not very widespread. For not breaking the compatibility
default_timestamp flag has been introduced in phy_device that is set by
the phy driver to know we are using the old API behavior.

Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Link: https://patch.msgid.link/20240709-feature_ptp_netnext-v17-4-b5317f50df2a@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/bcm-phy-ptp.c
drivers/net/phy/dp83640.c
drivers/net/phy/micrel.c
drivers/net/phy/mscc/mscc_ptp.c
drivers/net/phy/nxp-c45-tja11xx.c
include/linux/phy.h
net/core/dev_ioctl.c
net/core/timestamping.c
net/ethtool/common.c