]> www.infradead.org Git - users/willy/xarray.git/commit
r8169: improve RTL8168g PHY suspend quirk
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 6 Jan 2021 10:49:50 +0000 (11:49 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Jan 2021 22:56:33 +0000 (14:56 -0800)
commitacb58657c8694caa8a1ed99cf2a352382a0eb2b6
tree11452c0e73a21753d705247f4b6a0c458d74b109
parentc6cff9dfebb3387fa72570af70c9ea34b9e24550
r8169: improve RTL8168g PHY suspend quirk

According to Realtek the ERI register 0x1a8 quirk is needed to work
around a hw issue with the PHY on RTL8168g. The register needs to be
changed before powering down the PHY. Currently we don't meet this
requirement, however I'm not aware of any problems caused by this.
Therefore I see the change as an improvement.

The PHY driver has no means to access the chip ERI registers,
therefore we have to intercept MDIO writes to BMCR register.
If the BMCR_PDOWN bit is going to be set, then let's apply the
quirk before actually powering down the PHY.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/realtek/r8169_main.c