# pcmcia-cs instructions for Gentoo users.

## chadh

The pcmcia-cs package provides utilities (cardmgr, cardctl, etc.) and

drivers.  You probably want the tools if you use PCMCIA devices, as they

let you automatically bring up interfaces when you insert cards (cardmgr)

and change your network settings scheme (cardctl), etc.  You may or may not

want the drivers.  For instance, the orinoco_cs driver in the kernel is

supposedly better than the wvlan_cs driver provided with pcmcia-cs.

Whether you want the drivers or not, it is important that you configure

your kernel *before* installing pcmcia-cs.  The pcmcia-cs ebuild uses your

kernel settings (found /usr/src/linux) to determine whether or not to

install the modules.  If you want the pcmcia-cs modules, then make sure

that you configure "PCMCIA/Cardbus support" *off*  Then compile and install

your kernel and modules.  If you do not want the pcmcia-cs modules, then

configure "PCMCIA/Cardbus support" as either a module or built-in and

select any modules that you want to use.  Finally emerge pcmcia-cs to

install the utilities and possibly drivers.

If you choose to use the pcmcia-cs kernel modules, then you need to remerge

pcmcia-cs *each time* you rebuild your kernel.  And even if you don't use

the pcmcia-cs modules, it wouldn't be a bad idea to be in the habit of

remerging pcmcia-cs.

To configure networking, edit /etc/conf.d/net as described in other Gentoo docs.  You *do not* need to rc-update add net.eth*, though.  cardmgr will bring the interface up and down appropriately when you insert and eject the cards.

Finally, run the following command to bring up pcmcia services on each boot.

```
rc-update add pcmcia default
```

Last edited by chadh on Wed May 01, 2002 2:00 pm; edited 2 times in total

----------

## cedric

I think you have forgotten to do the following

rc-update add pcmcia default

----------

## chadh

added.  Thanks!

----------

## clattuc

