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