]> CyberLeo.Net >> Repos - FreeBSD/releng/9.0.git/blob - share/man/man4/dc.4
Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
[FreeBSD/releng/9.0.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$
32 .\"
33 .Dd July 23, 2011
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 To compile this driver into the kernel,
41 place the following lines in your
42 kernel configuration file:
43 .Bd -ragged -offset indent
44 .Cd "device miibus"
45 .Cd "device dc"
46 .Ed
47 .Pp
48 Alternatively, to load the driver as a
49 module at boot time, place the following line in
50 .Xr loader.conf 5 :
51 .Bd -literal -offset indent
52 if_dc_load="YES"
53 .Ed
54 .Sh DESCRIPTION
55 The
56 .Nm
57 driver provides support for several PCI Fast Ethernet adapters and
58 embedded controllers based on the the DEC/Intel 21143 chipset and clones.
59 .Pp
60 All of supported chipsets have the same general register layout, DMA
61 descriptor format and method of operation.
62 All of the clone chips
63 are based on the 21143 design with various modifications.
64 The
65 21143 itself has support for 10baseT, BNC, AUI, MII and symbol
66 media attachments, 10 and 100Mbps speeds in full or half duplex,
67 built in NWAY autonegotiation and wake on LAN.
68 The 21143 also
69 offers several receive filter programming options including
70 perfect filtering, inverse perfect filtering and hash table
71 filtering.
72 .Pp
73 Some clone chips duplicate the 21143 fairly closely while others
74 only maintain superficial similarities.
75 Some support only MII
76 media attachments.
77 Others use different receiver filter programming
78 mechanisms.
79 At least one supports only chained DMA descriptors
80 (most support both chained descriptors and contiguously allocated
81 fixed size rings).
82 Some chips (especially the PNIC) also have
83 peculiar bugs.
84 The
85 .Nm
86 driver does its best to provide generalized support for all
87 of these chipsets in order to keep special case code to a minimum.
88 .Pp
89 These chips are used by many vendors which makes it
90 difficult to provide a complete list of all supported cards.
91 .Pp
92 The
93 .Nm
94 driver supports the following media types:
95 .Bl -tag -width ".Cm 10baseT/UTP"
96 .It Cm autoselect
97 Enable autoselection of the media type and options.
98 The user can manually override
99 the autoselected mode by adding media options to the
100 .Pa /etc/rc.conf
101 file.
102 .Pp
103 Note: the built-in NWAY autonegotiation on the original PNIC 82c168
104 chip is horribly broken and is not supported by the
105 .Nm
106 driver at this time (see the
107 .Sx BUGS
108 section for details).
109 The original 82c168 appears
110 on very early revisions of the LinkSys LNE100TX and Matrox FastNIC.
111 .It Cm 10baseT/UTP
112 Set 10Mbps operation.
113 The
114 .Cm mediaopt
115 option can also be used to enable
116 .Cm full-duplex
117 operation.
118 Not specifying
119 .Cm full-duplex
120 implies
121 .Cm half-duplex
122 mode.
123 .It Cm 100baseTX
124 Set 100Mbps (Fast Ethernet) operation.
125 The
126 .Cm mediaopt
127 option can also be used to enable
128 .Cm full-duplex
129 operation.
130 Not specifying
131 .Cm full-duplex
132 implies
133 .Cm half-duplex
134 mode.
135 .El
136 .Pp
137 The
138 .Nm
139 driver supports the following media options:
140 .Bl -tag -width ".Cm full-duplex"
141 .It Cm full-duplex
142 Force full duplex operation.
143 The interface will operate in
144 half duplex mode if this media option is not specified.
145 .El
146 .Pp
147 Note that the 100baseTX media type may not be available on certain
148 Intel 21143 adapters which support 10Mbps media attachments only.
149 For more information on configuring this device, see
150 .Xr ifconfig 8 .
151 .Sh HARDWARE
152 The
153 .Nm
154 driver provides support for the following chipsets:
155 .Pp
156 .Bl -bullet -compact
157 .It
158 DEC/Intel 21143
159 .It
160 ADMtek AL981 Comet, AN985 Centaur, ADM9511 Centaur II and ADM9513
161 Centaur II
162 .It
163 ASIX Electronics AX88140A and AX88141
164 .It
165 Conexant LANfinity RS7112 (miniPCI)
166 .It
167 Davicom DM9009, DM9100, DM9102 and DM9102A
168 .It
169 Lite-On 82c168 and 82c169 PNIC
170 .It
171 Lite-On/Macronix 82c115 PNIC II
172 .It
173 Macronix 98713, 98713A, 98715, 98715A, 98715AEC-C, 98725, 98727 and 98732
174 .It
175 Xircom X3201 (cardbus only)
176 .El
177 .Pp
178 The
179 following NICs are known to work with the
180 .Nm
181 driver at this time:
182 .Pp
183 .Bl -bullet -compact
184 .It
185 3Com OfficeConnect 10/100B (ADMtek AN985 Centaur-P)
186 .It
187 Abocom FE2500
188 .It
189 Accton EN1217 (98715A)
190 .It
191 Accton EN2242 MiniPCI
192 .It
193 Adico AE310TX (98715A)
194 .It
195 Alfa Inc GFC2204 (ASIX AX88140A)
196 .It
197 Built in 10Mbps only Ethernet on Compaq Presario 7900 series
198 desktops (21143, non-MII)
199 .It
200 Built in Sun DMFE 10/100 Mbps Ethernet on Sun Netra X1 and Sun Fire V100
201 (DM9102A, MII)
202 .It
203 Built in Ethernet on LinkSys EtherFast 10/100 Instant GigaDrive (DM9102, MII)
204 .It
205 CNet Pro110B (ASIX AX88140A)
206 .It
207 CNet Pro120A (98715A or 98713A) and CNet Pro120B (98715)
208 .It
209 Compex RL100-TX (98713 or 98713A)
210 .It
211 D-Link DFE-570TX (21143, MII, quad port)
212 .It
213 Digital DE500-BA 10/100 (21143, non-MII)
214 .It
215 ELECOM Laneed LD-CBL/TXA (ADMtek AN985)
216 .It
217 Hawking CB102 CardBus
218 .It
219 IBM EtherJet Cardbus Adapter
220 .It
221 Intel PRO/100 Mobile Cardbus (versions that use the X3201 chipset)
222 .It
223 Jaton XpressNet (Davicom DM9102)
224 .It
225 Kingston KNE100TX (21143, MII)
226 .It
227 Kingston KNE110TX (PNIC 82c169)
228 .It
229 LinkSys LNE100TX (PNIC 82c168, 82c169)
230 .It
231 LinkSys LNE100TX v2.0 (PNIC II 82c115)
232 .It
233 LinkSys LNE100TX v4.0/4.1 (ADMtek AN985 Centaur-P)
234 .It
235 Matrox FastNIC 10/100 (PNIC 82c168, 82c169)
236 .It
237 Melco LGY-PCI-TXL
238 .It
239 Microsoft MN-120 10/100 CardBus (ADMTek Centaur-C)
240 .It
241 Microsoft MN-130 10/100 PCI (ADMTek Centaur-P)
242 .It
243 NDC SOHOware SFA110A (98713A)
244 .It
245 NDC SOHOware SFA110A Rev B4 (98715AEC-C)
246 .It
247 NetGear FA310-TX Rev.\& D1, D2 or D3 (PNIC 82c169)
248 .It
249 Netgear FA511
250 .It
251 PlaneX FNW-3602-T (ADMtek AN985)
252 .It
253 SMC EZ Card 10/100 1233A-TX (ADMtek AN985)
254 .It
255 SVEC PN102-TX (98713)
256 .It
257 Xircom Cardbus Realport
258 .It
259 Xircom Cardbus Ethernet 10/100
260 .It
261 Xircom Cardbus Ethernet II 10/100
262 .El
263 .Sh NOTES
264 On sparc64 the
265 .Nm
266 driver respects the
267 .Va local-mac-address?
268 system configuration variable for the built in Sun DMFE 10/100 Mbps Ethernet
269 interfaces on Sun Netra X1 and Sun Fire V100.
270 This system configuration variable can be set in the Open Firmware boot
271 monitor using the
272 .Ic setenv
273 command or by
274 .Xr eeprom 8 .
275 If set to
276 .Dq Li false
277 (the default), the
278 .Nm
279 driver will use the system's default MAC address for both of the built in
280 devices.
281 If set to
282 .Dq Li true ,
283 the unique MAC address of each interface is used rather than the system's
284 default MAC address.
285 .Sh DIAGNOSTICS
286 .Bl -diag
287 .It "dc%d: couldn't map ports/memory"
288 A fatal initialization error has occurred.
289 .It "dc%d: couldn't map interrupt"
290 A fatal initialization error has occurred.
291 .It "dc%d: watchdog timeout"
292 A packet was queued for transmission and a transmit command was
293 issued, but the device failed to acknowledge the transmission
294 before a timeout expired.
295 This can happen if the device is unable
296 to deliver interrupts for some reason, of if there is a problem with
297 the network connection (cable or network equipment) that results in a loss
298 of link.
299 .It "dc%d: no memory for rx list"
300 The driver failed to allocate an mbuf for the receiver ring.
301 .It "dc%d: TX underrun -- increasing TX threshold"
302 The device generated a transmit underrun error while attempting to
303 DMA and transmit a packet.
304 This happens if the host is not able to
305 DMA the packet data into the NIC's FIFO fast enough.
306 The driver
307 will dynamically increase the transmit start threshold so that
308 more data must be DMAed into the FIFO before the NIC will start
309 transmitting it onto the wire.
310 .It "dc%d: TX underrun -- using store and forward mode"
311 The device continued to generate transmit underruns even after all
312 possible transmit start threshold settings had been tried, so the
313 driver programmed the chip for store and forward mode.
314 In this mode,
315 the NIC will not begin transmission until the entire packet has been
316 transferred into its FIFO memory.
317 .It "dc%d: chip is in D3 power state -- setting to D0"
318 This message applies only to adapters which support power
319 management.
320 Some operating systems place the controller in low power
321 mode when shutting down, and some PCI BIOSes fail to bring the chip
322 out of this state before configuring it.
323 The controller loses all of
324 its PCI configuration in the D3 state, so if the BIOS does not set
325 it back to full power mode in time, it will not be able to configure it
326 correctly.
327 The driver tries to detect this condition and bring
328 the adapter back to the D0 (full power) state, but this may not be
329 enough to return the driver to a fully operational condition.
330 If
331 you see this message at boot time and the driver fails to attach
332 the device as a network interface, you will have to perform a second
333 warm boot to have the device properly configured.
334 .Pp
335 Note that this condition only occurs when warm booting from another
336 operating system.
337 If you power down your system prior to booting
338 .Fx ,
339 the card should be configured correctly.
340 .El
341 .Sh SEE ALSO
342 .Xr altq 4 ,
343 .Xr arp 4 ,
344 .Xr miibus 4 ,
345 .Xr netintro 4 ,
346 .Xr ng_ether 4 ,
347 .Xr polling 4 ,
348 .Xr eeprom 8 ,
349 .Xr ifconfig 8
350 .Rs
351 .%T ADMtek AL981, AL983 and AL985 data sheets
352 .%U http://www.admtek.com.tw
353 .Re
354 .Rs
355 .%T ASIX Electronics AX88140A and AX88141 data sheets
356 .%U http://www.asix.com.tw
357 .Re
358 .Rs
359 .%T Davicom DM9102 data sheet
360 .%U http://www.davicom.com.tw/userfile/24247/DM9102H-DS-F01-021508.pdf
361 .Re
362 .Rs
363 .%T Intel 21143 Hardware Reference Manual
364 .%U http://developer.intel.com
365 .Re
366 .Rs
367 .%T Macronix 98713/A, 98715/A and 98725 data sheets
368 .%U http://www.macronix.com
369 .Re
370 .Rs
371 .%T Macronix 98713/A and 98715/A app notes
372 .%U http://www.macronix.com
373 .Re
374 .Sh HISTORY
375 The
376 .Nm
377 device driver first appeared in
378 .Fx 4.0 .
379 .Sh AUTHORS
380 The
381 .Nm
382 driver was written by
383 .An Bill Paul Aq wpaul@ee.columbia.edu .
384 .Sh BUGS
385 The Macronix application notes claim that in order to put the
386 chips in normal operation, the driver must write a certain magic
387 number into the CSR16 register.
388 The numbers are documented in
389 the app notes, but the exact meaning of the bits is not.
390 .Pp
391 The 98713A seems to have a problem with 10Mbps full duplex mode.
392 The transmitter works but the receiver tends to produce many
393 unexplained errors leading to very poor overall performance.
394 The
395 98715A does not exhibit this problem.
396 All other modes on the
397 98713A seem to work correctly.
398 .Pp
399 The original 82c168 PNIC chip has built in NWAY support which is
400 used on certain early LinkSys LNE100TX and Matrox FastNIC cards,
401 however it is horribly broken and difficult to use reliably.
402 Consequently, autonegotiation is not currently supported for this
403 chipset: the driver defaults the NIC to 10baseT half duplex, and it is
404 up to the operator to manually select a different mode if necessary.
405 (Later cards use an external MII transceiver to implement NWAY
406 autonegotiation and work correctly.)
407 .Pp
408 The
409 .Nm
410 driver programs 82c168 and 82c169 PNIC chips to use the store and
411 forward setting for the transmit start threshold by default.
412 This
413 is to work around problems with some NIC/PCI bus combinations where
414 the PNIC can transmit corrupt frames when operating at 100Mbps,
415 probably due to PCI DMA burst transfer errors.
416 .Pp
417 The 82c168 and 82c169 PNIC chips also have a receiver bug that
418 sometimes manifests during periods of heavy receive and transmit
419 activity, where the chip will improperly DMA received frames to
420 the host.
421 The chips appear to upload several kilobytes of garbage
422 data along with the received frame data, dirtying several RX buffers
423 instead of just the expected one.
424 The
425 .Nm
426 driver detects this condition and will salvage the frame; however,
427 it incurs a serious performance penalty in the process.
428 .Pp
429 The PNIC chips also sometimes generate a transmit underrun error when
430 the driver attempts to download the receiver filter setup frame, which
431 can result in the receive filter being incorrectly programmed.
432 The
433 .Nm
434 driver will watch for this condition and requeue the setup frame until
435 it is transferred successfully.
436 .Pp
437 The ADMtek AL981 chip (and possibly the AN985 as well) has been observed
438 to sometimes wedge on transmit: this appears to happen when the driver
439 queues a sequence of frames which cause it to wrap from the end of the
440 transmit descriptor ring back to the beginning.
441 The
442 .Nm
443 driver attempts to avoid this condition by not queuing any frames past
444 the end of the transmit ring during a single invocation of the
445 .Fn dc_start
446 routine.
447 This workaround has a negligible impact on transmit performance.