# pci_get_subsys() called while pci_devices is still [solved]

## turtles

Updated this post June 2nd 2007. 

The problem was a micro spring clip must have sprung out of the CD/DVD and wedged itself between 4 pins of the PCMCIA slot. 

If you are experiencing a similar problem check your hardware and connections.

Things to remember when troubleshooting PCMCIA card slots:

lspci or lshw will display pcmcia cards. Weather or not you have the correct driver for the cards installed. I have attempted 2 different wireless drivers and cards. If it does not check your IRQ. 

In kinfo center > pcmcia  says "no PCMCIA resource detected". 

Here is a little script that I wrote & have been using to trouble shoot PCMCIA:

```
#a PCMCIA-tool by turtle

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 "/etc/pcmcia/config.opts"

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

echo "lspci":

lspci | grep CardBus

lspci -v | grep subordinate

```

 Here is an example of a dected card:

```

02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88w8335 [Libertas] 802.11 b/g Wireless (rev 03)
```

A non dected card:

```

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

```

Things to do:

 Check your kernel config. Paul has kindly walked me through the kernel recompiling thank you very much.

FYI If your pcmcia card does not show up in lspci then your pcmciautils is not working correctly. If you can see your card in lspci but it does not work then you have a driver issue.

Remove pcmcia-cs and replace with pcmciautils.

There is no difference between compiling in your pcmcia support or loading modules. As long as you are 100% shure what you need. Although udev will try to load the modules for the card when it is inserted.

 by selecting 

```
 <*> PCCard (PCMCIA/CardBus) support                                                 

  │ │              [ *]   Enable PCCARD debugging                                                       

  │ │              <M>   16-bit PCMCIA support                                                         

  │ │              [M]     Load CIS updates from userspace (EXPERIMENTAL)                             

  │ │              [* ]     PCMCIA control ioctl (obsolete)                                             

  │ │              ---   32-bit CardBus support                                                        

  │ │              ---   PC-card bridges                                                               

  │ │              <M>   CardBus yenta-compatible bridge support                                       

  │ │              <M >   Cirrus PD6729 compatible bridge support                                       

  │ │              < M>   i82092 compatible bridge support                                             

```

 Note I have toggeled many times between * and M for most options with no difference.

 

```
emerge pcmcia
```

 emerges 2 packages sys-apps/pcmciautils-014-r1 virtual/pcmcia-2.6.13 

Emerge complains about 

```
src/read-cis.c:62: warning: dereferencing type-punned pointer will break strict-aliasing rules, this is appears to be normal output.

```

 and 

```
 <stdout>: In function 'yy_get_next_buffer':

<stdout>:1099: warning: comparison between signed and unsigned

src/lex_config.l: In function 'get_glob':

src/lex_config.l:131: warning: comparison between signed and unsigned

src/lex_config.l: In function 'parse_configfile':

src/lex_config.l:217: warning: implicit declaration of function 'yyparse'

src/lex_config.l: At top level:

<stdout>:1191: warning: 'yyunput' defined but not used

```

 then emerge says  *Quote:*   

> * QA Notice: Package has poor programming practices which may compile
> 
>  *            fine but exhibit random runtime failures.
> 
> 

 wile emerging.

dmesg from I believe a bad hrdware connection 

```
pci_get_subsys() called while pci_devices is still empty
```

I am using a Toshiba Satellite A45-S120 Laptop.

My emerge info is here

My dmesg is here

MY kernel config is here

NOTE my first post about this is here it was more of a general question.

These may not be up to the minute accurate.

Reading list: http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html  http://kernel.org/pub/linux/utils/kernel/pcmcia/howto.html

handbook on wireless.   kernel configuring in handbook . madwifi-ng's gentoo docs  (for other card).  Posts on wireless netwoking how two part two. madwifi troubbleshoot post (other card).this script but what to do with it? The Wireless_Configuration_and_Startup gento wiki . 

pcmcia-cs is apparently no longer being used  yet is referenced in the handbook, the gentoo wiki.  There is a bug for this issue

 Interesting Ubuntu post on changing /etc/pcmcia/config.opts. http://bugzilla.kernel.org/show_bug.cgi?id=7304              

Here is my  kernel config

 it has everything compiled in not as modules.

Here is my emerge info

Here is my dmesg

Thank you to all that have helped!

----------

## cokey

can you explain your problem more clearly please. It did work and now it doesn't? Does it work on the livecd?

----------

## bjlockie

Is it a PCI card or built onto the motherboard?

If it is a card, try reseating it.

If it is on the motherboard and you have Windows, is it detected there?

Try another distros Live CD.

What does

```

dmesg

```

say?

----------

## turtles

OK thaks for the replys!

TO Date I have

 I installed gentoo form live cd using GUI on a Toshiba satellite A45-S120 the wireless is not built in.

NOTE: I have done a few stage 3's in past.

 NOTE: I am not very experienced with genkernel and somthing complained about not being able to find a kernel config. I copyed the one over from the live cd again as per the advice from my post here.

The Wireless is a Airlink card "AWLC3026" listed in the first lspci above with the marvell chip set. 

I was following ndiswrapper instructions.

 As per the instructions I tryed to recompile the kernel and modules several times and don't seem able to do it. I was NOT trying to use genkernel since I am more used to the manual way I thought.

After a few atempts at recompiling kernel / modules lspci no longer showes card.

NOTE: The card has no led's on it.

 After much reading I am thinking that the kernel was OK since ndiswrapper was showing "hardware found" at one point, and I just needed to find the right windows driver (I had tryed a several) and that it is a bug in the documentation sugesting to recompile a default kernel from the live cd  Now however I do not know what unsuccessfully recompiling the kernel and updating world / system 100's of times did but I cannot find the card?

My emerge info is here

My dmesg is here

Any tips would be great![/list]

----------

## cokey

try going through this http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup

If it doesn't work come back for more help

----------

## turtles

Thanks I had followed that doc.

It is interesting to see it says  *Quote:*   

> >=sys-apps/baselayout-1.11.0 now has wireless support, so the only thing you need to install is wireless-tools.

 

So kernel recompiling should not be necessary?

 *Quote:*   

> "iwconfig" at the command prompt and it will tell you which
> 
> # interfaces are wireless.

 

```
# iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

```

My system no longer see's my card

So I dont know what to do.

It is a laptop so it has a eth0 I assume it will be wan0 when it works?

I could to a config file for wan0?

----------

## PaulBredbury

 *turtles wrote:*   

> My system no longer sees my card

 

Has this coincided with upgrading to udev-103?

I'm having some success by just blaming udev for every problem, recently  :Smile: 

----------

## turtles

```
*  sys-fs/udev

      Latest version available: 103

      Latest version installed: 103

      Size of downloaded files: 586 kB

```

My problem hapened after I unsuccessfuly tried to update my kernel. I am still trying to update the kernel.

 However I am not shure what I am doing wrong.

Now the gentoo-sources, udev, kde lots of things changed when I updated world so i changed the kernel symlink and followed the kernel update guide. 

Now I just get kernel panic root hda (0,0) not found or somthing like that.

I have no way to log that scrooling output of the unsuccessful boot process that I know of.

