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)
commit47dda78671a3d5cee3fb2229e37997d2ac8a3b54
tree5d801f35ce3179aa5acc2db81db7626f25e7e07a
parent8aa7b526dc0b5dbf40c1b834d76a667ad672a410
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: 89fbd26cca7e ("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