]> git.baikalelectronics.ru Git - kernel.git/commit
r8169: fix PHY driver check on platforms w/o module softdeps
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 27 Mar 2020 16:33:32 +0000 (17:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:02:12 +0000 (11:02 +0200)
commit7f6df5fa5ca166d762aca753ab931114e013d3fc
tree62d776fd5281a2ade64fd815012cdbd65e362204
parent02f3450dd4db03a644b89e2ae2ddcb75b1f6f1cc
r8169: fix PHY driver check on platforms w/o module softdeps

commit 963dfb86b7428040560f179a18203cc936e9c920 upstream.

On Android/x86 the module loading infrastructure can't deal with
softdeps. Therefore the check for presence of the Realtek PHY driver
module fails. mdiobus_register() will try to load the PHY driver
module, therefore move the check to after this call and explicitly
check that a dedicated PHY driver is bound to the PHY device.

Fixes: b21013e58931 ("r8169: check that Realtek PHY driver module is loaded")
Reported-by: Chih-Wei Huang <cwhuang@android-x86.org>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/realtek/r8169_main.c