I also have lots of module load errors when my working kernel boots.

I think all these problems are from me not understanding somthing about the recompiling a kernel. There is no guide to simply recompiling a kernel either, I mistook the upgrade a kernel for a recompile guide. I think not upgrading but recompiling would be the best choice for wireless functionality.

----------

## cokey

 *turtles wrote:*   

> 
> 
> ```
> *  sys-fs/udev
> 
> ...

 Well the kernel panic is because it is not finding your kernel after updating it. You have configured grub.conf wrong. Post /boot/grub/grub.conf and tell us you hard drive layout

----------

## turtles

I suspected that too but I have not changed it on all privious 7 trys other than the name of the kernel.

I really appriciate you sticking with this thread! 

```
efault 0

timeout 10

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux

root (hd0,0)

kernel /kernel-genkernel-x86-2.6.17-gentoo-r7 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3

initrd /initramfs-genkernel-x86-2.6.17-gentoo-r7

title=Gentoo Linux 8th try

root (hd0,0)

kernel /kernel-2.6.18-gentoo-8thtry-r3    root=/dev/hda3 init=/bin/bb panic=5

```

```
GNU nano 1.3.12                         File: /etc/fstab

/dev/hda1        /boot   ext2    defaults                1 2

/dev/hda2        none            swap            sw              0 0

/dev/hda3        /       ext3    defaults                0 1

none        /proc     proc    defaults          0 0

none        /dev/shm  tmpfs   defaults          0 0

```

Also don't forget those links in my above post to my emerge info and dmesg. That dmesg is way too long to post here and I highlited things that looked funny.

Note also that it is a  pcmcia card info posted above also. It is a netgear FM114P wireless router but I would like to be able to log on to any public wireless. If you can recomend another card that runs nativly in linux I will get it off ebay.

Note that I REALLY appreciate the help.

----------

## turtles

Well if anyone elce is having a similar problem part of it was 

```
init=/bin/bb 
```

 was not supposed to be in grub.conf unless you want a rescue shell.

however my wireless still does not work and my kernel still does not boot.

----------

## turtles

Any recomendations here? I still have the same problem. The wireless card is not dectected anymore.

----------

## turtles

I tested the card on a windows computer and it is dectected.

----------

## turtles

```
ACPI: PCI Interrupt 0000:01:0b.0[A] -> GSI 18 (level, low) -> IRQ 16

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

Yenta: ISA IRQ mask 0x0cb8, PCI irq 16

Socket status: 30000020

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

cs: IO port probe 0xc000-0xcfff: clean.

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

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

pccard: CardBus card inserted into slot 0

pnp: Device 00:09 activated.

parport: PnPBIOS parport detected.

pnp: Device 00:09 disabled.

EXT3 FS on hda3, internal journal

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

Real Time Clock Driver v1.12ac

input: PC Speaker as /class/input/input3

[drm] Initialized drm 1.0.1 20051102

ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 16 (level, low) -> IRQ 19

[drm] Initialized i915 1.4.0 20060119 on minor 0

PCI: Enabling device 0000:00:02.1 (0000 -> 0002)

[drm] Initialized i915 1.4.0 20060119 on minor 1

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

e100: eth0: e100_watchdog: link down

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

pccard: card ejected from slot 0

pccard: CardBus card inserted into slot 0

```

Some lspci

```

lapcat / # lspci

00:00.0 Host bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)

00:00.1 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)

00:00.3 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)

00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)

00:02.1 Display controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)

00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 03)

00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 03)

00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 83)

00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03)

00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 03)

00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)

00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03)

00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03)

01:08.0 Ethernet controller: Intel Corporation 82801DB PRO/100 VE (MOB) Ethernet Controller (rev 83)

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

```

[/code]

----------

## turtles

One interisting thing is that it seems you have to recompile ndiswrapper everytime you recompile a kernel. I assume this is just 

```
emerge ndiswrapper
```

Well still no hardware dected 

```
lapcat turtle # ndiswrapper -l

installed drivers:

modules.ndiswrapper     invalid driver!

mrv8000c                driver installed

```

----------

## PaulBredbury

```
emerge ndiswrapper
```

Yeah, that's fine. It's necessary because it's a kernel module, and thus tied to the particular kernel.

 *Quote:*   

> modules.ndiswrapper     invalid driver!

 

Dunno how important that error message is, but I'd fix it. First of all, find the file - I expect it's somewhere in /etc:

```
find /etc -name modules.ndiswrapper
```

----------

## turtles

 *Quote:*   

> Yeah, that's fine. It's necessary because it's a kernel module, and thus tied to the particular kernel. 

 

 I now have 2 kernels 1 that does not work and one which I made using the GUI installer. I am using the one from the GUI installer.All I have to do is keep the lap top plugged in to the network.

I am not entirely shure IF i need to recompile the kernel is there some way of testing it to see if it has the necessary config for wireless? However I have changed the kernel config, and the kernel sym link and all that trying to recompile now none of that points to the original kernel which I am using.

Now every time my computer boots a whole list of modules fail to load I do not know how to capture the list and post here.

A command I found wile searching:

```
lapcat turtle # cardctl ident

no pcmcia driver in /proc/devices

```

I am posting my ls mod at this point

```
lapcat turtle # lsmod

Module                  Size  Used by

snd_pcm_oss            26944  0

snd_mixer_oss          12480  1 snd_pcm_oss

snd_seq_oss            21696  0

snd_seq_midi_event      3616  1 snd_seq_oss

snd_seq                32368  4 snd_seq_oss,snd_seq_midi_event

snd_seq_device          4364  2 snd_seq_oss,snd_seq

i915                   12672  2

drm                    45940  3 i915

pcspkr                  1760  0

rtc                     8660  0

parport_pc             26788  0

parport                21832  1 parport_pc

yenta_socket           17516  1

rsrc_nonstatic          8256  1 yenta_socket

e100                   24036  0

pcmcia_core            23284  2 yenta_socket,rsrc_nonstatic

mii                     3008  1 e100

intel_agp              15292  1

snd_intel8x0           21852  0

agpgart                17888  3 drm,intel_agp

snd_intel8x0m          10892  0

snd_ac97_codec         63424  2 snd_intel8x0,snd_intel8x0m

snd_ac97_bus            1248  1 snd_ac97_codec

snd_pcm                45156  4 snd_pcm_oss,snd_intel8x0,snd_intel8x0m,snd_ac97_codec

snd_timer              14212  2 snd_seq,snd_pcm

snd                    30564  10 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_intel8x0m,snd_ac97_codec,snd_pcm,snd_timer

snd_page_alloc          6024  3 snd_intel8x0,snd_intel8x0m,snd_pcm

nfs                    79276  0

lockd                  41416  1 nfs

sunrpc                100540  2 nfs,lockd

jfs                   143884  0

dm_mirror              14128  0

dm_mod                 36024  1 dm_mirror

pdc_adma                6180  0

sata_mv                12712  0

ata_piix                8036  0

ahci                   10756  0

sata_qstor              6372  0

sata_vsc                5380  0

sata_uli                4772  0

sata_sis                5188  0

sata_sx4                9732  0

