# PCMCIA card is not working

## pwk

I just installed Gentoo on my Compaq presario 1600.  Install was a snap.  From the CD, my pcmcia card worked like a champ.  Once I removed the CD and booted from my harddrive, I could not longer access the pcmcia card.  I compiled it into the kernel the first time, but no luck.  Then I recompiled it as a module but at boot time it would tell me it couldn't bring up eth0.  I included the module in the modules.autoload file, no luck.  I loaded the module by hand, and it showed up under lsmod, but as being (unused).  I opened /etc/init.d/net.eth0 and the "depend() { use pcmcia }" was already there.  I tried changing the "use" to "need" to match the install example, but that didn't help.  The install page suggested I look in /etc/init.d/pcmcia to see if everything looked good?  I don't have that file.  I do have an /etc/pcmcia but it is empty.

Any ideas would be greatly appreciated.

----------

## Devil

I have the EXACT same problem as you   :Sad: 

I have tried everything I can think of to get it to work but no luck..

Anyone got any ideas?

----------

## Gert

Did you do an :

```
emerge pcmcia
```

after you made your kernel ?

I don't think so because otherwise you'd have a bunch of files in

/etc/pcmcia and an /etc/init.d/pcmcia file

----------

## pwk

Gert,

Great idea, but when I run emerge pcmcia (after rebooting from my CD) I get    

!!! Couldn't find match for pcmcia; aborting.  

Is the package named something else?  Is there a list I can look through to find out?

Thanks for the tips so far.

----------

## Leoric

Compile a kernel without pcmcia support. 

Then "emerge pcmcia-cs". 

Load the modules pcmcia_core, your pcmcia_bus module ( mine is "i82365"), ds and the module for your card (mine is "3c589_cs") then run "cardmgr", and eth0 is up. This is what I do.

1. <Compile new kernel without pcmcia support>

2. "emerge pcmcia-cs"

3. "modprobe pcmcia_core"

4. "modprobe i82365"

5. "modprobe ds"

6. "modprobe 3c589_cs"

7. "ifconfig eth0 192.168.1.14"

8. "route add -net default gw 192.168.1.1 netmask 0.0.0.0 metric 1"

----------

## Leoric

I forgot something on the summary, "cardmgr" is between 7 and 8

----------

## rlyacht

 *Leoric wrote:*   

> Compile a kernel without pcmcia support. 
> 
> Then "emerge pcmcia-cs". 

 

If that's what I have to do, I'll do it, and I appreciate the post, but I'm wondering why this would be the case.  Why doesn't compiling pcmcia support into the kernel result in a kernel with pcmcia support  :Question: 

----------

## chadh

You should emerge pcmcia-cs, but your card will most likely work without it.  First, some questions:

1. What commands did you use to get networking going when you used the install CD?

2. Is this a card that you insert and remove?

The install CD uses pcmcia-cs modules, so if you want your installation to work the same way, you will need to unconfigure all pcmcia support from your kernel and then emerge pcmcia-cs.  Then 'rc-update add pcmcia default' and you should be pretty close to where you want to be.

If you want to use the kernel modules, then make sure you compile your network device driver as a module (if this is a removable card).  Then emerge pcmcia-cs, and it will install cardmgr, which will automatically load your kernel module when you insert the card.

If you search the gentoo-user mailing list archives, you will find a post by me with more detailed instructions.

----------

## pwk

Thank you all for taking the time to try and help out.

I have booted from the CD, recompiled my kernal without PCMCIA support.  I am using the insmod pcmcia_core, etc... method to get my card working from the CD.  I then emerge pcmcia-cs.  The rc-update add pcmcia default.  I then reboot from my harddrive, and no dice.  When I cd to /lib/modules/2.4.19-r1/pcmcia I have an empty directory.  Why am I not getting the modules that I need?  How can I find these.  I tried to copy the modules from the CD, but they are compiled for 2.4.19 so do go.  What do I need to do to get these modules?

Again, thanks for the tips and suggestions.

----------

## chadh

Did you find my e-mail with instructions on how to do this?  My bet is that  your kernel is still configured incorrectly.  

And I need more than "no dice"  Exactly how is it failling?  Check both your dmesg and your logs for cardmgr output.

----------

## pwk

Chad,

I've gone through the last two months of archives.  I found a post by you from 19 March that says you updated pcmcia-cs to 3.1.33-r1.  The post gives instuctions on how to make things work.  I assume that is the correct how-to.

