Skip to content

Commit cfaf81c

Browse files
habetsm-xilinxgregkh
authored andcommitted
sfc: Only cancel the PPS workqueue if it exists
[ Upstream commit 723eb53 ] The workqueue only exists for the primary PF. For other functions we hit a WARN_ON in kernel/workqueue.c. Fixes: 7c236c4 ("sfc: Add support for IEEE-1588 PTP") Signed-off-by: Martin Habets <mhabets@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3ae06e9 commit cfaf81c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • drivers/net/ethernet/sfc

‎drivers/net/ethernet/sfc/ptp.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,8 @@ void efx_ptp_remove(struct efx_nic *efx)
15311531
(void)efx_ptp_disable(efx);
15321532

15331533
cancel_work_sync(&efx->ptp_data->work);
1534-
cancel_work_sync(&efx->ptp_data->pps_work);
1534+
if (efx->ptp_data->pps_workwq)
1535+
cancel_work_sync(&efx->ptp_data->pps_work);
15351536

15361537
skb_queue_purge(&efx->ptp_data->rxq);
15371538
skb_queue_purge(&efx->ptp_data->txq);

0 commit comments

Comments
 (0)