All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] help needed with realtek gigabit network adapter
@ 2011-11-21 11:32 Emmanuel BOUAZIZ
  2011-11-21 12:41 ` Sven Neumann
  0 siblings, 1 reply; 9+ messages in thread
From: Emmanuel BOUAZIZ @ 2011-11-21 11:32 UTC (permalink / raw)
  To: buildroot

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 down
ADDRCONF(NETDEV_UP): eth0: link is not ready
r8169 0000:01:00.0: eth0: link up
ADDRCONF(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,

-- 
Emmanuel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] help needed with realtek gigabit network adapter
  2011-11-21 11:32 [Buildroot] help needed with realtek gigabit network adapter Emmanuel BOUAZIZ
@ 2011-11-21 12:41 ` Sven Neumann
  2011-11-21 12:44   ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Sven Neumann @ 2011-11-21 12:41 UTC (permalink / raw)
  To: buildroot

Hi,

On Mon, 2011-11-21 at 12:32 +0100, Emmanuel BOUAZIZ wrote:

> 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_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.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] help needed with realtek gigabit network adapter
  2011-11-21 12:41 ` Sven Neumann
@ 2011-11-21 12:44   ` Thomas Petazzoni
  2011-11-21 17:36     ` Emmanuel BOUAZIZ
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2011-11-21 12:44 UTC (permalink / raw)
  To: buildroot

Le Mon, 21 Nov 2011 13:41:52 +0100,
Sven Neumann <s.neumann@raumfeld.com> a ?crit :

> 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
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] help needed with realtek gigabit network adapter
  2011-11-21 12:44   ` Thomas Petazzoni
@ 2011-11-21 17:36     ` Emmanuel BOUAZIZ
  2011-11-21 18:10       ` Michael S. Zick
  2011-11-21 20:08       ` Thomas Petazzoni
  0 siblings, 2 replies; 9+ messages in thread
From: Emmanuel BOUAZIZ @ 2011-11-21 17:36 UTC (permalink / raw)
  To: buildroot


On 11/21/2011 01:44 PM, Thomas Petazzoni wrote:
> Le Mon, 21 Nov 2011 13:41:52 +0100,
> Sven Neumann <s.neumann@raumfeld.com> a ?crit :

> 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.


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,

-- 
Emmanuel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] help needed with realtek gigabit network adapter
  2011-11-21 17:36     ` Emmanuel BOUAZIZ
@ 2011-11-21 18:10       ` Michael S. Zick
  2011-11-21 20:08       ` Thomas Petazzoni
  1 sibling, 0 replies; 9+ messages in thread
From: Michael S. Zick @ 2011-11-21 18:10 UTC (permalink / raw)
  To: buildroot

On Mon November 21 2011, Emmanuel BOUAZIZ wrote:
> 
> On 11/21/2011 01:44 PM, Thomas Petazzoni wrote:
> > Le Mon, 21 Nov 2011 13:41:52 +0100,
> > Sven Neumann <s.neumann@raumfeld.com> a ?crit :
> 
> > 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.
> 
> 
> 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 ? 
> 

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
> regards,
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] help needed with realtek gigabit network adapter
  2011-11-21 17:36     ` Emmanuel BOUAZIZ
  2011-11-21 18:10       ` Michael S. Zick
@ 2011-11-21 20:08       ` Thomas Petazzoni
  2011-11-22 10:28         ` Emmanuel BOUAZIZ
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2011-11-21 20:08 UTC (permalink / raw)
  To: buildroot

Le Mon, 21 Nov 2011 18:36:40 +0100,
Emmanuel BOUAZIZ <ebouaziz@neotion.com> a ?crit :

> 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.

> 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
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] help needed with realtek gigabit network adapter
  2011-11-21 20:08       ` Thomas Petazzoni
@ 2011-11-22 10:28         ` Emmanuel BOUAZIZ
  2011-11-22 11:44           ` Trevor Woerner
  2011-11-23  9:24           ` Emmanuel BOUAZIZ
  0 siblings, 2 replies; 9+ messages in thread
From: Emmanuel BOUAZIZ @ 2011-11-22 10:28 UTC (permalink / raw)
  To: buildroot



On 11/21/2011 09:08 PM, Thomas Petazzoni wrote:

>> 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.
> 

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

>> 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 Controller
uhci_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,

-- 
Emmanuel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] help needed with realtek gigabit network adapter
  2011-11-22 10:28         ` Emmanuel BOUAZIZ
@ 2011-11-22 11:44           ` Trevor Woerner
  2011-11-23  9:24           ` Emmanuel BOUAZIZ
  1 sibling, 0 replies; 9+ messages in thread
From: Trevor Woerner @ 2011-11-22 11:44 UTC (permalink / raw)
  To: buildroot

On Tue, Nov 22, 2011 at 5:28 AM, Emmanuel BOUAZIZ <ebouaziz@neotion.com> wrote:
>>> 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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] help needed with realtek gigabit network adapter
  2011-11-22 10:28         ` Emmanuel BOUAZIZ
  2011-11-22 11:44           ` Trevor Woerner
@ 2011-11-23  9:24           ` Emmanuel BOUAZIZ
  1 sibling, 0 replies; 9+ messages in thread
From: Emmanuel BOUAZIZ @ 2011-11-23  9:24 UTC (permalink / raw)
  To: buildroot


On 11/22/2011 11:28 AM, Emmanuel BOUAZIZ wrote:
> 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 Controller
> uhci_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,
> 

Hi,

I'm not sure why but the problem dissapeared after I enabled Sparse IRQ numbering (and DMA)

Thanks for your help,

-- 
Emmanuel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-11-23  9:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-21 11:32 [Buildroot] help needed with realtek gigabit network adapter Emmanuel BOUAZIZ
2011-11-21 12:41 ` Sven Neumann
2011-11-21 12:44   ` Thomas Petazzoni
2011-11-21 17:36     ` Emmanuel BOUAZIZ
2011-11-21 18:10       ` Michael S. Zick
2011-11-21 20:08       ` Thomas Petazzoni
2011-11-22 10:28         ` Emmanuel BOUAZIZ
2011-11-22 11:44           ` Trevor Woerner
2011-11-23  9:24           ` Emmanuel BOUAZIZ

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.