]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: ptp: add support for receive timestamping
authorRussell King <rmk+kernel@armlinux.org.uk>
Wed, 9 Sep 2020 16:25:55 +0000 (17:25 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Sep 2020 21:22:42 +0000 (14:22 -0700)
commit17177a4c60d2bfab888fd8440a1299401e24a3ed
tree01539643a690023d3c2baf8675e08e4eb9af72fb
parentbd9b60c804a6ed8090ca6efb94df99ae73ec4373
net: mvpp2: ptp: add support for receive timestamping

Add support for receive timestamping. When enabled, the hardware adds
a timestamp into the receive queue descriptor for all received packets
with no filtering. Hence, we can only support NONE or ALL receive
filter modes.

The timestamp in the receive queue contains two bit sof seconds and
the full nanosecond timestamp. This has to be merged with the remainder
of the seconds from the TAI clock to arrive at a full timestamp before
we can convert it to a ktime for the skb hardware timestamp field.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2.h
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c