.\" .\" Copyright (c) 1994 Andrew McRae. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" %Id: pccardd.8,v 1.10 1998/03/23 08:25:40 charnier Exp % .\" jpman %Id: pccardd.8,v 1.4 1997/07/26 22:04:06 horikawa Stab % .\" .Dd November 1, 1994 .Dt PCCARDD 8 .Os FreeBSD .Sh NAME .Nm pccardd .Nd PC-CARD (PCMCIA) management daemon .Sh SYNOPSIS .Nm pccardd .Op Fl d .Op Fl n .Op Fl v .Op Fl z .Op Fl I .Op Fl i Ar IRQ .Op Fl s Ar pathname .Op Fl f Ar configfile .Sh DESCRIPTION .Nm is normally started at boot time, and manages the insertion and removal of PC-CARD cards. Whether it starts or not at boot time depends on the environment variable `pccard_enable' in .Xr rc.conf 5 . .Pp When started, .Nm will look for the configuration file which is determined by the following way: .Bl -enum .It If .Fl f option is specified, it reads .Ar configfile . .It If the option is not specified, it attempts to read .Pa /etc/pccard.conf . .It If .Pa /etc/pccard.conf does not exist, it reads .Pa /stand/etc/pccard.conf . .El .Pp Next, .Nm scans the available PC-CARD slots for cards. And it opens sockets to connect with other tools such as .Xr xpccard 8 if -DSERVER option was specified when .Nm was built. The sockets is specified in .Fl s option(default is .Pa /var/tmp/.pccardd ). .Pp .Nm then waits for .Em card events such as the insertion of a new card or the removal of a card as a background daemon process. If .Nm fails to read a configuration file, to scan slots or to open sockets, it'll abort immediately and exit. .Pp When a card inserted, the following action are taken: .Bl -enum .It The kernel driver detects the card insertion and applies power to the card. .It An address of the card's EEPROM is associated with an address of the host specified in the environment variable `pccard_mem' in .Xr rc.conf 5 . See also .Xr pccardc 8 . .It .Nm reads the CIS data from the mapped memory address, and uses the manufacturer name and card version to match the card description(`card' or `function') in the configuration file. .It Once matched, a driver is allocated according to the card description(`config'). .It Once a free driver and device instance is located, .Nm will (if required) allocate resources such as IRQs, a shared memory block and Input/Output ports from a common pool. .It The PC-CARD slot is configured with the I/O ports, IRQs and memory contexts allocated, then the kernel driver allocation routine(corresponds to `probe' and `attach') is invoked. .It If the allocation succeeds, then shell commands associated with card insertion are executed to configure the device. The commands can be specified for each of the card descriptions, and are executed in that order. For example, .Pa /etc/pccard_ether is available to set up a network interface. .El .Pp When .Nm detects that a card has been removed, the following sequence occurs: .Bl -enum .It Shell commands associated with card removal are executed. These are intended to release system resources associated with the removed card. The commands can be specified for each of the card descriptions, and are executed in that order as well. For example, .Pa /etc/pccard_ether_remove is available to set up a network interface. .It The kernel driver release routine(unload) is invoked, it releases an allocated device instance and memory associated with it. .It System resources such as I/O ports, IRQs, a shared memory block allocated to the PC-CARD slot are put back into a resource pool. .El .Pp SIGHUP causes .Nm to reload the configuration files and to re-initialize the sockets. .Pp The start options understood by .Nm are: .Bl -tag -width Ds .It Fl d Do not run as a daemon, but run in the foreground and display error messages. If it is not specified, the messages are sent to .Xr syslogd 8 . .It Fl n Suppresses log messages. .It Fl v After reading the configuration file, print out a summary of it. .It Fl z Delays running as a daemon slightly. .It Fl I Configures an available IRQs pool from the "irq" lines in .Pa /etc/pccard.conf . By default, .Nm gets a list of them from the kernel. .Pp NOTE: It is NOT RECOMMENDED to use this option. You shouldn't use the "irq" lines in .Pa /etc/pccard.conf normally. .It Fl i Ar IRQ Removes .Ar IRQ from an available IRQs pool, even if the kernel regarded it as available. This option corresponds to the .Em "ignirq" line in .Xr pccard.conf 5 . .It Fl s Ar pathname Specifies a pathname of a Unix domain socket to connect with clients. Default is .Pa /var/tmp/.pccardd . .It Fl f Ar configfile Specifies a configuration file. Default is .Pa /etc/pccard.conf . .Pp A file format, a list of available PC-CARD cards for .Nm and kernel drivers/devices used as an interface to a card are fully described in .Xr pccard.conf 5 . .Pp .Sh FILES .Bl -tag -width /stand/etc/pccard.conf -compact .It Pa /etc/pccard.conf default configuration file .It Pa /stand/etc/pccard.conf configuration file normally used in boot.flp .It Pa /var/tmp/.pccardd Unix domain socket .It Pa /var/run/pccardd.pid process id of of the currently running .Nm .El .Sh SEE ALSO .Xr pccard.conf 5 , .Xr rc.conf 5 , .Xr ifconfig 8 , .Xr pccardc 8 .Sh AUTHORS The original version was written by .An Andrew McRae Aq andrew@mega.com.au . .An Tatsumi Hosokawa Aq hosokawa@mt.cs.keio.ac.jp fixed bugs and added some features. .Sh BUGS .Nm can set up card parameters, but cannot guarantee that particular drivers can work with the card. .Pp I/O port specifications of a wdc driver in the configuration file must match the 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.