PC-CARD(8)

NAME
cardd - PC-CARD (PCMCIA) management daemon

SYNOPSIS
cardd [-d] [-v] [-f configfile]

DESCRIPTION
Cardd is normally started at boot time, and manages the insertion and removal of PC-CARD cards.

When started, cardd will read the configuration file (default name /etc/card.conf) and scans the available PC-CARD slots for cards. Cardd then waits for card events, such as the insertion of a new card or the removal of a card.

When a card is inserted, the following actions are taken:

1.  The kernel driver detects the card insertion and applies power to the card.

2.  Cardd reads the CIS data from the attribute memory of the card, and uses the manufacturer name and card version to match the card description in the configuration file.

3.  Once matched, a driver is allocated.

4.  Once a free driver and device instance is located, cardd will (if required) allocate resources such as an ISA memory block and Input/Output ports from a common pool.

5.  The PC-CARD slot is configured with the I/O and memory contexts allocated, and the kernel driver is attached to this card.

6.  If the attach succeeds, then specific shell commands may be executed to configure the device, such as ifconfig(8) to set up a network interface. Separate commands may be specified for each card, driver or device, and are executed in that order.

When cardd detects that a card has been removed, the following sequence occurs:

1.  The shell commands associated with card removal are executed. These are intended to reset any device associated with the removed card. Separate commands may exist for card, driver and device instances.

2.  The PC-CARD slot resources are freed.

Once a card/driver instance is configured, the resources bound to that instance are remembered, and if the card is removed and reinserted, the same driver is allocated. The primary reason is that once a driver is associated with a card, the driver's probe() routine has been called, and this usually causes driver specific data areas to be initialised with the I/O ports or memory resources allocated to the card. Most drivers are not designed to be disassociated from the hardware and then reassociated with different parameters. This will change significantly when loadable kernel modules are supported.

The start options understood by cardd are:

-d  Do not run as a daemon, but run in the foreground and display error messages.

-v  After reading the configuration file, print out a summary of it.

-f configfile
    Specifies a different configuration file to be used in placed of the default file /etc/card.conf. The file format is detailed in card.conf(5), and lists the PC-CARD cards recognized by cardd, and the kernel drivers and devices that are used to interface to the card.

FILES
/etc/card.conf

SEE ALSO
card.conf(5) ifconfig(8)

AUTHOR
Developed by Andrew McRae (andrew@mega.com.au).

BUGS
Cardd can set up card parameters, but cannot guarantee that particular drivers can work with the card.

Since FreeBSD does not currently support loadable kernel modules, any irq specifications in the configuration file must match the config entry for the kernel.

Removing cards may cause problems if system resources have been associated with the card, such as network mounted filesystems.