summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/ptp.c
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2015-05-12 14:04:52 +0200
committerDavid S. Miller <davem@davemloft.net>2015-05-13 21:11:51 +0200
commitb1336389091b33cd147903480a878eeab1421090 (patch)
tree353ea8ac6d5dda3d53edbae3aa85fc8720ad8401 /drivers/net/ethernet/sfc/ptp.c
parentnet: sched: use counter to break reclassify loops (diff)
downloadlinux-b1336389091b33cd147903480a878eeab1421090.tar.xz
linux-b1336389091b33cd147903480a878eeab1421090.zip
sfc: nicer log message on PTP probe fail
Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/ptp.c')
-rw-r--r--drivers/net/ethernet/sfc/ptp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c
index a2e9aee05cdd..8c5c96acecc9 100644
--- a/drivers/net/ethernet/sfc/ptp.c
+++ b/drivers/net/ethernet/sfc/ptp.c
@@ -604,7 +604,12 @@ static int efx_ptp_disable(struct efx_nic *efx)
rc = efx_mcdi_rpc_quiet(efx, MC_CMD_PTP, inbuf, sizeof(inbuf),
outbuf, sizeof(outbuf), NULL);
rc = (rc == -EALREADY) ? 0 : rc;
- if (rc)
+ /* If we get ENOSYS, the NIC doesn't support PTP, and thus this function
+ * should only have been called during probe.
+ */
+ if (rc == -ENOSYS || rc == -EPERM)
+ netif_info(efx, probe, efx->net_dev, "no PTP support\n");
+ else if (rc)
efx_mcdi_display_error(efx, MC_CMD_PTP,
MC_CMD_PTP_IN_DISABLE_LEN,
outbuf, sizeof(outbuf), rc);