Commit 07dd4485 authored by Radu Bulie's avatar Radu Bulie Committed by David S. Miller
Browse files

dpaa2-eth: Initialize mutex used in one step timestamping path



1588 Single Step Timestamping code path uses a mutex to
enforce atomicity for two events:
- update of ptp single step register
- transmit ptp event packet

Before this patch the mutex was not initialized. This
caused unexpected crashes in the Tx function.

Fixes: c5521189 ("dpaa2-eth: support PTP Sync packet one-step timestamping")
Signed-off-by: default avatarRadu Bulie <radu-andrei.bulie@nxp.com>
Reviewed-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2a36ed7c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4338,7 +4338,7 @@ static int dpaa2_eth_probe(struct fsl_mc_device *dpni_dev)
	}

	INIT_WORK(&priv->tx_onestep_tstamp, dpaa2_eth_tx_onestep_tstamp);

	mutex_init(&priv->onestep_tstamp_lock);
	skb_queue_head_init(&priv->tx_skbs);

	priv->rx_copybreak = DPAA2_ETH_DEFAULT_COPYBREAK;