kernel: Nuke the old (and deprecated) ata(4) driver and atacontrol(8).
[dragonfly.git] / share / man / man4 / dc.4
1 .\" Copyright (c) 1997, 1998, 1999
2 .\"     Bill Paul <wpaul@ee.columbia.edu>. 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. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by Bill Paul.
15 .\" 4. Neither the name of the author nor the names of any co-contributors
16 .\"    may be used to endorse or promote products derived from this software
17 .\"   without specific prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
23 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29 .\" THE POSSIBILITY OF SUCH DAMAGE.
30 .\"
31 .\" $FreeBSD: src/share/man/man4/dc.4,v 1.6.2.9 2003/02/17 21:20:39 trhodes Exp $
32 .\"
33 .Dd November 14, 2010
34 .Dt DC 4
35 .Os
36 .Sh NAME
37 .Nm dc
38 .Nd "DEC/Intel 21143 and clone 10/100 ethernet driver"
39 .Sh SYNOPSIS
40 .Cd "device miibus"
41 .Cd "device dc"
42 .Sh DESCRIPTION
43 The
44 .Nm
45 driver provides support for several PCI fast ethernet adapters and
46 embedded controllers based on the following chipsets:
47 .Pp
48 .Bl -bullet -compact -offset indent
49 .It
50 DEC/Intel 21143
51 .It
52 Macronix 98713, 98713A, 98715, 98715A and 98725
53 .It
54 Davicom DM9100, DM9102 and DM9102A
55 .It
56 ASIX Electronics AX88140A and AX88141
57 .It
58 ADMtek AL981 Comet and AN985 Centaur
59 .It
60 Lite-On 82c168 and 82c169 PNIC
61 .It
62 Lite-On/Macronix 82c115 PNIC II
63 .It
64 Conexant LANfinity RS7112 (miniPCI)
65 .It
66 Abocom FE2500
67 .El
68 .Pp
69 All of these chips have the same general register layout, DMA
70 descriptor format and method of operation.
71 All of the clone chips
72 are based on the 21143 design with various modifications.
73 The
74 21143 itself has support for 10baseT, BNC, AUI, MII and symbol
75 media attachments, 10 and 100Mbps speeds in full or half duplex,
76 built in NWAY autonegotiation and wake on LAN.
77 The 21143 also
78 offers several receive filter programming options including
79 perfect filtering, inverse perfect filtering and hash table
80 filtering.
81 .Pp
82 Some clone chips duplicate the 21143 fairly closely while others
83 only maintain superficial similarities.
84 Some support only MII
85 media attachments.
86 Others use different receiver filter programming
87 mechanisms.
88 At least one supports only chained DMA descriptors
89 (most support both chained descriptors and contiguously allocated
90 fixed size rings). Some chips (especially the PNIC) also have
91 peculiar bugs.
92 The
93 .Nm
94 driver does its best to provide generalized support for all
95 of these chipsets in order to keep special case code to a minimum.
96 .Pp
97 These chips are used by many vendors which makes it
98 difficult to provide a complete list of all supported cards.
99 The
100 following NICs are known to work with the
101 .Nm
102 driver at this time:
103 .Pp
104 .Bl -bullet -compact -offset indent
105 .It
106 Digital DE500-BA 10/100 (21143, non-MII)
107 .It
108 Built in 10Mbps only ethernet on Compaq Presario 7900 series
109 desktops (21143, non-MII)
110 .It
111 Built in ethernet on LinkSys EtherFast 10/100 Instant GigaDrive (DM9102, MII)
112 .It
113 Kingston KNE100TX (21143, MII)
114 .It
115 D-Link DFE-570TX (21143, MII, quad port)
116 .It
117 NDC SOHOware SFA110 (98713A)
118 .It
119 SVEC PN102-TX (98713)
120 .It
121 CNet Pro120A (98715A or 98713A) and CNet Pro120B (98715)
122 .It
123 Compex RL100-TX (98713 or 98713A)
124 .It
125 LinkSys LNE100TX (PNIC 82c168, 82c169)
126 .It
127 NetGear FA310-TX Rev. D1, D2 or D3 (PNIC 82c169)
128 .It
129 Matrox FastNIC 10/100 (PNIC 82c168, 82c169)
130 .It
131 Kingston KNE110TX (PNIC 82c169)
132 .It
133 LinkSys LNE100TX v2.0 (PNIC II 82c115)
134 .It
135 Jaton XpressNet (Davicom DM9102)
136 .It
137 Alfa Inc GFC2204 (ASIX AX88140A)
138 .It
139 CNet Pro110B (ASIX AX88140A)
140 .El
141 .Pp
142 The
143 .Nm
144 driver supports the following media types:
145 .Bl -tag -width xxxxxxxxxxxxxxxxxxxx
146 .It autoselect
147 Enable autoselection of the media type and options.
148 The user can manually override
149 the autoselected mode by adding media options to the
150 .Pa /etc/rc.conf
151 file.
152 .Pp
153 Note: the built-in NWAY autonegotiation on the original PNIC 82c168
154 chip is horribly broken and is not supported by the
155 .Nm
156 driver at this time (see the
157 .Sx BUGS
158 section for details).
159 The original 82c168 appears
160 on very early revisions of the LinkSys LNE100TX and Matrox FastNIC.
161 .It 10baseT/UTP
162 Set 10Mbps operation.
163 The
164 .Ar mediaopt
165 option can also be used to enable
166 .Ar full-duplex
167 operation.
168 Not specifying
169 .Ar full duplex
170 implies
171 .Ar half-duplex
172 mode.
173 .It 100baseTX
174 Set 100Mbps (fast ethernet) operation.
175 The
176 .Ar mediaopt
177 option can also be used to enable
178 .Ar full-duplex
179 operation.
180 Not specifying
181 .Ar full duplex
182 implies
183 .Ar half-duplex
184 mode.
185 .El
186 .Pp
187 The
188 .Nm
189 driver supports the following media options:
190 .Bl -tag -width xxxxxxxxxxxxxxxxxxxx
191 .It full-duplex
192 Force full duplex operation.
193 The interface will operate in
194 half duplex mode if this media option is not specified.
195 .El
196 .Pp
197 Note that the 100baseTX media type may not be available on certain
198 Intel 21143 adapters which support 10mbps media attachments only.
199 .Pp
200 For more information on configuring this device, see
201 .Xr ifconfig 8 .
202 The
203 .Nm
204 driver supports
205 .Xr polling 4 .
206 .Sh DIAGNOSTICS
207 .Bl -diag
208 .It "dc%d: couldn't map ports/memory"
209 A fatal initialization error has occurred.
210 .It "dc%d: couldn't map interrupt"
211 A fatal initialization error has occurred.
212 .It "dc%d: watchdog timeout"
213 A packet was queued for transmission and a transmit command was
214 issued, but the device failed to acknowledge the transmission
215 before a timeout expired.
216 This can happen if the device is unable
217 to deliver interrupts for some reason, of if there is a problem with
218 the network connection (cable or network equipment) that results in a loss
219 of link.
220 .It "dc%d: no memory for rx list"
221 The driver failed to allocate an mbuf for the receiver ring.
222 .It "dc%d: TX underrun -- increasing TX threshold"
223 The device generated a transmit underrun error while attempting to
224 DMA and transmit a packet.
225 This happens if the host is not able to
226 DMA the packet data into the NIC's FIFO fast enough.
227 The driver
228 will dynamically increase the transmit start threshold so that
229 more data must be DMAed into the FIFO before the NIC will start
230 transmitting it onto the wire.
231 .It "dc%d: TX underrun -- using store and forward mode"
232 The device continued to generate transmit underruns even after all
233 possible transmit start threshold settings had been tried, so the
234 driver programmed the chip for store and forward mode.
235 In this mode,
236 the NIC will not begin transmission until the entire packet has been
237 transferred into its FIFO memory.
238 .It "dc%d: chip is in D3 power state -- setting to D0"
239 This message applies only to adapters which support power
240 management.
241 Some operating systems place the controller in low power
242 mode when shutting down, and some PCI BIOSes fail to bring the chip
243 out of this state before configuring it.
244 The controller loses all of
245 its PCI configuration in the D3 state, so if the BIOS does not set
246 it back to full power mode in time, it won't be able to configure it
247 correctly.
248 The driver tries to detect this condition and bring
249 the adapter back to the D0 (full power) state, but this may not be
250 enough to return the driver to a fully operational condition.
251 If
252 you see this message at boot time and the driver fails to attach
253 the device as a network interface, you will have to perform a second
254 warm boot to have the device properly configured.
255 .Pp
256 Note that this condition only occurs when warm booting from another
257 operating system.
258 If you power down your system prior to booting
259 .Dx ,
260 the card should be configured correctly.
261 .El
262 .Sh SEE ALSO
263 .Xr arp 4 ,
264 .Xr ifmedia 4 ,
265 .Xr miibus 4 ,
266 .Xr netintro 4 ,
267 .Xr ng_ether 4 ,
268 .Xr polling 4 ,
269 .Xr ifconfig 8
270 .Rs
271 .%T ADMtek AL981, AL983 and AL985 data sheets
272 .%O http://www.admtek.com.tw
273 .Re
274 .Rs
275 .%T ASIX Electronics AX88140A and AX88141 data sheets
276 .%O http://www.asix.com.tw
277 .Re
278 .Rs
279 .%T Davicom DM9102 data sheet
280 .%O http://www.davicom.com.tw
281 .Re
282 .Rs
283 .%T Intel 21143 Hardware Reference Manual
284 .%O http://developer.intel.com
285 .Re
286 .Rs
287 .%T Macronix 98713/A, 98715/A and 98725 data sheets
288 .%O http://www.macronix.com
289 .Re
290 .Rs
291 .%T Macronix 98713/A and 98715/A app notes
292 .%O http://www.macronix.com
293 .Re
294 .Sh HISTORY
295 The
296 .Nm
297 device driver first appeared in
298 .Fx 4.0 .
299 .Sh AUTHORS
300 The
301 .Nm
302 driver was written by
303 .An Bill Paul Aq wpaul@ee.columbia.edu .
304 .Sh BUGS
305 The Macronix application notes claim that in order to put the
306 chips in normal operation, the driver must write a certain magic
307 number into the CSR16 register.
308 The numbers are documented in
309 the app notes, but the exact meaning of the bits is not.
310 .Pp
311 The 98713A seems to have a problem with 10Mbps full duplex mode.
312 The transmitter works but the receiver tends to produce many
313 unexplained errors leading to very poor overall performance.
314 The
315 98715A does not exhibit this problem.
316 All other modes on the
317 98713A seem to work correctly.
318 .Pp
319 The original 82c168 PNIC chip has built in NWAY support which is
320 used on certain early LinkSys LNE100TX and Matrox FastNIC cards,
321 however it is horribly broken and difficult to use reliably.
322 Consequently, autonegotiation is not currently supported for this
323 chipset: the driver defaults the NIC to 10baseT half duplex, and it's
324 up to the operator to manually select a different mode if necessary.
325 (Later cards use an external MII transceiver to implement NWAY
326 autonegotiation and work correctly.)
327 .Pp
328 The
329 .Nm
330 driver programs 82c168 and 82c169 PNIC chips to use the store and
331 forward setting for the transmit start threshold by default.
332 This
333 is to work around problems with some NIC/PCI bus combinations where
334 the PNIC can transmit corrupt frames when operating at 100Mbps,
335 probably due to PCI DMA burst transfer errors.
336 .Pp
337 The 82c168 and 82c169 PNIC chips also have a receiver bug that
338 sometimes manifests during periods of heavy receive and transmit
339 activity, where the chip will improperly DMA received frames to
340 the host.
341 The chips appear to upload several kilobytes of garbage
342 data along with the received frame data, dirtying several RX buffers
343 instead of just the expected one.
344 The
345 .Nm
346 driver detects this condition and will salvage the frame; however,
347 it incurs a serious performance penalty in the process.
348 .Pp
349 The PNIC chips also sometimes generate a transmit underrun error when
350 the driver attempts to download the receiver filter setup frame, which
351 can result in the receive filter being incorrectly programmed.
352 The
353 .Nm
354 driver will watch for this condition and requeue the setup frame until
355 it is transferred successfully.
356 .Pp
357 The ADMtek AL981 chip (and possibly the AN985 as well) has been observed
358 to sometimes wedge on transmit: this appears to happen when the driver
359 queues a sequence of frames which cause it to wrap from the end of the
360 transmit descriptor ring back to the beginning.
361 The
362 .Nm
363 driver attempts to avoid this condition by not queueing any frames past
364 the end of the transmit ring during a single invocation of the
365 .Fn dc_start
366 routine.
367 This workaround has a negligible impact on transmit performance.