[realtek] ressource allocation problem - rtl8139 cardbus

Donald Becker becker@scyld.com
Sun, 30 Sep 2001 20:40:58 -0400 (EDT)


On Sun, 30 Sep 2001, Martin Krasser wrote:

> I recently bought a Realtek rtl8139 cardbus card and updated the rtl8139
> driver following the instructions at
> 
> http://www.scyld.com/network/rtl8139.html
> http://www.scyld.com/network/updates.html
> http://www.scyld.com/network/modules.html
> 
> but the card cannot be assigned an IRQ or ressources cannot be
> allocated.
> - Kernel 2.2.16 (SuSE 7.0)
> - PCMCIA 3.1.17
> The System in running on a Dell Inspiron 4000 Laptop.
..
> Socket 0:
> Resources for CardBus device 'RealTek RTL8139 Fast Ethernet' have not
> been allocated. Activation has been delayed. 

This might be OK -- the CardBus code maps the card CIS and loads the
driver before it finishes allocating the resources.  The code really
should finish mapping the card's resources before notifying the driver,
but David Hinds considers it my problem to work-around.

> Here's the output from lspci -v (why has the Ethernet controller this
> number: 20:00.0 ?)

That's the PCI bus number for the CardBus controller.  This is a set by
the Linux PCMCIA code.

> 20:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139
> (rev 10)
>         Subsystem: Realtek Semiconductor Co., Ltd. RT8139
>         Flags: bus master, medium devsel, latency 64, IRQ 11
>         I/O ports at 0200
>         Memory at a0003000 (32-bit, non-prefetchable)

This looks OK.

> rcpcmcia: /sbin/insmod /lib/modules/2.2.16/pcmcia/pcmcia_core.o
> kernel: Linux PCMCIA Card Services 3.1.17
> kernel:   kernel build: 2.2.16 #11 Mon Sep 24 22:26:56 GMT 2001
...
> cardmgr[1634]: executing: 'modprobe rtl8139'
> kernel: rtl8139.c:v1.15 8/1/2001 Donald Becker, becker@scyld.com.
> kernel:  http://www.scyld.com/network/rtl8139.html
> kernel: Resources for CardBus device 'RealTek RTL8139 Fast Ethernet'
> have not been allocated.
> kernel: Activation has been delayed.

First message, not really a problem yet.

> kernel: cs: cb_config(bus 32)
> kernel:   fn 0 bar 1: io 0x200-0x2ff
> kernel:   fn 0 bar 2: mem 0x60001000-0x600011ff
> kernel:   irq 11

OK, the PCI device mappings have been set up.  Good.

> kernel: cs: cb_enable(bus 32)
> kernel:   bridge io map 0 (flags 0x21): 0x200-0x2ff
> kernel:   bridge mem map 0 (flags 0x1): 0x60001000-0x60001fff
> kernel: Found a RealTek RTL8139 Fast Ethernet at 32/0 address
> 0x201->0x200 IRQ 11.
> kernel: RealTek RTL8139 Fast Ethernet at 32/0 command 0x7.
> kernel: eth0: RealTek RTL8139 Fast Ethernet at 0x200, IRQ 11,
> 00:50:fc:2d:02:60.

Good so far.

> cardmgr[1634]: executing: './network start eth0'
> PCMCIA: Shutting down Name Service Cache
> Daemon^M^[[132C^[[9D^[[32m^[[1mdone^[[m^O
> PCMCIA: Starting Name Service Cache
> Daemon^M^[[132C^[[9D^[[32m^[[1mdone^[[m^O

The card should now be working.

Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Second Generation Beowulf Clusters
Annapolis MD 21403			410-990-9993