Problem with yenta_socket (unable to map card memory)

Santanu Roy sroy at broadcom.com
Mon Jun 15 13:17:32 EDT 2009


There is a legacy data card "U630" (PCMCIA). When plugged in a router
with Linux 2.6.x 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. 
 
Linux 2.6:
---------------
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!".
 
Instrumented rsrc_nonstatic.c as seen below to show which place failed in the find_mem callback routine. There are three
places that might be the cause.

dmesg output:
cs: memory probe 0x4000b000-0x4000bfff: excluding 0x4000b000-0x4000cfff
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) 

#pccardctl ls -vv
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--
# 

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





More information about the linux-pcmcia mailing list