1.\" $NetBSD: le.4,v 1.22 2004/10/04 19:12:52 rumble Exp $ 2.\" 3.\"- 4.\" Copyright (c) 1992, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" This software was developed by the Computer Systems Engineering group 8.\" at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 9.\" contributed to Berkeley. 10.\" 11.\" Redistribution and use in source and binary forms, with or without 12.\" modification, are permitted provided that the following conditions 13.\" are met: 14.\" 1. Redistributions of source code must retain the above copyright 15.\" notice, this list of conditions and the following disclaimer. 16.\" 2. Redistributions in binary form must reproduce the above copyright 17.\" notice, this list of conditions and the following disclaimer in the 18.\" documentation and/or other materials provided with the distribution. 19.\" 3. Neither the name of the University nor the names of its contributors 20.\" may be used to endorse or promote products derived from this software 21.\" without specific prior written permission. 22.\" 23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" from: Header: le.4,v 1.2 92/10/13 05:31:33 leres Exp 36.\" from: @(#)le.4 8.1 (Berkeley) 6/9/93 37.\" $FreeBSD$ 38.\" 39.Dd December 26, 2020 40.Dt LE 4 41.Os 42.Sh NAME 43.Nm le 44.Nd "AMD Am7900 LANCE and Am79C9xx ILACC/PCnet Ethernet interface driver" 45.Sh SYNOPSIS 46To compile this driver into the kernel, 47place the following line in your 48kernel configuration file: 49.Bd -ragged -offset indent 50.Cd "device le" 51.Ed 52.Pp 53Alternatively, to load the driver as a 54module at boot time, place the following line in 55.Xr loader.conf 5 : 56.Bd -literal -offset indent 57if_le_load="YES" 58.Ed 59.Pp 60For ISA non-PnP adapters, the port address as well as the IRQ and the DRQ 61numbers have to be specified in 62.Pa /boot/device.hints : 63.Cd hint.le.0.at="isa" 64.Cd hint.le.0.port="0x280" 65.Cd hint.le.0.irq="10" 66.Cd hint.le.0.drq="0" 67.Sh DESCRIPTION 68The 69.Nm 70driver provides support for Ethernet adapters based on the 71.Tn AMD Am7990 72and 73.Tn Am79C90 74.Pq CMOS, pin-compatible 75Local Area Network Controller for Ethernet 76.Pq Tn LANCE 77chips. 78.Pp 79The 80.Nm 81driver also supports Ethernet adapters based on the 82.Tn AMD Am79C900 83Integrated Local Area Communications Controller 84.Pq Tn ILACC 85as well as the 86.Tn Am79C9xx PCnet 87family of chips, which are single-chip implementations of a 88.Tn LANCE 89chip and a DMA engine. 90The 91.Nm 92driver treats all of these 93.Tn PCI 94bus Ethernet chips as an 95.Tn AMD Am79C970 PCnet-PCI 96and does not support the additional features like the MII bus and burst mode of 97.Tn AMD Am79C971 PCnet-FAST 98and greater chips. 99.Pp 100Generally, the 101.Nm 102driver aims at supporting as many different chips on as many different 103platforms as possible, 104partially at the cost of the best performance with some of these. 105.Pp 106The 107.Nm 108driver supports reception and transmission of extended frames for 109.Xr vlan 4 . 110Selective reception of multicast Ethernet frames is provided by a 64-bit mask; 111multicast destination addresses are hashed to a bit entry using the Ethernet 112CRC function. 113.Sh HARDWARE 114.Ss ISA 115The 116.Nm 117driver supports 118.Tn ISA 119bus Ethernet adapters which are based on the following chips: 120.Pp 121.Bl -bullet -compact 122.It 123.Tn AMD Am7990 and Am79C90 LANCE 124.It 125.Tn AMD Am79C960 PCnet-ISA 126.It 127.Tn AMD Am79C961 PCnet-ISA+ 128.It 129.Tn AMD Am79C961A PCnet-ISA II 130.El 131.Pp 132This includes support for the following Ethernet adapters: 133.Pp 134ISA non-PnP: 135.Pp 136.Bl -bullet -compact 137.It 138.Tn BICC Isolan 139.\" .It 140.\" .Tn Digital DEPCA 141.It 142.Tn Novell NE2100 143.El 144.Pp 145ISA PnP: 146.Pp 147.Bl -bullet -compact 148.It 149.Tn AMD AM1500T/AM2100 150.It 151.Tn AMD PCnet-32 152.It 153.Tn AMD PCnet-ISA 154.It 155.Tn Allied Telesyn AT-1500 156.It 157.Tn Boca LANCard Combo 158.It 159.Tn Cabletron E2100 Series DNI 160.It 161.Tn Cabletron E2200 Single Chip 162.It 163.Tn Melco Inc. LGY-IV 164.It 165.Tn Novell NE2100 166.It 167.Tn Racal InterLan EtherBlaster 168.El 169.Pp 170The 171.Nm 172driver does not support the selection of media types and options via 173.Xr ifconfig 8 174with 175.Tn ISA 176bus Ethernet adapters. 177.Ss PCI 178The 179.Tn PCI 180bus Ethernet chips supported by the 181.Nm 182driver are: 183.Pp 184.Bl -bullet -compact 185.It 186.Tn AMD Am53C974/Am79C970/Am79C974 PCnet-PCI 187.It 188.Tn AMD Am79C970A PCnet-PCI II 189.It 190.Tn AMD Am79C971 PCnet-FAST 191.It 192.Tn AMD Am79C972 PCnet-FAST+ 193.It 194.Tn AMD Am79C973/Am79C975 PCnet-FAST III 195.It 196.Tn AMD Am79C976 PCnet-PRO 197.It 198.Tn AMD Am79C978 PCnet-Home 199.El 200.Pp 201This includes support for the following Ethernet adapters: 202.Pp 203.Bl -bullet -compact 204.It 205.Tn AcerLAN NIC P20 206.It 207.Tn Allied Telesyn AT-2450 and AT-2700 series 208.It 209.Tn VMware emulated AMD Am79C970A PCnet-PCI II interface 210.El 211.Pp 212The 213.Nm 214driver supports the selection of the following media types via 215.Xr ifconfig 8 216with 217.Tn PCI 218bus Ethernet adapters: 219.Bl -tag -width ".Cm 10base5/AUI" 220.It Cm autoselect 221Enable autoselection of the media type. 222.It Cm 10baseT/UTP 223Select UTP media. 224.It Cm 10base5/AUI 225Select AUI/BNC media. 226.El 227.Pp 228The following media option is supported with these media types: 229.Bl -tag -width ".Cm full-duplex" 230.It Cm full-duplex 231Select full duplex operation. 232.El 233.Pp 234Note that the 235.Nm 236driver does not support selecting 100Mbps (Fast Ethernet) media types. 237.Sh DIAGNOSTICS 238.Bl -diag 239.It "le%d: overflow" 240More packets came in from the Ethernet than there was space in the 241.Tn LANCE 242receive buffers. 243Packets were missed. 244.It "le%d: receive buffer error" 245The 246.Tn LANCE 247ran out of buffer space, packet dropped. 248.It "le%d: lost carrier" 249The Ethernet carrier disappeared during an attempt to transmit. 250The 251.Tn LANCE 252will finish transmitting the current packet, 253but will not automatically retry transmission if there is a collision. 254.It "le%d: excessive collisions, tdr %d" 255The Ethernet was extremely busy or jammed, 256outbound packets were dropped after 16 attempts to retransmit. 257.Pp 258TDR 259is the abbreviation of 260.Qq Time Domain Reflectometry . 261The optionally reported TDR value is an internal counter of the interval 262between the start of a transmission and the occurrence of a collision. 263This value can be used to determine the distance from the Ethernet tap to 264the point on the Ethernet cable that is shorted or open (unterminated). 265.It "le%d: dropping chained buffer" 266A packet did not fit into a single receive buffer and was dropped. 267Since the 268.Nm 269driver allocates buffers large enough to receive maximum sized Ethernet 270packets, this means some other station on the LAN transmitted a packet 271larger than allowed by the Ethernet standard. 272.It "le%d: transmit buffer error" 273The 274.Tn LANCE 275ran out of buffer space before finishing the transmission of a packet. 276If this error occurs, the driver software has a bug. 277.It "le%d: underflow" 278The 279.Tn LANCE 280ran out of buffer space before finishing the transmission of a packet. 281If this error occurs, the driver software has a bug. 282.It "le%d: controller failed to initialize" 283Driver failed to start the 284.Tn LANCE . 285This is potentially a hardware failure. 286.It "le%d: memory error" 287RAM failed to respond within the timeout when the 288.Tn LANCE 289wanted to read or write it. 290This is potentially a hardware failure. 291.It "le%d: receiver disabled" 292The receiver of the 293.Tn LANCE 294was turned off due to an error. 295.It "le%d: transmitter disabled" 296The transmitter of the 297.Tn LANCE 298was turned off due to an error. 299.El 300.Sh SEE ALSO 301.Xr altq 4 , 302.Xr arp 4 , 303.Xr intro 4 , 304.Xr netintro 4 , 305.Xr vlan 4 , 306.Xr ifconfig 8 307.Sh HISTORY 308The 309.Nm 310driver was ported from 311.Nx 312and first appeared in 313.Fx 6.1 . 314The 315.Nx 316version in turn was derived from the 317.Nm 318driver which first appeared in 319.Bx 4.4 . 320.Sh AUTHORS 321The 322.Nm 323driver was ported by 324.An Marius Strobl Aq Mt marius@FreeBSD.org . 325.\" .Sh BUGS 326.\" The Am7990 Revision C chips have a bug which causes garbage to be inserted 327.\" in front of the received packet occasionally. 328.\" The work-around is to ignore packets with an invalid destination address 329.\" (garbage will usually not match), by double-checking the destination 330.\" address of every packet in the driver. 331.\" This work-around can be enabled with the 332.\" .Dv LANCE_REVC_BUG 333.\" kernel option. 334.\" .Pp 335.\" When 336.\" .Dv LANCE_REVC_BUG 337.\" is enabled, the 338.\" .Nm 339.\" driver executes one or two calls to an inline Ethernet address comparison 340.\" function for every received packet. 341.\" On the 342.\" .Tn MC68000 343.\" it is exactly eight instructions of 16 bits each. 344.\" There is one comparison for each unicast packet, and two comparisons for 345.\" each broadcast packet. 346.\" .Pp 347.\" In summary, the cost of the LANCE_REVC_BUG option is: 348.\" .Bl -enum -compact 349.\" .It 350.\" loss of multicast support, and 351.\" .It 352.\" eight extra 353.\" .Tn CPU 354.\" instructions per received packet, sometimes sixteen, depending on both the 355.\" processor, and the type of packet. 356.\" .El 357.\" .Pp 358.\" All sun3 systems are presumed to have this bad revision of the Am7990, 359.\" until proven otherwise. 360.\" Alas, the only way to prove what revision of the chip is in a particular 361.\" system is inspection of the date code on the chip package, 362.\" to compare against a list of what chip revisions were fabricated between 363.\" which dates. 364.\" .Pp 365.\" Alas, the Am7990 chip is so old that 366.\" .Tn AMD 367.\" has 368.\" .Qq de-archived 369.\" the production information about it; pending a search elsewhere, we do not 370.\" know how to identify the revision C chip from the date codes. 371