Skip to content
Commit c730ab42 authored by Laurent Badel's avatar Laurent Badel Committed by Jakub Kicinski
Browse files

net: fec: Fix temporary RMII clock reset on link up



fec_restart() does a hard reset of the MAC module when the link status
changes to up. This temporarily resets the R_CNTRL register which controls
the MII mode of the ENET_OUT clock. In the case of RMII, the clock
frequency momentarily drops from 50MHz to 25MHz until the register is
reconfigured. Some link partners do not tolerate this glitch and
invalidate the link causing failure to establish a stable link when using
PHY polling mode. Since as per IEEE802.3 the criteria for link validity
are PHY-specific, what the partner should tolerate cannot be assumed, so
avoid resetting the MII clock by using software reset instead of hardware
reset when the link is up. This is generally relevant only if the SoC
provides the clock to an external PHY and the PHY is configured for RMII.

Signed-off-by: default avatarLaurent Badel <laurentbadel@eaton.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent b491e6a7
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