diff options
author | Edward Cree <ecree@solarflare.com> | 2017-12-18 17:56:58 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-18 19:07:49 +0100 |
commit | acaef3c15612d7b0f5a4835f57e87a290e054839 (patch) | |
tree | 8e77c76345d2078676adae185f6c99fa9e0f0686 /drivers/net/ethernet/sfc/ef10.c | |
parent | sfc: add Medford2 (SFC9250) PCI Device IDs (diff) | |
download | linux-acaef3c15612d7b0f5a4835f57e87a290e054839.tar.xz linux-acaef3c15612d7b0f5a4835f57e87a290e054839.zip |
sfc: improve PTP error reporting
Log a message if PTP probing fails; if we then, unexpectedly, get PTP
events, only log a message for the first one on each device.
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, 8 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c index dcd6be14a430..009bf28bdba5 100644 --- a/drivers/net/ethernet/sfc/ef10.c +++ b/drivers/net/ethernet/sfc/ef10.c @@ -747,7 +747,14 @@ static int efx_ef10_probe(struct efx_nic *efx) if (rc && rc != -EPERM) goto fail5; - efx_ptp_probe(efx, NULL); + 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); #ifdef CONFIG_SFC_SRIOV if ((efx->pci_dev->physfn) && (!efx->pci_dev->is_physfn)) { |