0b289962c4
[ Upstream commit 1b9e743e923b256e353a9a644195372285e5a6c0 ]
The CPTS, by design, captures the messageType (Sync, Delay_Req, etc.)
field from the second nibble of the PTP header which is defined in the
PTPv2 (1588-2008) specification. In the PTPv1 (1588-2002) specification
the first two bytes of the PTP header are defined as the versionType
which is always 0x0001. This means that any PTPv1 packets that are
tagged for TX timestamping by the CPTS will have their messageType set
to 0x0 which corresponds to a Sync message type. This causes issues
when a PTPv1 stack is expecting a Delay_Req (messageType: 0x1)
timestamp that never appears.
Fix this by checking if the ptp_class of the timestamped TX packet is
PTP_CLASS_V1 and then matching the PTP sequence ID to the stored
sequence ID in the skb->cb data structure. If the sequence IDs match
and the packet is of type PTPv1 then there is a chance that the
messageType has been incorrectly stored by the CPTS so overwrite the
messageType stored by the CPTS with the messageType from the skb->cb
data structure. This allows the PTPv1 stack to receive TX timestamps
for Delay_Req packets which are necessary to lock onto a PTP Leader.
Signed-off-by: Jason Reeder <jreeder@ti.com>
Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Tested-by: Ed Trexel <ed.trexel@hp.com>
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
am65-cpsw-ethtool.c | ||
am65-cpsw-nuss.c | ||
am65-cpsw-nuss.h | ||
am65-cpsw-qos.c | ||
am65-cpsw-qos.h | ||
am65-cpsw-switchdev.c | ||
am65-cpsw-switchdev.h | ||
am65-cpts.c | ||
am65-cpts.h | ||
cpmac.c | ||
cpsw-common.c | ||
cpsw-phy-sel.c | ||
cpsw.c | ||
cpsw.h | ||
cpsw_ale.c | ||
cpsw_ale.h | ||
cpsw_ethtool.c | ||
cpsw_new.c | ||
cpsw_priv.c | ||
cpsw_priv.h | ||
cpsw_sl.c | ||
cpsw_sl.h | ||
cpsw_switchdev.c | ||
cpsw_switchdev.h | ||
cpts.c | ||
cpts.h | ||
davinci_cpdma.c | ||
davinci_cpdma.h | ||
davinci_emac.c | ||
davinci_mdio.c | ||
k3-cppi-desc-pool.c | ||
k3-cppi-desc-pool.h | ||
netcp.h | ||
netcp_core.c | ||
netcp_ethss.c | ||
netcp_sgmii.c | ||
netcp_xgbepcsr.c | ||
tlan.c | ||
tlan.h |