I did "make menuconfig", went under "network device support => pcmcia network device support"  I have "[  ] pcmcia network device support" which I take to mean I do not have pcmcia support in the kernel.  I recompiled just to make sure.  After recompiling, I do "make dep && make clean bzImage modules modules_install" then I rename my old image and move bzImage to /boot.  I then run "emerge pcmcia-cs".  The modules are still not in /lib/modules/2.4.19-r1/pcmcia, it is still empty.  I rebooted from my harddrive.  During the boot process I saw "cardmgr[1971]: card services release does not match".  "Bringing eth0 up."  "Failed to bring eth0 up."  I looked through my dmesg output, but didn't see anything that seems relevant.  Maybe I just don't know what to look for.  I also went through the logs at /var/log/kernel/ and I didn't see anything that gave me any clues.  I grep'ed them both for 'cardmgr' as well as visually searching.   In /var/log/everything I found the following output from [cardmgr]:

watching 1 sockets

Card Services release does not match     (problem here?)

starting, version is 3.1.33

socket 0: CardBus hotplug device

exiting

Do I have some screwy setting somewhere?  Installation was pretty easy, so I'll do it again if you think that will help.  Hell, I'll try it standing on my head if you think that will help.

Thanks for your assistance.

----------

## Guest

I had a very similar problem when I installed the first time.  Here's how I resolved it.  I compiled my kernel with NO pcmcia support at all.  After installing the kernel but before rebooting I did an 'emerge pcmcia-cs' then I added pcmcia_core, i82365, and ds to my /etc/modules.autoload file.  Then i edited the /etc/conf.d/net file as needed and did rc-update add for net.eth0 and pcmcia.  It should work from there.

----------

## pwk

Thanks for the suggestions.  When I try it that way, it tells me "Failed to load pcmcia-core......"  It really looks like pcmcia-cs didn't give me the modules.  I've tried recompiling my kernel as Chad suggested, but it is still not giving them to me.  Is there somewhere else I can get them from?  Is there some kernel setting log that I can blow away so the modules will download?

----------

## chadh

 *pwk wrote:*   

> Chad,
> 
> I've gone through the last two months of archives.  I found a post by you from 19 March that says you updated pcmcia-cs to 3.1.33-r1.  The post gives instuctions on how to make things work.  I assume that is the correct how-to.

 

The mail I am referring to is from Mar 19 and the subject is "UPDATED pcmcia-cs Instructions".

 *pwk wrote:*   

> I did "make menuconfig", went under "network device support => pcmcia network device support"  I have "[  ] pcmcia network device support" which I take to mean I do not have pcmcia support in the kernel.

 

I am very explicit in that mail about the kernel options.  The important one that you have to unconfigure is "PCMCIA/Cardbus Support"  I think it is under General Setup or something like that.  If that is not deselected, then you will not get the pcmcia modules.

----------

## pwk

Chad,

It worked great.  I unchecked "general setup => pcmcia/card bus support => PCMCIA/CardBus support" and the modules came through via an emerge pcmcia-cs.  Thanks for your help.

New problem, when I reboot from my harddrive, the modules load fine, but when the cardmgr comes up, it says "cardmgr[2150]: watching 1 socket"  then it hangs.

I've read through the last 4 months of your emails and I've only seen one similar reference.  You told the poster to remove the "-f" option from the cardmgr command, so I did.  It still hangs.  Any ideas?  I'm using an internal card (not removable)

I removed the modules from the modules.autoload file, and the system came up just fine.  I installed the modules by hand (insmod blah blah) and they went in fine.  When I ran the cardmgr command, it hung up again.  Rats!!

Ideas on what I misconfigured?

Thanks in advance.

----------

## chadh

Have you googled for your laptop/network card support with pcmcia-cs.  You may need to configure /etc/pcmcia/config.opts.  Also, make sure you are checking the logs for output of cardmgr.  If you can't find anything, try shutting down your logger and running cardmgr.

----------

## pwk

I found no output from cardmgr in my logs, so I shutdown the logger (rc-update del metalog) and it did better.  I now get the following output from cardmgr during startup

watching 1 sockets

starting, version is 3.1.33

socket 0: 3Com 3CCFE575CT/3CXFE575CT Fast EtherLink XL

'modprobe bc_enabler'

'modprobe 3c575.cb'

'./network start eth0'

Then it hangs.

In /etc/pcmcia/confis.opts I have the following lines uncommented

include port 0x100-0x4ff, etc

include memory 0xc0000- etc

include memory 0xa0000000-etc

and then under Extra port range for IBM token ring  (really?)

include port 0xa00-0xaff

then under resources we should not use

exclude irq 4

exclude irq7

everything else is commented.

