]> git.baikalelectronics.ru Git - kernel.git/commit
fec: Restart PPS after link state change
authorCsókás Bence <csokas.bence@prolan.hu>
Mon, 22 Aug 2022 08:10:52 +0000 (10:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Aug 2022 08:53:23 +0000 (09:53 +0100)
commit0dda7085ea1a042e93a1ca64cbed6601b1171f31
tree78b7f0a580e019138316ca0cad88a4d10369a254
parent59bc812a86e1eb62cd6d3a86b6d775d7a4bbead8
fec: Restart PPS after link state change

On link state change, the controller gets reset,
causing PPS to drop out and the PHC to lose its
time and calibration. So we restart it if needed,
restoring calibration and time registers.

Changes since v2:
* Add `fec_ptp_save_state()`/`fec_ptp_restore_state()`
* Use `ktime_get_real_ns()`
* Use `BIT()` macro
Changes since v1:
* More ECR #define's
* Stop PPS in `fec_ptp_stop()`

Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec.h
drivers/net/ethernet/freescale/fec_main.c
drivers/net/ethernet/freescale/fec_ptp.c