r8169: check that Realtek PHY driver module is loaded
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 13 Dec 2019 15:53:37 +0000 (16:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:36:36 +0000 (08:36 +0100)
commit58bc57b373e0be8461e15f8c75b15647f783d37f
treec59bc970e2ac320fb18cc72194b21b545c96c2d5
parentcdd5b09bcbc0c2ee8bfbdaacfe35c61fb297b8a1
r8169: check that Realtek PHY driver module is loaded

[ Upstream commit f325937735498afb054a0195291bbf68d0b60be5 ]

Some users complained about problems with r8169 and it turned out that
the generic PHY driver was used instead instead of the dedicated one.
In all cases reason was that r8169.ko was in initramfs, but realtek.ko
not. Manually adding realtek.ko to initramfs fixed the issues.
Root cause seems to be that tools like dracut and genkernel don't
consider softdeps. Add a check for loaded Realtek PHY driver module
and provide the user with a hint if it's not loaded.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/realtek/r8169_main.c