aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igc/igc_ptp.c
diff options
context:
space:
mode:
authorVinicius Costa Gomes <[email protected]>2019-12-02 23:19:53 +0000
committerJeff Kirsher <[email protected]>2020-01-06 23:02:45 +0000
commita299df3524eabc1def8e93bf005b07ea396ff2bd (patch)
treeb8f927ed92a125dfd4c3d1b5845175ccc4976419 /drivers/net/ethernet/intel/igc/igc_ptp.c
parentigc: Add support for ethtool GET_TS_INFO command (diff)
downloadkernel-a299df3524eabc1def8e93bf005b07ea396ff2bd.tar.gz
kernel-a299df3524eabc1def8e93bf005b07ea396ff2bd.zip
igc: Use Start of Packet signal from PHY for timestamping
For better accuracy, i225 is able to do timestamping using the Start of Packet signal from the PHY. Signed-off-by: Vinicius Costa Gomes <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_ptp.c')
-rw-r--r--drivers/net/ethernet/intel/igc/igc_ptp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c
index 79ffb833aa80..693506587198 100644
--- a/drivers/net/ethernet/intel/igc/igc_ptp.c
+++ b/drivers/net/ethernet/intel/igc/igc_ptp.c
@@ -368,6 +368,7 @@ static int igc_ptp_set_timestamp_mode(struct igc_adapter *adapter,
if (tsync_rx_ctl) {
tsync_rx_ctl = IGC_TSYNCRXCTL_ENABLED;
tsync_rx_ctl |= IGC_TSYNCRXCTL_TYPE_ALL;
+ tsync_rx_ctl |= IGC_TSYNCRXCTL_RXSYNSIG;
config->rx_filter = HWTSTAMP_FILTER_ALL;
is_l2 = true;
is_l4 = true;
@@ -384,8 +385,10 @@ static int igc_ptp_set_timestamp_mode(struct igc_adapter *adapter,
}
}
- if (tsync_tx_ctl)
+ if (tsync_tx_ctl) {
tsync_tx_ctl = IGC_TSYNCTXCTL_ENABLED;
+ tsync_tx_ctl |= IGC_TSYNCTXCTL_TXSYNSIG;
+ }
/* enable/disable TX */
regval = rd32(IGC_TSYNCTXCTL);