net: dsa: sja1105: Expose PTP timestamping ioctls to userspace
authorVladimir Oltean <olteanv@gmail.com>
Sat, 8 Jun 2019 12:04:43 +0000 (15:04 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Jun 2019 22:20:40 +0000 (15:20 -0700)
commita602afd200f557a5cc67dd5e7fa8ad5bfa5c98f8
tree922c5361cc97f138f9f23729d828a77eb9a9face
parentf3097be21bf17ae8785eea009cbc424f16611d9a
net: dsa: sja1105: Expose PTP timestamping ioctls to userspace

This enables the PTP support towards userspace applications such as
linuxptp.

The switches can timestamp only trapped multicast MAC frames, and
therefore only the profiles of 1588 over L2 are supported.

TX timestamping can be enabled per port, but RX timestamping is enabled
globally. As long as RX timestamping is enabled, the switch will emit
metadata follow-up frames that will be processed by the tagger. It may
be a problem that linuxptp does not restore the RX timestamping settings
when exiting.

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