]> git.karo-electronics.de Git - linux-beck.git/commit
mlx4_en: Add PTP hardware clock
authorShawn Bohrer <sbohrer@rgmadvisors.com>
Tue, 31 Dec 2013 17:39:39 +0000 (11:39 -0600)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Jan 2014 08:30:36 +0000 (03:30 -0500)
commitad7d4eaed995d76fb24a18e202fdf5072197ff0a
tree2625d165dd5b6972f582f19e20cc6c955fd9259a
parentdd9b45598a7198f8b12965f2ec453bcb5cb90aec
mlx4_en: Add PTP hardware clock

This adds a PHC to the mlx4_en driver. We use reader/writer spinlocks to
protect the timecounter since every packet received needs to call
timecounter_cycle2time() when timestamping is enabled.  This can become
a performance bottleneck with RSS and multiple receive queues if normal
spinlocks are used.

This driver has been tested with both Documentation/ptp/testptp and the
linuxptp project (http://linuxptp.sourceforge.net/) on a Mellanox
ConnectX-3 card.

Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Acked-By: Hadar Hen Zion <hadarh@mellanox.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_clock.c
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
drivers/net/ethernet/mellanox/mlx4/en_main.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h