# cs: unable to map card memory! [SOLVED]

## stillman

i'm having problems to get my orinoco-pcmcia-card working. since i guess it's more hardware- than network-related atm i've choosen this forum.

i bought a  Texas Instruments PCI1410 PC card Cardbus Controller(pci-pcmcia-adapter) and a orinoco silver pcmcia-card on ebay. after reading several threads on this topic, following lots of advices this is the current status on my machine/kernel:

sys-apps/pcmcia-cs installed and added to default runlevel, even followed this guide, upgrading my baselayout(alltough that guide doesn't fit my situation)

```
crane peletiah # lsmod

Module                  Size  Used by

yenta_socket           19784  2

rsrc_nonstatic          9024  1 yenta_socket

orinoco_cs              6664  0

pcmcia                 19400  3 orinoco_cs

pcmcia_core            41908  4 yenta_socket,rsrc_nonstatic,orinoco_cs,pcmcia

orinoco                41612  1 orinoco_cs

hermes                  7616  2 orinoco_cs,orinoco

```

(only the relevant modules are pasted, orinoco and orinoco_cs are beeing loaded by entries in /etc/modules.autoload.d/kernel-2.6, the others have been added automagically by pcmcia-cs, i guess)

cardmgr(pcmcia-service) starts without error-messages or hangups, but still there's no entry with 'cardctl info', 'cardctl status' says:

```
crane peletiah # cardctl status

Socket 0:

  5V 16-bit PC Card

  function 0: [ready]

```

when i remove the card from the adapter there's only:

```
crane peletiah # cardctl status

Socket 0:

  no card

```

- so i'm not beeing far from the solution! it even beeps when ejecting/inserting the card.

there's a message in dmesg saying:

```
Yenta: CardBus bridge found at 0000:01:09.0 [133f:3000]

Yenta: Enabling burst memory read transactions

Yenta: Using CSCINT to route CSC interrupts to PCI

Yenta: Routing CardBus interrupts to PCI

Yenta TI: socket 0000:01:09.0, mfunc 0x00001d92, devctl 0x02

Yenta: ISA IRQ mask 0x0000, PCI irq 11

Socket status: 10000011

input: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:02.1-2

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

cs: IO port probe 0xc00-0xcff: clean.

cs: IO port probe 0x800-0x8ff: clean.

cs: IO port probe 0x100-0x4ff: excluding 0x200-0x207 0x330-0x337 0x4d0-0x4d7

cs: IO port probe 0x30-0x39: excluding 0x30-0x3f

cs: IO port probe 0xa00-0xaff: clean.

cs: unable to map card memory!

cs: unable to map card memory!

```

i have already edited the mem-entry in /etc/pcmcia/config.opts, removing the old entries and adding those that should be free referring to the output of cat /proc/iomem:

```
crane peletiah # cat /proc/iomem

00000000-0009ffff : System RAM

000a0000-000bffff : Video RAM area

000c0000-000ce3ff : Video ROM

000d0000-000d17ff : Adapter ROM

000f0000-000fffff : System ROM

00100000-1ffeffff : System RAM

  00100000-003c1cbd : Kernel code

  003c1cbe-004cceff : Kernel data

1fff0000-1fff2fff : ACPI Non-volatile Storage

1fff3000-1fffffff : ACPI Tables

d0000000-d7ffffff : 0000:00:00.0

d8000000-dfffffff : PCI Bus #03

  d8000000-dfffffff : 0000:03:00.0

    d8000000-dfffffff : vesafb

e0000000-e1ffffff : PCI Bus #03

  e0000000-e0ffffff : 0000:03:00.0

    e0000000-e0ffffff : nvidia

e2000000-e2ffffff : PCI Bus #01

  e2000000-e2000fff : 0000:01:09.0

    e2000000-e2000fff : yenta_socket

  e2001000-e2002fff : PCI CardBus #02

  e2003000-e2004fff : PCI CardBus #02

e3000000-e3000fff : 0000:00:04.0

  e3000000-e3000fff : forcedeth

e3001000-e3001fff : 0000:00:06.0

  e3001000-e3001fff : NVidia nForce2

e3003000-e3003fff : 0000:00:02.0

  e3003000-e3003fff : ohci_hcd

e3004000-e3004fff : 0000:00:02.1

  e3004000-e3004fff : ohci_hcd

e3005000-e30050ff : 0000:00:02.2

  e3005000-e30050ff : ehci_hcd

fec00000-fec00fff : reserved

fee00000-fee00fff : reserved

ffff0000-ffffffff : reserved

```

heres the mem-ranges i've defined in /etc/pcmcia/config.opts:

```
crane peletiah # nano /etc/pcmcia/config.opts

include memory 0x000d8000-0x000effff

include memory 0x20000000-0xcfffffff

include memory 0xe3002000-0xe3002fff

include memory 0xe3005100-0xfebfffff

```

have i missunderstood the hexadezimal-system or is there some other conflict, not actually related to the memory-ranges? every advice is highly appreciated, i've come to a point where i'm really clueless  :Rolling Eyes:   :Sad: Last edited by stillman on Sat Apr 23, 2005 10:20 pm; edited 1 time in total

----------

## augury

this is just a guess but maybe your usb mouse is taking your space unless you have other hardware  thats not showing up.

----------

## stillman

after 4 days i've finally set up this card! that was some hard work - but beeing persistent has paid off again.  :Smile: 

in the afternoon i've been able to solve the memory problem with the help of this thread resp. with the bug report referrenced there. i just configured the memory-range that is beeing mapped by PCI Bus #01, then i still had some error-messages but pcmcia_socket0 had been added below PCI CardBus #02, ranging from e2005000-e2005fff - the space unused had been correctly mapped. since pcmcia_socket0 only used this small range, i edited /etc/pcmcia/config.opts again and narrowed the range to the actually used one, after that there were no more memory-errors. oh, and very important, i added /etc/init.d/pcmcia to runlevel boot, not default, otherwise mapping does not work for some reason - oddly cardmgr has to be started manually resp. added to /etc/conf.d/local.start.

also 'cardctl info/cardctl ident' showed a proper entry after memory beeing allocated, but unfortunately there was still no device shown with 'iwconfig'.

'dmesg' spit out an error-message containing the phrase "GetNextTuple(). No matching CIS configuration, maybe you need the ignore_cis_vcc=1 parameter.".

after some googling the solution to get rid of that was to add the line 

```
module "orinoco_cs" opts "ignore_cis_vcc=1"
```

 in /etc/pcmcia/config.opts.

no more obvious error messages, but still no working device.  :Rolling Eyes: 

then i realized that the messages reporting 'IP ports clean/excluding etc.' weren't actually messages of sucessfull mapping but error-messages as well. so i narrowed the entry for ioports in config.opts to the one not used by PCI CardBus #02(just like with memory, using the output of cat /proc/ioports), after that, the piece of crap works(i guess i'd better not call it crap, otherwise it could strike back with refusing memory-ranges or something)  :Twisted Evil: 

