   PCMCIA

   This section contains answers to questions frequently asked about
   using PCMCIA hardware (commonly found on laptop computers) with Debian
   GNU/Linux.
   
   Answers in this category:
   
   [1]How does Debian provide PCMCIA support?
   [2]How do I setup my Debian system to use PCMCIA cards?
   [3]How do I upgrade my PCMCIA packages?
   [4]What must I do when I upgrade my kernel?
   [5]What if I don't use the default Debian kernel?
   [6]Why can't I use my PCMCIA network card to reach my network?
   [7]What if my question is not answered here?

   This document is: http://www.debian.org/cgi-bin/fom?file=60

References

   1. http://www.debian.org/cgi-bin/fom?file=70
   2. http://www.debian.org/cgi-bin/fom?file=74
   3. http://www.debian.org/cgi-bin/fom?file=75
   4. http://www.debian.org/cgi-bin/fom?file=76
   5. http://www.debian.org/cgi-bin/fom?file=77
   6. http://www.debian.org/cgi-bin/fom?file=79
   7. http://www.debian.org/cgi-bin/fom?file=80

     _________________________________________________________________
   
   How does Debian provide PCMCIA support?

   PCMCIA support for the Debian distribution is provided by the Card
   Services for Linux package by David Hinds. This package includes a set
   of loadable kernel modules, a set of client drivers for specific
   cards, and a card manager daemon that can respond to card insertion
   and removal events, loading and unloading drivers on demand. More
   information about this package can be found in the Linux PCMCIA HOWTO
   at

   [1]http://hyper.stanford.edu/~dhinds/pcmcia/doc/PCMCIA-HOWTO.html

   Card Services for Linux is provided in two complementary Debian
   packages: pcmcia-cs and pcmcia-modules-<kernel version>. The pcmcia-cs
   package contains the card manager daemon, configuration files, and
   other PCMCIA utilities. The pcmcia-modules-<kernel version> package
   contains the loadable kernel modules. Here <kernel version> is the
   version of the Linux kernel for which the modules were built (for
   example, 2.0.29-7).

   This document is: http://www.debian.org/cgi-bin/fom?file=70

