[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMxDh17knIDhJany@shell.armlinux.org.uk>
Date: Thu, 18 Sep 2025 18:38:15 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: netdev@...r.kernel.org
Cc: Andrew Lunn <andrew@...n.ch>, Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Richard Cochran <richardcochran@...il.com>,
Vladimir Oltean <olteanv@...il.com>
Subject: [PATCH RFC net-next 00/20] Marvell PTP stuffs
Not for merging, and, yes, it's more than 15 patches.
As the merge window is approaching, I thought I would share my current
state with the Marvell PTP library. I don't consider this ready for
merging yet, as I still have decisions to make on the structure for
multi-port setups such as DSA. 88E6165 support is also likely broken.
You will have noticed I've pushed out some patches cleaning up stuff
in the mv88e6xxx driver, and also making it easier for PTP clock
drivers to clean up when unregistering.
This series contains potentially another independent patch, adding
the ability to get the hwtstamp configuration from a MII timestamper,
although of course, the only known user right now is the Marvell PHY
PTP support (specifically 88E1510) in this series.
One of the things I don't like about the conversion for mv88e6xxx is
the "drop the old code, plug in the new". The hwtstamp.c changes
are split up, but they result in stuff becoming non-functional during
the transition.
The only thing I can think of doing to solve that is to forward the
hwtstamp_set() call to both implementations, and then convert the
tx side, rx side, and remove the old.
I've been running this for about 10 days (with reboots) between two
machines, one using the PHY side as the GM, and the other using
DSA as the slave. All seems happy, no timeouts on getting the
timestamps for the Sync or Delay_Req packets:
ptp4l[3032.775]: master offset -60 s2 freq -3984 path delay 11144
ptp4l[3033.775]: master offset -16 s2 freq -3958 path delay 11144
ptp4l[3034.775]: master offset 45 s2 freq -3901 path delay 11144
ptp4l[3035.775]: master offset 203 s2 freq -3730 path delay 11144
ptp4l[3036.775]: master offset 115 s2 freq -3757 path delay 11144
ptp4l[3037.775]: master offset -186 s2 freq -4023 path delay 11144
ptp4l[3038.775]: master offset -244 s2 freq -4137 path delay 11144
ptp4l[3039.775]: master offset -122 s2 freq -4088 path delay 11137
I've tested both L2 and L4 configurations. Whether I get these to
a point that I can post some of them for real next week is uncertain,
and I certainly won't post them unless I feel they are ready -
especially not before I'm happy with the library.
drivers/net/dsa/mv88e6xxx/Kconfig | 1 +
drivers/net/dsa/mv88e6xxx/chip.c | 10 +
drivers/net/dsa/mv88e6xxx/chip.h | 63 +--
drivers/net/dsa/mv88e6xxx/hwtstamp.c | 664 ++++++++++++------------------
drivers/net/dsa/mv88e6xxx/hwtstamp.h | 26 +-
drivers/net/dsa/mv88e6xxx/ptp.c | 527 +++++++++---------------
drivers/net/dsa/mv88e6xxx/ptp.h | 30 +-
drivers/net/phy/Kconfig | 13 +
drivers/net/phy/Makefile | 1 +
drivers/net/phy/marvell.c | 15 +-
drivers/net/phy/marvell_ptp.c | 369 +++++++++++++++++
drivers/net/phy/marvell_ptp.h | 17 +
drivers/net/phy/phy.c | 3 +
drivers/ptp/Kconfig | 4 +
drivers/ptp/Makefile | 2 +
drivers/ptp/ptp_marvell_tai.c | 445 ++++++++++++++++++++
drivers/ptp/ptp_marvell_ts.c | 778 +++++++++++++++++++++++++++++++++++
include/linux/marvell_ptp.h | 159 +++++++
include/linux/mii_timestamper.h | 3 +
19 files changed, 2318 insertions(+), 812 deletions(-)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists