diff options
author | Martin Habets <mhabets@solarflare.com> | 2018-01-25 17:25:15 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-25 16:05:14 -0500 |
commit | 23418dc131464ffe29c9ac2d71cf95bf2883fc4f (patch) | |
tree | 00d9a768627f0960913a007e371fb840b1345862 /drivers/net/ethernet/sfc/ef10.c | |
parent | sfc: add function to determine which TX timestamping method to use (diff) | |
download | linux-dev-23418dc131464ffe29c9ac2d71cf95bf2883fc4f.tar.xz linux-dev-23418dc131464ffe29c9ac2d71cf95bf2883fc4f.zip |
sfc: use main datapath for HW timestamps if available
We can now transmit SKBs in 2 ways:
1. Via the MC (for the 7XXX series and earlier), using
efx_ptp_xmit_skb_mc().
2. Via the TX queues on the dedicated PTP channel (8XXX series and later),
using efx_ptp_xmit_skb_queue().
The PTP worker thread uses the method set up at probe time. It never
checked the return code from the old efx_ptp_xmit_skb(), so it now
returns void.
We increment the TX dropped counter of the device if the transmit fails.
As a result of the probe per channel the remove gets called multiple times.
Clean up efx->ptp_data properly to avoid the 2nd call blowing up.
Signed-off-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/ef10.c')
-rw-r--r-- | drivers/net/ethernet/sfc/ef10.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c index 774e9cd14302..6deef607a914 100644 --- a/drivers/net/ethernet/sfc/ef10.c +++ b/drivers/net/ethernet/sfc/ef10.c @@ -760,14 +760,7 @@ static int efx_ef10_probe(struct efx_nic *efx) if (rc && rc != -EPERM) goto fail5; - rc = efx_ptp_probe(efx, NULL); - /* Failure to probe PTP is not fatal. - * In the case of EPERM, efx_ptp_probe will print its own message (in - * efx_ptp_get_attributes()), so we don't need to. - */ - if (rc && rc != -EPERM) - netif_warn(efx, drv, efx->net_dev, - "Failed to probe PTP, rc=%d\n", rc); + efx_ptp_defer_probe_with_channel(efx); #ifdef CONFIG_SFC_SRIOV if ((efx->pci_dev->physfn) && (!efx->pci_dev->is_physfn)) { |