f2b46629be
This is not quite finished yet, and therefore I have not added it to the usr.sbin/Makefile yet. I collected a bunch of Andrews small programs into one: pccardc /phk Reviewed by: phk Submitted by: Andrew McRae <andrew@mega.com.au>
134 lines
3.5 KiB
Groff
134 lines
3.5 KiB
Groff
.\" Copyright (c) 1994 Andrew McRae
|
|
.\" All rights reserved.
|
|
.\"
|
|
.Dd November 1, 1994
|
|
.Dt PC-CARD 8
|
|
.Os FreeBSD
|
|
.Sh NAME
|
|
.Nm cardd
|
|
.Nd PC-CARD (PCMCIA) management daemon
|
|
.Sh SYNOPSIS
|
|
.Nm cardd
|
|
.Op Fl d
|
|
.Op Fl v
|
|
.Op Fl f Ar configfile
|
|
.Sh DESCRIPTION
|
|
.Nm Cardd
|
|
is normally started at boot time, and manages the insertion
|
|
and removal of PC-CARD cards.
|
|
.Pp
|
|
When started,
|
|
.Nm cardd
|
|
will read the configuration file (default name
|
|
.Pa /etc/card.conf )
|
|
and scans the available PC-CARD slots for cards.
|
|
.Nm Cardd
|
|
then waits for
|
|
.Em "card events" ,
|
|
such as the insertion of a new card or the removal
|
|
of a card.
|
|
.Pp
|
|
When a card is inserted, the following
|
|
actions are taken:
|
|
.Bl -enum
|
|
.It
|
|
The kernel driver detects the card insertion and applies
|
|
power to the card.
|
|
.It
|
|
.Nm Cardd
|
|
reads the
|
|
.Em 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.
|
|
.It
|
|
Once matched, a driver is allocated.
|
|
.It
|
|
Once a free driver and device instance is located,
|
|
.Nm cardd
|
|
will (if required) allocate resources such as an ISA memory
|
|
block and Input/Output ports from a common pool.
|
|
.It
|
|
The PC-CARD slot is configured with the I/O and memory
|
|
contexts allocated, and the kernel driver is attached to
|
|
this card.
|
|
.It
|
|
If the attach succeeds, then specific shell commands
|
|
may be executed to configure the device, such as
|
|
.Xr 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.
|
|
.El
|
|
.Pp
|
|
When
|
|
.Nm cardd
|
|
detects that a card has been removed, the following sequence occurs:
|
|
.Bl -enum
|
|
.It
|
|
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.
|
|
.It
|
|
The PC-CARD slot resources are freed.
|
|
.El
|
|
.Pp
|
|
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
|
|
.Fn 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.
|
|
.Pp
|
|
The start options understood by
|
|
.Nm cardd
|
|
are:
|
|
.Bl -tag -width Ds
|
|
.It Fl d
|
|
Do not run as a daemon, but run in the foreground and
|
|
display error messages.
|
|
.It Fl v
|
|
After reading the configuration file, print out a summary
|
|
of it.
|
|
.It Fl f Ar configfile
|
|
Specifies a different configuration file to be used
|
|
in placed of the default file
|
|
.Pa /etc/card.conf.
|
|
The file format is detailed in
|
|
.Xr card.conf 5 ,
|
|
and lists the PC-CARD cards recognized by
|
|
.Nm cardd ,
|
|
and the kernel drivers and devices that are used to
|
|
interface to the card.
|
|
.Pp
|
|
.Sh FILES
|
|
.Bl -tag -width /etc/card.conf -compact
|
|
.It Pa /etc/card.conf
|
|
.El
|
|
.Sh SEE ALSO
|
|
.Xr card.conf 5
|
|
.Xr ifconfig 8
|
|
.Sh AUTHOR
|
|
Developed by Andrew McRae (andrew@mega.com.au).
|
|
.Sh BUGS
|
|
.Nm Cardd
|
|
can set up card parameters, but cannot guarantee that
|
|
particular drivers can work with the card.
|
|
.Pp
|
|
Since
|
|
.Nm FreeBSD
|
|
does not currently support loadable kernel modules, any
|
|
.Em irq
|
|
specifications in the configuration file must match the
|
|
.Nm config
|
|
entry for the kernel.
|
|
.Pp
|
|
Removing cards may cause problems if system resources
|
|
have been associated with the card, such as network
|
|
mounted filesystems.
|