aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/tx.c
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2018-01-25 17:26:06 +0000
committerDavid S. Miller <davem@davemloft.net>2018-01-25 16:05:14 -0500
commit2935e3c38228ad9bf073eeb0eedff5849eea63db (patch)
tree34ca28b1afdbce735a4326d077a96a8e304599ab /drivers/net/ethernet/sfc/tx.c
parentsfc: MAC TX timestamp handling on the 8000 series (diff)
downloadlinux-dev-2935e3c38228ad9bf073eeb0eedff5849eea63db.tar.xz
linux-dev-2935e3c38228ad9bf073eeb0eedff5849eea63db.zip
sfc: on 8000 series use TX queues for TX timestamps
For this we create and use one or more new TX queues on the PTP channel, and enable sync events for it. Based on a patch by Martin Habets <mhabets@solarflare.com>. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/tx.c')
-rw-r--r--drivers/net/ethernet/sfc/tx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c
index f86a0a900f2f..cece961f2e82 100644
--- a/drivers/net/ethernet/sfc/tx.c
+++ b/drivers/net/ethernet/sfc/tx.c
@@ -842,7 +842,8 @@ void efx_init_tx_queue(struct efx_tx_queue *tx_queue)
tx_queue->old_read_count = 0;
tx_queue->empty_read_count = 0 | EFX_EMPTY_COUNT_VALID;
tx_queue->xmit_more_available = false;
- tx_queue->timestamping = false;
+ tx_queue->timestamping = (efx_ptp_use_mac_tx_timestamps(efx) &&
+ tx_queue->channel == efx_ptp_channel(efx));
tx_queue->completed_desc_ptr = tx_queue->ptr_mask;
tx_queue->completed_timestamp_major = 0;
tx_queue->completed_timestamp_minor = 0;