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