Discussion:
[Linuxptp-devel] Fwd: PHY Hardware Time Stamping
Imanol Allende
2017-07-04 07:40:43 UTC
Permalink
Hello,

I am using Xilinx Emaclite mac driver for phy level hardware time stamping.
When I first executed tp4l, it gave the error that the driver does not
implemented ioctl. Therefore, I added the following lines to the driver:
< static int xemaclite_ioctl(struct net_device *ndev, struct ifreq *rq, int
cmd){
< struct net_local *lp = netdev_priv(ndev);
< struct phy_device *phydev = lp->phy_dev;
< switch(cmd){
< case SIOCSHWTSTAMP
< return phy_mii_ioctl(phydev, rq, cmd);
< default:
< return 0;
< }
< }

1244d1228
< .ndo_do_ioctl = xemaclite_ioctl,

However, it still does not work. When I execute the program It warns the
following:

ptp4l[839.698]: port 1: MASTER to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED)

ptp4l[855.840]: port 1: FAULTY to LISTENING on FAULT_CLEARED

ptp4l[863.340]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_
EXPIRES

ptp4l[863.341]: selected best master clock 000a35.fffe.000000

ptp4l[863.341]: assuming the grand master role

ptp4l[864.342]: timed out while polling for tx timestamp

ptp4l[864.342]: increasing tx_timestamp_timeout may correct this issue, but
it is likely caused by a driver bug

ptp4l[864.342]: port 1: send sync failed



I connected the board to wireshark and the sync message is sent. Apart from
that, I saw the following post saying that the emaclite driver does not
accept multicast message(which is true) and that it does not work with
ptp4l: https://sourceforge.net/p/linuxptp/mailman/message/30622664/

I examined the ptp4l and it fails in the poll() function of the sk.c file.
What does it mean?

Thank you and sorry for the inconvenience,
Imanol
Richard Cochran
2017-07-04 07:55:31 UTC
Permalink
Post by Imanol Allende
I connected the board to wireshark and the sync message is sent. Apart from
that, I saw the following post saying that the emaclite driver does not
accept multicast message(which is true) and that it does not work with
ptp4l: https://sourceforge.net/p/linuxptp/mailman/message/30622664/
Right. If the MAC doesn't support multicast, then PTP will never work.
Post by Imanol Allende
I examined the ptp4l and it fails in the poll() function of the sk.c file.
What does it mean?
You are not receiving a Tx time stamp. This is understandable, since
you MAC drops all multicast frames.

Sorry,
Richard

Loading...