summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pccard/pccardd/pccardd.8
blob: d868c2bbbe2918b0d8474741e45404422a7e11db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
.\"
.\" 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.
.\"
.\" $FreeBSD$
.\"
.Dd November 1, 1994
.Dt PCCARDD 8
.Os
.Sh NAME
.Nm pccardd
.Nd PC-CARD (PCMCIA) management daemon
.Sh SYNOPSIS
.Nm
.Op Fl d
.Op Fl v
.Op Fl z
.Op Fl i Ar IRQ
.Op Fl I 
.Op Fl f Ar configfile
.Sh DESCRIPTION
.Nm Pccardd
is normally started at boot time, and manages the insertion
and removal of PC-CARD cards.
.Pp
When started,
.Nm
will read the configuration file (default name
.Pa /etc/defaults/pccard.conf
which includes
.Pa /etc/pccard.conf
as the user configuration file)
and scans the available PC-CARD slots for cards.
.Nm Pccardd
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 Pccardd
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
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
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 initialized 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
SIGHUP causes
.Nm
to reload the configuration files.
.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.
.It Fl v
After reading the configuration file, print out a summary
of it.
.It Fl z
Delays running as a daemon until after the cards have been probed and attached.
.It Fl I
Don't get a list of free IRQs from kernel.
.It Fl i Ar IRQ
Configures an available IRQ.  It overrides the "irq" line in
.Pa /etc/defaults/pccard.conf
and
.Pa /etc/pccard.conf .
.It Fl f Ar configfile
Specifies a different configuration file to be used
in placed of the default file
.Pa /etc/defaults/pccard.conf .
The file format is detailed in
.Xr pccard.conf 5 ,
and lists the PC-CARD cards recognized by
.Nm ,
and the kernel drivers and devices that are used to
interface to the card.
.El
.Sh FILES
.Bl -tag -width /etc/defaults/pccard.conf -compact
.It Pa /etc/defaults/pccard.conf
default configuration file
.It Pa /etc/pccard.conf
user configuration file
.It Pa /var/run/pccardd.pid
process id of the currently running
.Nm
.El
.Sh SEE ALSO
.Xr pccard.conf 5 ,
.Xr ifconfig 8
.Sh AUTHORS
Developed by
.An Andrew McRae Aq andrew@mega.com.au .
.Sh BUGS
.Nm Pccardd
can set up card parameters, but cannot guarantee that
particular drivers can work with the card.
.Pp
Removing cards may cause problems if system resources
have been associated with the card, such as network
mounted filesystems.
OpenPOWER on IntegriCloud