Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 723eb536 authored by Martin Habets's avatar Martin Habets Committed by David S. Miller
Browse files

sfc: Only cancel the PPS workqueue if it exists



The workqueue only exists for the primary PF. For other functions
we hit a WARN_ON in kernel/workqueue.c.

Fixes: 7c236c43 ("sfc: Add support for IEEE-1588 PTP")
Signed-off-by: default avatarMartin Habets <mhabets@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5f9f0b11
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1531,6 +1531,7 @@ void efx_ptp_remove(struct efx_nic *efx)
	(void)efx_ptp_disable(efx);

	cancel_work_sync(&efx->ptp_data->work);
	if (efx->ptp_data->pps_workwq)
		cancel_work_sync(&efx->ptp_data->pps_work);

	skb_queue_purge(&efx->ptp_data->rxq);