# pcmcia-cs or pcmciautils?Pcmcia upgrade error collection.

## turtles

Read me / EDIT: Solved first part See https://bugs.gentoo.org/show_bug.cgi?id=131935 This is now a pcmciautils pcmcia-cs-cis & pcmcia-cs-pnptools error collection thread.

Post errors you have had, tips advice on pcmciautils and getting pccmcia to work.

I have read this http://kernel.org/pub/linux/utils/kernel/pcmcia/howto.html

Do I need to follow this  *Quote:*   

> Optional: Get PCMCIA Working
> 
> PCMCIA-users should first install the pcmcia-cs package. This also includes users who will be working with a 2.6 kernel (even though they won't be using the PCMCIA drivers from this package). The USE="-X" is necessary to avoid installing xorg-x11 at this moment:
> 
> Code Listing 15: Installing pcmcia-cs
> ...

 

OR  *Quote:*   

> don't mess around with pcmcia at that time anymore.. in kernel >=2.6.14 the cardmanager is obsolete, pcmcia is then working like a hotplug device, so pcmcia isn't needed in any runlevel anymore. Remove
> 
> Code:
> 
>   [ ]     PCMCIA control ioctl (obsolete)
> ...

  from this

Thanks 

This is related to my other unanswered post here

I have tried both and neither work

I have also tried to compile pcmcia support as modules and into kernel.

Addtionaly what is  *Quote:*   

> 2.2. Resource database? 
> 
> Then, you need to find out whether you need a resource database. This contains the ioport and iomem region which PCMCIA cards may use. Fortunately, less and less systems require setting such a database up. 

 

Thanks so much for any ideas

----------

## sonicbhoc

pcmcia-cs is depreciated and will soon no longer work. Get pcmciautils.

----------

## turtles

Thanks for the reply I guess the handbook is outdated.

I unmerged pcmcia-cs and removed pcmcia from runlevel default.

but I still get errors.

I get from dmesg:

```

Freeing unused kernel memory: 260k freed

Yenta: CardBus bridge found at 0000:01:0b.0 [1179:0001]

Yenta: ISA IRQ mask 0x04b8, PCI irq 16

Socket status: 30000020

pcmcia: parent PCI bridge I/O window: 0xc000 - 0xcfff

pcmcia: parent PCI bridge Memory window: 0xcff00000 - 0xcfffffff

pcmcia: parent PCI bridge Memory window: 0x28000000 - 0x29ffffff

pccard: CardBus card inserted into slot 0

EXT3 FS on hda3, internal journal

Adding 996020k swap on /dev/hda2.  Priority:-1 extents:1 across:996020k

ADDRCONF(NETDEV_UP): eth0: link is not ready

e100: eth0: e100_watchdog: link up, 100Mbps, half-duplex

ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

eth0: no IPv6 routers present 
```

```
# pccardctl insert

 # pccardctl ident

Socket 0:

  no product info available

# pccardctl info

PRODID_1=""

PRODID_2=""

PRODID_3=""

PRODID_4=""

MANFID=0000,0000

FUNCID=255

# cat /sys/class/pcmcia/pcmcia_socket/*/*

cat: /sys/class/pcmcia/pcmcia_socket/*/*: No such file or directory

 # cat /sys/bus/pcmcia/devices/*/*

cat: /sys/bus/pcmcia/devices/*/*: No such file or directory

    
```

And I have got these modules loaded:

```
lapcat turtle # lsmod

Module                  Size  Used by

ath_pci                86816  0

ath_rate_sample        16512  1 ath_pci

wlan                  175324  2 ath_pci,ath_rate_sample

ath_hal               193872  2 ath_pci,ath_rate_sample

yenta_socket           26892  2

rsrc_nonstatic         13952  1 yenta_socket

```

Addtionaly what is a Resource database? And how do I assemble one for a:

```
01:0b.0 CardBus bridge: Toshiba America Info Systems ToPIC100 PCI to Cardbus Bridge with ZV Support (rev 33)

        Subsystem: Toshiba America Info Systems Unknown device 0001

        Flags: bus master, slow devsel, latency 168, IRQ 16

        Memory at cff00000 (32-bit, non-prefetchable) [size=4K]

        Bus: primary=01, secondary=02, subordinate=02, sec-latency=0

        Memory window 0: 28000000-29fff000 (prefetchable)

        Memory window 1: 2c000000-2dfff000

        I/O window 0: 0000c000-0000c0ff

        I/O window 1: 0000c400-0000c4ff

        16-bit legacy interface ports at 0001

```

Thanks

----------

## sonicbhoc

did you emerge pcmcia-cs-cis? I think that's the resource database and it says its part of pcmciautils but don't quote me on it.

----------

## gniWkraD

Quick recap of my setup: My laptop (old acer travelmate 506t, kernel 2.6.19r5)has no ethernet so I'm using a usb 2.0 pcmcia card with a linksys usb200m 10/100 mbit ethernet usb adaptor.

I'm having similar problems with my PCMCIA socket 

#dmesg | grep Yenta

```
Yenta: CardBus bridge found at 0000:00:06.0 [1025:100b]

Yenta O2: res at 0x94/0xD4: 00/ea

Yenta O2: old bridge, disabling read prefetch/write burst

Yenta: ISA IRQ mask 0x0438, PCI irq 11

Socket status: 30000821

```

Since 2.6.12 i havnt been able to make the usb200m or any other usb device work on the usb 2.0 pcmcia card. When i plug in a usb device it is detected correctly , but as soon as i try to use it (mount a disk or configure the ethernet) stuff justs times out...

My pcmcia socket acording to lspvi -v

```
00:06.0 CardBus bridge: O2 Micro, Inc. OZ6812 CardBus Controller (rev 05)

        Subsystem: Acer Incorporated [ALI] Unknown device 100b

        Flags: bus master, stepping, slow devsel, latency 168, IRQ 11

        Memory at 14000000 (32-bit, non-prefetchable) [size=4K]

        Bus: primary=00, secondary=01, subordinate=04, sec-latency=176

        Memory window 0: 10000000-11fff000 (prefetchable)

        Memory window 1: 12000000-13fff000

        I/O window 0: 00001800-000018ff

        I/O window 1: 00001c00-00001cff

        16-bit legacy interface ports at 0001

```

Acording to http://kernel.org/pub/linux/utils/kernel/pcmcia/howto.html i need a resource database for devices with busnumbers starting with 00. So do i need the resourcedatabase for the O2 cardbus bridge because the device is on 00:06.0 ? 

I have emerged pcmciautils and pcmcia-cs-cis but to no avail... pcmcia-cs-cis doesnt seem to contain any database for the O2 cardbus bridge

The usb 2.0 pcmcia card acording to lspci -v

```
01:00.0 USB Controller: NEC Corporation USB (rev 41) (prog-if 10 [OHCI])

        Subsystem: D-Link System Inc Unknown device 0035

        Flags: bus master, medium devsel, latency 64, IRQ 11

        Memory at 12000000 (32-bit, non-prefetchable) [size=4K]

        Capabilities: [40] Power Management version 2

01:00.1 USB Controller: NEC Corporation USB (rev 41) (prog-if 10 [OHCI])

        Subsystem: D-Link System Inc Unknown device 0035

        Flags: bus master, medium devsel, latency 64, IRQ 11

        Memory at 12001000 (32-bit, non-prefetchable) [size=4K]

        Capabilities: [40] Power Management version 2

01:00.2 USB Controller: NEC Corporation USB 2.0 (rev 02) (prog-if 20 [EHCI])

        Subsystem: D-Link System Inc Unknown device f100

        Flags: bus master, medium devsel, latency 68, IRQ 11

        Memory at 12002000 (32-bit, non-prefetchable) [size=256]

        Capabilities: [40] Power Management version 2

```

I have usb ehci, ohci, pcmcia support compiled into the kernel along with the options to load userspace resourcedatabase...

Complete dmesg output:

```
Linux version 2.6.19-gentoo-r5 (root@bart) (gcc version 4.1.1 (Gentoo 4.1.1-r3)) #9 Sun Feb 18 14:26:27 CET 2007

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 0000000009ff0000 (usable)

 BIOS-e820: 0000000009ff0000 - 0000000009ff8000 (ACPI data)

 BIOS-e820: 0000000009ff8000 - 000000000a000000 (ACPI NVS)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

159MB LOWMEM available.

Entering add_active_range(0, 0, 40944) 0 entries of 256 used

Zone PFN ranges:

  DMA             0 ->     4096

  Normal       4096 ->    40944

early_node_map[1] active PFN ranges

    0:        0 ->    40944

On node 0 totalpages: 40944

  DMA zone: 32 pages used for memmap

  DMA zone: 0 pages reserved

  DMA zone: 4064 pages, LIFO batch:0

  Normal zone: 287 pages used for memmap

  Normal zone: 36561 pages, LIFO batch:7

DMI 2.1 present.

ACPI: RSDP (v000 Acer                                  ) @ 0x000fe030

ACPI: RSDT (v001 Acer   Falcon   0x00000001 Acer 0x00000000) @ 0x09ff0000

ACPI: FADT (v001 Acer   Falcon   0x00000001 Acer 0x00000000) @ 0x09ff0054

ACPI: BOOT (v001 Acer   Falcon   0x00000001 Acer 0x00000000) @ 0x09ff002c

ACPI: DSDT (v001   Acer   FALCON 0x00001000 MSFT 0x0100000c) @ 0x00000000

ACPI: PM-Timer IO Port: 0xf008

Allocating PCI resources starting at 10000000 (gap: 0a000000:f5ff0000)

Detected 433.252 MHz processor.

Built 1 zonelists.  Total pages: 40625

Kernel command line: gentoo=nodevfs root=/dev/hda3 vga=789

Enabling fast FPU save and restore... done.

Initializing CPU#0

PID hash table entries: 1024 (order: 10, 4096 bytes)

Console: colour dummy device 80x25

Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)

Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)

Memory: 157828k/163776k available (2694k kernel code, 5452k reserved, 889k data, 164k init, 0k highmem)

virtual kernel memory layout:

    fixmap  : 0xffff8000 - 0xfffff000   (  28 kB)

    vmalloc : 0xca800000 - 0xffff6000   ( 855 MB)

    lowmem  : 0xc0000000 - 0xc9ff0000   ( 159 MB)

      .init : 0xc0482000 - 0xc04ab000   ( 164 kB)

      .data : 0xc03a1806 - 0xc047ff0c   ( 889 kB)

      .text : 0xc0100000 - 0xc03a1806   (2694 kB)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay using timer specific routine.. 867.10 BogoMIPS (lpj=4335546)

Mount-cache hash table entries: 512

CPU: After generic identify, caps: 0183f9ff 00000000 00000000 00000000 00000000 00000000 00000000

CPU: L1 I cache: 16K, L1 D cache: 16K

CPU: L2 cache: 128K

CPU: After all inits, caps: 0183f9ff 00000000 00000000 00000040 00000000 00000000 00000000

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

Compat vDSO mapped to ffffe000.

CPU: Intel Celeron (Mendocino) stepping 0a

Checking 'hlt' instruction... OK.

ACPI: Core revision 20060707

ACPI: setting ELCR to 0200 (from 0c20)

NET: Registered protocol family 16

ACPI: bus type pci registered

PCI: PCI BIOS revision 2.10 entry at 0xf0200, last bus=0

PCI: Using configuration type 1

Setting up standard PCI resources

ACPI: Interpreter enabled

ACPI: Using PIC for interrupt routing

ACPI: PCI Interrupt Link [PILA] (IRQs 3 4 *5 6 7 9 10 11 12 14 15)

ACPI: PCI Interrupt Link [PILB] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)

ACPI: PCI Interrupt Link [PILC] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [PILD] (IRQs 3 4 5 6 7 9 *10 11 12 14 15)

ACPI: PCI Root Bridge [PCI0] (0000:00)

PCI: Probing PCI hardware (bus 00)

ACPI: Assume root bridge [\_SB_.PCI0] bus is 0

Boot video device is 0000:00:02.0

PCI quirk: region f000-f03f claimed by PIIX4 ACPI

PCI quirk: region f100-f10f claimed by PIIX4 SMB

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

Linux Plug and Play Support v0.97 (c) Adam Belay

pnp: PnP ACPI init

pnp: PnP ACPI: found 11 devices

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

PCI: Using ACPI for IRQ routing

PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report

pnp: 00:0a: ioport range 0xf000-0xf03f could not be reserved

pnp: 00:0a: ioport range 0xf100-0xf10f has been reserved

pnp: 00:0a: ioport range 0x4d0-0x4d1 has been reserved

PCI: Ignore bogus resource 6 [0:0] of 0000:00:02.0

PCI: Bus 1, cardbus bridge: 0000:00:06.0

  IO window: 00001800-000018ff

  IO window: 00001c00-00001cff

  PREFETCH window: 10000000-11ffffff

  MEM window: 12000000-13ffffff

ACPI: PCI Interrupt Link [PILB] enabled at IRQ 11

PCI: setting IRQ 11 as level-triggered

ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [PILB] -> GSI 11 (level, low) -> IRQ 11

NET: Registered protocol family 2

IP route cache hash table entries: 2048 (order: 1, 8192 bytes)

TCP established hash table entries: 8192 (order: 3, 32768 bytes)

TCP bind hash table entries: 4096 (order: 2, 16384 bytes)

TCP: Hash tables configured (established 8192 bind 4096)

TCP reno registered

Simple Boot Flag at 0x6e set to 0x80

audit: initializing netlink socket (disabled)

audit(1171805436.410:1): initialized

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

NTFS driver 2.1.27 [Flags: R/O].

io scheduler noop registered

io scheduler anticipatory registered

io scheduler deadline registered

io scheduler cfq registered (default)

lp: driver loaded but no devices found

Linux agpgart interface v0.101 (c) Dave Jones

[drm] Initialized drm 1.0.1 20051102

vesafb: framebuffer at 0xc000000, mapped to 0xca880000, using 1984k, total 1984k

vesafb: mode is 800x600x24, linelength=2400, pages=0

vesafb: protected mode interface info at c000:8e30

vesafb: pmi: set display start = c00c8e66, set palette = c00c8eb8

vesafb: scrolling: redraw

vesafb: Truecolor: size=0:8:8:8, shift=0:16:8:0

Console: switching to colour frame buffer device 100x37

fb0: VESA VGA frame buffer device

ACPI: AC Adapter [AC] (on-line)

ACPI: Battery Slot [BAT0] (battery absent)

ACPI: Power Button (FF) [PWRF]

ACPI: Sleep Button (CM) [SLPB]

ACPI: Lid Switch [LID]

ACPI: CPU0 (power states: C1[C1] C2[C2])

ACPI: Thermal Zone [THR2] (40 C)

Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled

serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

PCI: Enabling device 0000:00:00.2 (0000 -> 0001)

ACPI: PCI Interrupt 0000:00:00.2[B] -> Link [PILB] -> GSI 11 (level, low) -> IRQ 11

parport: PnPBIOS parport detected.

parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP]

lp0: using parport0 (interrupt-driven).

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

loop: loaded (max 8 devices)

nbd: registered device at major 43

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

PIIX4: IDE controller at PCI slot 0000:00:07.1

PIIX4: chipset revision 0

PIIX4: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0x8000-0x8007, BIOS settings: hda:DMA, hdb:pio

Probing IDE interface ide0...

hda: ST94011A, ATA DISK drive

hdb: CD-224E, ATAPI CD/DVD-ROM drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

Probing IDE interface ide1...

hda: max request size: 512KiB

hda: 78140160 sectors (40007 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(33)

hda: cache flushes supported

 hda: hda1 hda2 hda3

hdb: ATAPI 24X CD-ROM drive, 128kB Cache, DMA

Uniform CD-ROM driver Revision: 3.20

Yenta: CardBus bridge found at 0000:00:06.0 [1025:100b]

Yenta O2: res at 0x94/0xD4: 00/ea

Yenta O2: old bridge, disabling read prefetch/write burst

Yenta: ISA IRQ mask 0x0438, PCI irq 11

Socket status: 30000821

ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

USB Universal Host Controller Interface driver v3.0

ACPI: PCI Interrupt Link [PILD] enabled at IRQ 10

PCI: setting IRQ 10 as level-triggered

ACPI: PCI Interrupt 0000:00:07.2[D] -> Link [PILD] -> GSI 10 (level, low) -> IRQ 10

uhci_hcd 0000:00:07.2: UHCI Host Controller

uhci_hcd 0000:00:07.2: new USB bus registered, assigned bus number 1

uhci_hcd 0000:00:07.2: irq 10, io base 0x00007cc0

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 2 ports detected

usbcore: registered new interface driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

usbcore: registered new interface driver usbhid

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

usbcore: registered new interface driver asix

usbcore: registered new interface driver cdc_ether

usbcore: registered new interface driver net1080

usbcore: registered new interface driver zaurus

PNP: PS/2 Controller [PNP0303:KBC0,PNP0f13:PS2M] at 0x60,0x64 irq 1,12

serio: i8042 KBD port at 0x60,0x64 irq 1

serio: i8042 AUX port at 0x60,0x64 irq 12

mice: PS/2 mouse device common for all mice

Advanced Linux Sound Architecture Driver Version 1.0.13 (Tue Nov 28 14:07:24 2006 UTC).

PCI: Enabling device 0000:00:00.1 (0000 -> 0001)

ACPI: PCI Interrupt 0000:00:00.1[B] -> Link [PILB] -> GSI 11 (level, low) -> IRQ 11

PCI: Setting latency timer of device 0000:00:00.1 to 64

input: AT Translated Set 2 keyboard as /class/input/input0

pccard: CardBus card inserted into slot 0

PCI: Enabling device 0000:01:00.0 (0000 -> 0002)

ACPI: PCI Interrupt 0000:01:00.0[A] -> Link [PILB] -> GSI 11 (level, low) -> IRQ 11

PCI: Setting latency timer of device 0000:01:00.0 to 64

ohci_hcd 0000:01:00.0: OHCI Host Controller

ohci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2

ohci_hcd 0000:01:00.0: irq 11, io mem 0x12000000

usb usb2: configuration #1 chosen from 1 choice

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 3 ports detected

intel8x0_measure_ac97_clock: measured 60001 usecs

intel8x0: measured clock 86265 rejected

intel8x0: clocking to 48000

ALSA device list:

  #0: Intel 440MX with CS4299 at 0x1000, irq 11

oprofile: using timer interrupt.

ip_conntrack version 2.4 (1279 buckets, 10232 max) - 176 bytes per conntrack

Synaptics Touchpad, model: 1, fw: 5.0, id: 0x8f40b1, caps: 0x804713/0x0

input: SynPS/2 Synaptics TouchPad as /class/input/input1

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

Using IPI Shortcut mode

ACPI: (supports S0 S1 S4 S5)

Time: tsc clocksource has been installed.

Time: acpi_pm clocksource has been installed.

PCI: Enabling device 0000:01:00.1 (0000 -> 0002)

ACPI: PCI Interrupt 0000:01:00.1[B] -> Link [PILB] -> GSI 11 (level, low) -> IRQ 11

PCI: Setting latency timer of device 0000:01:00.1 to 64

ohci_hcd 0000:01:00.1: OHCI Host Controller

ohci_hcd 0000:01:00.1: new USB bus registered, assigned bus number 3

ohci_hcd 0000:01:00.1: irq 11, io mem 0x12001000

usb usb3: configuration #1 chosen from 1 choice

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 2 ports detected

PCI: Enabling device 0000:01:00.2 (0000 -> 0002)

ACPI: PCI Interrupt 0000:01:00.2[C] -> Link [PILB] -> GSI 11 (level, low) -> IRQ 11

ehci_hcd 0000:01:00.2: EHCI Host Controller

ehci_hcd 0000:01:00.2: new USB bus registered, assigned bus number 4

ehci_hcd 0000:01:00.2: irq 11, io mem 0x12002000

ehci_hcd 0000:01:00.2: USB 2.0 started, EHCI 0.95, driver 10 Dec 2004

usb usb4: configuration #1 chosen from 1 choice

hub 4-0:1.0: USB hub found

hub 4-0:1.0: 5 ports detected

ReiserFS: hda3: found reiserfs format "3.6" with standard journal

ReiserFS: hda3: using ordered data mode

ReiserFS: hda3: journal params: device hda3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: hda3: checking transaction log (hda3)

ReiserFS: hda3: Using r5 hash to sort names

VFS: Mounted root (reiserfs filesystem) readonly.

Freeing unused kernel memory: 164k freed

usb 4-2: new high speed USB device using ehci_hcd and address 2

usb 4-2: configuration #1 chosen from 1 choice

hub 4-2:1.0: USB hub found

hub 4-2:1.0: 4 ports detected

usb 4-2.4: new high speed USB device using ehci_hcd and address 3

usb 4-2.4: configuration #1 chosen from 1 choice

eth0: register 'asix' at usb-0000:01:00.2-2.4, ASIX AX8817x USB 2.0 Ethernet, 00:10:60:24:e6:fc

cs: IO port probe 0x100-0x3af: clean.

cs: IO port probe 0x3e0-0x4ff: clean.

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

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

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

Adding 506036k swap on /dev/hda2.  Priority:-1 extents:1 across:506036k

eth0: link up, 100Mbps, full-duplex, lpa 0x41E1

eth0: link up, 100Mbps, full-duplex, lpa 0x41E1

```

Last edited by gniWkraD on Mon Feb 19, 2007 11:12 pm; edited 1 time in total

----------

## gniWkraD

Ok I finally tracked down the error  :Smile: 

in drivers/pcmcia/o2micro.h comment out the line for the O2 6812 bridge chip

```
static int o2micro_override(struct yenta_socket *socket)

{

        /*

         * 'reserved' register at 0x94/D4. allows setting read prefetch and write

         * bursting. read prefetching for example makes the RME Hammerfall DSP

         * working. for some bridges it is at 0x94, for others at 0xD4. it's

         * ok to write to both registers on all O2 bridges.

         * from Eric Still, 02Micro.

         */

        u8 a, b;

        if (PCI_FUNC(socket->dev->devfn) == 0) {

                a = config_readb(socket, O2_RESERVED1);

                b = config_readb(socket, O2_RESERVED2);

                printk(KERN_INFO "Yenta O2: res at 0x94/0xD4: %02x/%02x\n", a, b);

                switch (socket->dev->device) {

                /*

                 * older bridges have problems with both read prefetch and write

                 * bursting depending on the combination of the chipset, bridge

                 * and the cardbus card. so disable them to be on the safe side.

                 */

                case PCI_DEVICE_ID_O2_6729:

                case PCI_DEVICE_ID_O2_6730:

                /*case PCI_DEVICE_ID_O2_6812:*/  /* breaks the yenta_socket on Acer travelmate 505 series */

                case PCI_DEVICE_ID_O2_6832:

                case PCI_DEVICE_ID_O2_6836:

                        printk(KERN_INFO "Yenta O2: old bridge, disabling read prefetch/write burst\n");

                        config_writeb(socket, O2_RESERVED1,

                                      a & ~(O2_RES_READ_PREFETCH | O2_RES_WRITE_BURST));

                        config_writeb(socket, O2_RESERVED2,

                                      b & ~(O2_RES_READ_PREFETCH | O2_RES_WRITE_BURST));

                        break;

                default:

                        printk(KERN_INFO "Yenta O2: enabling read prefetch/write burst\n");

                        config_writeb(socket, O2_RESERVED1,

                                      a | O2_RES_READ_PREFETCH | O2_RES_WRITE_BURST);

                        config_writeb(socket, O2_RESERVED2,

                                      b | O2_RES_READ_PREFETCH | O2_RES_WRITE_BURST);

                }

        }

        return 0;

}
```

Everything PCMCIA works again now for me now!

----------

## Yamakuzure

Weird issue:

When I boot from Gentoo Install CD, it loads these modules:

pcmcia_core

pcmcia

yenta_socket

rsrc_nonstatic

8139too

networking works fine.

When I boot from HD, I have set up the machine with pcmciautils loading exactly these modules (kernel 2.6.19-r5, modular) but can't get networking up. No eth0.

What unnerves me is, that "pccardctl status" shows, that a 32bit cardbus card sits in slot 0, and "lspci" correctly identifies it as my "D-Link DFE 690 tXD" card with completely correct Info.

I am puzzled. But could it be, that the gentoo CD loads a completely different version of "/etc/pcmcia/config.opts"?

Edit: Just compiled the drivers into the kernel to have a Yenta dmesg output. "demesg | grep -i yenta" shows no errors, and nothing changed. No eth0.

Maybe the Gentoo CD has a more complete list of .cis files in it's /lib/firmware/ ? I'll check this when I am at home tonight.

edit2: @turtles, I will do this tonight, when I am back at home.

One thing I can answer now: I haven't got any error messages while compiling

----------

## turtles

Can you run this script and post the output:

```
#/bin/bash

echo "list everything we know about this card"

pccardctl status

pccardctl ls

pccardctl info

pccardctl ident

echo "dmesg:"

dmesg | grep pci

dmesg | grep pcmcia && dmesg | grep Yenta

echo "memory from /etc/pcmcia/config.opts"

less /etc/pcmcia/config.opts | grep memory

echo "lspci":

lspci | grep CardBus

lspci -v | grep subordinate

```

Do you get errors or warnings when compiling pcmciautils, pcmcia-cs-cis or pcmcia-cs-pnptools?

----------

## Yamakuzure

Here is the output of your script: (Two versions)

The first one is after booting from gentoo minimum install cd (i686, 2006.1), where eth0 is available and working fine

```
list everything we know about this card

Socket 0:

  3.3V 32-bit PC Card

Socket 1:

  no card

Socket 0 Bridge:      [yenta_cardbus]    (bus ID: 0000:00:03.0)

  CardBus card -- see "lspci" for more information

Socket 1 Bridge:      [yenta_cardbus]    (bus ID: 0000:00:03.1)

PRODID_1=""

PRODID_2=""

PRODID_3=""

PRODID_4=""

MANFID=0000,0000

FUNCID=255

PRODID_1=""

PRODID_2=""

PRODID_3=""

PRODID_4=""

MANFID=0000,0000

FUNCID=255

Socket 0:

  no product info available

Socket 1:

  no product info available

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

dmesg:

Allocating PCI resources starting at 20000000 (gap: 10100000:efd00000)

ACPI: bus type pci registered

PCI: PCI BIOS revision 2.10 entry at 0xfc13e, last bus=1

Setting up standard PCI resources

ACPI: PCI Root Bridge [PCI0] (0000:00)

PCI: Probing PCI hardware (bus 00)

ACPI: Assume root bridge [\_SB_.PCI0] bus is 0

PCI quirk: region 0800-083f claimed by PIIX4 ACPI

PCI quirk: region 0840-084f claimed by PIIX4 SMB

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Link [LNKA] (IRQs 9 10 *11)

ACPI: PCI Interrupt Link [LNKB] (IRQs *5 7)

ACPI: PCI Interrupt Link [LNKC] (IRQs 9 10 11) *0, disabled.

ACPI: PCI Interrupt Link [LNKD] (IRQs 5 7 9 10 *11)

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGP_._PRT]

PCI: Using ACPI for IRQ routing

PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report

PCI: Bridge: 0000:00:01.0

PCI: Bus 2, cardbus bridge: 0000:00:03.0

PCI: Bus 6, cardbus bridge: 0000:00:03.1

PCI: Enabling device 0000:00:03.0 (0000 -> 0003)

ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11

PCI: setting IRQ 11 as level-triggered

ACPI: PCI Interrupt 0000:00:03.0[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

PCI: Enabling device 0000:00:03.1 (0000 -> 0003)

ACPI: PCI Interrupt 0000:00:03.1[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

Limiting direct PCI/PCI transfers.

PIIX4: IDE controller at PCI slot 0000:00:07.1

ACPI: PCI Interrupt 0000:00:07.2[D] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

ACPI: PCI Interrupt 0000:00:03.0[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

Yenta: Using CSCINT to route CSC interrupts to PCI

Yenta: Routing CardBus interrupts to PCI

Yenta: ISA IRQ mask 0x04f8, PCI irq 11

ACPI: PCI Interrupt 0000:00:03.1[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

Yenta: Using CSCINT to route CSC interrupts to PCI

Yenta: Routing CardBus interrupts to PCI

Yenta: ISA IRQ mask 0x04f8, PCI irq 11

Intel ISA PCIC probe: not found.

PCI: Enabling device 0000:02:00.0 (0000 -> 0003)

ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

PCI: Setting latency timer of device 0000:02:00.0 to 64

ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

Kernel command line: root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/image.squashfs cdroot initrd=gentoo.igz vga=791 splash=silent,theme:livecd-2006.1 CONSOLE=/dev/tty1 quiet BOOT_IMAGE=gentoo dopcmcia nodhcp acpi=on vga=0x318

pcmcia: Detected deprecated PCMCIA ioctl usage from process: cardmgr.

pcmcia: This interface will soon be removed from the kernel; please expect breakage unless you upgrade to new tools.

pcmcia: see http://www.kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html for details.

Yenta: CardBus bridge found at 0000:00:03.0 [1028:00b1]

Yenta: Using CSCINT to route CSC interrupts to PCI

Yenta: Routing CardBus interrupts to PCI

Yenta TI: socket 0000:00:03.0, mfunc 0x01261222, devctl 0x64

Yenta: ISA IRQ mask 0x04f8, PCI irq 11

Yenta: CardBus bridge found at 0000:00:03.1 [1028:00b1]

Yenta: Using CSCINT to route CSC interrupts to PCI

Yenta: Routing CardBus interrupts to PCI

Yenta TI: socket 0000:00:03.1, mfunc 0x01261222, devctl 0x64

Yenta: ISA IRQ mask 0x04f8, PCI irq 11

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

memory from /etc/pcmcia/config.opts

include memory 0xc0000-0xfffff

include memory 0xa0000000-0xa0ffffff

include memory 0x60000000-0x60ffffff

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

lspci:

00:03.0 CardBus bridge: Texas Instruments PCI1420

00:03.1 CardBus bridge: Texas Instruments PCI1420

02:00.0 Ethernet controller: D-Link System Inc DFE-690TXD CardBus PC Card (rev 10)

   Bus: primary=00, secondary=01, subordinate=01, sec-latency=32

   Bus: primary=00, secondary=02, subordinate=05, sec-latency=176

   Bus: primary=00, secondary=06, subordinate=09, sec-latency=176

--------------------------------------------------
```

The second one is from my installation, booted normally from HD

```
list everything we know about this card

Socket 0:

  3.3V 32-bit PC Card

Socket 1:

  no card

Socket 0 Bridge:      [yenta_cardbus]    (bus ID: 0000:00:03.0)

  CardBus card -- see "lspci" for more information

Socket 1 Bridge:      [yenta_cardbus]    (bus ID: 0000:00:03.1)

PRODID_1=""

PRODID_2=""

PRODID_3=""

PRODID_4=""

MANFID=0000,0000

FUNCID=255

PRODID_1=""

PRODID_2=""

PRODID_3=""

PRODID_4=""

MANFID=0000,0000

FUNCID=255

Socket 0:

  no product info available

Socket 1:

  no product info available

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

dmesg:

ACPI: bus type pci registered

PCI: PCI BIOS revision 2.10 entry at 0xfc13e, last bus=1

PCI: Using configuration type 1

Setting up standard PCI resources

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

ACPI: PCI Root Bridge [PCI0] (0000:00)

PCI: Probing PCI hardware (bus 00)

ACPI: Assume root bridge [\_SB_.PCI0] bus is 0

PCI quirk: region 0800-083f claimed by PIIX4 ACPI

PCI quirk: region 0840-084f claimed by PIIX4 SMB

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Link [LNKA] (IRQs 9 10 *11)

ACPI: PCI Interrupt Link [LNKB] (IRQs *5 7)

ACPI: PCI Interrupt Link [LNKC] (IRQs 9 10 11) *0, disabled.

ACPI: PCI Interrupt Link [LNKD] (IRQs 5 7 9 10 *11)

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGP_._PRT]

PCI: Using ACPI for IRQ routing

PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report

PCI: Bridge: 0000:00:01.0

PCI: Bus 2, cardbus bridge: 0000:00:03.0

PCI: Bus 6, cardbus bridge: 0000:00:03.1

PCI: Enabling device 0000:00:03.0 (0000 -> 0003)

ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11

PCI: setting IRQ 11 as level-triggered

ACPI: PCI Interrupt 0000:00:03.0[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

PCI: Enabling device 0000:00:03.1 (0000 -> 0003)

ACPI: PCI Interrupt 0000:00:03.1[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

Limiting direct PCI/PCI transfers.

pci_hotplug: PCI Hot Plug PCI Core version: 0.5

ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11

ACPI: PCI Interrupt 0000:01:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11

PIIX4: IDE controller at PCI slot 0000:00:07.1

Yenta: Using CSCINT to route CSC interrupts to PCI

Yenta: Routing CardBus interrupts to PCI

Yenta: ISA IRQ mask 0x04b8, PCI irq 11

Yenta: Using CSCINT to route CSC interrupts to PCI

Yenta: Routing CardBus interrupts to PCI

Yenta: ISA IRQ mask 0x04b8, PCI irq 11

Intel ISA PCIC probe: not found.

ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

ACPI: PCI Interrupt 0000:00:07.2[D] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

PCI: Enabling device 0000:02:00.0 (0000 -> 0003)

ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11

PCI: Setting latency timer of device 0000:02:00.0 to 64

ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 5

PCI: setting IRQ 5 as level-triggered

ACPI: PCI Interrupt 0000:00:08.0[A] -> Link [LNKB] -> GSI 5 (level, low) -> IRQ 5

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

memory from /etc/pcmcia/config.opts

include memory 0xc0000-0xfffff

include memory 0xa0000000-0xa0ffffff

include memory 0x60000000-0x60ffffff

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

lspci:

00:03.0 CardBus bridge: Texas Instruments PCI1420

00:03.1 CardBus bridge: Texas Instruments PCI1420

02:00.0 Ethernet controller: D-Link System Inc DFE-690TXD CardBus PC Card (rev 10)

   Bus: primary=00, secondary=01, subordinate=01, sec-latency=32

   Bus: primary=00, secondary=02, subordinate=05, sec-latency=176

   Bus: primary=00, secondary=06, subordinate=09, sec-latency=176

--------------------------------------------------
```

The CD uses colplug and pcmcia-cs, I am using udevd and pcmciautils...

----------

## Yamakuzure

A little update:

I have compiled alot more modules for networking (LAN and WLAN) and have plugged in my WLAN-card as well. (For letting udev sort that out)

Now lspci shows both of them right. In dmesg I can see, that both are identified right. (8139too and rt2500)

Even "pccardctl status" correctly shows that both ports are used by 32bit cardbus cards.

But nevertheless ifconfig does only show "lo", nothing else.

I will try out what "cat /proc/net/dev" and "iwconfig" will list later and come back here.

Oh! One question: with pcmcia-cs cardmanager ("/etc/init.d/pcmcia") the bus and the cards get activated. With pcmciautils udev should do the activation, right?

----------

## sonicbhoc

I can't remember if it's the kernel or udev that does the activation.

It works just fine for me, but I cheated and used PCLinuxOS to test it.   :Laughing: 

----------

## turtles

 *Yamakuzure wrote:*   

> 
> 
> Oh! One question: with pcmcia-cs cardmanager ("/etc/init.d/pcmcia") the bus and the cards get activated. With pcmciautils Udev should do the activation, right?

 

I would like a clear answer on this one too. What I am guessing is that if you compile in PCMCIA  support and Yenta they are active in the kernel from the start. I am starting to think that this might be the best way to handle PCMCIA cardbus for primary internet connection. For instance if you need your PCMCIA  wireless card for internet access. If you use it once in awile modular pcmcia support i am guessing would be then activated by udev.

Let me add this is totally a guess.

Glad the cards are showing up in lspci.

----------

## swimmer

When I emerged pcmciautils today (after unmerging pcmcia-cs) I got this message at the end of the emerge process:

```
If you relied on pcmcia-cs to automatically load the appropriate PCMCIA-related modules upon boot, you need to add 'pcmcia' and the PCMCIA socket driver you need for this system (yenta-socket, i82092, i82365, ...) to /etc/modules.autoload.d/kernel-2.6
```

Did that and everything worked just fine from the beginning ...  :Smile: 

HTH

swimmer

PS: *Before* I unmerged pcmcia-cs I stopped the service and removed it from the default run-level ... all config/init-files in /etc/* got cleaned thoroughly ...

----------

## Yamakuzure

You only need to add the modules to autostart when neither coldplug nor udev are running. udev loads all modules neccessary automatically.

But I have something good to report (and something not so good)

The good one first: My Network works now.

The bad one: I can't tell you in detail why, because I changed alot without taking notes. (my fault, I know)

But I start some guessing:I reactivated ioctl and activated all other cardbridge drivers, everyone compiled into the kernel.

I think these ones does nothing but produce a larger kernel, but I still have to test what happens when I use a kernel without ioctl and activate only yenta_socket (the one that is used).I had activated PCI hotplug, but did not activate a driver as I do not have a PCI HotPlug System.

But I activated ACPI Hotplug Driver, and compiled all ACPI Modules into the kernel instead of compiling them as modules.

This one seems to be a bit closer to the solution, as dmesg now shows a difference: (I will copy that down tonight, but from memory I can tell you, that now there are three lines telling me, that cardbus gets initialized, then activated by ACPI and then the driver for the chipset (8139too) gets activated. Before these changes, I only got the third line in dmesg.)After installing the new kernel, but before a reboot, I reemerged "baselayout", "sysfsutils", "pcmcia-cs-cis", "pcmcia-cs-pnptools", "pcmciautils" and "pcmcia", did an etc-update and a modules-update. The last one really showed some activity for the first time in a week!

This step *could* have been a step to the solution, as modules.conf and modules.dep got rebuilt.Finally after all these steps "cat /proc/net/dev" suddenly showed up the card as beein (?) eth1. Before these steps it only showed "lo" and "dummy0".I guess the card is shown as eth1, because I reswapped it to Slot 1 to insert my WLAN-Card in Slot0. (The WLAN card doesn't show up, but I bet this is because I can't find rt2500 drivers in the kernel. It is external from some wlan-package, right?

I know these informations are everything but complete. I will do some testing tonight with different kernel options.

...but I bet it was compiling ACPI-HotPlug, PCMCIA and Yenta into the kernel with a re-emerge of the pcmcia system and the modules-update...

----------

## Yamakuzure

Sorry for the late answer, I managed to completely drench my notebook battery on friday.  :Sad:  (Even in S3 9 hours are too much ... forgot to shut down properly   :Rolling Eyes:  )

Okay, I disabled ioctl again and threw out the not-in-use Bridge-Drivers. Yenta_Socket kept of course, and everything kept working fine.

(WLAN is working too now. RaLink is fantastic!)

Then I tested what happens when I disable PCI Hotplug support, and this is it. When I rebooted without PCI-Hotplug support, my cards were gone again from /proc/net/dev

I do not understand why PCI-Hotplug is needed for PCMCIA, but then this could be something special with my Dell Latitude C600.

----------

## turtles

Thanks for keeping us up to date.

I will try this as well and see if it helps my problem.

I had pci hotplug enabled with fake hot plug driver and acpi hot plug driver.

I Dont know why.

I will re compile kernel with out those and just pci hot plug.

Also that is quite the list to re emerge after a kernel recompile I will add that to my script.

```
cd /usr/src/linux

[[ -e .config ]] || cp /boot/config .config

# From http://www.gentoo.org/doc/en/kernel-upgrade.xml

make clean && make && make modules_install

if [[ $? != 0 ]] ; then

    echo "Kernel compilation failed."

    exit 1

fi

[[ -e /boot/kernel ]] && cp -p /boot/kernel /boot/kernel-prev

cp arch/i386/boot/bzImage /boot/kernel

[[ -e /boot/System.map ]] && cp -p /boot/System.map /boot/System.map-prev

cp System.map /boot/System.map

[[ -e /boot/config ]] && cp -p /boot/config /boot/config-prev

cp .config /boot/config

module-rebuild rebuild

emerge -1 baselayout sysfsutils pcmcia-cs-cis pcmcia pcmcia-cs-pnptools pcmciautils pcmcia

```

----------

## turtles

Did not help my situation.

----------

## Yamakuzure

After I compiled in PCI Hotplug with ACPI-Hotplug driver, my network cards still did *not* show up in ifconfig. But they do show up in 

```
cat /proc/net/dev
```

and can be configured.

----------