sata_nv                 6212  0

sata_via                5636  0

sata_svw                4900  0

sata_sil24              7780  0

sata_sil                6408  0

sata_promise            7748  0

libata                 40044  15 pdc_adma,sata_mv,ata_piix,ahci,sata_qstor,sata_vsc,sata_uli,sata_sis,sata_sx4,sata_nv,sata_via,sata_svw,sata_sil24,sata_sil,sata_promise

sbp2                   15848  0

ohci1394               25456  0

ieee1394               55416  2 sbp2,ohci1394

sl811_hcd               8960  0

ohci_hcd               14468  0

uhci_hcd               16296  0

usb_storage            55456  0

usbhid                 31488  0

ehci_hcd               21608  0

usbcore                80448  7 sl811_hcd,ohci_hcd,uhci_hcd,usb_storage,usbhid,ehci_hcd

```

EDIT: 1x removed unnecessary text

----------

## PaulBredbury

 *turtles wrote:*   

> Now every time my computer boots a whole list of modules fail to load

 

Well, that needs to be fixed. Apps which install kernel modules need to be recompiled when the kernel changes. And make sure you're compiling the kernel's modules.

Here is my script to set up a kernel, ready for compilation:

```
emerge gentoo-sources

cp /boot/config /usr/src/linux/.config || exit 1

cd /usr/src/linux

make oldconfig || exit 1
```

Here is my script to compile the kernel:

```
cd /usr/src/linux

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

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

make clean bzImage modules modules_install || exit 1