One thing: I 'downgraded' my kernel to 2.4.18 (the network interface built into my laptop doesn't work properly with the Gentoo-'2.4.19' kernels).

I also downgraded to pcmcia-cs-3.1.22, because that's the version matching the pcmcia in the kernel.

If I emerge the current version, pcmcia-cs-3.1.33, cardmgr starts up with a warning that there is a mismatch between kernel pcmcia-headers & pcmcia-cs headers, and says it will exit (but doesn't...).

Don't know if it will work anyway, I just got sick of the errormessage  :Cool: 

Cu,

  Edwin

----------

## LabRat

Ok so I did everything you said and rebooted.

The pcmcia_core, i82365, ds and 3c574_cs modules loaded.

 then i got 

 *Quote:*   

> Starting pcmcia...
> 
> cardmgr[1442]: Watching 2 sockets

 

and it froze.   :Evil or Very Mad:   :Sad:   :Exclamation:   :Question: 

I did a hard reset and now all of the modules fail to load and I get 

 *Quote:*   

> Starting pcmcia...
> 
> cardmgr[1434]: no pcmcia drivers in /proc/devices
> 
> cardmgr failed to start. Make sure that you have PCMCIA
> ...

 

so what happened?

I looked at /proc/devices and there is no listing for pcmcia.

any help is appreciated

Thanks

Doug

----------

## LabRat

I for got you gave a few methodes in your post. 

I complied my kernel without pcmcia suport then

```
emerge pcmcia-cs
```

I also forgot to mention that before my computer froze my card reved to life and made a few beeps.

again thanks

----------

## JamieC

 *chadh wrote:*   

> The pcmcia-cs package provides utilities (cardmgr, cardctl, etc.) and
> 
> ...
> 
> ```
> ...

 

It really is just "rc-update add pcmcia default".  If you add the "-cs", you get an error message about not finding /etc/init.d/pcmcia-cs.

Other than that, thanks for this explanation!  My PCMCIA ethernet card wasn't recognised properly until I followed these directions.

----------

## chadh

Thanks!  Fixed.

----------

## JL

OK, I figured out how to get my wireless lucent card to work. 

I have a built in rtl8139 nic too that work s great. wireless nic is eth1.

MAnually modprobe'ing everything listed in this thread and the correct driver. rc-update add wvlan_cs default was done. dhcpcd eth1 brings it up and I was surfing! Great I think. Now I edit /etc/modules.autoload and add pcmcia_core, i82365, ds and wvlan_cs (the ones it did manually before). rebooted. cardmgr was launced during boot. Now the light comes on on the card but no joy. ifconfig shows the card configured. cardctl ident shows the card. cardmgr error because it's running already.

How do I make this card work automatically? I must be editing the wrong file or have something out of order during boot. Can someone shed some light on this one?

----------

## JL

why is it that whenever you make a post to any forum for help, you always get that 1 great idea to try and solve your problem?

Well mine was a dns issue. i added a nameserver entry for my wireless gateway to /etc/resolv.conf and all is happy happy

imagine THAT!

thanks for the great posts on getting wireless going. you may want to add the parts about editing /etc/resolv.conf if needed for nameserver entry.

JL

----------

## al

Hi,

  I have netmount started at boot and had to update the depend on 

/etc/init.d/netmount 

to add PCMCIA so netmount gets started after pcmcia

my depend for netmount now looks like

depend () {

   need net

   user potmap pcmcia

}

Al

----------

## antrod

I have the oddest  problem when I put my Sony Z505RX Vaio to sleep. The computer suspends/resumes correctly, but my lucent Wavelan card stays on after the computer is suspended until I manually yank the card out of the socket. I wouldnt mind except for the fact that this is likely to drain the battery while the computer is suspended. 

I used to have Debian on this laptop and this worked well. Does this have to do with apmd (which I don't have installed due to the emerge error) or is it some setting in the pcmcia confs?

Thanks,

Antonio

----------

## Guest

I followed the instructions, but when done nothing worked. 

Modprobe pcmcia_core worked, but modprobe ds would not work. After a lot of searching - thanks google  :Smile:  I found that I should modprobe i82365 first, then ds. But there was no i82365. The emerge pcmcia-cs did not create this module. So where does it come from?

The instructions provided say set "PCMCIA/Cardbus off" But there is no mention of i82365. Searching manually thru the .config file I found "CONFIG_I82365 is not set".  I'm now guessing that this must be set "on".

There really should be a list with this set of PCMCIA-CS instructions of the exact kernel config settings required to make this work.

Oh well. It's only another 2 hours to compile my kernel and modules.

I'll let you know if I am sucessful

----------

## Guest

Unfortunately I have a Dynalink L100CLV. I can't install gentoo (not with the 16mb iso) because that iso doesn't provide yenta_socket iso the i82365... 8139too module fails without yenta_socket.

Would it be wise to use the stage 3 install and get it to work after that?

Now I can't install at all  :Smile: 

----------

## chadh

 *Anonymous wrote:*   

> Unfortunately I have a Dynalink L100CLV. I can't install gentoo (not with the 16mb iso) because that iso doesn't provide yenta_socket iso the i82365... 8139too module fails without yenta_socket.
> 
> Would it be wise to use the stage 3 install and get it to work after that?
> 
> Now I can't install at all 

 

I think you are confused.  i82365 and yenta_socket are mutually exclusive.  If you are using pcmcia-cs modules, then you load i82365, and if you are using kernel modules, then you use yenta_socket.  And please note that the i82365 module for pcmcia-cs is different than the option you see if the Linux kernel config.  If you have to use yenta_socket to get your card to work, then you will have to come up with another boot CD to get the install going.

----------

## nickperry

 *LabRat wrote:*   

> I for got you gave a few methodes in your post. 
> 
> I complied my kernel without pcmcia suport then
> 
> ```
> ...

 

Try lettting cardmgr load the 3c574_cs module, rather than autoloading / modprobing it first. I have a 3c575_cb and I just autoload i82365 and ds and let cardmgr look after the rest.

----------

## WildBill

I'm having a strange PCMCIA problem:

Machine: Sony Picturebook C1VPK

PCMCIA-CS works great (I am using the pcmcia-cs drivers, not the kernel drivers) with all my network cards, including the Orinoco wireless card I have.  However, I run into problems when ejecting any NIC card.

Symptom:

1) Running "cardctl eject" results in this message; "ioctl():Device or resource busy"

2) Ejecting the PCMCIA card without running cardctl eject works.  The machine beeps on card removal, but eth0 stays up, and the modules remain loaded.  Inserting a different NIC (say, going from wired to wireless) doesn't do anything, that is, the NIC isn't recognized.  If I do an "ifconfig eth0 down" , "killall dhcpcd" ,and then manually rmmod the modules for the removed NIC, I can swap NIC cards, but I have to manually run dhcpcd to get an IP address again.

It's my understanding that I should be able to swap cards on the fly without having to do this - I have Mandrake in another partition on this machine, and I use pcmcia-cs and kernel 2.4.18 both compiled from source over there, and this works.  I'm stuck.   I think I'm missing something, but I don't know what.  Any help is greatly appreciated, as once I get this figured out I feel comfortable enough with Gentoo to wipe out the Mandrake partition and use it for data storage.

