Skip to content
Commit b353b241 authored by Csókás Bence's avatar Csókás Bence Committed by Jakub Kicinski
Browse files

net: fec: Use a spinlock to guard `fep->ptp_clk_on`



Mutexes cannot be taken in a non-preemptible context,
causing a panic in `fec_ptp_save_state()`. Replacing
`ptp_clk_mutex` by `tmreg_lock` fixes this.

Fixes: 6a4d7234 ("net: fec: ptp: avoid register access when ipg clock is disabled")
Fixes: f7995922 ("fec: Restart PPS after link state change")
Reported-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/all/20220827160922.642zlcd5foopozru@pengutronix.de/


Signed-off-by: default avatarCsókás Bence <csokas.bence@prolan.hu>
Tested-by: Francesco Dolcini <francesco.dolcini@toradex.com> # Toradex Apalis iMX6
Link: https://lore.kernel.org/r/20220901140402.64804-1-csokas.bence@prolan.hu


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 7d650df9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment