|
@@ -1668,6 +1668,13 @@ void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev)
|
|
struct efx_ptp_data *ptp = efx->ptp_data;
|
|
struct efx_ptp_data *ptp = efx->ptp_data;
|
|
int code = EFX_QWORD_FIELD(*ev, MCDI_EVENT_CODE);
|
|
int code = EFX_QWORD_FIELD(*ev, MCDI_EVENT_CODE);
|
|
|
|
|
|
|
|
+ if (!ptp) {
|
|
|
|
+ if (net_ratelimit())
|
|
|
|
+ netif_warn(efx, drv, efx->net_dev,
|
|
|
|
+ "Received PTP event but PTP not set up\n");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!ptp->enabled)
|
|
if (!ptp->enabled)
|
|
return;
|
|
return;
|
|
|
|
|