Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: fec: Fix FEC_ECR_EN1588 being cleared on link-down

FEC_ECR_EN1588 bit gets cleared after MAC reset in `fec_stop()`, which
makes all 1588 functionality shut down, and all the extended registers
disappear, on link-down, making the adapter fall back to compatibility
"dumb mode". However, some functionality needs to be retained (e.g. PPS)
even without link.

Fixes: 6605b730c061 ("FEC: Add time stamping code and a PTP hardware clock")
Cc: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/netdev/5fa9fadc-a89d-467a-aae9-c65469ff5fe1@lunn.ch/
Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
Reviewed-by: Wei Fang <wei.fang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Csókás, Bence and committed by
David S. Miller
c32fe198 a0c6359d

+6
+6
drivers/net/ethernet/freescale/fec_main.c
··· 1361 1361 writel(FEC_ECR_ETHEREN, fep->hwp + FEC_ECNTRL); 1362 1362 writel(rmii_mode, fep->hwp + FEC_R_CNTRL); 1363 1363 } 1364 + 1365 + if (fep->bufdesc_ex) { 1366 + val = readl(fep->hwp + FEC_ECNTRL); 1367 + val |= FEC_ECR_EN1588; 1368 + writel(val, fep->hwp + FEC_ECNTRL); 1369 + } 1364 1370 } 1365 1371 1366 1372 static void