]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: fix PTP SDP pin setup on X540 hardware
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 8 Apr 2019 23:51:59 +0000 (16:51 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 5 Jun 2019 20:04:29 +0000 (13:04 -0700)
commite2d32786af4ebe105866017f24bafd521838155f
tree46500e58f40c8c362b052df88b221e363ede0d56
parent7938550830f38a0bff0bc81ad3f80cfd23f78a03
ixgbe: fix PTP SDP pin setup on X540 hardware

The function ixgbe_ptp_setup_sdp_X540 attempts to program a software
defined pin, in order to generate a pulse-per-second output on SDP 0.

It does work to generate the output, but does not align the output on
the full second. Additionally, it does not take into account the
cyclecounter multiplier. This leads to somewhat confusing code which is
likely to be incorrect if blindly copied to another hardware type.

Update this code to account for the cyclecounter multiplier, and to
directly use timecounter_read.

This change ensures that the SDP output will align properly on a full
second, and makes the intent of the calculations a bit more clear.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c