net: renesas: rswitch: Improve TX timestamp accuracy
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thu, 9 Feb 2023 08:17:41 +0000 (17:17 +0900)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 Feb 2023 03:44:17 +0000 (19:44 -0800)
commit33f5d733b589031bda69f92f6a0dec230bc6d4fb
treefdfb55e11879a546a22faba21c1b08987f83d2ca
parent48cf0a25702b2d1d1ca5667d03df91780191657a
net: renesas: rswitch: Improve TX timestamp accuracy

In the previous code, TX timestamp accuracy was bad because the irq
handler got the timestamp from the timestamp register at that time.

This hardware has "Timestamp capture" feature which can store
each TX timestamp into the timestamp descriptors. To improve
TX timestamp accuracy, implement timestamp descriptors' handling.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/renesas/rswitch.c
drivers/net/ethernet/renesas/rswitch.h