net: ethernet: ti: cpts: rework locking
authorGrygorii Strashko <grygorii.strashko@ti.com>
Thu, 23 Apr 2020 14:20:19 +0000 (17:20 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Apr 2020 19:50:21 +0000 (12:50 -0700)
commitba10742840fbc6e475dc05c7515fd91b7c88e1b2
treed95a1a208366302ad49f258204ce171d7a148e9a
parentc8f8e47efe66dae775b617982e47a4564d7c4dda
net: ethernet: ti: cpts: rework locking

Now spinlock is used to synchronize everything which is not required. Add
mutex and use to sync access to PTP interface and PTP worker and use
spinlock only to sync FIFO/events processing.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpts.c
drivers/net/ethernet/ti/cpts.h