Is this a situation where we might all be happier if I reinstalled from scratch or is it specific hardware compatability problems and I should keep trying with this machine?

Thanks as always for your assistance.

----------

## chadh

Are you sure that it is hanging?  Can you do a ps aux in another terminal and see if dhcpcd is running?  I know you said that you removed -f from the cardmgr options, and that should mean that dhcpcd is not the problem, but you never know.

Reinstalling is hardly ever the answer, and I would say it is definitely not in this case.  You probably have a simple error.  Double check your /etc/conf.d/net file.  You can also try setting a static IP addrress.  If the module really is locking up your hardware, you might take a second look through your kernel configuration.  You might have compiled in something that is causing problems that was not in the ISO kernel.

----------

## Guest

Chad,

You have the patients of a saint.

/etc/conf.d/net has

iface_eth0="eth0"

uncommented only.

I have changed it to iface="192.168.102.-etc.....

and uncommented the gateway line (and change the address accordingly)

With logging on or off, still it hangs.

I can't check the ps aux, it won't let me open another terminal.

The only changes I made to the kernel we the ones suggested in the install guide.  The code maturity level option, and the filesystem virtual memory stuff.  The pcmcia options under network device support aren't even available anymore, so they aren't checked.  I looked through every other option and didn't see anything suspicious although I'm not sure I would recognize it.

Again, the file system boots fine if I don't autoload the modules.  The modules insmod in just fine.  When I issue dhcpcd eth0, it hangs up and stays hung.

Should I sacrifice a chicken?  Can I hardcode my card info somewhere and avoid the cardmgr?  Keep 'em coming, I'll try anything.

Thanks agian

----------

## pwk

Oooppss.. Correction to above

/etc/conf.d/net has:

ifacd_eth0="dhcp"

uncommented

Funny, I woke up this morning and it still didn't work.  I figured maybe the cardmgr farie would have come and fixed my mistakes, and maybe installed apache for me, but no...., nothing.    :Smile: 

----------

## chadh

 *Anonymous wrote:*   

> I can't check the ps aux, it won't let me open another terminal.

 

Does that mean that your whole machine is locked up?  That definitely means a hardware conflict.

 *Anonymous wrote:*   

> Should I sacrifice a chicken?  Can I hardcode my card info somewhere and avoid the cardmgr?  Keep 'em coming, I'll try anything.

 

Well, you can always try to build all the drivers into your kernel (not as modules), but you can only do that with the modules provided in the kernel.  If you do that, then you don't even need cardmgr.

----------

## pwk

Ok,

I'll recap just to keep things fresh.

I have a Compaq presario 1600.  My PCMCIA card is a 3com575 (3cxfe575ct)  I did a clean install and select NO pcmcia/card bus support under General options in the kernel configuration.  I run emerge pcmcia-cs after my kernel configuration.  I recieved the pcmcia modules (_core, i82365,ds) necessary to run my card.  The modules ran my card fine when I boot from the CD.  I have not modified /etc/init.d/net.eth0.  When I insert the modules, whether at boot time or manually, they go in just fine.  When I run cardmgr, either at boot time or manually, with -f or without, the machine hangs and will not unlock.  I must power down.  I can not open other terminals, she is totally stuck.  I have included pcmcia in rc-update and I have tried this with my logger on and off.  The OS works just fine, as long as I'm happy without network support.  I have tried checking every pcmcia/3com like option in the kernel config menu, and rebooted, still the same problem, when the cardmgr starts, it just hangs the machine.

Any options?  Could it still be a hardware problem even though it worked with the CD?  Is this a bug?  Can I test anything to help fix it?  I've got time if anyones got ideas.   :Smile: 

----------

## chadh

 *pwk wrote:*   

> Any options?  Could it still be a hardware problem even though it worked with the CD?  Is this a bug?  Can I test anything to help fix it?  I've got time if anyones got ideas.  

 

I recommend removing cardmgr from the equation, just to make sure the problem is what I think it is.  Boot from the CD and run cardmgr.  Then do an lsmod to see what modules are loaded.  You will see that cardmgr loads the modules specific to your network card.  Then boot into your current system and modprobe i82365, ds, and those modules loaded by cardmgr.   That should let you know exactly which module is causing the problem.

Another thing you can try is to try the kernel's modules (rather than pcmcia-cs) and see if it works any better.  A lot of people are recommending not using the pcmcia-cs modules with current kernels.

----------

## pwk

Chad,