References

   1. http://hyper.stanford.edu/~dhinds/pcmcia/doc/PCMCIA-HOWTO.html

     _________________________________________________________________
   
   How do I setup my Debian system to use PCMCIA cards?

   First you should obtain and install the pcmcia-cs and
   pcmcia-modules-<kernel version> packages, where <kernel version> is
   the version of the Linux kernel that your system is using (for
   example, 2.0.29-7). Next you must configure your PCMCIA device
   scripts. The configuration of the PCMCIA Card Services software is
   throughly described in the Linux PCMCIA HOWTO at

    [1]http://hyper.stanford.edu/~dhinds/pcmcia/doc/PCMCIA-HOWTO.html

   However a brief description of the procedure has been included here.
   
   IMPORTANT: As a general rule, when configuring Linux for a laptop,
   PCMCIA devices should only be configured from the PCMCIA device
   scripts. Do not try to configure a PCMCIA device the same way you
   would configure a permanently attached device.
   
   To configure your system, you must first check the settings in the
   /etc/pcmcia/config.opts file. This file usually does not need to be
   changed; however, if your system has any unusual devices that cannot
   automatically be detected by Card Services, you may need to explicitly
   exclude resources for a device in this file. For example, a system
   with a sound card that uses irq 5 may need to add the line `exclude
   irq 5' to this file.
   
   Next you must configure each class of devices that you plan to use.
   There currently are eight device classes: network, SCSI, cdrom, fixed
   disk, serial, FTL, memory, and pcmem. Each class has an options script
   (e.g., /etc/pcmcia/network.opts) associated with it that contains the
   configuration information for its devices. The pcmcia-cs package
   contains a set of default option scripts that can be modified to
   reflect your system's specifications. The default option scripts may
   not need to be modified for modems and CD-ROMS (including SCSI
   CD-ROMS), but the other device classes are unconfigured by default.
   
   The PCMCIA device manager daemon is not started when the package is
   installed. Therefore to use your PCMCIA cards, you must start it
   either by rebooting the system or executing

    /etc/init.d/pcmcia start

   as root.

   This document is: http://www.debian.org/cgi-bin/fom?file=74

References

   1. http://hyper.stanford.edu/~dhinds/pcmcia/doc/PCMCIA-HOWTO.html

     _________________________________________________________________
   
   How do I upgrade my PCMCIA packages?

   When upgrading to a new version of the PCMCIA packages, both the
   pcmcia-cs package and the pcmcia-modules-<kernel version> package must
   be upgraded to the new version. The version numbers of both packages
   must match.
   
   The PCMCIA system is not restarted when the packages are upgraded.
   Thus, your system will use the old version of the PCMCIA utilities
   until you either reboot the system or manually restart the PCMCIA
   device manager by executing

    /etc/init.d/pcmcia restart

   as root.

   This document is: http://www.debian.org/cgi-bin/fom?file=75

     _________________________________________________________________
   
   What must I do when I upgrade my kernel?

   When you upgrade to a new version of the Linux kernel, you also must
   install the pcmcia-modules-<new kernel version> package, where of
   course <new kernel version> is the version of the Linux kernel that
   you have just installed. After rebooting the system to start the new
   kernel, the pcmcia-modules-<old kernel version> package can be removed
   (or purged) from your system, either by deselecting it with the
   dselect program or by using the remove (or purge) option of dpkg. Note
   that pcmcia-modules-<old kernel version> will not automatically be
   removed from your system when you install the pcmcia-modules-<new
   kernel version> package.

   This document is: http://www.debian.org/cgi-bin/fom?file=76

     _________________________________________________________________
   
   What if I don't use the default Debian kernel?

   The PCMCIA modules provided in the Debian distribution have been
   compiled to work with Debian's default Linux kernel. If you compile
   your own kernel with a different configuration, these modules might
   not work. However, you can compile your own version of the PCMCIA
   modules.
   
   The pcmcia-source package has been provided to help Debian users
   recompile the PCMCIA modules to work with their kernels'
   configurations. (It also is possible to rebuild these modules using
   the Debian source files for the pcmcia-cs package.) The pcmcia-source
   package unpacks the source for the PCMCIA Card Services for Linux
   package into the /usr/src/modules/pcmcia-cs directory.
   
   To compile a new set of PCMCIA modules, you will need the full source
   of the kernel used by your system, say in the /usr/src/linux
   directory, and you will need ensure that it is configured (i.e.,
   execute `make config dep' in /usr/src/linux). You also will need to
   have the dpkg-dev package installed on your system.
   
   Once the kernel's source is ready, go to the top of the PCMCIA Card
   Services source tree (/usr/src/modules/pcmcia-cs if you have installed
   the pcmcia-source package). If your kernel's source is located in the
   /usr/src/linux directory, execute debian/rules binary-modules as root,
   otherwise, you will have to specify the location of the kernel's
   source with

    debian/rules KSRC=<kernel directory> binary-modules

   where <kernel directory> is the location of the kernel's source. This
   will generate a new file named

  pcmcia-modules-<kernel version>_<package version>_i386.deb

   in the parent directory that, once installed, will be compatible with
   your custom kernel configuration.

   This document is: http://www.debian.org/cgi-bin/fom?file=77

     _________________________________________________________________
   
   Why can't I use my PCMCIA network card to reach my network?

   Ensure that your network configuration is in the
   /etc/pcmcia/network.opts script and not in /etc/init.d/network. In
   general, the network configuration information that normally would go
   in the /etc/init.d/network file for a non-PCMCIA network card, should
   be placed in the /etc/pcmcia/network.opts script.

   This document is:
   http://www.debian.org/cgi-bin/fom?file=79

     _________________________________________________________________
   
   What if my question is not answered here?

   Numerous sources of information are available. If your question is
   about Linux on a Laptop computer, but not necessarily about the Debian
   distribution, check The Linux Laptop Home Page (at
   [1]http://www.redhat.com/linux-info/laptop/). Help also is available
   on the linux.dev.laptop USENET newsgroup (at news:linux.dev.laptop).
   
   If your question is about PCMCIA cards and the Card Services for Linux
   package, see the Linux PCMCIA Information Page (at
   [2]http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html). Your
   question may be answered in the Linux PCMCIA HOWTO (at
   [3]http://hyper.stanford.edu/~dhinds/pcmcia/doc/PCMCIA-HOWTO.html),
   which is available as /usr/doc/HOWTO/PCMCIA-HOWTO on Debian systems
   with the doc-linux-text package installed.

   This document is:
   http://www.debian.org/cgi-bin/fom?file=80

References

   1. http://www.redhat.com/linux-info/laptop/
   2. http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html
   3. http://hyper.stanford.edu/~dhinds/pcmcia/doc/PCMCIA-HOWTO.html
