problems with U630 card

Santanu Roy sroy at broadcom.com
Mon Jun 15 17:33:33 GMT 2009


There is a legacy data card "U630" (PCMCIA). When plugged in a router with our Linux 2.6.22 based code, there is the error from CS (card service), "cs: unable to map card memory!" It means that daemon of Card Service can not get the mapping space from Kernel. Seems that the function pci_find_parent_resource() return 0 (It means the bus resource can not be found). pcmcia_find_mem_region() will be called in linux kernel 2.6 but finally sends error message "cs: unable to map card memory!".
I instrumented rsrc_nonstatic.c as seen below to show which place failed in the find_mem callback routine.  

dmesg output:
cs: memory probe 0x4000b000-0x4000bfff: excluding 0x4000b000-0x4000cfff - [roy] As long this memory is excluded, it will always fail. Not sure if someone else is using this area.
pcmcia: pci_bus_alloc_resource returned -12
pcmcia: pci_bus_alloc_resource returned -12
cs: unable to map card memory!
pcmcia: pci_bus_alloc_resource returned -12
pcmcia: pci_bus_alloc_resource returned -12
cs: unable to map card memory!

It seems that the message corresponds to
#define ENOMEM 12 /* Out of memory */ (Linux) 

Output of "pccardctl ls -vv" shows:
Socket 0 Bridge:   	[yenta_cardbus] 	(bus ID: 0000:01:03.0)
Configuration:	state: on	ready: yes
Voltage: 5.0V Vcc: 5.0V Vpp: 5.0V
Available IRQs: none
Available ioports:	0x000002f8 - 0x000002ff
				0x000003f8 - 0x000003ff
Available iomem:	--none--
# 

Also, output of cat /etc/pcmcia/config.opts shows the following:
include port 0x2f8-0x2ff, port 0x3f8-0x3ff
include memory 0x4000b000-0x4000bfff
exclude irq 3
exclude irq 12

I have tried to change memory regions in /etc/pcmcia/config.opts before and got the same result "cs: unable to map card memory!"
I am wondering that the PCI Yenta Socket data structure changed in Linux 2.6 caused the issue.  Appreciate comment & any tip to debug this issue.





More information about the wireless mailing list