aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa/Kconfig
diff options
context:
space:
mode:
authorYangbo Lu <yangbo.lu@nxp.com>2021-04-27 12:22:03 +0800
committerDavid S. Miller <davem@davemloft.net>2021-04-27 14:10:15 -0700
commit39e5308b3250666cc92c5ca33a667698ac645bd2 (patch)
tree579ecd683ca4111cc6d6f81f2d16b2f09f3d25b5 /net/dsa/Kconfig
parentnet: mscc: ocelot: convert to ocelot_port_txtstamp_request() (diff)
downloadlinux-dev-39e5308b3250666cc92c5ca33a667698ac645bd2.tar.xz
linux-dev-39e5308b3250666cc92c5ca33a667698ac645bd2.zip
net: mscc: ocelot: support PTP Sync one-step timestamping
Although HWTSTAMP_TX_ONESTEP_SYNC existed in ioctl for hardware timestamp configuration, the PTP Sync one-step timestamping had never been supported. This patch is to truely support it. - ocelot_port_txtstamp_request() This function handles tx timestamp request by storing ptp_cmd(tx timestamp type) in OCELOT_SKB_CB(skb)->ptp_cmd, and additionally for two-step timestamp storing ts_id in OCELOT_SKB_CB(clone)->ptp_cmd. - ocelot_ptp_rew_op() During xmit, this function is called to get rew_op (rewriter option) by checking skb->cb for tx timestamp request, and configure to transmitting. Non-onestep-Sync packet with one-step timestamp request falls back to use two-step timestamp. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/Kconfig')
-rw-r--r--net/dsa/Kconfig2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index cbc2bd643ab2..5baba7021427 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -111,6 +111,8 @@ config NET_DSA_TAG_RTL4_A
config NET_DSA_TAG_OCELOT
tristate "Tag driver for Ocelot family of switches, using NPI port"
+ depends on MSCC_OCELOT_SWITCH_LIB || \
+ (MSCC_OCELOT_SWITCH_LIB=n && COMPILE_TEST)
select PACKING
help
Say Y or M if you want to enable NPI tagging for the Ocelot switches