]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: sja1105: Add a state machine for RX timestamping
authorVladimir Oltean <olteanv@gmail.com>
Sat, 8 Jun 2019 12:04:42 +0000 (15:04 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Jun 2019 22:20:40 +0000 (15:20 -0700)
commite03baf195b2efe9107b151c98ce85ad406a792e4
treee21fd387d3a4914c2bf7b0322aaedb0d5172b23c
parent0619e3c6583f1d90f4d773d60b91e4d97d03ce07
net: dsa: sja1105: Add a state machine for RX timestamping

Meta frame reception relies on the hardware keeping its promise that it
will send no other traffic towards the CPU port between a link-local
frame and a meta frame.  Otherwise there is no other way to associate
the meta frame with the link-local frame it's holding a timestamp of.
The receive function is made stateful, and buffers a timestampable frame
until its meta frame arrives, then merges the two, drops the meta and
releases the link-local frame up the stack.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105_main.c
include/linux/dsa/sja1105.h
net/dsa/tag_sja1105.c