[[ -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

# Prevent file ownership confusion with FEATURES=collision-protect

rm /lib/modules/*/{video/nvidia,fs/fuse,misc/{cdemu,ndiswrapper,vm{mon,net}}}.ko

emerge -1 nvidia-drivers ndiswrapper
```

The emerge command should be setting up the /usr/src/linux symlink. In /etc/portage/package.use

```
sys-kernel/gentoo-sources  symlink
```

Also see FAQ.

Edit:  Added rm line. Removed  sys-fs/fuse, because it needs to be recompiled after a reboot into the new kernel.Last edited by PaulBredbury on Sat Jul 14, 2007 1:17 am; edited 6 times in total

----------

## turtles

Reviewing my notes and perivious posts I have concluded that the kernel I compiled does support wireless since ndiswrapper used to display "hardware dectected". I mistakenly was led to recompile. The new kernel  failed due to my lack of manual kernel compiling experience. The working kernel got stuck with modules intended for the new kernel.

So I am trying out your script and contnuing with the recompiling my kernel. It is the first time I have gotten a script like that to work! I have reviewed all the specialty manuals for things like ipod, printer, alsa, and wireless and I think I will have a kernel that I dont have to recompile if I just want sound to work or I add a USB ipod some day.

[*]If the kernel does not work am I stuck with all the new modules trying to run on my old kernel? How can 2 different kernel versions co exist?

Is the only way through a partitioning scheme?

a partition for different kernels? or is there a eiser way. 1 swap

and seperate home partition?

Thanks Paul for your help

----------

## turtles

So in grub.conf do I

```

title=Gentoo Linux 11th try

root (hd0,0)

kernel /kernel-prev real_root=/dev/hda3 panic=5

```

?

EDIT Script ran with our errors. But I got a file not found error when booting that kernel.

OK I ll try just kernel

here is my boot dir:

```
lapcat boot # ls

System.map

boot

bzImage-2.6.18-gentoo-8thtry-r3

config

grub

initramfs-genkernel-x86-2.6.17-gentoo-r7

kernel

kernel-2.6.17-gentoo-3rd-try-r8.1

kernel-2.6.17-gentoo-5th-try-r8

kernel-2.6.17-gentoo-r7

kernel-2.6.17-gentoo-r8

kernel-2.6.17-gentoo-try_7-r8

kernel-2.6.17-gentoo-try_six-r8

kernel-2.6.17-gentoo_custom-r8

kernel-2.6.18-gentoo-8thtry-r3

kernel-genkernel-x86-2.6.17-gentoo-r7

lost+found

lapcat boot #

```

----------

## PaulBredbury

My /boot/grub/grub.conf is basically:

```
timeout 8

title Gentoo

root (hd0,0)

kernel /boot/kernel root=/dev/sda1 panic=30 usbhid.mousepoll=4

# Safe (fallback)

title Gentoo Safe

root (hd0,0)

kernel /boot/kernel-safe root=/dev/sda1 panic=30 usbhid.mousepoll=4

# Previous

title Gentoo Previous

root (hd0,0)

kernel /boot/kernel-prev root=/dev/sda1 panic=30 usbhid.mousepoll=4
```

Although of course there are lots of ways to organize it.

----------

## turtles

thanks 

```
default 0

timeout 10

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux

root (hd0,0)

kernel /kernel-genkernel-x86-2.6.17-gentoo-r7 root=/dev/ram0 init=/linuxrc ramdisk=8192 re$

initrd /initramfs-genkernel-x86-2.6.17-gentoo-r7

title Gentoo 2.6.18

root (hd0,0)

kernel /boot/kernel root=/dev/hda3 Panic=15

```

IS my grub.conf and thanks to you I am in the new kernel gentoo 2.6.18.

I will be re do alsa-utils and then I will set it as the default and work on the wireless.

----------

## turtles

Well ndiswrapper seemed to work all I did was re check "the list" found my airlink card and it had a link to some 3com drivers wich i downloaded and installed with ndiswrapper directions 

```
lapcat wireless # cd Windows\ XP/

lapcat Windows XP # ls

Mrv8000c.cat  Mrv8000c.inf  Mrv8000c.sys

lapcat Windows XP # ndiswrapper -i Mrv8000c.inf

driver mrv8000c is already installed

lapcat Windows XP # ndiswrapper -i Mrv8000c.sys

installing mrv8000c.sys ...

couldn't get manufacturer section - installation may be incomplete

lapcat Windows XP # depmod -a

lapcat Windows XP # modprobe ndiswrapper

lapcat Windows XP # ndiswrapper -l

installed drivers:

modules.ndiswrapper     invalid driver!

mrv8000c                driver installed

mrv8000c.sys    invalid driver!

```

(The invalid ones are from privious attempts)

```
lapcat ndiswrapper # lsmod

Module                  Size  Used by

ndiswrapper           144852  0

```

```
iwconfig

eth0      no wireless extensions.

lo        no wireless extensions.

```

Do I have to edit config files before iwconfig works?

How do I know if the drivers are working?

Cheers

----------

## turtles

I do get a different responce here:

```
lapcat init.d # cardctl ident

Socket 0:

  no product info available

```

----------

## turtles

I feel like I am really close here. 

will iwconfig dectect the wireless card even if it is not in conf.d/net?

I really cant tell if ndiswrapper is working?

I dont seem to see the wireless card so I am assuming it is not a networking issue.

I updated kernel successfuly so far

I posted my most recent emerge info

and I think I have emerged everything that has anything to do with wireless

I have read all the documentation but still no luck.

I compiled in every wireless option in the kernel hopefully that just gives me options and is not the problem.

ANY thoughts are welcome. 

I could post my kernel config if it would be handy.

----------

## PaulBredbury

Hints:

Look in /var/log/messages

Google for what other people say works for your exact hardware. Download the exact driver. If you're using the wrong driver, it simply won't work.

ndiswrapper -i whatever.inf (not the .sys file)

If ndiswrapper moans about invalid drivers, remove them:  rm -rf /etc/ndiswrapper/whatever*

----------

## turtles

Thanks for sticking with this everyone I am just going to keep at this since

It appears people have the marvell chip sets working under linux with ndiswrapper.

So I have 2 drivers I have tried one is from the ndiswrapper list it is a 3com driver listed to work with the chip set that lspci showed my wireless card as being. However as stated earlier in this post lspci no longer shows the marvell chip set or any chip set. And apparantly lspci may not be all that accurate?

First I am removing the existing drivers:

```

lapcat turtle # ndiswrapper -l

installed drivers:

mrv8000c                driver installed

lapcat turtle # ndiswrapper -e mrv8000c

```

Now installing the driver listed to work with this chip set on ndiswrappers list site:

```
lapcat turtle # ndiswrapper -i /home/turtle/Mrv8000c.inf

installing mrv8000c ...
```

The instructions say to install th .sys file too but here is is sugested not to ?

I will atempt to install it:

```
lapcat turtle # ndiswrapper -i /home/turtle/Mrv8000c.sys

installing mrv8000c.sys ...

couldn't get manufacturer section - installation may be incomplete
```

it is a 3com file being installed for an air link card so that must be what the error is about.

```
lapcat turtle # ndiswrapper -l

installed drivers:

mrv8000c                driver installed

mrv8000c.sys    invalid driver!
```

Well the .sys did not work so If it is needed the card will not work. If it is not needed the card will. 

I'll remove the driver:

```
lapcat turtle # ndiswrapper -e mrv8000c.sys

lapcat turtle # ndiswrapper -l

installed drivers:

mrv8000c                driver installed
```

Now does modprobe remove the ndiswrapper module and replace it with a new one or do you have to use modprobe -r first?

```
lapcat turtle # ndiswrapper -m mrv8000c

install/manage Windows drivers for ndiswrapper

usage: ndiswrapper OPTION

-i inffile       install driver described by 'inffile'

-a devid driver  use installed 'driver' for 'devid'

-r driver        remove 'driver'

-l               list installed drivers

-m               write configuration for modprobe

-ma              write module alias configuration for all devices

-mi              write module install configuration for all devices

-v               report version information

where 'devid' is either PCIID or USBID of the form XXXX:XXXX,

as reported by 'lspci -n' or 'lsusb' for the card

lapcat turtle # ndiswrapper -m

modprobe config already contains alias directive

lapcat turtle # modprobe ndiswrapper

lapcat turtle # lsmod

Module                  Size  Used by

ndiswrapper           143572  0
```

Well the ndiswrapper and the new kernel are definitly talking, but the card does not show up in lspci which it did before.

```

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

retry ndiswrapper with modprobe:

l

```
apcat turtle # depmod -a

lapcat turtle # modprobe ndiswrapper

lapcat turtle # lsmod

Module                  Size  Used by

ndiswrapper           143572  0
```

dmesg sees somthing happining:

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

mtrr: base(0xd8020000) is not aligned on a size(0x180000) boundary

[drm:drm_unlock] *ERROR* Process 5302 using kernel context 0

ndiswrapper version 1.25 loaded (preempt=no,smp=no)

usbcore: registered new driver ndiswrapper
```

```
# iwconfig

eth0      no wireless extensions.

lo        no wireless extensions.

lapcat Windows XP # cardctl ident

Socket 0:

  no product info available
```

Is the .sys file really not required?

Is the kernel configured correctly if the wireless card is not showing up in lspci but it does show up on cardctl?

If I am shurely past the kernel config problem thanks to Paul then I can continue with other drivers for the card.

When will ndiswrapper display 'hardware dectected'? after a proper driver is loaded or when it can see the card in general?

It used to say "hardware dectected".

----------

## PaulBredbury

 *turtles wrote:*   

> lspci no longer shows the marvell chip set or any chip set.

 

Fix that first. ndiswrapper cannot possibly work if the hardware isn't even detected. Not sure which kernel option that is, but this may help:

```
grep PCI /usr/src/linux/.config
```

modprobing an already-loaded module is pointless. modprobe -r it, recompile it (if that's the intention), then modprobe it again.

----------

## turtles

OK back to the driver from the cd that came with the card.

I assume it must be the windows xp one

dmesg does not list the error from before and I believe you have to use modprobe -r to remove a ndiswrapper module before trying a new one.

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

mtrr: base(0xd8020000) is not aligned on a size(0x180000)                 boundary

[drm:drm_unlock] *ERROR* Process 5302 using kernel context                 0

ndiswrapper version 1.25 loaded (preempt=no,smp=no)

usbcore: registered new driver ndiswrapper

ds: ds_open(socket 0)

pcmcia: Detected deprecated PCMCIA ioctl usage from proces                s: cardctl.

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

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

ds: ds_open(socket 1)

cs: memory probe 0x28000000-0x29ffffff: excluding 0x280000                00-0x29ffffff

cs: memory probe 0xcff00000-0xcfffffff: excluding 0xcff000                00-0xcfffffff

ds: ds_release(socket 0)

usbcore: deregistering driver ndiswrapper

ndiswrapper version 1.25 loaded (preempt=no,smp=no)

usbcore: registered new driver ndiswrapper

```

/var/log/messages:

```
 GNU nano 2.0.1                     File: /var/log/messages

Jan 13 17:14:32 lapcat usbcore: deregistering driver ndiswrapper

Jan 13 17:15:25 lapcat ndiswrapper version 1.25 loaded (preempt=no,smp=no)

Jan 13 17:15:25 lapcat usbcore: registered new driver ndiswrapper

Jan 13 17:20:01 lapcat cron[20311]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

```

```
 cardctl ident

Socket 0:

  no product info available

lapcat log #                     
```

IS  *Quote:*   

> pcmcia: Detected deprecated PCMCIA ioctl usage from proces
> 
> 

  a indicator that I need different configs in my kernel? 

The questions from above remain as well.

----------

## turtles

I have updated the first page of this post With alot of information.

 *PaulBredbury wrote:*   

>  *turtles wrote:*   lspci no longer shows the marvell chip set or any chip set. 
> 
> Fix that first. ndiswrapper cannot possibly work if the hardware isn't even detected. Not sure which kernel option that is, but this may help:
> 
> ```
> ...

 

```
grep PCI /usr/src/linux/.config

# Bus options (PCI, PCMCIA, EISA, MCA, ISA)

CONFIG_PCI=y

# CONFIG_PCI_GOBIOS is not set

# CONFIG_PCI_GOMMCONFIG is not set

# CONFIG_PCI_GODIRECT is not set

CONFIG_PCI_GOANY=y

CONFIG_PCI_BIOS=y

CONFIG_PCI_DIRECT=y

CONFIG_PCI_MMCONFIG=y

# CONFIG_PCIEPORTBUS is not set

CONFIG_PCI_MSI=y

# CONFIG_PCI_DEBUG is not set

# PCI Hotplug Support

# CONFIG_HOTPLUG_PCI is not set

CONFIG_BLK_DEV_IDEPCI=y

# CONFIG_IDEPCI_SHARE_IRQ is not set

CONFIG_BLK_DEV_IDEDMA_PCI=y

CONFIG_IDEDMA_PCI_AUTO=y

# Texas Instruments PCILynx requires I2C

CONFIG_NET_PCI=y

# CONFIG_NE2K_PCI is not set

# Wireless 802.11b ISA/PCI cards support

# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support

# CONFIG_SERIO_PCIPS2 is not set

CONFIG_SERIAL_8250_PCI=y

```

I am revitialising this post eventhough I have been trying a netgear wpn511 card (post here) because eliminating ndiswrapper reveals PCMCIA is the culprit. Once PCMCIA is correctly working I should be able to plug in a card and see it in 

```
lspci
```

 or 

```
pccardctl ident 
```

trying both cards gives me 

```
lapcat turtle # pccardctl ident

Socket 0:

  no product info available

lapcat turtle # pccardctl eject

lapcat turtle # pccardctl insert

lapcat turtle # pccardctl ident

Socket 0:

  no product info available

```

Been looking at 

```
/etc/pcmcia/config.opts
```

Interesting puzzle here. Pleese any advice would be great!

----------

## turtles

Here is some more output. It is over the course of several kernels.

```
less messages | grep pcmcia
```

```
Feb 17 12:57:28 lapcat pcmcia: parent PCI bridge Memory window: 0xcff00000 - 0xcfffffff

Feb 17 12:57:28 lapcat pcmcia: parent PCI bridge Memory window: 0x28000000 - 0x29ffffff

Feb 17 12:57:32 lapcat pcmcia: Detected deprecated PCMCIA ioctl usage from process: cardmgr.

Feb 17 12:57:32 lapcat pcmcia: This interface will soon be removed from the kernel; please expect breakage unless you upgrade to new tools.

Feb 17 12:57:32 lapcat pcmcia: see http://www.kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html for details.

Feb 17 13:44:00 lapcat pcmcia: parent PCI bridge I/O window: 0xc000 - 0xcfff

Feb 17 13:44:00 lapcat pcmcia: parent PCI bridge Memory window: 0xcff00000 - 0xcfffffff

Feb 17 13:44:00 lapcat pcmcia: parent PCI bridge Memory window: 0x28000000 - 0x29ffffff

```

```
 lapcat turtle # ls -l /sys/bus/pcmcia/devices/

total 0

lapcat turtle # pccardctl ident

Socket 0:

  no product info available

lapcat turtle #

```

What is wrong

----------

## turtles

I had a theory that madwifi-ng and ndiswrapper needed to see yenta or somthing as modules and not compiled in. So I recompiled with yenta as module. lapcat linux AS modules: 

```
## dmesg | grep pcmcia && dmesg | grep Yenta

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

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

Yenta: ISA IRQ mask 0x04b8, PCI irq 16

```

OLD dmesg with yenta compiled in:

```
 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

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

Yenta: ISA IRQ mask 0x04b8, PCI irq 16

```

Interesting output from /var/log/messages 

```
less /var/log/messages | grep pci 

Feb 21 23:11:42 lapcat pci_get_subsys() called while pci_devices is still empty

Feb 21 23:11:42 lapcat PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report

Feb 21 23:11:42 lapcat pci_hotplug: PCI Hot Plug PCI Core version: 0.5

```

```
pci=routeirq
```

Does not return any output or change anything.

----------

## turtles

Has anybody elce had problems like this?

----------

## turtles

Some PCMCIA controllers (including yenta_socket) require to setup a dynamic resource database for non statically mapped PCMCIA sockets.

How is this done in gentoo and how do I know if it is working?

----------

## turtles

Still having this probelm.

```
# lsmod

Module                  Size  Used by

parport_pc             37988  0

plip                   16808  0

parport                36552  2 parport_pc,plip

pcmcia                 34840  0

yenta_socket           26892  2

rsrc_nonstatic         13952  1 yenta_socket

pcmcia_core            38168  3 pcmcia,yenta_socket,rsrc_nonstatic

```

Is there anything I could have hosed by 

```
emerge -C pcmcia-cs
```

?

----------

## turtles

I have been checking out http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html

 *kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html wrote:*   

> CardBus (sometimes also PCMCIA) cards not found
> 
> On several, especially new systems the Yenta bridge is not on the root PCI bridge, but behind a PCI-to-PCI bridge. On some x86 or x86_64 systems, these bridges aren't corrreclty set up by the BIOS, which may cause CardBus and even PCMCIA devices not to show up in lspci or in pccardctl ident correctly. If you suspect that this may be the cause, issue this command:
> 
> 	lspci -v | grep subordinate
> ...

 

I have no such line in my kernel dmesg but I do have:

```
#dmesg | grep pci

pci_get_subsys() called while pci_devices is still empty

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

pci_hotplug: PCI Hot Plug PCI Core version: 0.5

ath_pci: 0.9.4.5 (0.9.2.1)

```

I will try adding pci=routeirq and pci=assign-busses on the kernel boot line.

EDIT now dmesg | grep pci gets me:

```
Kernel command line: root=/dev/hda3 pci=assign-busses pci=routeirq Panic=5

ACPI: bus type pci registered

pci_get_subsys() called while pci_devices is still empty

PCI: Routing PCI interrupts for all devices because "pci=routeirq" specified

pci_hotplug: PCI Hot Plug PCI Core version: 0.5

```

----------

## tSp

i would almost bet you have an irq conflict.  If this is so, the irq will be disabled on bootup and no matter what you do will not bring the hardware back in lspci.  If its not seen in lspci, it won't be seen by cardctl, and won't be seen by ndiswrapper.

What is the output of 'cat /proc/interrupts'

Also, the pci=routeirq is a kernel boot parameter that goes at the end of the grub.conf line for your kernel, i.e -- where mine says pci=nomsi it would say pci=routeirq on yours:

```

        root (hd0,2)

        kernel /kernel-genkernel-x86_64-2.6.19-gentoo-r4  dolvm2 root=/dev/ram0 ramdisk=8192 real_root=/dev/VolGroup00/LogVol00  quiet  init=/linuxrc splash=silent,theme:sabayon vga=791 CONSOLE=/dev/tty1 pci=nomsi

```

----------

## turtles

Thanks for the reply. I feel like I have been rescued off a desert island. 

```
# cat /proc/interrupts

           CPU0

  0:     208693   IO-APIC-edge      timer

  1:       2065   IO-APIC-edge      i8042

  8:          2   IO-APIC-edge      rtc

  9:         58   IO-APIC-fasteoi   acpi

 12:      47657   IO-APIC-edge      i8042

 14:      11349   IO-APIC-edge      ide0

 15:       2474   IO-APIC-edge      ide1

 16:          7   IO-APIC-fasteoi   yenta

 17:       2822   IO-APIC-fasteoi   Intel 82801DB-ICH4

 18:       1909   IO-APIC-fasteoi   eth0

 19:          0   IO-APIC-fasteoi   ehci_hcd:usb1

 20:          0   IO-APIC-fasteoi   uhci_hcd:usb2

 21:          0   IO-APIC-fasteoi   uhci_hcd:usb3

NMI:          0

LOC:     208652

ERR:          0

MIS:          0

```

I have been trying booting a couple of different ways:

```
title=Gentoo 2.6.19-latest

root (hd0,0)

kernel /boot/kernel root=/dev/hda3 Panic=15

title=Gentoo 2.6.19-r5pci=routeirq

root (hd0,0)

kernel /boot/kernel root=/dev/hda3 pci=routeirq Panic=5

title=Gentoo 2.6.19-r5pci=assign-busses

root (hd0,0)

kernel /boot/kernel root=/dev/hda3 pci=assign-busses Panic=5

title=Gentoo 2.6.19-r5pci=assign-busses&pci=routeirq

root (hd0,0)

kernel /boot/kernel root=/dev/hda3 pci=assign-busses pci=routeirq Panic=5

title=Gentoo-prev

root (hd0,0)

kernel /boot/kernel-prev root=/dev/hda3 Panic=15

```

```
dmesg | grep pci

Kernel command line: root=/dev/hda3 pci=assign-busses Panic=5

ACPI: bus type pci registered

pci_get_subsys() called while pci_devices is still empty

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

pci_hotplug: PCI Hot Plug PCI Core version: 0.5
```

That doesnt seem to change the lspci or dmesg output.

----------

## tSp

your irq's look good as posted, none are shared and yenta shows up.

I previously used a toshiba laptop with yenta, and it worked great with all kernel versions up to 2.6.20 (I just stopped using it last week) - I still have it until next week when it goes to another Linux user who is buying it.  

I have noticed that pccardctl status doesn't show the card, but it shows the slot for the card.  The only other thing I could think of that might cause your problem then is if the module (driver if using ndiswrapper) was not loading.  I am not sure which module (ndiswrapper driver) is supposed to work with your card.  I will try to do some research later today and post if I can find anything specific to your card.

One thing I might suggest, is if you could boot a linux live cd and see if it works there.  If it does, you definitely know something is borked with your gentoo installation (could be something as simple as mistmatched gcc, binutils, or glibc compiles)

One other thing, my toshiba would allow all 16 bit cards but had troubles with some 32 bit cards.  Weird thing was, some 32 bit cards worked fine while others didn't work at all.  Someone once told me that my laptops cardbus was a hybrid, made at the time when the conversion from 16 bit to 32 bit cards were being made.  However, it didn't follow the 32 bit standards, so only some 32 bit cards would work.  I never researched it........I just verified all my cards worked with linux using native modules before buying them.  My new laptop (only 2 weeks old) uses expresscard and not pcmcia...so I have a bunch of linux compat pcmcia cards (usb 2.0, firewire, wireless ethernet) that will be up on ebay soon (if someone doesnt buy them straight out)

----------

## turtles

Thanks

I am trying 2 cards a netgear wpn511 that uses mad wifi and the Airlink one with the Marvell chipset that uses Ndiswrapper. I have both emerged and both load modules sucessful. 

I dont know what irq's should look like so that's good.

 *tSp wrote:*   

>  The only other thing I could think of that might cause your problem then is if the module (driver if using ndiswrapper) was not loading. 

  Lspci should still show the chip set and the 02 addresses even if there is no driver loaded. 

Gentoo linux live cd has same output as my kernel in lspci and pccardctl ident. However I do get lots of errors emerging the programs pcmciautils and madwifi-ng, however the emerge always exits successfully. I reemerge after each kernel recompile.

EDIT:

```
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

emerge -1 madwifi-ng ndiswrapper pcmciautils pcmcia-cs-cis

```

 that is the script I have been using let me know if there is anything elce I need to be reemerging or dont need to reemerge.

Both cards display in lspci with gentoo live cd on an really old IBM thinkpad. the Think pad is so old that it does not have an ethernet port.

Toshiba.coms tech specs for this model say it supports one type II pc card.

I will try another linux distros live cd next.

----------

## turtles

Well I wrote a silly little script 

```
 dmesg | grep pci

dmesg | grep pcmcia && dmesg | grep Yenta

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

lspci -v | grep subordinate 
```

 It gives me 

```

pcmcia-tool

Kernel command line: root=/dev/hda3 pci=assign-busses pci=routeirq Panic=5

ACPI: bus type pci registered

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

PCI: Routing PCI interrupts for all devices because "pci=routeirq" specified

pci_hotplug: PCI Hot Plug PCI Core version: 0.5

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

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

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

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

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

Yenta: ISA IRQ mask 0x04b8, PCI irq 19

include memory 0xc0000-0xfffff

include memory 0xa0000000-0xa0ffffff, memory 0x60000000-0x60ffffff

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

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

```

Note pcmcia: parent PCI bridge Memory window: 0x28000000 - 0x29ffffff repeats about 50X.

I dont get the  Bus: primary=00, secondary=01, subordinate=05, sec-latency=64

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

EDIT:

How do I "try to walk the tree to bus" secondary=02, subordinate=05. To see if that is the problem.

Thanks in advance

Note that when the card shows up it starts with 

```
02:00.0
```

----------

## tSp

 *turtles wrote:*   

>  
> 
> ```
> 
> Kernel command line: root=/dev/hda3 pci=assign-busses pci=routeirq Panic=5
> ...

 

can you boot without assign-busses and routeirq and run that script again.

The way you are compiling the kernel looks strange.   I have never gotten a kernel compile error, which appears it has failed.  I would follow the gentoo kernel guide and follow it step by step.

The irq being assigned for yenta looks odd, it is irq 13.  Mine always used 11 and wasnt shared.

Also, the message about it being removed from the kernel is rather disheartening, however, mine worked through 2.6.20 kernels

----------

## turtles

tSp I REALLY appreciate you continuing with this.

 *tSp wrote:*   

> The way you are compiling the kernel looks strange. I have never gotten a kernel compile error, which appears it has failed. I would follow the gentoo kernel guide and follow it step by step. 

 

The compile errors are in pcmciautils. The messages about "it" being removed from the kernel are referring to pcmcia-cs. Pcmcia-cs is depreciated and we are supposed to be using pcmciautils. See bug 131935 .

I don't get any errors compiling my kernel. I guess the errors compiling pcmciautils could be from a misconfigured kernel. I did unmerge pcmcia-cs but maby some left over config is messing up pcmciautils.

Booting without the pci= stuff I get:

```
pcmcia-tool

ACPI: bus type pci registered

pci_get_subsys() called while pci_devices is still empty

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

pci_hotplug: PCI Hot Plug PCI Core version: 0.5

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

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

Yenta: ISA IRQ mask 0x04b8, PCI irq 16

include memory 0xc0000-0xfffff

include memory 0xa0000000-0xa0ffffff, memory 0x60000000-0x60ffffff

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

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

Note as usual that pci_get_subsys() called while pci_devices is still empty repeats many times and I edit it out.

Thanks again.

----------

## turtles

OK I have recompiled kernel:

Errors are present and I posted them here

This is a different .config I am trying.

----------

## turtles

Well I have fine tuned my kernel .config some more and it compiles without errors or warnings.

----------

## turtles

```
lspci -v | grep subordinate

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

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

I will attempt to decode this as the linux pcmcia site did earlier in this post:

The first line: bus 0 (primary) is bridged to busses 1 (secondary) to 3 (subordinate) by a bridge. The second line state that bus 1 is bridged to buss 2. However, the CPU (which itself is connected to bus 0 through the root bridge) needs to be able to access all these busses. If you try to walk the tree to bus 2, you see that the CPU can't get there, as bus 0 is only bridged to busses 1, 3.

So I am thinking this is a pcmcia irq routing problem?

But the boot options don't help.

So now what?

What could emerge update world or setting could have changed that would alter this singe it did work at one time? It also does not work / looks the same from a live cd.

Seems this closed bug adresses this problem http://bugzilla.kernel.org/show_bug.cgi?id=5557 but I don't know if this was put in Gentoo?

----------

## turtles

```
pcmcia-tool

list everything we know about this card

Socket 0:

  3.3V 32-bit PC Card

Socket 0 Bridge:        [yenta_cardbus]         (bus ID: 0000:01:0b.0)

  CardBus card -- see "lspci" for more information

PRODID_1=""

PRODID_2=""

PRODID_3=""

PRODID_4=""

MANFID=0000,0000

FUNCID=255

Socket 0:

  no product info available

dmesg:

Kernel command line: root=/dev/hda3 pci=assign-busses pci=routeirq Panic=5

ACPI: bus type pci registered

pci_get_subsys() called while pci_devices is still empty 
```

 EDIT OUT REPETS

```

PCI: Routing PCI interrupts for all devices because "pci=routeirq" specified

pci_hotplug: PCI Hot Plug PCI Core version: 0.5

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

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

Yenta: ISA IRQ mask 0x04b8, PCI irq 19

include memory 0xc0000-0xfffff

include memory 0xa0000000-0xa0ffffff, memory 0x60000000-0x60ffffff

lspci:

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

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

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

Now I have booted with 2 options pci=assign-busses pci=routeirq and it seems now the kernel should be able to walk from 0 to 1 and 5, from 1 to 2 but not from 0 to 2.

----------

## turtles

Opened a bug for this https://bugs.gentoo.org/show_bug.cgi?id=170614

----------

## 1nk

Hi!

I found this thread via google, because i have exact the same problem. Unfortunately i can not really contribute, i am using arch linux (with stock 2.6.20 kernel) and i have tried almost all stuff which was posted here (no modules/kernel recompiling though). I have a z-com xi-325 pcmcia wlan-card.

Some output:

 dmesg 

 *Quote:*   

> Mar 16 22:47:01 denkpad pccard: card ejected from slot 0
> 
> Mar 16 22:47:03 denkpad pccard: PCMCIA card inserted into slot 0
> 
> Mar 16 22:47:03 denkpad pcmcia: registering new device pcmcia0.0
> ...

 

pccardctl 

 *Quote:*   

> ink@denkpad:~/.Eterm/themes/Eterm$ pccardctl ident
> 
> Socket 0:
> 
>   product info: " ", "IEEE 802.11 Wireless LAN/PC Card", "", ""
> ...

 

/sys/bus/pcmcia/devices also has some information but lspci wont show my card:

 *Quote:*   

> 
> 
> 00:00.0 Host bridge: Intel Corporation 82855PM Processor to I/O Controller (rev 03)
> 
> 00:01.0 PCI bridge: Intel Corporation 82855PM Processor to AGP Controller (rev 03)
> ...

 

Any ideas?

----------

## turtles

HI welcome to Gentoo

If you dont mind run the pcmcia-tool script I posted above.

----------

## 1nk

 *turtles wrote:*   

> HI welcome to Gentoo
> 
> If you dont mind run the pcmcia-tool script I posted above.

 

Hi,

done, output@ nopaste: http://nopaste.php-q.net/283028

----------

## turtles

Similar problem in deed.

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

   Bus: primary=00, secondary=02, subordinate=0a, sec-latency=64

   Bus: primary=02, secondary=03, subordinate=06, sec-latency=176

   Bus: primary=02, secondary=07, subordinate=0a, sec-latency=176
```

I hypothesize from reading the the Linux Pcmcia page that I quoted all the primary=02 are not accessible by the kernel. I think they all need to start with 00

I filed a bug report with Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=170614

Gentoo closes my bugs really fast if it is my error. 

Just for giggles try it with a Gentoo live cd.

I have a ubuntu live cd around here somewhere... I'll give that a try.

Disclaimer: All I know about this problem is posted here. I am not a kernel expert.

----------

## turtles

Well I figured out how to add a boot from cd feature to grub and booted a ubuntu live cd.

From ubuntu 

```
 dmesg

[17179569.184000] Linux version 2.6.17-10-generic (root@vernadsky) (gcc version 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)) #2 SMP Fri Oct 13 18:45:35 UTC 2006 (Ubuntu 2.6.17-10.33-generic)

```

I get:

```
list everything we know about this card

Socket 0:

  3.3V 32-bit PC Card

Socket 0 Bridge:        [yenta_cardbus]         (bus ID: 0000:01:0b.0)

  CardBus card -- see "lspci" for more information

PRODID_1=""

PRODID_2=""

PRODID_3=""

PRODID_4=""

MANFID=0000,0000

FUNCID=255

Socket 0:

  no product info available

dmesg:

[17179571.748000] ACPI: bus type pci registered

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

[17179675.728000] pci_hotplug: PCI Hot Plug PCI Core version: 0.5

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

[17179677.772000] pcmcia: parent PCI bridge Memory window: 0xcff00000 - 0xcfffffff

[17179677.772000] pcmcia: parent PCI bridge Memory window: 0x58000000 - 0x59ffffff

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

[17179677.772000] Yenta: ISA IRQ mask 0x0cb8, PCI irq 169

/etc/pcmcia/config.opts

include memory 0xc0000-0xfffff

include memory 0xa0000000-0xa0ffffff

include memory 0x60000000-0x60ffffff

lspci:

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

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

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

```

The subordinate keeps changing from 05 to 03 but not much elce.

----------

## turtles

Well thankfully another Gentoo user uses a toshiba a45-s120 and emailed me the output of my script he is usung pcmcia-cs and his wireless card works.

```
pcmcia_tool

list everything we know about this card

-su: pccardctl: command not found

-su: pccardctl: command not found

-su: pccardctl: command not found

-su: pccardctl: command not found

dmesg:

ACPI: bus type pci registered

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

report

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

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

pcmcia: parent PCI bridge Memory window: 0x38000000 - 0x39ffffff

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

Yenta: ISA IRQ mask 0x04b8, PCI irq 16

/etc/pcmcia/config.opts

/etc/pcmcia/config.opts: No such file or directory

lspci:

01:0b.0 CardBus bridge: Toshiba America Info Systems ToPIC100 PCI to Cardbus

Bridge with ZV Support (rev 33)

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

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

```

This eliminates the possibility of a bug in the kernel. 

As we are both running 2.6.19-r5

I am recompiling with all drivers built in:

```
<*> PCCard (PCMCIA/CardBus) support                                                   │ │

  │ │                [*]   Enable PCCARD debugging                                                         │ │

  │ │                <*>   16-bit PCMCIA support                                                           │ │

  │ │                [*]     Load CIS updates from userspace (EXPERIMENTAL)                                │ │

  │ │                [ ]     PCMCIA control ioctl (obsolete)                                               │ │

  │ │                ---   32-bit CardBus support                                                          │ │

  │ │                ---   PC-card bridges                                                                 │ │

  │ │                <*>   CardBus yenta-compatible bridge support                                         │ │

  │ │                <M>   Cirrus PD6729 compatible bridge support                                         │ │

  │ │                <M>   i82092 compatible bridge support                                                │ │

  │ │                                                                                                      │ │

  │ │                                              
```

And 

```
<*> Support for PCI Hotplug (EXPERIMENTAL)                                            │ │

  │ │                < >   Fake PCI Hotplug driver                                                         │ │

  │ │                < >   Compaq PCI Hotplug driver                                                       │ │

  │ │                < >   IBM PCI Hotplug driver                                                          │ │

  │ │                < > ACPI PCI Hotplug driver                                                           │ │

  │ │                [ ] CompactPCI Hotplug driver                                                         │ │

  │ │                < > SHPC PCI Hotplug driver                                                           │ │

  │ │                                    
```

This also kills my theory about the all the irq's needing to start with 00.

----------

## turtles

I now have recompiled world with pcmcia use flag set.

I had not set this before.

```
pcmcia-tool

list everything we know about this card

Socket 0:

  3.3V 32-bit PC Card

Socket 0 Bridge:        [yenta_cardbus]         (bus ID: 0000:01:0b.0)

  CardBus card -- see "lspci" for more information

PRODID_1=""

PRODID_2=""

PRODID_3=""

PRODID_4=""

MANFID=0000,0000

FUNCID=255

Socket 0:

  no product info available

dmesg:

ACPI: bus type pci registered

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

pci_get_subsys() called while pci_devices is still empty

pci_get_subsys() called while pci_devices is still empty

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

pci_hotplug: PCI Hot Plug PCI Core version: 0.5

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

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

pcmcia: parent PCI bridge Memory window: 0x58000000 - 0x59ffffff

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

Yenta: ISA IRQ mask 0x04b8, PCI irq 16

memory from /etc/pcmcia/config.opts

include memory 0xc0000-0xfffff

include memory 0xa0000000-0xa0ffffff

include memory 0x60000000-0x60ffffff

lspci:

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

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

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

```

This did not change a thing.

However I think I have narrowed the problem down.

It is not a kernel bug because some one with the dame laptop running th same kernel does not have this problem. they are running pcmcia-cs and possibly a different udev.

It is not an IRQ routing problem either since the irq's are the same on the working and non working hardware.

It must have to do with "pci_get_subsys() called while pci_devices is still empty"

since that is the only thing different between the working and non working laptop, same hardware same kernel.

----------

## turtles

Bump

----------

## turtles

Bump

----------

## turtles

```
May 22 06:39:55 lapcat Kernel command line: root=/dev/hda3 pci=assign-busses pci=routeirq Panic=15

May 22 06:39:55 lapcat ACPI: bus type pci registered

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat pci_get_subsys() called while pci_devices is still empty

May 22 06:39:55 lapcat PCI: Routing PCI interrupts for all devices because "pci=routeirq" specified

May 22 06:39:55 lapcat pci 0000:00:1d.0: uhci_check_and_reset_hc: legsup = 0x0010

May 22 06:39:55 lapcat pci 0000:00:1d.0: Performing full reset

May 22 06:39:55 lapcat pci 0000:00:1d.1: uhci_check_and_reset_hc: legsup = 0x0010

May 22 06:39:55 lapcat pci 0000:00:1d.1: Performing full reset

May 22 06:39:55 lapcat pci_hotplug: PCI Hot Plug PCI Core version: 0.5

May 22 06:39:55 lapcat pciehp: PCI Express Hot Plug Controller Driver version: 0.4

```

```
pcmcia-tool

list everything we know about this card

Socket 0:

  3.3V 32-bit PC Card

Socket 0 Bridge:        [yenta_cardbus]         (bus ID: 0000:01:0b.0)

  CardBus card -- see "lspci" for more information

PRODID_1=""

PRODID_2=""

PRODID_3=""

PRODID_4=""

MANFID=0000,0000

FUNCID=255

Socket 0:

  no product info available

dmesg:

memory from /etc/pcmcia/config.opts

#include memory 0xc0000-0xfffff

#include memory 0xa0000000-0xa0ffffff

#include memory 0x60000000-0x60ffffff

include memory 0xd0000-0xdffff

include memory 0xc0000-0xcffff

include memory 0xc8000-0xcffff

include memory 0xd8000-0xdffff

lspci:

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

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

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

```

Irq routing problem seems solved with new linux-2.6.20-gentoo-r8.

Now the card is still not seen other than voltage.

Power light on card still blinks.

----------

## DyingMuppet

maybe a stupid question, but could it be that you accidentally ruined your pcmcia slot while inserting or ejecting a card?

because it looks like your pcmcia slot is seen in the IRQs, and your dmesg says there is no card inserted...

maybe you could look in the slot with a flashlight or something to see if there is any pin bend aside?  :Rolling Eyes: 

I've seen something like that when a person had put his laptop in a case with the pcmcia card still in the slot, because this can ruin your pcmcia slot I wouldn't recommend such things  :Wink: 

Good-luck with the problem, i'm not a wireless/pcmcia > linux expert, I'm sorry for that I can't help you any further I think...

Grtzz DM

----------

## turtles

 :Shocked: 

Wow

Amazing

Who would have thought?

You would think an electrician whom troubleshoots electrical connections for a living would look at his electrical connection with a flash light?

 :Embarassed: 

There was a very tiny spring clip wedged between 4 pins in the center.

I could hardly tell it was in there.

It took me the last hour to carefully get it out.

After 7 months you solved it.

Now i will go eat crow.

Thanks if you are ever totaly stuck with something pm me so I can ask you all the obvious questions.

The card I was using the Netgear range max WPN511 is now dected by udev and udev freezes when trying to load ath_pci but the original Airlink card showes:

```
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88w8335 [Libertas] 802.11b/g Wireless (rev 03)

```

In lspci and ndiswrapper module loading gets the card lights blinking.

This issue is solved.

Thanks again.

Edit: All I had to do was cp net.lo to net.wlan0 start wlan0 and stop eth0

I am posting this from my new wireless connection. Which I remove the card from when traveling and keep the port clean.

```
ifconfig wlan0

wlan0     Link encap:Ethernet  HWaddr 00:03:2F:38:16:78

          inet addr:192.168.0.7  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::203:2fff:fe38:1678/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:31 errors:0 dropped:0 overruns:0 frame:0

          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:6317 (6.1 Kb)  TX bytes:1161 (1.1 Kb)

          Interrupt:19 Memory:5c010000-5c020000

```

----------

