# pcmcia-cs vs. kernel..

## masseya

I would like to use the kernel source for my driver for my orinoco wireless card.  I have been told that they work better than the pcmcia-cs drivers.  I was wondering though, how do I use cardmgr with the kernel sources?  Can I still emerge the pcmcia-cs package to use cardmgr or will that use it's own driver as well?  Is this utility builtin when I compile support for pcmcia in my kernel?

----------

## fidler

Even if you compile PCMCIA support into the kernel you still need to install the pcmcia-cs package.  The pcmcia-cs package recoginizes that you have compiled support and just compiles the needed drivers.  Otherwise, you can't get the PCMCIA to work...

In other words, you emerge pcmcia-cs and the cardmanager tool will appear.

----------

## masseya

Ok, I think I understand that.  I read somewhere that you have to emerge pcmcia-cs everytime you compile a new kernel if you are not compiling support for your card into the kernel.  Just to confim, does this mean that if you are compiling support in your kernel that you only have to emerge pcmcia-cs once?

----------

## delta407

I made a "remerge-modules" script that contains all the commands I need to execute to bring all my modules online. Namely, "emerge nvidia-kernel" and "yes | vmware-config.pl". Then, I added the following to /etc/init.d/modules, before it modprobes anything:

```
# Check kernel version

cd /etc/conf.d/

current=`uname -a`

prev=`cat current-kernel`

if [[ $current != $prev ]]; then

        echo New kernel detected, re-installing modules...

        uname -a > current-kernel

        cd /usr/src/

        ./remerge-modules

fi
```

This checks the running kernel with the previously running kernel, and if they're different, runs /usr/src/remerge-modules (yeah, dumb place). It works great (except for the obvious side-effect of preventing a boot until the modules are back in, and if Portage wants to access the network, it may not be able to).

----------

## fidler

 *Tristam29 wrote:*   

> Ok, I think I understand that.  I read somewhere that you have to emerge pcmcia-cs everytime you compile a new kernel if you are not compiling support for your card into the kernel.  Just to confim, does this mean that if you are compiling support in your kernel that you only have to emerge pcmcia-cs once?

 

I think so.  Otherwise it says invalid card manager version, or something like that.

----------

## Hole

However, I always turn off the pcmcia stuff in the kernel as it tends to be out of date compared to the pcmcia-cs package modules.

This is very important on my laptop (Sony Vaio PCG-FX103) as the kernel ones mean I can only use one slot at a time!

----------

## chadh

Whether you use the kernel or pcmcia-cs modules is up to you.  The latest orinoco drivers are in the pcmcia-cs ebuild, though.  I am using the 0.12b drivers, and I no longer get a ton of NULL Interrupt errors (if you are getting those, then you know what I am talking about).  The 0.12 drivers are available if you emerge the masked 3.1.34-r7 ebuild.  There should be an unmasked -r8 soon that will require an "orinoco" keyword to get the drivers.

As far as remerging pcmcia-cs, you only need to do that if you are using pcmcia-cs modules.  The reason is that make modules_install blows away the pcmcia-cs modules, so you have to put them back.  If you are using the kernel pcmcia stuff, you should not have to remerge pcmcia-cs.  With pcmcia-cs 3.1.33, I always get the unmatched kernel version error, but pcmcia-cs 3.1.34 seems to have done away with it.

----------