I ran cardmgr from the cd and lsmod.  I get pcmcia_cor, i82365, ds, cb_enabler, 3c575_cb.  I reboot and load those modules in that order with insmod.  At this point an lsmod looks the same as it did when I booted from the cd except the 3c575_cb modules say (unused).  If I do a dhcpcd command, I get the same hang and message that was occuring before.  It says (./network start eth0) and that is where it hangs.  I assume it is trying use the network script in /etc/init.d/pcmcia (I think that's where it is) so I looked through that script.  I don't know enough to make much from there.  I see it calls to net.eth0 so I went over there.  It starts with depend { use pcmcia} so I commented those lines thinking I might have had some infinite loop problem.  As I'm sure you already know, that didn't work.  What up?  

If there is anything I can check or test, even if I never end up with a working system, I'd be glad to help.

----------

## mellofone

 *pwk wrote:*   

> Chad,
> 
> It worked great.  I unchecked "general setup => pcmcia/card bus support => PCMCIA/CardBus support" and the modules came through via an emerge pcmcia-cs.  Thanks for your help.
> 
> New problem, when I reboot from my harddrive, the modules load fine, but when the cardmgr comes up, it says "cardmgr[2150]: watching 1 socket"  then it hangs.
> ...

 

Whew. Now I KNOW I am not crazy. I have the EXACT same problem. Everything works out perfectly until I add that cardmgr line. As soon as I do, I get the cardmgr[xxxx]: watching 1 socket: and the whole system hangs.

I also tried REMOVING my card and running the cardmgr, and it loads without the hang. When I insert the card, it beeps and the system locks. I checked and double checked, I do not have anything in the kernel config reguarding PCMCIA support... I am using a 3com 3C3FE575CT (uses 3c575_cb).  I know the card works, because I used it to install Gentoo, and the cardmgr works perfectly there... What am I missing?

----------

## mellofone

I have made a SLIGHT bit of progress here...

I also have this problem under a Compaq Laptop, with what appears to be the same network card. I have tried and tried, and nothing is working. The 3com card that we both have is a 32bit CardBus card. I had an extra 32bit card, to which I have the same results.

I found an older 16bit card and decided to try it. It works perfectly. cardmgr works as it should with no lockups. I also can connect to my network with no problems...

The question is: What is the difference between the kernel sources on the install CD and the new gentoo-2.4.19-r1 (or standard linux-2.4.19-r1, i have tried both) sources when it comes to 32bt cardbus support?

----------

## Cr0t

thX guys... I had the same problem but now it's working great   :Cool: 

----------

## mellofone

 *Cr0t wrote:*   

> thX guys... I had the same problem but now it's working great  

 

What did you do?

----------

## mb

 *mellofone wrote:*   

> 
> 
> When I insert the card, it beeps and the system locks. 

 

the cardmgr scans several io ranges... most/all dell notebooks hanges when scanning 0x8??

so.. check your /etc/pcmcia/config.opts

my include line:

```
include port 0x100-0x4ff, port 0xc00-0xcff
```

#mb

----------

## roman

Hallo,

i had the same problems, so I switch off all PCMCIA related stuff in kernel

end emerged pcmcia-cs. Now all works, only that I spend

4 hours to search in forums here and recompilling kernel..

Anyway, do anybody know, WHY THE KERNEL PCMCIA MODULES ARE NOT WORKING?????

Roman.

----------

## mingnut

Hi,

I have just found this thread and since I am currently in the same boat as some of you with my Netgear card, this is what I am planning on doing:

I have disabled the PCMCIA support in the kernel and have chosen to emerge the pcmcia-cs package.  Oddly enough, I have already done this, when I realised that the pcmcia start-up file in /etc/init.d was missing during the installation phase.  I am currently re-compiling my kernel and seeing if I can just use the pcmcia-cs package.

Has anyone tried using the standard "vanilla" kernel with PCMCIA support enabled to see if that kernel works instead ?  If my above plan fails, I might try this.

I will update this thread, if this works.

----------

## mingnut

Ok, I seemingly have my network card running.  But I reckon for everybody else, your mileage may vary.

I compiled PCMCIA support into the gentoo-optimised kernel.  And then I loaded the standard tulip driver (modprobe tulip) into the kernel.  I was then able to do a "dhcpcd eth0" to get an IP address.

I hope this bit of information helps somebody.

----------

## mdarl

I too had a problem with cardmgr locking up the system using the kernel( 2.4.20 ) PCMCIA drivers.  The card in question was a Linksys 10-100MBit/56K modem combo card.  Somewhere I came across information saying you should try compiling into the kernel 'ISA bus support' and 'ISA Plug and Play support' when using PCMCIA.

It solved my problems.

----------

