Am 2021-12-08 10:42, schrieb Maximilian Kirchner:
Am 2021-12-07 17:31, schrieb Richard Cochran:
On Tue, Dec 07, 2021 at 11:27:19AM +0100, Maximilian Kirchner wrote:
Hello,
I hope someone may be able to help me here. I have trouble syncing two
Linux
systems using PTP.
Setup:
Two PCBs with a BegleCore module and a DP83640 PHY are connected with
each
other over Ethernet. One board should act as the PTP master, the other
as
the slave.
You want to use the PTP features in the phyters.
First step is to make sure the MAC driver isn't also doing time
stamping.
I assume your MAC has the CPTS and will muck things up. I have had to
hack the CPTS support away in some cases.
Thanks,
Richard
Hi,
the SoC used on the BeagleCore modules does indead have a CPTS module.
To see if it helps, I recompiled and replaced the kernel, now with the
option for "TI Common PLatofrm Time Sync (CPTS) Support" turned off.
This now resulted in ptp4l to not running at all. The output is now the
following:
ptp4l[1614.335]: selected /dev/ptp0 as PTP clock
ptp4l[1614.348]: driver rejected most general HWTSTAMP filter
ptp4l[1614.351]: ioctl SIOCSHWTSTAMP failed: Operation not supported
ptp4l[1614.355]: port 1 (eth0): INITIALIZING to FAULTY on FAULT_DETECTED
(FT_UNSPECIFIED)
ptp4l[1614.359]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on
INIT_COMPLETE
ptp4l[1614.363]: port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on
INIT_COMPLETE
It doesn't go further.
The command "./hwstamp_ctl -i eth0" returned:
Device driver does not have support for non-destructive SIOCGHWTSTAMP.
Now I dont know if I made it worse, or if this is the first step to a
solution :-/
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users
Hello,
I would like to let you know that I was able to fix my problem.
Thank you very much for your tip regarding the CPTS.
After disabling the CPTS in the kernel, I also had to change the
following:
diff --git a/drivers/net/ethernet/ti/cpsw.c
b/drivers/net/ethernet/ti/cpsw.c
index fc8e3ed383a2..d4d70706e86c 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2490,15 +2490,22 @@ static int cpsw_ndo_ioctl(struct net_device
*dev, struct ifreq *req, int cmd)
struct cpsw_priv *priv = netdev_priv(dev);
struct cpsw_common *cpsw = priv->cpsw;
int slave_no = cpsw_slave_index(cpsw, priv);
+ int err = 0;
if (!netif_running(dev))
return -EINVAL;
switch (cmd) {
case SIOCSHWTSTAMP:
- return cpsw_hwtstamp_set(dev, req);
+ err = cpsw_hwtstamp_set(dev, req);
+ if(err != -EOPNOTSUPP)
+ return err;
+ break;
case SIOCGHWTSTAMP:
- return cpsw_hwtstamp_get(dev, req);
+ err = cpsw_hwtstamp_get(dev, req);
+ if(err != -EOPNOTSUPP)
+ return err;
+ break;
case SIOCSWITCHCONFIG:
return cpsw_switch_config_ioctl(dev, req, cmd);
}
Not sure if it is the most elegant thing to do, but it works now.
Best regards
Maximilian Kirchner
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users