]> git.baikalelectronics.ru Git - kernel.git/commit
r8169: consider that PHY reset may still be in progress after applying firmware
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 7 Oct 2020 11:34:51 +0000 (13:34 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 8 Oct 2020 19:20:51 +0000 (12:20 -0700)
commit8a06a244d88c64b0b41cbaca07f3b86b50af3944
tree5d801f35ce3179aa5acc2db81db7626f25e7e07a
parent97a0b8d50d2c2bd5a8e67957e8fd762b938a09f8
r8169: consider that PHY reset may still be in progress after applying firmware

Some firmware files trigger a PHY soft reset and don't wait for it to
be finished. PHY register writes directly after applying the firmware
may fail or provide unexpected results therefore. Fix this by waiting
for bit BMCR_RESET to be cleared after applying firmware.

There's nothing wrong with the referenced change, it's just that the
fix will apply cleanly only after this change.

Fixes: d5a63c9987fb ("r8169: fix firmware not resetting tp->ocp_base")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/realtek/r8169_main.c