Hi :
I am debugging ptp for our own ethernet driver. After running ptp4l �Ci
eth0 �Cm,
there are some error message printing out as follows.
sh-4.4# ptp4l -i eth0 -m
ptp4l[826.733]: selected /dev/ptp0 as PTP clock
ptp4l[827.120]: failed to adjust the clock: Operation not supported
[ 827.979987] 157 (ptp4l) emac_hwtstamp_ioctl config flags:0x0, tx_type:0x1,
rx_filter:0xc
ptp4l[827.970]: driver rejected most general HWTSTAMP filter
[ 828.181685] 157 (ptp4l) emac_hwtstamp_ioctl config flags:0x0, tx_type:0x1,
rx_filter:0x6
ptp4l[828.250]: ioctl SIOCSHWTSTAMP failed: Numerical result out of range
ptp4l[828.891]: port 1: INITIALIZING to FAULTY on INITIALIZE
ptp4l[829.229]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[829.390]: port 1: link up
[ 829.771456] 157 (ptp4l) emac_hwtstamp_ioctl config flags:0x0, tx_type:0x1,
rx_filter:0xc
ptp4l[829.772]: driver rejected most general HWTSTAMP filter
[ 830.139391] 157 (ptp4l) emac_hwtstamp_ioctl config flags:0x0, tx_type:0x1,
rx_filter:0x6
ptp4l[830.190]: ioctl SIOCSHWTSTAMP failed: Numerical result out of range
ptp4l[830.669]: port 1: FAULTY to FAULTY on FAULT_CLEARED
[ 1016.909744] 0 (swapper/0) random: crng init done
So I checked linuxptp sourecode and found that ethernet driver doesn’t
support the rx filter type which linuxptp set.
filter1 = HWTSTAMP_FILTER_PTP_V2_EVENT;
filter2 = HWTSTAMP_FILTER_PTP_V2_L4_EVENT
sh-4.4# 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-sync (HWTSTAMP_FILTER_PTP_V2_SYNC)
ptpv2-delay-req (HWTSTAMP_FILTER_PTP_V2_DELAY_REQ)
My ethernet driver only support specific PTP EVENT ,like SYNC or DELAY_REQ.
and couldn’t support any kinds of event for PTP.
so does linuxptp support this kind of ethernet ptp ?
or anyone who could give a piece of advice about how to enable ptp for this
kind of driver?
Thanks in advance!!
-----------------------------------
Best Regards
Meitao Gao
------------------------------------
_______________________________________________
Linuxptp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-users