here's the magic output after successfully adding the changes:

```
crane peletiah # cat /proc/iomem

00000000-0009ffff : System RAM

000a0000-000bffff : Video RAM area

000c0000-000ce3ff : Video ROM

000d0000-000d17ff : Adapter ROM

000f0000-000fffff : System ROM

00100000-1ffeffff : System RAM

  00100000-003c1cbd : Kernel code

  003c1cbe-004cceff : Kernel data

1fff0000-1fff2fff : ACPI Non-volatile Storage

1fff3000-1fffffff : ACPI Tables

d0000000-d7ffffff : 0000:00:00.0

d8000000-dfffffff : PCI Bus #03

  d8000000-dfffffff : 0000:03:00.0

    d8000000-dfffffff : vesafb

e0000000-e1ffffff : PCI Bus #03

  e0000000-e0ffffff : 0000:03:00.0

    e0000000-e0ffffff : nvidia

e2000000-e2ffffff : PCI Bus #01

  e2000000-e2000fff : 0000:01:09.0

    e2000000-e2000fff : yenta_socket

  e2001000-e2002fff : PCI CardBus #02

  e2003000-e2004fff : PCI CardBus #02

  e2005000-e2005fff : pcmcia_socket0

e3000000-e3000fff : 0000:00:04.0

  e3000000-e3000fff : forcedeth

e3001000-e3001fff : 0000:00:06.0

  e3001000-e3001fff : NVidia nForce2

e3003000-e3003fff : 0000:00:02.0

  e3003000-e3003fff : ohci_hcd

e3004000-e3004fff : 0000:00:02.1

  e3004000-e3004fff : ohci_hcd

e3005000-e30050ff : 0000:00:02.2

  e3005000-e30050ff : ehci_hcd

fec00000-fec00fff : reserved

fee00000-fee00fff : reserved

ffff0000-ffffffff : reserved

crane peletiah # cat /proc/ioports

0000-001f : dma1

0020-0021 : pic1

0040-0043 : timer0

0050-0053 : timer1

0060-006f : keyboard

0080-008f : dma page reg

00a0-00a1 : pic2

00c0-00df : dma2

00f0-00ff : fpu

0170-0177 : ide1

01f0-01f7 : ide0

02f8-02ff : serial

0376-0376 : ide1

0378-037a : parport0

03c0-03df : vga+

  03c0-03df : vesafb

03f6-03f6 : ide0

03f8-03ff : lirc_serial

0cf8-0cff : PCI conf1

4000-407f : motherboard

  4000-4003 : PM1a_EVT_BLK

  4004-4005 : PM1a_CNT_BLK

  4008-400b : PM_TMR

  4020-4027 : GPE0_BLK

4080-40ff : motherboard

4200-427f : motherboard

4280-42ff : motherboard

4400-447f : motherboard

4480-44ff : motherboard

  44a0-44af : GPE1_BLK

5000-503f : motherboard

5500-553f : motherboard

c000-cfff : PCI Bus #01

  c000-c403 : PCI CardBus #02

  c800-cc03 : PCI CardBus #02

  cc40-cc7f : pcmcia_socket0

d000-d007 : 0000:00:04.0

  d000-d007 : forcedeth

d400-d4ff : 0000:00:06.0

  d400-d4ff : NVidia nForce2

d800-d87f : 0000:00:06.0

  d800-d87f : NVidia nForce2

e400-e41f : 0000:00:01.1

f000-f00f : 0000:00:09.0

  f000-f007 : ide0

  f008-f00f : ide1

crane peletiah # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      IEEE 802.11-DS  ESSID:""  Nickname:"HERMES I"

          Mode:Managed  Frequency:2.422 GHz  Access Point: 00:00:00:00:00:00

          Bit Rate:11 Mb/s   Tx-Power=15 dBm   Sensitivity:1/3

          Retry limit:4   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=0/92  Signal level=134/153  Noise level=134/153

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

crane peletiah #

```

BIG SMILE   :Smile:   :Very Happy:   :Mr. Green:    Thank you, forums.gentoo.org!!!

----------

