HomeFreeBSD

Disable EEE(Energy Efficient Ethernet) for RTL8211F PHY.

Description

Disable EEE(Energy Efficient Ethernet) for RTL8211F PHY.
It seems the EEE made RX MAC enter LPI(Low Power Idle) mode such
that dwc(4) was not able to receive packets. Ideally dwc(4) should
be able to use EEE to save power during periods of low link
utilization(i.e. gating off clock). Due to lack of dwc(4)
datasheet it's not easy to take required steps for EEE on LPI
enter/exit events. Disabling EEE in PHY seems to be easy
workaround until dwc(4) supports EEE.

Updating EEE advertisement register on RTL8211F seems to have no
effect until reprogramming MII_ANAR, MII_100T2CR and MII_BMCR
with auto-negotiation. It's not clear whether it's related with
mii_phy_reset()'s BMCR_ISO handling for RTL8211F though.
It seems rgephy_reset() needs careful investigation for newer
RealTek PHYs.

Ganbold submitted working version based on NetBSD change and
tested lots of changes I made. Thanks a lot!

Submitted by: ganbold (initial version)
In collaboration with: ganbold

Details

Provenance
yongariAuthored on
Parents
rS291675: Import version 7.2.4 of the Intel FreeBSD Driver, em(4) from
Branches
Unknown
Tags
Unknown