AnsweredAssumed Answered

1588 PTP Linux eTSEC gianfar.c device driver restarting

Question asked by Ken Sallings on Sep 19, 2013
Latest reply on Oct 2, 2013 by Ken Sallings

I am using the following:

 

-P1020 QorIQ processor.

-eTSEC3 (configured as eth0)

-gianfar device driver.

-Linux Kernel (Mainline Linux kernel 3.10)  [NOTE:  Freescale bsp 1.3 exhibits the same problem.]

-linuxptp-1.3

 

When running ptp4l, I get the following output:

 

~ # cat /bin/start_ptp4l.sh

#!/bin/sh

 

ptp4l -m -l 7 -i eth0 -f /etc/gPTP.cfg

 

 

~ # start_ptp4l.sh

ptp4l[39.609]: selected /dev/ptp0 as PTP clock

ptp4l[39.612]: PI servo: sync interval 1.000 kp 0.700 ki 0.300000

ptp4l[39.619]: driver changed our HWTSTAMP options

ptp4l[39.619]: tx_type   1 not 1

ptp4l[39.619]: rx_filter 1 not 12

ptp4l[39.619]: port 1: INITIALIZING to LISTENING on INITIALIZE

ptp4l[39.619]: port 0: INITIALIZING to LISTENING on INITIALIZE

ptp4l[45.619]: port 1: announce timeout

ptp4l[45.619]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES

ptp4l[45.619]: selected best master clock 000102.fffe.030405

ptp4l[45.620]: assuming the grand master role

ptp4l[45.620]: port 1: master sync timeout

ptp4l[45.622]: port 1: master sync timeout

NETDEV WATCHDOG: eth0 (fsl-gianfar): transmit queue 6 timed out

------------[ cut here ]------------

WARNING: at net/sched/sch_generic.c:255

Modules linked in: trak_fpga_itfc(O) trak_intr0(O)

CPU: 0 PID: 710 Comm: main Tainted: G           O 3.10.0 #9

task: df112300 ti: c426e000 task.ti: c426e000

NIP: c040f240 LR: c040f240 CTR: c030a7b0

REGS: c426fd50 TRAP: 0700   Tainted: G           O  (3.10.0)

MSR: 00029000 <CE,EE,ME>  CR: 22000422  XER: 20000000

 

GPR00: c040f240 c426fe00 df112300 0000003f 00021000 00000005 c030b15c 65756520

GPR08: 36207469 c063b11c c066f490 00000001 000000e4 1002e398 00000004 00000001

GPR16: c0584a18 c063b1c0 00400100 ffff08c1 00000000 c0635260 c0679714 ffffffff

GPR24: 00000000 00000000 00000004 00000600 c0660000 c0670000 c426e000 df022000

NIP [c040f240] dev_watchdog+0x2c4/0x2d4

LR [c040f240] dev_watchdog+0x2c4/0x2d4

Call Trace:

[c426fe00] [c040f240] dev_watchdog+0x2c4/0x2d4 (unreliable)

[c426fe40] [c00431c4] call_timer_fn.clone.26+0x28/0x80

[c426fe60] [c0043400] run_timer_softirq+0x1e4/0x1f0

[c426fea0] [c003ce04] __do_softirq+0x104/0x1c0

[c426ff00] [c003d064] irq_exit+0xa8/0xd0

[c426ff10] [c0008dc0] timer_interrupt+0x1a0/0x1cc

[c426ff40] [c000e374] ret_from_except+0x0/0x18

--- Exception: 901 at 0x100015a4

    LR = 0x100015a4

Instruction dump:

4e800421 815f0204 4bfffe9c 7fe3fb78 90c10008 4bfe6edd 7fe4fb78 7c651b78

80c10008 3c60c05d 3863817c 480ee041 <0fe00000> 38000001 981c2ee0 4bffffb4

---[ end trace 6bacd068e81b67d9 ]---

ptp4l[46.953]: port 1: master sync timeout

ptp4l[48.821]: port 1: master tx announce timeout

ptp4l[48.822]: port 1: master sync timeout

ptp4l[50.821]: port 1: master sync timeout

ptp4l[52.821]: port 1: master tx announce timeout

ptp4l[52.822]: port 1: master sync timeout

ptp4l[53.690]: caught signal 2

ptp4l[53.690]: poll tx timestamp failed: Interrupted system call

ptp4l[53.690]: port 1: send sync failed

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

ptp4l[53.690]: waiting 2^{4} seconds to clear fault on port 0

 

~ #

~ #

~ #

~ #

~ #

~ #

~ # ifconfig eth0

eth0      Link encap:Ethernet  HWaddr 00:01:02:03:04:05 

          inet addr:10.80.41.229  Bcast:10.80.43.255  Mask:255.255.252.0

          inet6 addr: fe80::201:2ff:fe03:405/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:2976 errors:0 dropped:24 overruns:0 frame:0

          TX packets:21 errors:6 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:313521 (306.1 KiB)  TX bytes:1918 (1.8 KiB)

          Base address:0xe000

 

 

From looking at the output one of the transmit queues timed out.  Shortly thereafter the gianfar error interrupt will be called and the device driver is restarted.  That happens every 2 seconds.  This is killing the 1588 protocol.  Does anyone have any idea as to why this is happening?  I am currently trying to dig through the device driver to determine the problem, but I could use some expert advice to speed me up.

 

Ken

Outcomes