PCMCIA issues ---> cs: unable to map card memory 0x1000!

Mathieu Bertrand Bertrand at tcl.ite.mee.com
Thu Feb 10 08:27:44 EST 2005



-----Original Message-----
From: Dominik Brodowski [mailto:linux at dominikbrodowski.net]
Sent: mercredi 9 février 2005 21:13
To: Mathieu Bertrand
Cc: 'linux-pcmcia at lists.infradead.org'
Subject: Re: PCMCIA issues ---> cs: unable to map card memory 0x1000!


Hi,

On Tue, Feb 08, 2005 at 05:40:51PM +0100, Mathieu Bertrand wrote:
>         Memory behind bridge: c4000000-c8ffffff
>         Prefetchable memory behind bridge:
00000000c0000000-00000000c3f00000

>         Memory window 0: c0000000-c1fff000 (prefetchable)
>         Memory window 1: c4000000-c5fff000

>         Memory window 0: c2000000-c3fff000 (prefetchable)
>         Memory window 1: c6000000-c7fff000

> include port 0x00000000-0x00000fff, port 0x00001000-0x00001fff
> include port 0x00002000-0x00002fff, port 0x00003000-0x00003fff
> include memory 0xc0000000-0xc1ffffff, memory 0xc4000000-0xc5ffffff
> include memory 0xc2000000-0xc3ffffff, memory 0xc6000000-0xc7ffffff
> 
> I don't really know what to do.

You need to make more iomem and ioport resources available. Especially some
which are _not_ used as Memory windows or I/O windows on the socket by
default. E.g. on my notebook's yenta sockets there is

Memory window 0: 30400000-307ff000 (prefetchable)
Memory window 1: 30800000-30bff000
I/O window 0: 00004000-000040ff
I/O window 1: 00004400-000044ff

but my /etc/pcmcia/config.opts does not even contain these resources:

include port 0x100-0x4ff, port 0x800-0x8ff, port 0xc00-0xcff
include memory 0xc0000-0xfffff
include memory 0xa0000000-0xa0ffffff, memory 0x60000000-0x60ffffff

----------------------------------------------------------------------

Hi,
Thanks Dominik.
Well, I added some iomem and ioport resources in my config.opts file with no
change, I still have the same message :

# cardmgr -v
cardmgr[1589]: cannot access /lib/modules/2.6.10-rc2: No such file or
directory
cardmgr[1589]: watching 2 sockets
# Dec 31 17:01:02 cardmgr[1594]: starting, version is 3.2.7
Dcs: memory probe 0xa800000-0xa9ffffff: excluding 0xa800000-0xa9ffffff
cs: memory probe 0xae000000-0xaeffffff: excluding 0xae000000-0xaeffffff
cs: memory probe 0xc0000000-0xc1ffffff: excluding 0xc0000000-0xc1ffffff
cs: memory probe 0xc2000000-0xc3ffffff: excluding 0xc2000000-0xc3ffffff
cs: memory probe 0xc4000000-0xc5ffffff: excluding 0xc4000000-0xc5ffffff
cs: memory probe 0xc6000000-0xc7ffffff: excluding 0xc6000000-0xc7ffffff
cs: unable to map card memory 0x1000!
cs: unable to map card memory 0x1000!
eDc 31 17:01:02 cardmgr[1594]: initializing socket 0
Dec 31 17:01:02 cardmgr[1594]: socket 0: Anonymous Memory
cs: unable to map card memory 0x1000!
cs: unable to map card memory 0x1000!
cs: unable to map card memory 0x1000!
cs: unable to map card memory 0x1000!
Dec 31 17:01:03 cardmgr[1594]: executing: 'modprobe memory_cs'
Dec 31 17:01:03 cardmgr[1594]: + modprobe: could not parse modules.dep
Dec 31 17:01:03 cardmgr[1594]: +
Dec 31 17:01:03 cardmgr[1594]: modprobe exited with status 1
Dec 31 17:01:03 cardmgr[1594]: module
/lib/modules/2.6.10-rc2/pcmcia/memory_cs.o not available
Dec 31 17:01:03 cardmgr[1594]: bind 'memory_cs' to socket 0 failed: Invalid
argument

With these windows in my config.opts file :
include port 0x00000000-0x00000fff, port 0x00001000-0x00001fff
include port 0x00002000-0x00002fff, port 0x00003000-0x00003fff
include port 0x4000-0x40ff, port 0x8000-0x8fff
include memory 0xc0000000-0xc0ffffff, memory 0xc4000000-0xc4ffffff
include memory 0xc2000000-0xc3ffffff, memory 0xc6000000-0xc7ffffff
include memory 0xa8000000-0xa9ffffff, memory 0xae000000-0xaeffffff


The error comes from find_mem_region in drivers/pcmcia/cistpl.c :
  if (!(s->features & SS_CAP_STATIC_MAP) && mem->res == NULL) {
	mem->res = find_mem_region(0, s->map_size, s->map_size, 0,
				   "card services", s);
	if (mem->res == NULL) {
	    printk(KERN_NOTICE "cs: unable to map card memory 0x%x!\n",
s->map_size);
	    return NULL;
	}

Nevertheless, my PCI configuration seems ok :
- From my MIPS processor, the PCI mem space is mapped to 0xc0000000 that is
mapped to the PCI physical address 0xc0000000.
- The PCI IO space is mapped to 0xe0000000 that is remapped to the PCI
physical address 0x00000000.

An idea ? Thanks a lot for your help.

Mathieu BERTRAND
Mitsubishi ITE-TCL, Rennes (FRANCE)



More information about the linux-pcmcia mailing list