r8169 0000:09:00.0: no dedicated PHY driver found for PHY ID 0x001cc912, maybe realtek.ko needs to be added to initramfs?
After regenerating the initramfs using dracut -f, we end up seeing the following, rather disappointing message:
r8169 0000:09:00.0: no dedicated PHY driver found for PHY ID 0x001cc912, maybe realtek.ko needs to be added to initramfs?
More specifically, in order to fix a QLogic card firmware issue on the following Linux kernel level, which foced the regeneration of the initramfs to take in the ql2400_fw.bin file once more with the updated 08.07 firmware:
Linux mbpc-pc 5.11.13 #1 SMP Sun Apr 11 21:31:14 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux
On reboot however, though the FW driver worked like a charm, the network card didn't come up. Digging deeper:
[root@mbpc-pc firmware]#
Apr 10 17:17:45 mbpc-pc kernel: r8169 0000:09:00.0: no dedicated PHY driver found for PHY ID 0x001cc912, maybe realtek.ko needs to be added to initramfs?
Apr 10 17:17:45 mbpc-pc kernel: r8169: probe of 0000:09:00.0 failed with error -49
[root@mbpc-pc ~]# grep -Ei r8169 /var/log/messages
Apr 10 16:46:15 mbpc-pc kernel: libphy: r8169: probed
Apr 10 16:46:15 mbpc-pc kernel: r8169 0000:09:00.0 eth0: RTL8168d/8111d, aa:bb:cc:dd:ee:ff, XID 283, IRQ 18
Apr 10 16:46:15 mbpc-pc kernel: r8169 0000:09:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
Apr 10 16:46:15 mbpc-pc kernel: RTL8211B Gigabit Ethernet r8169-900:00: attached PHY driver (mii_bus:phy_addr=r8169-900:00, irq=IGNORE)
Apr 10 16:46:15 mbpc-pc kernel: r8169 0000:09:00.0 eth0: Link is Down
Apr 10 16:46:15 mbpc-pc kernel: r8169 0000:09:00.0 eth0: Link is Up – 1Gbps/Full – flow control off
Apr 10 17:17:45 mbpc-pc kernel: libphy: r8169: probed
Apr 10 17:17:45 mbpc-pc kernel: r8169 0000:09:00.0: no dedicated PHY driver found for PHY ID 0x001cc912, maybe realtek.ko needs to be added to initramfs?
Apr 10 17:17:45 mbpc-pc kernel: r8169: probe of 0000:09:00.0 failed with error -49
Apr 10 18:06:04 mbpc-pc kernel: libphy: r8169: probed
Apr 10 18:06:04 mbpc-pc kernel: r8169 0000:09:00.0 eth0: RTL8168d/8111d, aa:bb:cc:dd:ee:ff, XID 283, IRQ 18
Apr 10 18:06:04 mbpc-pc kernel: r8169 0000:09:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
Apr 10 18:06:04 mbpc-pc kernel: RTL8211B Gigabit Ethernet r8169-900:00: attached PHY driver (mii_bus:phy_addr=r8169-900:00, irq=IGNORE)
Apr 10 18:06:04 mbpc-pc kernel: r8169 0000:09:00.0 eth0: Link is Down
Apr 10 18:06:06 mbpc-pc kernel: r8169 0000:09:00.0 eth0: Link is Up – 1Gbps/Full – flow control off
This is a horrible way to fix things but given the fact that this is a Scientific Linux 6.X OS w/ a 5.X kernel in it, slated for a future upgrade, so be it:
[root@mbpc-pc ~]# vi /etc/rc.local
# Sometimes the realtek driver doesn't load. It's between realtek.ko and r8169. In this case, if eth0 doesn't show up, reinsert the module and log the attempt.
#
# Attempts to fix:
#
# mbpc-pc kernel: r8169 0000:09:00.0: no dedicated PHY driver found for PHY ID 0x001cc912, maybe realtek.ko needs to be added to initramfs?
# kernel: r8169: probe of 0000:09:00.0 failed with error -49
#
# This fix is only temporary for buggy kernels until a better kernel shows up that fixes this. There are alot of assumptions here.
#
if ip a|grep -Ei eth0 >/dev/null >/dev/null 2>&1; then
echo "ERROR: eth0 was not present. Removing r8169 and reinserting it again to 'fix' the problem." | tee -a /var/log/messages;
rmmod r8169;
modprobe r8169;
else
echo "GOOD: eth0 was present. Not necessary to reinsert the r8169 kernel module." | tee -a /var/log/messages;
fi
[root@mbpc-pc 5.11.13]#
Hope it works for you too!