----------

## WildBill

I think I'm getting closer.  My buddy's machine also exhibits the same behavior with ejecting a PCMCIA card.

I notice upon a PCMCIA eject that the /etc/pcmcia/network script fails when checking... it can't find the /var/run/stab file.

Anyone else have issues with /var/run/stab?  Is there any easy fix?  I'm still digging... as I find more info or come up with a fix I'll let everyone know.

----------

## JoePenguin

I am missing /var/run/stab just like Wildbill. My understanding is that this is something that cardmgr is supposed to create but instead it complains that the file is not there. I created the file by doing 

```
touch /var/run/stab
```

 but it looks like the file disappeared after I rebooted. This is not preventing me from using my PCMCIA card, so I only consider it a minor annoyance right now.

----------

## Ludwig

A big thx for this instructions. 

It was very helpful to make my 3COMCCE575BT card working !

----------

## elijahchancey

It would be incredibly useful to have the install docs tell you to "emerge pcmcia-cs" in the install.

 *LabRat wrote:*   

> I for got you gave a few methodes in your post. 
> 
> I complied my kernel without pcmcia suport then
> 
> ```
> ...

 

----------

## oregonshoegazer

** warning - linux newbie questions ahead **

hi guys,

i am having difficulty installing the PCMCIA modules on my machine.  in fact, i may have made the *least* progress of anyone in this thread.    :Wink: 

my problem is that i can't get the base PCMCIA kernel modules to load.  i read the PCMCIA-HOWTO after trying 

```
emerge pcmcia-cs
```

 and i couldn't find any solution there.  no matter which approach i take, i can't seem to get any of the base modules (pcmcia_core, ds, i82365) built.

i've pulled all the PCMCIA modules out of the kernel.  i've rebuilt the kernel before

1.  using emerge

2.  unpacking pcmcia-cs myself

any ideas?  i can't find any documentation with regards to my problem.  i'm sure it's something simple that i've forgotten...

Thanks!

----------

## irony

Just to make sure I'm getting this correctly:

If you configure the kernel to support pcmcia and compile in the particular drivers for a card, pcmcia-cs isn't needed.  Further, the init.d entries don't need to be modified to need(pcmcia).  The kernel will load the pcmcia support automatically (assuming it works), as well as the card drivers, and networking should proceed apace.

If you want to use pcmcia-cs, pcmica support should not be compiled into the kernel, and consequently, neither should the drivers for a particular card.  In this case, the init.d entries do need to be modified, and emerge pcmcia-cs should be done after any changes to the kernel.

So pcmcia-cs generates the correct kernel modules automatically?

----------

## cbrese

So far the best I can get it 2 beeps and a hung system or an error message saying "Make sure you have PCMCIA loaded..."

I get the 2 beep error if I put pcmcia_core, i82365, and ds in modules.autoload.

I get the error message if I remove ds from modules.autoload.

I fixed the bug in /etc/pcmcia/network by removing the wireless stuff

I have my kernel compiled WITHOUT PCMCIA/CardBus support and WITH i82365

After compiling the kernel and the rest of the makes I emerged pcmcia-cs

I can't think of anything else to try, please help my head hurts from banging it against the wall for 2 days.   :Sad: 

----------

## cbrese

I knew all I had to do was make a post and I'd figure it out right after.

It looks like the problem wasn't just the wireless stuff in /etc/pcmcia/network

I followed the instructions of a previous post for blowing away the /etc/pcmcia/network file and creating an empty one.

I now have pcmcia_core, i82365, and ds in my modules.autoload and it dosen't hang.

The only problem left is dhcpcd eth0 isn't getting run, and I have to do it manualy.

I have iface_eth0="dhcp" set in my /etc/conf.d/net.  Is there something else I need to do?  Should I do rc-update add net.eth0 default?

----------

## jthj

my pcmcia nic is working but I dont think quite correclty using cardbus support on in kernel is the only way it will work for me as if it's off it errors loading the pcmcia_cs anyhow the way it is it works fine if the card isnt' in when I boot.  If the card is in when I boot it works untill I eject it.  But once I do the module does not get unloaded and thus reinserting the card does not work it just gives me that low tone error!  Any ideas?

----------

## r8dhex

OK my pcmcia hard disk works fine, i can hotplug it. but i can't unplug it... if i do, i get a kernel panic or something and the machine freezes. i try to cardctl eject, but it says device or resource busy.

----------

## jthj

Mine dose that resource busy error if I use the cardctl eject thing to try and eject if my nic is in when I boot I wonder if it's something I set up wrong in the kernel.

----------

