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