help needed with realtek gigabit network adapter
Hi guys,
I'm trying to run buildroot 2011.08 on an atom based board, but I have a problem with the network driver:
It's a realtek gigabit network device, the traces say RTL8168d/8111d:
r8168 Gigabit Ethernet driver 2.3LK-NAPI loaded
r8169 0000:01:00.0: PCI INT A -> Link[LNKA] -> GSI 11 (level, low) -> IRQ 11 r8169 0000:01:00.0: no MSI. Back to INTx.
r8169 0000:01:00.0: eth0: RTL8168d/8111d at 0xf8012000, 70:71:bc:31:87:6f, XID 081000c0 IRQ 11
When I want to bring it up, it freezes for a minute or two before I get the following message:
r8169 0000:01:00.0: eth0: unable to load firmware patch rtl_nic/rtl8168d-1.fw (-2) r8169 0000:01:00.0: eth0: link down
r8169 0000:01:00.0: eth0: link downADDRCONF(NETDEV_UP): eth0: link is not ready
r8169 0000:01:00.0: eth0: link upADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
at this point, the network seems to work, it gets a DHCP lease.
after some more minutes, I get another error which does not happen if I don't bring the network up:
irq 7: nobody cared (try booting with the "irqpoll" option)
Pid: 0, comm: swapper Not tainted 3.0.4 #1
Call Trace:
(...)
handlers:
[<c11a1050>] usb_hcd_irq
Disabling IRQ #7
I have tried to put a the rtl8168d-1.fw and rtl8168d-1.fw in /lib/firmware/rtl_nic directory
I tried to define the CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware" but it requires to define CONFIG_EXTRA_FIRMWARE and I don't know what to set it to. I tried with "rtl8168d" and some variations but it didn't work
I also tried to deactivate firmware support but it doesn't seem to have any effect, I'm not sure I did that correctly though.
I googled the error messages but didn't find any solution so I'm stuck.
The firmware thing apparently appeared with kernel 2.6.38
I had an old version of buildroot that works with this hardware but it's from early 2009 and the config file changed deeply since then.
Any idea welcome,
regard,
Signature · 1 line
Emmanuel
Hi,
Quoted 12 lines · Emmanuel BOUAZIZ
I'm trying to run buildroot 2011.08 on an atom based board, but I have a problem with the network driver:
I have tried to put a the rtl8168d-1.fw and rtl8168d-1.fw in
/lib/firmware/rtl_nicdirectory
I tried to define theCONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware" but it requires to defineCONFIG_EXTRA_FIRMWAREand I
don't know what to set it to. I tried with "rtl8168d" and some variations but it didn't work
I also tried to deactivate firmware support but it doesn't seem to have any effect, I'm not sure I did that correctly
though.
If this device requires firmware to be uploaded, then you most probably need to have udev running. The udev daemon should then take care of uploading the firmware when the module is loaded.
Regards,
Sven
Le Mon, 21 Nov 2011 13:41:52 +0100,
Sven Neumann <[email protected]> a ?crit :
Quoted 3 lines
If this device requires firmware to be uploaded, then you most probably need to have udev running. The udev daemon should then take care of uploading the firmware when the module is loaded.
Note that Busybox mdev is also capable of pushing firmwares to the kernel. FEATURE_MDEV_LOAD_FIRMWARE needs to be enabled in the Busybox configuration, though, and it is not part of the default Busybox configuration we have in Buildroot, so it requires manual tweaking.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Quoted 7 lines · Thomas Petazzoni
Le Mon, 21 Nov 2011 13:41:52 +0100,
Sven Neumann <[email protected]> a ?crit :Note that Busybox mdev is also capable of pushing firmwares to the kernel.
FEATURE_MDEV_LOAD_FIRMWAREneeds to be enabled in the Busybox configuration, though, and it is not part of the default Busybox configuration we have in Buildroot, so it requires manual tweaking.
It worked, thank you very much!
I enabled mdev with loading firmware support and added a S30mdev file in init.d with
mount -t tmpfs -o size=64k,mode=0755 tmpfs /dev
echo /sbin/mdev > /proc/sys/kernel/hotplug
mdev -s
The "irq 7: nobody cared" error is still there though. It was not related after all. Any idea about that ?
regards,
Signature · 1 line
Emmanuel
Quoted 13 lines · Emmanuel BOUAZIZ
Quoted 7 lines · Thomas Petazzoni
Le Mon, 21 Nov 2011 13:41:52 +0100,
Sven Neumann <[email protected]> a ?crit :Note that Busybox mdev is also capable of pushing firmwares to the kernel.
FEATURE_MDEV_LOAD_FIRMWAREneeds to be enabled in the Busybox configuration, though, and it is not part of the default Busybox configuration we have in Buildroot, so it requires manual tweaking.It worked, thank you very much!
Quoted 9 lines
I enabled mdev with loading firmware support and added a S30mdev file in init.d with
mount -t tmpfs -o size=64k,mode=0755 tmpfs /dev
echo/sbin/mdev>/proc/sys/kernel/hotplug
mdev -sThe "irq 7: nobody cared" error is still there though. It was not related after all. Any idea about that ?
That one is usually indicating that a kernel driver is not present or that the driver that is present, is not optioned (or written) to claim the irq.
Find what hardware is diddling irq 7 and then check you kernel config.
Mike
Quoted 2 lines
regards,
Le Mon, 21 Nov 2011 18:36:40 +0100,
Emmanuel BOUAZIZ <[email protected]> a ?crit :
Quoted 4 lines
I enabled mdev with loading firmware support and added a S30mdev file in init.d with mount -t tmpfs -o size=64k,mode=0755 tmpfs /dev
echo/sbin/mdev>/proc/sys/kernel/hotplug
mdev -s
All these steps are done automatically by Buildroot, if you select BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV.
Quoted 2 lines
The "irq 7: nobody cared" error is still there though. It was not related after all. Any idea about that ?
Buggy driver or hardware. Find out which device corresponds to IRQ 7, and then if a driver is supposed to manage this device or not.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Quoted 8 lines · Thomas Petazzoni
Quoted 4 lines
I enabled mdev with loading firmware support and added a S30mdev file in init.d with mount -t tmpfs -o size=64k,mode=0755 tmpfs /dev
echo/sbin/mdev>/proc/sys/kernel/hotplug
mdev -sAll these steps are done automatically by Buildroot, if you select
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV.
Oh that's right, I enabled mdev in busybox but didn't noticed that it appeared also in buildroot's menu. Thanks :)
Note: I had to enable initramfs
Quoted 6 lines
Quoted 2 lines
The "irq 7: nobody cared" error is still there though. It was not related after all. Any idea about that ?
Buggy driver or hardware. Find out which device corresponds to IRQ 7, and then if a driver is supposed to manage this device or not.
uhci_hcd 0000:00:1d.2: PCI INT C -> Link[LNKC] -> GSI 7 (level, low) -> IRQ 7 uhci_hcd 0000:00:1d.2: UHCI Host Controlleruhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4 uhci_hcd 0000:00:1d.2: irq 7, io base 0x0000f040
there are 4 of them, 2 of which use IRQ 11 and the last one IRQ 10.
The UHCI driver is selected in linux's configuration.
regards,
Signature · 1 line
Emmanuel
Quoted 2 lines · Emmanuel BOUAZIZ
Quoted 2 lines
Quoted 2 lines
The "irq 7: nobody cared" error is still there though. It was not related after all. Any idea about that ?
It means IRQ 7 was raised, the kernel asked all the drivers registered for IRQ 7 to have a look, and none of them reported having handled it. Therefore a buggy driver somewhere or misbehaving hardware.
You can pass "nodebugirq" as a kernel cmdline option if you want the kernel to not care.
Quoted 11 lines · Emmanuel BOUAZIZ
uhci_hcd0000:00:1d.2: PCI INT C -> Link[LNKC] -> GSI 7 (level, low) -> IRQ 7uhci_hcd0000:00:1d.2: UHCI Host Controlleruhci_hcd0000:00:1d.2: new USB bus registered, assigned bus number 4uhci_hcd0000:00:1d.2: irq 7, io base0x0000f040there are 4 of them, 2 of which use IRQ 11 and the last one IRQ 10.
The UHCI driver is selected in linux's configuration.
regards,
Hi,
I'm not sure why but the problem dissapeared after I enabled Sparse IRQ numbering (and DMA)
Thanks for your help,
Signature · 1 line
Emmanuel