netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] mlx4_en: Add PTP support
@ 2013-12-17 20:32 Shawn Bohrer
  2013-12-17 20:32 ` [PATCH net-next 1/2] mlx4_en: Add PTP hardware clock Shawn Bohrer
  2013-12-17 20:32 ` [PATCH net-next 2/2] mlx4_en: Only cycle port if HW timestamp config changes Shawn Bohrer
  0 siblings, 2 replies; 23+ messages in thread
From: Shawn Bohrer @ 2013-12-17 20:32 UTC (permalink / raw)
  To: David S. Miller
  Cc: Or Gerlitz, Amir Vadai, Richard Cochran, netdev, tomk,
	Hadar Hen Zion, Shawn Bohrer

From: Shawn Bohrer <sbohrer@rgmadvisors.com>

This adds support to the mlx4_en driver to support running a PTP client
with hardware timestamp support.  It also allows synchronization of the
hardware timestamped packets with the system clock.  

Shawn Bohrer (2):
  mlx4_en: Add PTP hardware clock
  mlx4_en: Only cycle port if HW timestamp config changes

 drivers/net/ethernet/mellanox/mlx4/en_clock.c   |  196 ++++++++++++++++++++++-
 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c |    3 +
 drivers/net/ethernet/mellanox/mlx4/en_main.c    |    3 +
 drivers/net/ethernet/mellanox/mlx4/mlx4_en.h    |    6 +
 4 files changed, 200 insertions(+), 8 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [PATCH net-next 2/2] mlx4_en: Only cycle port if HW timestamp config changes
@ 2013-12-17 20:22 Shawn Bohrer
  2013-12-17 20:32 ` Shawn Bohrer
  0 siblings, 1 reply; 23+ messages in thread
From: Shawn Bohrer @ 2013-12-17 20:22 UTC (permalink / raw)
  To: David S. Miller
  Cc: Or Gerlitz, Amir Vadai, Richard Cochran, netdev, tomk,
	Hadar Hen Zion, Shawn Bohrer

From: Shawn Bohrer <sbohrer@rgmadvisors.com>

If the hwtstamp_config matches what is currently set for the device then
simply return.  Without this change any program that tries to enable
hardware timestamps will cause the link to cycle even if hardware
timstamps were already enabled.

Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
---
 drivers/net/ethernet/mellanox/mlx4/en_clock.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_clock.c b/drivers/net/ethernet/mellanox/mlx4/en_clock.c
index 9b0d515..cc6a546 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_clock.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_clock.c
@@ -42,6 +42,10 @@ int mlx4_en_timestamp_config(struct net_device *dev, int tx_type, int rx_filter)
 	int port_up = 0;
 	int err = 0;
 
+	if (priv->hwtstamp_config.tx_type == tx_type &&
+	    priv->hwtstamp_config.rx_filter == rx_filter)
+		return 0;
+
 	mutex_lock(&mdev->state_lock);
 	if (priv->port_up) {
 		port_up = 1;
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2013-12-26 14:49 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-17 20:32 [PATCH net-next 0/2] mlx4_en: Add PTP support Shawn Bohrer
2013-12-17 20:32 ` [PATCH net-next 1/2] mlx4_en: Add PTP hardware clock Shawn Bohrer
2013-12-17 21:04   ` Or Gerlitz
2013-12-17 21:46     ` Shawn Bohrer
2013-12-18  7:59       ` Or Gerlitz
2013-12-18 15:03         ` Shawn Bohrer
2013-12-22 13:13   ` Hadar Hen Zion
2013-12-23 16:29     ` Shawn Bohrer
2013-12-23 16:59       ` Shawn Bohrer
2013-12-24 15:38         ` Hadar Hen Zion
2013-12-25 11:49           ` Richard Cochran
2013-12-23 18:48     ` Richard Cochran
2013-12-24 13:58       ` Hadar Hen Zion
2013-12-25 11:53         ` Richard Cochran
     [not found]           ` <CAKBbMu33zXkG4+S1kP6zB+4iKMNNoy=XVBtoqZZEkqurRsgvQw@mail.gmail.com>
2013-12-25 17:02             ` Richard Cochran
2013-12-26  8:26           ` Hadar Hen Zion
2013-12-26  8:33             ` Hadar Hen Zion
2013-12-26  9:17               ` Richard Cochran
2013-12-26 14:41                 ` Hadar Hen-Zion
2013-12-26 14:49                   ` Richard Cochran
2013-12-17 20:32 ` [PATCH net-next 2/2] mlx4_en: Only cycle port if HW timestamp config changes Shawn Bohrer
  -- strict thread matches above, loose matches on Subject: below --
2013-12-17 20:22 Shawn Bohrer
2013-12-17 20:32 ` Shawn Bohrer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).