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