Hello,

I'm using linuxptp from master branch on a Jetson TX2 device, where unfortunately only kernel 4.9.299 is available from the manufacturer.

The device's NIC uses eqos driver and reports all the timestamping capabilities required for ptp4l:

$ ethtool -T eth0
Time stamping parameters for eth0:
Capabilities:
    hardware-transmit     (SOF_TIMESTAMPING_TX_HARDWARE)
    software-transmit     (SOF_TIMESTAMPING_TX_SOFTWARE)
    hardware-receive      (SOF_TIMESTAMPING_RX_HARDWARE)
    software-receive      (SOF_TIMESTAMPING_RX_SOFTWARE)
    software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
    hardware-raw-clock    (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 0
Hardware Transmit Timestamp Modes:
    off                   (HWTSTAMP_TX_OFF)
    on                    (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
    none                  (HWTSTAMP_FILTER_NONE)
    ptpv1-l4-sync         (HWTSTAMP_FILTER_PTP_V1_L4_SYNC)
    ptpv1-l4-delay-req    (HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ)
    ptpv2-l4-sync         (HWTSTAMP_FILTER_PTP_V2_L4_SYNC)
    ptpv2-l4-delay-req    (HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ)
    ptpv2-l2-sync         (HWTSTAMP_FILTER_PTP_V2_L2_SYNC)
    ptpv2-l2-delay-req    (HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ)
    ptpv2-event           (HWTSTAMP_FILTER_PTP_V2_EVENT)

After updating to v4.0, I've noticed ptp4l cannot run with hardware timestamping:

$ sudo ptp4l -H -i eth0 -f /etc/linuxptp/automotive-slave.cfg -m -l6
ptp4l[1045.377]: selected /dev/ptp0 as PTP clock
ptp4l[1045.420]: driver rejected most general HWTSTAMP filter
ptp4l[1045.421]: ioctl SIOCSHWTSTAMP failed: Numerical result out of range
ptp4l[1045.456]: port 1 (eth0): INITIALIZING to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED)

With the older version I used before (something after v3.1), it worked flawlessly.

Using git bisect, I've concluded that commit afeabf3 "ptp4l: add VLAN over bond support" is the bad one.

If I comment out this part in sk.c, I get HW timestamping working again (line 67 onwards on current master):

        init_ifreq(&ifreq, &cfg, device);

        //cfg.flags = HWTSTAMP_FLAG_BONDED_PHC_INDEX;
        /* Fall back without flag if user run new build on old kernel */
        //if (ioctl(fd, SIOCGHWTSTAMP, &ifreq) == -EINVAL)
        //      init_ifreq(&ifreq, &cfg, device);

What would be the best way to fix this properly?

Thanks,

Martin

Attachment: smime.p7s
Description: Elektronicky podpis S/MIME

_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to