aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/mv88e6xxx/hwtstamp.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2018-07-18 22:38:26 +0200
committerDavid S. Miller <davem@davemloft.net>2018-07-18 15:05:38 -0700
commit2dbed245b408f3e458345b974c862447a73c73c0 (patch)
tree2211b9f3fb5ccb67d243b52b20d6be11812a915a /drivers/net/dsa/mv88e6xxx/hwtstamp.c
parentnet: dsa: mv88e6xxx: Add hwtimestamp support for the 6165 (diff)
downloadlinux-dev-2dbed245b408f3e458345b974c862447a73c73c0.tar.xz
linux-dev-2dbed245b408f3e458345b974c862447a73c73c0.zip
net: dsa: mv88e6xxx: Set PTP Ethertype
For the 6352 and newer switches, the PTP Ethertype defaults to ETH_P_1588. Hence it was not explicitly set. The 6165 however defaults to 0. So explicitly set the EtherType. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/hwtstamp.c')
-rw-r--r--drivers/net/dsa/mv88e6xxx/hwtstamp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/hwtstamp.c b/drivers/net/dsa/mv88e6xxx/hwtstamp.c
index 01e60a8c97fb..ac71910c63c0 100644
--- a/drivers/net/dsa/mv88e6xxx/hwtstamp.c
+++ b/drivers/net/dsa/mv88e6xxx/hwtstamp.c
@@ -606,6 +606,11 @@ int mv88e6xxx_hwtstamp_setup(struct mv88e6xxx_chip *chip)
return err;
}
+ /* Set the ethertype of L2 PTP messages */
+ err = mv88e6xxx_ptp_write(chip, MV88E6XXX_PTP_GC_ETYPE, ETH_P_1588);
+ if (err)
+ return err;
+
/* MV88E6XXX_PTP_MSG_TYPE is a mask of PTP message types to
* timestamp. This affects all ports that have timestamping enabled,
* but the timestamp config is per-port; thus we configure all events