Skip to content

Commit 723eb53

Browse files
habetsm-xilinxdavem330
authored andcommitted
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: 7c236c4 ("sfc: Add support for IEEE-1588 PTP") Signed-off-by: Martin Habets <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5f9f0b1 commit 723eb53

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/ethernet/sfc

1 file changed

+2
-1
lines changed

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)