dpaa2-eth: Initialize mutex used in one step timestamping path
authorRadu Bulie <radu-andrei.bulie@nxp.com>
Mon, 14 Feb 2022 17:45:34 +0000 (19:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:12 +0000 (12:03 +0100)
commit6b1c9f99c2e67a6671ad5f9f0a16881c630414e0
tree1d7aeb0d92d6c9fec98d468b8f8f8eec986a5886
parentd3c9dd36ec2443b6841b0aa3194797dd89215430
dpaa2-eth: Initialize mutex used in one step timestamping path

commit 07dd44852be89386ab12210df90a2d78779f3bff upstream.

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: c55211892f463 ("dpaa2-eth: support PTP Sync packet one-step timestamping")
Signed-off-by: Radu Bulie <radu-andrei.bulie@nxp.com>
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c