]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[realtek] Work around hardware bug on RTL8211B 397/head
authorMichael Brown <mcb30@ipxe.org>
Tue, 22 Jun 2021 13:48:10 +0000 (14:48 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 24 Jun 2021 11:36:46 +0000 (12:36 +0100)
commit5622575c5e4bffb07307f39903bb95caad7d172d
tree3bb74d96b17d6807ecfe4cdd8298fdf3a1149c20
parent0688114ea63fee21c39d94cc8df9e2a5003ac283
[realtek] Work around hardware bug on RTL8211B

The RTL8211B seems to have a bug that prevents the link from coming up
unless the MII_MMD_DATA register is cleared.

The Linux kernel driver applies this workaround (in rtl8211b_resume())
only to the specific RTL8211B PHY model, along with a matching
workaround to set bit 9 of MII_MMD_DATA when suspending the PHY.
Since we have no need to ever suspend the PHY, and since writing a
zero ought to be harmless, we just clear the register unconditionally.

Debugged-by: Nikolay Pertsev <nikolay.p@cos.flag.org>
Tested-by: Nikolay Pertsev <nikolay.p@cos.flag.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/realtek.c
src/include/mii.h