net: phy: nxp-c45-tja11xx: reset PCS if the link goes down
authorRadu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Mon, 31 Jul 2023 09:16:19 +0000 (12:16 +0300)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Aug 2023 04:06:26 +0000 (21:06 -0700)
commit68c6af72047ca77e6b56bf5ae550f980a0ed704d
tree62810d23a888177638f712a7bcb47e3c4cdac414
parent08e6547c8468863734a847154aee390f2a44befe
net: phy: nxp-c45-tja11xx: reset PCS if the link goes down

During PTP testing on early TJA1120 engineering samples I observed that
if the link is lost and recovered, the tx timestamps will be randomly
lost. To avoid this HW issue, the PCS should be reset.

Resetting the PCS will break the link and we should reset the PCS on
LINK UP -> LINK DOWN transition, otherwise we will trigger and infinite
loop of LINK UP -> LINK DOWN events.

Signed-off-by: Radu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20230731091619.77961-12-radu-nicolae.pirea@oss.nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/nxp-c45-tja11xx.c