Initial import from FreeBSD RELENG_4:
[dragonfly.git] / usr.sbin / pccard / pccardd / pccardd.8
1 .\"
2 .\" Copyright (c) 1994 Andrew McRae.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. The name of the author may not be used to endorse or promote products
13 .\"    derived from this software without specific prior written permission.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD: src/usr.sbin/pccard/pccardd/pccardd.8,v 1.17.2.7 2001/08/16 15:56:12 ru Exp $
27 .\"
28 .Dd November 1, 1994
29 .Dt PCCARDD 8
30 .Os
31 .Sh NAME
32 .Nm pccardd
33 .Nd PC-CARD (PCMCIA) management daemon
34 .Sh SYNOPSIS
35 .Nm
36 .Op Fl d
37 .Op Fl v
38 .Op Fl z
39 .Op Fl i Ar IRQ
40 .Op Fl I
41 .Op Fl f Ar configfile
42 .Sh DESCRIPTION
43 .Nm Pccardd
44 is normally started at boot time, and manages the insertion
45 and removal of PC-CARD cards.
46 .Pp
47 When started,
48 .Nm
49 will read the configuration file (default name
50 .Pa /etc/defaults/pccard.conf
51 which includes
52 .Pa /etc/pccard.conf
53 as the user configuration file)
54 and scans the available PC-CARD slots for cards.
55 .Nm Pccardd
56 then waits for
57 .Em "card events" ,
58 such as the insertion of a new card or the removal
59 of a card.
60 .Pp
61 When a card is inserted, the following
62 actions are taken:
63 .Bl -enum
64 .It
65 The kernel driver detects the card insertion and applies
66 power to the card.
67 .It
68 .Nm Pccardd
69 reads the
70 .Em CIS
71 data from the attribute memory of the card, and uses
72 the manufacturer name and card version to match
73 the card description in the configuration file.
74 .It
75 Once matched, a driver is allocated.
76 .It
77 Once a free driver and device instance is located,
78 .Nm
79 will (if required) allocate resources such as an ISA memory
80 block and Input/Output ports from a common pool.
81 .It
82 The PC-CARD slot is configured with the I/O and memory
83 contexts allocated, and the kernel driver is attached to
84 this card.
85 .It
86 If the attach succeeds, then specific shell commands
87 may be executed to configure the device, such as
88 .Xr ifconfig 8
89 to set up a network interface.
90 Separate commands may be specified
91 for each card, driver or device, and are executed in that order.
92 .El
93 .Pp
94 When
95 .Nm
96 detects that a card has been removed, the following sequence occurs:
97 .Bl -enum
98 .It
99 The shell commands associated with card removal are executed.
100 These
101 are intended to reset any device associated with the removed card.
102 Separate commands may exist for card, driver and device instances.
103 .It
104 The PC-CARD slot resources are freed.
105 .El
106 .Pp
107 Once a card/driver instance is configured, the resources
108 bound to that instance are remembered, and if the card is removed
109 and reinserted, the same driver is allocated.
110 The primary reason
111 is that once a driver is associated with a card, the
112 driver's
113 .Fn probe
114 routine has been called, and this usually causes driver specific
115 data areas to be initialized with the I/O ports or memory resources
116 allocated to the card.
117 Most drivers are not designed to be
118 disassociated from the hardware and then reassociated with different
119 parameters.
120 This will change significantly when loadable kernel
121 modules are supported.
122 .Pp
123 SIGHUP causes
124 .Nm
125 to reload the configuration files.
126 .Pp
127 The start options understood by
128 .Nm
129 are:
130 .Bl -tag -width Ds
131 .It Fl d
132 Do not run as a daemon, but run in the foreground and
133 display error messages.
134 .It Fl v
135 After reading the configuration file, print out a summary
136 of it.
137 .It Fl z
138 Delays running as a daemon until after the cards have been probed and attached.
139 .It Fl I
140 Don't get a list of free IRQs from kernel.
141 .It Fl i Ar IRQ
142 Configures an available IRQ.  It overrides the "irq" line in
143 .Pa /etc/defaults/pccard.conf
144 and
145 .Pa /etc/pccard.conf .
146 .It Fl f Ar configfile
147 Specifies a different configuration file to be used
148 in placed of the default file
149 .Pa /etc/defaults/pccard.conf .
150 The file format is detailed in
151 .Xr pccard.conf 5 ,
152 and lists the PC-CARD cards recognized by
153 .Nm ,
154 and the kernel drivers and devices that are used to
155 interface to the card.
156 .El
157 .Sh FILES
158 .Bl -tag -width /etc/defaults/pccard.conf -compact
159 .It Pa /etc/defaults/pccard.conf
160 default configuration file
161 .It Pa /etc/pccard.conf
162 user configuration file
163 .It Pa /var/run/pccardd.pid
164 process id of the currently running
165 .Nm
166 .El
167 .Sh SEE ALSO
168 .Xr pccard.conf 5 ,
169 .Xr ifconfig 8
170 .Sh AUTHORS
171 Developed by
172 .An Andrew McRae Aq andrew@mega.com.au .
173 .Sh BUGS
174 .Nm Pccardd
175 can set up card parameters, but cannot guarantee that
176 particular drivers can work with the card.
177 .Pp
178 Removing cards may cause problems if system resources
179 have been associated with the card, such as network
180 mounted filesystems.