xref: /netbsd/share/man/man4/tlp.4 (revision bf9ec67e)
1.\"	$NetBSD: tlp.4,v 1.10 2001/09/22 16:36:23 wiz Exp $
2.\"
3.\" Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
8.\" NASA Ames Research Center.
9.\"
10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions
12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright
14.\"    notice, this list of conditions and the following disclaimer.
15.\" 2. Redistributions in binary form must reproduce the above copyright
16.\"    notice, this list of conditions and the following disclaimer in the
17.\"    documentation and/or other materials provided with the distribution.
18.\" 3. All advertising materials mentioning features or use of this software
19.\"    must display the following acknowledgement:
20.\"        This product includes software developed by the NetBSD
21.\"        Foundation, Inc. and its contributors.
22.\" 4. Neither the name of The NetBSD Foundation nor the names of its
23.\"    contributors may be used to endorse or promote products derived
24.\"    from this software without specific prior written permission.
25.\"
26.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36.\" POSSIBILITY OF SUCH DAMAGE.
37.\"
38.Dd November 4, 1999
39.Dt TLP 4
40.Os
41.Sh NAME
42.Nm tlp
43.Nd DECchip 21x4x and clone Ethernet interfaces device driver
44.Sh SYNOPSIS
45.Cd "tlp* at eisa? slot ?"
46.Cd "tlp* at pci? dev ? function ?"
47.Cd "tlp* at cardbus? dev ? function ?"
48.Pp
49.Cd "options TLP_MATCH_21040"
50.Cd "options TLP_MATCH_21041"
51.Cd "options TLP_MATCH_21140"
52.Cd "options TLP_MATCH_21142"
53.Pp
54Configuration of PHYs may also be necessary.  See
55.Xr mii 4 .
56.Sh DESCRIPTION
57The
58.Nm
59device driver supports Ethernet interfaces based on the DECchip 21x4x
60.Dq Tulip
61(DEC fourth generation Ethernet controller) and a variety of clone chips.
62The Tulip has several features designed to make it flexible and reduce
63CPU usage:
64.Bl -bullet -offset indent
65.It
66Flexible receive filter allowing for 16 perfect matches, 16 perfect
67inverse matches, 512-bit hash table plus 1 perfect match, or
68512-bit hash table only.
69.It
70Uniform transmit descriptor architecture, configurable as a ring (allowing
712 buffers per descriptor) or a chain (allowing 1 buffer per descriptor).
72.It
73Uniform receive descriptor architecture, configurable as a ring (allowing
742 buffers per descriptor) or a chain (allowing 1 buffer per descriptor).
75.It
76Interrupt pacing; host may chose whether or not completion of processing of
77an individual descriptor causes an interrupt.
78.It
79Support for jumbo packets (by disabling transmit and receive watchdog
80timers).
81.It
82A patented transmit backoff algorithm which solves the Ethernet capture
83effect problem.
84.It
85Flexible bus modes to optimize DMA cycles for various cache sizes and
86bus implementations.
87.It
88Programmable transmit FIFO drain threshold to allow DMA overlap and reduce
89time to transmit.
90.It
91Flexible media attachment facilities.
92.El
93.Pp
94The
95.Nm
96driver supports the following chips:
97.Bl -bullet -offset indent
98.It
99.Em DECchip 21040
100-- This is the original Tulip Ethernet chip.  It supports 10Mb/s speeds
101over a built-in serial interface.  The serial interface has support for
10210BASE-T and AUI media.  The AUI port may be connected to 10BASE5 AUI
103or 10BASE2 BNC connectors, or both, selected by a gang jumper on the
104board.  Some boards connect the BNC connector to an external serial
105interface.  The driver has no way of knowing this, but the external
106serial interface may be selected with the
107.Dq manual
108media setting.
109.Pp
110Boards that include this chip include the DEC DE-435, on-board Ethernet on
111many DEC AlphaStation and AlphaServer systems, ZNYX ZX312, ZX312T,
112ZX314, ZX315, SMC 8432, SMC 8434, ACCTON EN1203, and some Cogent
113multi-port boards.
114.Pp
115This chip also appears on the DEC DE-425 EISA Ethernet board.  This board
116is a DECchip 21040 and a PLX PCI glue chip, which provides the interface
117to the EISA bus, and special address decoding so that the PCI configuration
118space registers of the 21040 are accessible in normal EISA I/O space.
119.Pp
120The very first versions of this chip were labeled
121.Dq DC1003
122and
123.Dq DC1003 Prototype .
124.It
125.Em DECchip 21041
126-- This is the second chip in the Tulip family, dubbed
127.Dq Tulip Plus .
128It supports 10Mb/s speeds over a built-in serial interface.  The serial
129interface has support for 10BASE-T, 10BASE5 AUI, and 10BASE2 BNC media.
130The serial interface also includes support for IEEE 802.3u NWay over
131the 10baseT interface, for negotiation of duplex mode with the link
132partner.
133.Pp
134Boards that include this chip include the DEC DE-450 and some SMC boards.
135.It
136.Em DECchip 21140 and 21140A
137-- This is the third chip in the Tulip family, dubbed
138.Dq FasterNet .
139It supports 10Mb/s speeds with a built-in 10BASE-T encoder/decoder,
140and 100Mb/s speeds with a built-in 100BASE PCS function.  Support
141for 100BASE-TX and 100BASE-T4 is provided by a built-in scrambler.
142Support for 100BASE-FX is possible with an appropriate PMD connected
143to the 100BASE PCS.  The 21140 and 21140A also support 10Mb/s and
144100Mb/s speeds over an MII interface connected to one or more PHYs.
145.Pp
146The 21140 and 21140A include a general purpose I/O facility, which
147may be used to toggle relays on the board.  This facility is often
148used to reset individual board modules (e.g. the MII bus), select
149the output path of the chip (e.g. connect the UTP port on the board
150to the PHY, built-in 10BASE-T ENDEC, or built-in 100BASE-T PMD), or
151detect link status (by reading an output pin on the 100BASE-T magnetics).
152.Pp
153The 21140 and 21140A use a standardized data structure located in
154the SROM to describe how the chip should be programmed for various
155media settings, including the internal chip pathway, and GPIO settings.
156If the SROM data is not in the standardized format, the device driver
157must know specific programming information for that particular board.
158.Pp
159Boards that include the 21140 and 21140A include the DEC EB140, DE-500XA,
160DE-500AA, Asante EtherFast, DaynaPORT BlueStreak, Cogent EM100TX, EM110TX,
161EM440T4 multi-port, Kingston KNE100TX, older versions of the NetGear FA-310TX,
162SMC 9332, SMC 9334, ZNYX ZX34x multi-port, and Adaptec ANA-6944A/TX multi-port.
163.It
164.Em DECchip 21142 and 21143
165-- These are the fourth and fifth chips in the Tulip family.  While
166they have two different chip numbers, the 21142 and 21143 are essentially
167identical, with only minor differences related to available technology
168at time of manufacture.  Both chips include support for 10Mb/s speeds
169over a built-in serial interface, and support for 10Mb/s and 100Mb/s
170speeds over an MII interface connected to one or more PHYs.  The
171serial interface includes support for 10BASE-T, 10BASE5 AUI, and
17210BASE2 BNC media, as well as support for IEEE 802.3u NWay over
173the 10BASE-T interface, for negotiation of duplex mode and link
174speed with the link partner.
175.Pp
176The 21143 adds support for 100Mb/s speeds with a built-in
177PCS function.  Support for 100BASE-TX and 100BASE-T4 is provided by
178a built-in scrambler.  Support for 100BASE-FX is possible with an
179appropriate PMD connected to the 100BASE PCS.
180.Pp
181The 21142 and 21143 include a general purpose I/O facility, which
182may be used to toggle relays on the board.  This facility is often
183used to reset individual board modules (e.g. the MII bus), select
184the output path of the chip (e.g. connect the UTP port on the board
185to the PHY, built-in serial interface, or built-in 100BASE-T PMD), or
186detect link status (by reading an output pin on the 100BASE-T magnetics).
187.Pp
188The 21142 and 21143 use a standardized data structure located in
189the SROM to describe how the chip should be programmed for various
190media settings, including the internal chip pathway, and GPIO settings.
191If the SROM data is not in the standardized format, the device driver
192must know specific programming information for that particular board.
193.Pp
194Boards that include the 21142 include the DEC EB142, and on-board Ethernet
195on the Digital Personal Workstation (Alpha
196.Dq Miata
197and x86 models) and several Digital PCs.
198.Pp
199Boards that include the 21143 include the DEC EB143, DE-500BA, several
200commonly-available 100baseFX boards, and the NetGear FA-510c CardBus
201card.
202.It
203.Em Lite-On 82C168 and 82C169
204-- These chips, dubbed
205.Dq PNIC ,
206were some of the first commonly-available Tulip clones,
207appearing on low-cost boards when it became difficult for board
208vendors to obtain DECchip 21140A parts.  They include support for
20910Mb/s speeds over a built-in 10BASE-T encoder/decoder, and 100Mb/s
210speeds over a built-in PCS function.  Support for 100BASE-TX and
211100BASE-T4 is provided by a built-in scrambler and transceiver
212module.  The transceiver module also includes support for NWay,
213for negotiating duplex mode and link speed with the link partner.
214These chips also include support for 10Mb/s and 100Mb/s speeds over
215and MII interface connected to one or more PHYs.
216.Pp
217These chips also include a GPIO facility, although it is programmed
218differently than the 21140's.
219.Pp
220Unfortunately, these chips seem to be plagued by two unfortunate
221hardware bugs: in some situations, the receive logic incorrectly
222dumps the entire transmit FIFO into the receive chain, rather
223than a single Ethernet frame, and the DMA engines appear to be
224substandard; they must be run in store-and-forward mode, and
225occasionally fail to upload the filter setup frame.
226.Pp
227Boards that include the 82C168 and 82C169 include the newer NetGear
228FA-310TX, the Kingston KNE110TX, and some older LinkSys LNE100TX boards.
229.It
230.Em Macronix 98713, 98713A, 98715, 98715A, and 98725
231-- Of all the clones, these chips, dubbed
232.Dq PMAC ,
233are the best.  They are very close clones of their respective
234originals, with the exception of some slight programming magic
235necessary to work around an apparent hardware bug.
236.Pp
237The 98713 is a DECchip 21140A clone.  It includes all of the 21140A's
238features, and uses the same SROM data format.
239.Pp
240The 98713A is a half-clone of the DECchip 21143.  It has support for
241serial, PCS, and MII media.  The serial interface has a built-in
242NWay function.  However, the 98713A does not have a GPIO facility, and,
243as a result, usually does not use the same SROM format as the 21143 (no
244need for GPIO programming information).
245.Pp
246The 98715, 98715A, and 98725 are more 21143-like, but lack the GPIO
247facility and MII.  These chips also support ACPI power management.
248.Pp
249Boards that include the Macronix chips include some SVEC boards,
250some SOHOWare boards, and the Compex RL100TX.
251.It
252.Em Lite-On/Macronix 82C115
253-- This chip, dubbed the
254.Dq PNIC-II ,
255was co-designed by Lite-On and Macronix.  It is almost identical to
256the Macronix 98725, with a few exceptions: it has Wake-On-LAN support,
257uses a 128-bit receive filter hash table, and supports IEEE 802.3x
258flow control.
259.Pp
260Boards that include the 82C115 include the newer LinkSys (Version 2)
261LNE100TX boards.
262.It
263.Em Winbond 89C840F
264-- This chip is a very low-end barely-a-clone of the 21140.  It supports
26510Mb/s and 100Mb/s speeds over an MII interface only, and has several
266programming differences from the 21140.
267.Pp
268The receive filter is completely different: it supports only a single
269perfect match, and has only a 64-bit multicast filter hash table.  The
270receive filter is programmed using special registers rather than the
271standard Tulip setup frame.
272.Pp
273This chip is also plagued by a terrible DMA engine.  The chip must be
274run in store-and-forward mode or it will often transmit garbage onto
275the wire.
276.Pp
277Interrupt pacing is also less flexible on the chip.
278.Pp
279Boards that include the 89C940F include the Complex RL100ATX,
280some Unicom 10/100 boards, and several no-name 10/100 boards.
281.It
282.Em ADMtek AL981
283-- This chip is a low cost, single-chip (sans magnetics) 10/100 Ethernet
284implementation.  It supports 10Mb/s and 100Mb/s speeds over an internal
285PHY.  There is no generic MII bus; instead the IEEE 802.3u-compliant PHY
286is accessed via special registers on the chip.  This chip also supports
287Wake-On-LAN and IEEE 802.3x flow control.
288.Pp
289The receive filter on the AL981 is completely different: it supports only
290a single perfect match, and has only a 64-bit multicast filter hash table.
291The receive filter is programmed using special registers rather than the
292standard Tulip setup frame.
293.Pp
294This chip also supports ACPI power management.
295.Pp
296A list of boards which include the AL981 is not yet available.
297.Pp
298Support for the AL981 has not yet been tested.  If you have a board
299which uses this chip, please contact the author (listed below).
300.It
301.Em Xircom X3201-3
302-- This chip is a CardBus 21143 clone with a loosely-coupled modem
303function (the modem is on a separate CardBus function, but the MAC
304portion includes a shadow of its interrupt status).  Media is provided
305by an IEEE 802.3u-compliant PHY connected to an MII interface.  These
306chips have no SROM; instead, the MAC address must be obtained from the
307card's CIS information.  Unlike most other Tulip-like chips, the X3201-3
308requires that transmit buffers be aligned to a 4-byte boundary.  This
309virtually ensures that each outgoing packet must be copied into an aligned
310buffer, since the Ethernet header is 14 bytes long.
311.Pp
312This chip also supports ACPI power management.
313.Pp
314This chip is found in Xircom RealPort(tm) 10/100 CardBus Ethernet/Modem
315cards, as well as some Intel OEM'd RealPort(tm) cards.
316.It
317.Em Davicom DM9102 and DM9102A
318-- These chips are 21104A-like with a few minor exceptions.  Media is
319provided by an internal IEEE 802.3u-compliant PHY accessed as if it
320were connected to a normal MII interface.  The DM9102A also provides
321an external MII interface, to which a HomePNA 1 PHY is typically
322connected.  The DM9102A also includes support for CardBus.
323.Pp
324This chip also supports ACPI power management and Wake-On-LAN.
325.Pp
326A complete list of boards with the DM9102 and DM9102A is not available.
327However, the DM9102 is often found on PC motherboards that include a
328built-in Ethernet interface.
329.El
330.Sh MEDIA SELECTION
331Media selection done using
332.Xr ifconfig 8
333using the standard
334.Xr ifmedia 4
335mechanism.  Refer to those manual pages for more information.
336.\" .Sh DIAGNOSTICS
337.\" XXX too be done.
338.Sh SEE ALSO
339.Xr arp 4 ,
340.Xr eisa 4 ,
341.Xr ifmedia 4 ,
342.Xr mii 4 ,
343.Xr netintro 4 ,
344.Xr pci 4 ,
345.Xr ifconfig 8
346.Rs
347.%T "DECchip 21040 Ethernet LAN Controller for PCI Hardware Reference Manual"
348.%D May 1994
349.%A Digital Equipment Corporation
350.%O Order Number EC-N0752-72
351.Re
352.Rs
353.%T "DECchip 21041 PCI Ethernet LAN Controller Hardware Reference Manual"
354.%N Preliminary
355.%D April 1995
356.%A Digital Equipment Corporation
357.%O Order Number EC-QAWXA-TE
358.Re
359.Rs
360.%T "DECchip 21041 DC1017-BA Errata"
361.%N Revision 1.0
362.%D April 27, 1995
363.%A Digital Equipment Corporation
364.%O Order Number EC-QD2MA-TE
365.Re
366.Rs
367.%T "DECchip 21140 PCI Fast Ethernet LAN Controller Hardware Reference Manual"
368.%N Supercedes EC-Q0CA-TE
369.%D May 1995
370.%A Digital Equipment Corporation
371.%O Order Number EC-Q0CB-TE
372.Re
373.Rs
374.%T "DECchip 21140A PCI Fast Ethernet LAN Controller Hardware Reference Manual"
375.%N Supercedes EC-QN7NA-TE, EC-QN7NB-TE
376.%D January 1996
377.%A Digital Equipment Corporation
378.%O Order Number EC-QN7NC-TE
379.Re
380.Rs
381.%T "21143 PCI/CardBus 10/100Mb/s Ethernet LAN Controller Hardware Reference Manual"
382.%N Revision 1.0
383.%D October 1998
384.%A Intel Corporation
385.%O Document Number 278074-001
386.Re
387.Rs
388.%T "Ethernet Address ROM Programming: An Application Note"
389.%D April 1994
390.%A Digital Equipment Corporation
391.%O Order Number EC-N3214-72
392.Re
393.Rs
394.%T "Using the DECchip 21041 with Boot ROM, Serial ROM, and External Register: An Application Note"
395.%D April 1995
396.%A Digital Equipment Corporation
397.%O Order Number EC-QJLGA-TE
398.Re
399.Rs
400.%T "Connecting the DECchip 21140 PCI Fast Ethernet LAN Controller to the Network: An Application Note"
401.%N Preliminary
402.%D December 1994
403.%A Digital Equipment Corporation
404.%O Order Number EC-QAR2A-TE
405.Re
406.Rs
407.%T "MXIC MX98713 PMAC 100/10BASE PCI MAC Controller"
408.%N Revision 1.1
409.%D November 8, 1996
410.%A Macronix International Co., Ltd.
411.%O Part Number: PM0386
412.Re
413.Rs
414.%T "MXIC MX98713A Fast Ethernet MAC Controller"
415.%N Revision 1.0
416.%D August 28, 1997
417.%A Macronix International Co., Ltd.
418.%O Part Number: PM0489
419.Re
420.Rs
421.%T "MXIC MX98715A Single Chip Fast Ethernet NIC Controller"
422.%N Revision 1.2
423.%D February 24, 1999
424.%A Macronix International Co., Ltd.
425.%O Part Number: PM0537
426.Re
427.Rs
428.%T "MXIC MX98725 Single Chip Fast Ethernet NIC Controller"
429.%N Revision 1.7
430.%D September 15, 1998
431.%A Macronix International Co., Ltd.
432.%O Part Number: PM0468
433.Re
434.Rs
435.%T "MXIC MX98715 Application Note"
436.%N Revision 1.5
437.%D October 9, 1998
438.%A Macronix International Co., Ltd.
439.%O Part Number: PM0498
440.Re
441.Rs
442.%T "MXIC MX98715A Application Note"
443.%N Revision 1.2
444.%D October 9, 1998
445.%A Macronix International Co., Ltd.
446.%O Part Number: PM0541
447.Re
448.Rs
449.%T "MXIC MX98725 Application Note"
450.%N Revision 1.1
451.%D July 10, 1998
452.%A Macronix International Co., Ltd.
453.%O Part Number: PM0525
454.Re
455.Rs
456.%T "MXIC LC82C115 Single Chip Fast Ethernet NIC Controller"
457.%N Revision 0.2
458.%D February 12, 1999
459.%A Macronix International Co., Ltd.
460.%O Part Number: PM0572
461.Re
462.Rs
463.%T "PNIC Hardware Specification"
464.%N Revision 1.0
465.%D December 1, 1994
466.%A LITE ON, Inc.
467.Re
468.Rs
469.%T "Comet: AL981 PCI 10/100 Fast Ethernet Controller with Integrated PHY"
470.%N Revision 0.93
471.%D January, 1999
472.%A ADMtek Incorporated
473.Re
474.Rs
475.%T "Winbond LAN W89C840F 100/10Mbps Ethernet Controller"
476.%N Revision A1
477.%D April 1997
478.%A Winbond Electronics Corporation
479.Re
480.Rs
481.%T "Xircom X3201-3 CardBus 10/100 Mbps Ethernet Controller Software Developer's Specification"
482.%N Revision B
483.%D April 7, 1999
484.%O Reference number: 103-0548-001
485.Re
486.Rs
487.%T "Davicom DM9102 10/100 Mbps Single Chip LAN Controller"
488.%N Version DM9102-DS-F01
489.%D July 22, 1999
490.Re
491.Rs
492.%T "Davicom DM9102A Single Chip Fast Ethernet NIC Controller"
493.%N Version DM9102A-DS-F01
494.%D January 20, 2000
495.Re
496.Sh HISTORY
497The
498.Nm
499driver first appeared in
500.Nx 1.5 .
501.Sh AUTHORS
502The
503.Nm
504driver was written by
505.An Jason R. Thorpe
506while employed at the Numerical Aerospace Simulation Facility,
507NASA Ames Research Center.  The author may be contacted at
508.Aq thorpej@netbsd.org .
509.Sh BUGS
510The
511.Nm
512driver does not match the DECchip 21040, 21041, 21140, 21142, and 21143
513chips on the PCI bus by default.  That is because another driver,
514.Nm de ,
515which is more functional in some circumstances, exists for them.  In
516order for support for these chips to be activated in
517.Nm tlp ,
518either
519.Nm de
520must be left out of the kernel, or the appropriate
521.Pa TLP_MATCH_*
522options must be used.
523.Pp
524Media autosense is not yet supported for any serial or PCS function media.
525It is, however, supported for IEEE 802.3u-compliant PHY media.
526