]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Feb 2022 14:33:30 +0000 (14:33 +0000)
commita19dbc6f7f81ee8bbb71ae3df117dbd4f859fcf5
treed8f0794deeed5bbacb7a6bba5fc71aee04674b09
parent51161a715deefe8431d79da61bb7cce9e5f0755f
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: 9289bbe02a82d ("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>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c