PTP TX hardware timestamp timeout on Raspberry Pi CM5 (regression from 6.6 to 6.12)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- c, linux, raspberry-pi
- Domaine
- embedded-iot, networking, operating-systems
Piste de recherche
Start with drivers/net/phy/bcm-phy-ptp.c and compare the PTP TX timestamp path between rpi-6.6.y and rpi-6.12.y, focusing on bcm_ptp_txtstamp, bcm_ptp_do_aux_work, and bcm_ptp_get_tstamp. Reproduce with ptp4l -i eth0 -m while monitoring UDP ports 319 and 320 with tcpdump. Done means PHY TX timestamps no longer time out on the Raspberry Pi CM5 with the newer kernel.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the bug
Basic Information
- Hardware: Raspberry Pi CM5 + Official CM5 IO Board
- Network Port: eth0 (Cadence GEM MAC + BCM54213PE PHY)
- Regression Scope: Kernel 6.6.74 (Working) → 6.12+ (Failing)
Test Matrix
| Kernel | Provider | Result |
|---|---|---|
| rpi-6.6.y | PHY timestamp (idx 0) | PASS |
| rpi-6.12.y | PHY timestamp (idx 0) | FAIL |
| rpi-6.18.y | PHY timestamp (idx 0) | FAIL |
Symptom
- Test side
pi@raspberrypi:~ $ sudo ptp4l -i eth0 -m
ptp4l[70.739]: selected /dev/ptp0 as PTP clock
ptp4l[70.745]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[70.745]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[77.867]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[77.867]: selected local clock 2ccf67.fffe.feb41d as best master
ptp4l[77.867]: port 1: assuming the grand master role
ptp4l[78.868]: timed out while polling for tx timestamp
ptp4l[78.868]: increasing tx_timestamp_timeout may correct this issue, but it is likely caused by a driver bug
ptp4l[78.868]: port 1: send sync failed
ptp4l[78.868]: port 1: MASTER to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED)
- Monitoring end
pi@raspberrypi:~ $ sudo tcpdump -ni eth0 udp port 319 or udp port 320
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
10:11:14.984307 IP 192.168.8.4.320 > 224.0.1.129.320: PTPv2, v1 compat : no, msg type : announce msg, length : 64, domain : 0, reserved1 : 0, Flags [timescale], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x2ccf67fffefeb41d, port id : 1, seq id : 0, control : 5 (Other), log message interval : 1, originTimeStamp : 0 seconds 0 nanoseconds, origin cur utc :37, rsvd : 0, gm priority_1 : 128, gm clock class : 248, gm clock accuracy : 254, gm clock variance : 65535, gm priority_2 : 128, gm clock id : 0x2ccf67fffefeb41d, steps removed : 0, time source : 0xa0
10:11:15.983322 IP 192.168.8.4.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 0, reserved1 : 0, Flags [two step], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x2ccf67fffefeb41d, port id : 1, seq id : 0, control : 0 (Sync), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
Reproduction (minimal)
- Install the following tools:
sudo apt install tcpdump linuxptp -y
- Perform the following operations in a terminal:
sudo ptp4l -i eth0 -m
- Open a new terminal and perform the following operations:
sudo tcpdump -ni eth0 udp port 319 or udp port 320
Analysis
- drivers/net/phy/bcm-phy-ptp.c is functionally identical between rpi-6.6.y and rpi-6.18.y . The core TX timestamp logic ( bcm_ptp_txtstamp , bcm_ptp_do_aux_work , bcm_ptp_get_tstamp ) is unchanged.
- EEE is NOT the cause. ethtool --set-eee eth0 eee off does not resolve the issue.
- IRQ vs Poll mode irrelevant. Both modes fail on the newer kernels.
- Likely suspects (the regression was introduced between Linux 6.6 and 6.12)
Impact
This breaks PTP hardware timestamping via the PHY, which is required for industrial use cases requiring sub-100ns synchronization precision (motion control, IEC 61850, 5G fronthaul, TSN 802.1AS). MAC timestamps provide a lower-precision workaround (~50-200ns RGMII jitter vs <10ns for PHY timestamps).
Steps to reproduce the behaviour
- Install the following tools:
sudo apt install tcpdump linuxptp -y
- Perform the following operations in a terminal:
sudo ptp4l -i eth0 -m
- Open a new terminal and perform the following operations:
sudo tcpdump -ni eth0 udp port 319 or udp port 320
Device (s)
Raspberry Pi CM5
System
- Hardware: Raspberry Pi CM5 + Official CM5 IO Board
- Network Port: eth0 (Cadence GEM MAC + BCM54213PE PHY)
- Regression Scope: Kernel 6.6.74 (Working) → 6.12+ (Failing)
Logs
No response
Additional context
No response
- Langage dominant
- C
- Étoiles
- 13.3k
- Forks
- 5.5k
- Merge moyen
- 3 j 20 h
- PR mergées (30 j)
- 27
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de raspberrypi/linux
-
Difficulté 2/5 1-3 heures Accessibilité débutants 63/100
raspberrypi/linux#7718 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
raspberrypi/linux#7415 · 2 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace appOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
raspberrypi/linux#7399 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Documentation update requiredOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
raspberrypi/linux#7357 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
raspberrypi/linux#7054 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de raspberrypi/linux
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour
-
SPIDevice selects an active-high device as soon as it is createdPeut-être pris @mikeysklar l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
adafruit/circuitpython#11869 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 78/100
gnif/LookingGlass#1352 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
kovidgoyal/kitty#10862 ·
Les mainteneurs répondent en général sous 1 jour