Top

A Linux User Reference

Search tips
  • search ignores words that are less than 4 characters in length
  • searches are case insensitve
  • if a search does not return anything try it in Boolean mode then Query expansion mode by checking the appropriate radio button e.g. searching for 'cron' in just the Administration category returns nothing - presumably because the 50% threshold is reached. Boolean mode ignores this threshold so a search for 'cron' returns several hits
  • in Boolean mode preceding a word with a '+' means the result must include that word, a '-' means it must not
  • in Boolean mode '+crontab -anacron' means match articles about crontab that DO NOT mention anacron
  • to match a phrase e.g. 'manage system' check the Boolean mode radio button and enclose the phrase in quotes "some phrase ..."
  • in Query expansion mode the search context is expanded beyond the keywords you entered - relevancy of hits may well be degraded

HARDWARE

PCMCIA

  • PCMemory Card International Association (superceded)

    Superceded by usb

    USB devices are available for almost all functions the PC Card originally provided. The ExpressCard, which replaced the PC Card, contains a PCIe 1x and a USB interface. Cardbus devices can be plugged into an ExpressCard adaptor having a PCI-to-PCIe Bridge.

    Easily hot-swappable and transportable. Many devices packaged as PCMCIA in the past might now be packaged as USB "dongle" style devices.

    The two main issues concerning PCMCIA devices are:

    • recognition of the insertion event
    • identifying the correct driver for the card

    PCMCIA form factor

    Includes Wireless and Ethernet adaptors, Micro-drives, Flash-drives, Modems, SCSI adapters and other special purpose devices.

    PCMCIA device recognition - > 2.4 kernels

    Support is available as a kernel module via the following kernel options:

    CONFIG_HOTPLUG
    CONFIG_PCMCIA
    CONFIG_CARDBUS
    

    Modules

    'pcmcia_core' and 'pcmcia' support loading PCMCIA devices. 'yenta_socket' is also generally loaded to support the CardBus interface (PCI-over-PCMCIA)

    # lsmod | egrep '(yenta)|(pcmcia)'
    pcmcia                  21380 3 atmel_cs
    yenta_socket            19584 1
    pcmcia_core             53568 3 atmel_cs,pcmcia,yenta_socket
    

    Package contents - pcmiautils

    # dpkg-query -L pcmciautils 
    /etc/pcmcia                              PCMCIA device customisation/setup scripts  
    /etc/pcmcia/config                       Once a card is inserted into a PCMCIA slot, the daemon cardmgr
                                             looks up a card in this DB and loads appropriate supporting 
                                             drivers as needed.
    /etc/pcmcia/<card function>              Script for card reflects its function e.g. wireless 
                                             isdn, cdrom, network, ftl, serial, parport, ide, iccc, teles
    /etc/pcmcia/*.opts                       Consulted by above scripts, contains user/admin settings e.g.
                                             IP, network ... e.g. /etc/pcmcia/network.opts
    /etc/pcmcia/config.opts                  A local configuration file. Installed only the first time the
                                             packages are installed.  Includes resource settings/addresses
                                             available for use including port and memory addresses, irqs,
                                             options for loadable modules.  Check this if you get hardware
                                             IRQ conflicts.
    /etc 
    /etc/udev/rules.d/85-pcmcia.rules 
    /etc/init.d/pcmciautils 
    /lib 
    .....
    /sbin 
    /sbin/pccardctl 
    /sbin/lspcmcia 
    /usr 
    /usr/share 
    .....                                    Man pages and docs
    /usr/lib/pcmciautils 
    /usr/lib/pcmciautils/config.opts
    
  • Network configuration
    /etc/pcmcia/network.opts (obsolete)

    Superceded by usb devices

    Edit 'network.opts' or run 'pcnetconfig'

    IPADDR
    NETMASK
    NETWORK
    GATEWAY
    DOMAIN                         # Domain name
    DHCP                           # Use dhcp
    PPOE                           # Use PPOE
    

    network.opts configuration params.

  • PCMCIA daemon
    /usr/sbin/cardmgr (obsolete)

    Superceded by usb devices

    PCMCIA daemon. The kernel module pcmcia_core queries the physical card. 'cardmgr' uses this information to scan the following files:

    /etc/pcmcia/config              to determine the modules/driver, then runs
    /etc/pcmcia/<card function>     which reads
    /etc/pcmcia/<card type>.opts    to configure based on the scheme.
    
    cardmgr [options]
    
    Some options:
     -d          Use modprobe instead of insmod to load modules
     -q          Quiet. Stops cardmgr from beeping when card is added/removed
    

    When cardmgr scans the DB to figure out what driver to load it does the equivalent of

    # grep -C 1 '0x01bf,0x3302' /etc/pcmcia/config
    card "Belkin FSD6020 v2"
    manfid 0x01bf,0x3302
    bind "atmel_cs"
    

    "atmel_cs" is the kernel module to load

    See what actually got loaded by looking at either

    # cat /var/lib/pcmcia/stab
                                 (or)
    # cat /var/run/stab
    
  • PCMCIA socket control utility
    /usr/sbin/cardctl (obsolete)

    Superceded by usb devices

    • Used to monitor and control the state of PCMCIA sockets.
    • If a socket number is specified the command will be applied to just that socket else all sockets will be affected.
    cardctl [-V] command [socket]
    cardctl [options] scheme [name]
    
    Commands:
     status           Display the current socket status flags. 
     config           Display the socket configuration, including power settings, interrupt 
                      and I/O window settings and configuration registers. 
     ident            Display card identification information, including product identification
                      strings, manufacturer ID codes and function ID codes. 
     suspend          Shut down and then disable power for a socket. 
     resume           Restore power to a socket, and re-configure for use. 
     reset            Send a reset signal to a socket. 
     eject            Notify all client drivers that this card will be ejected, then cut power to
                      the socket. 
     insert           Notify all client drivers that this card has just been inserted. 
     scheme           If no scheme name is given, cardctl will display the current PCMCIA 
                      configuration scheme.  If a scheme name is given, cardctl will unconfigure
                      all PCMCIA devices and reconfigure for the new scheme
    
    Options:
     -V               Show version information and exit. 
     -c config        Look for the card configuration db and card configuration scripts in the
                      specified directory instead of /etc/pcmcia 
     -f scheme        Use the specified file to keep track of the current configuration scheme, 
                      instead of /var/{state,lib}/pcmcia/scheme 
     -s stab          Read current socket information from the specified file, instead of 
                      /var/{state,lib}/pcmcia/stab
    

    Display card identification information

    # cardctl ident
    Socket 0:
    product info: "Belkin", "11Mbps-Wireless-Notebook-Network-Adapter"
    manfid: 0x01bf, 0x3302
    function: 6 (network)
    

    This information is provided by the 'pcmcia_core' kernel module which queries the physical card.

  • PCMCIA card management
    /sbin/pccardctl, lspcmcia (obsolete)

    Superceded by usb devices

    PCMCIA control and monitoring utlity. 'lspcmcia' is an alias for 'pccardctl ls' and is provided for convenience. It displays extended PCMCIA debugging information.

    pccardctl [-V] [-v ...] command [socket] 
    lspcmcia  [-V] [-v ...] [socket]
    
    Commands:
     status           Current socket status flags. 
     config           Display socket configuration  --not yet implemented 
     ident            Display card id info. Not cardbus cards. Use lspci 
     info             Like ident, output suited for scripts.  Not cardbus
     ls               Display extended debugging information
     suspend          Shut down and then disable power for a socket. 
     resume           Restore power to a socket, and re-configure for use. 
     eject            Notify all client drivers, cut power to the socket. 
     insert           Notify all client drivers that card has been inserted.
    
    Options:            
     -V               Version 
     -v, -vv          Verbosity level of the ls command
    

    A GUI application cardinfo may also be available.

  • PCMCIA schemes
    /usr/sbin/cardctl (obsolete)

    Superceded by usb devices

    Schemes are used to provide multiple configurations for a PCMCIA device. For example, a home scheme for connecting to a home lan and a work scheme for connecting to the work lan. Different IPs are used.

    Set (or query) a scheme's configuration

    # cardctl scheme home
    checking: eth2
    /sbin/ifdown: interface eth2 not configured
    Changing scheme to 'foo'...
    Ignoring unknown interface eth2=eth2.
    

    Identify current scheme

    # cardctl scheme
    Current scheme: 'foo'.
    
  • Troubleshoot a card
    /usr/sbin/cardctl (obsolete)

    Superceded by usb devices

    Check the right driver is being used

    # cardctl ident [socket] 
    # grep -C 1 '0x01bf,0x3302' /etc/pcmcia/config
    

    '0x01bf,0x3302' = manfid which is displayed as part of the first command.

    Determine state of all sockets

    # cardctl status
                       (or)
    # cardinfo
    
    1. Review/edit '/etc/pcmcia/config' to ensure correct drivers are being used
    2. Verify the proper drivers are installed, modules loaded - lsmod
    3. Determine that the required drivers are supported
    4. Restart PCMCIA
    # /etc/init.d/pcmcia restart
    

    Check logs - /var/log/messages, /var/log/syslog

    "unsupported card in socket 0 | x"
    

    May need to map correct device in '/etc/pcmcia/config'.

    Load modules

    include 'pcmcia_core', 'yenta_socket' and 'ds', may need 'i82092' or 'i82365'

    If 'modprobe' causes problems add a kernel option at boot

    PCMCIA_CORE_OPTS='probe_i0=0 setup_delay=10'
    
  • Some common problems
    Boot problems

    Sometimes system will hang when PCMCIA devices are scanned. In some cases this can be caused by a conflict with ACPI subsystem. Disable module loading - at the boot prompt enter

    NOPCMIA=yes
    
    

    Can also enter interactive mode and load PCMCIA modules one at a time.

    System does not respond to card insertion

    ACPI is often the culprit- reboot and pass kernel param pci=noacpi at the boot prompt.

    System responds to card but fails to recognise it as valid

    Generally no driver assigned or driver mismatch.

    Driver does not load

    Check /var/log/messages. Could be an IRQ conflict experienced by the PCI card containing the PCMCIA interface.

    Improper configuration

    Fix with 'getcfg'.