https://github.com/torvalds/linux
Revision 9fcf024dd6fae082f05e8c1fcdae23972b2f6971 authored by Vladimir Oltean on 27 December 2019, 00:59:54 UTC, committed by David S. Miller on 31 December 2019, 04:10:20 UTC
The PTP egress timestamp N must be captured from register PTPEGR_TS[n],
where n = 2 * PORT + TSREG. There are 10 PTPEGR_TS registers, 2 per
port. We are only using TSREG=0.

As opposed to the management slots, which are 4 in number
(SJA1105_NUM_PORTS, minus the CPU port). Any management frame (which
includes PTP frames) can be sent to any non-CPU port through any
management slot. When the CPU port is not the last port (#4), there will
be a mismatch between the slot and the port number.

Luckily, the only mainline occurrence with this switch
(arch/arm/boot/dts/ls1021a-tsn.dts) does have the CPU port as #4, so the
issue did not manifest itself thus far.

Fixes: 47ed985e97f5 ("net: dsa: sja1105: Add logic for TX timestamping")
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0caeaf6
History
Tip revision: 9fcf024dd6fae082f05e8c1fcdae23972b2f6971 authored by Vladimir Oltean on 27 December 2019, 00:59:54 UTC
net: dsa: sja1105: Take PTP egress timestamp by port, not mgmt slot
Tip revision: 9fcf024
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 15.0 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.7 KB
.mailmap -rw-r--r-- 14.1 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 97.3 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 595 bytes
MAINTAINERS -rw-r--r-- 526.7 KB
Makefile -rw-r--r-- 59.4 KB
README -rw-r--r-- 727 bytes

README

back to top