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 20, 2007 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. 90This includes a superset of the 91.Tn PCI 92bus Ethernet chips supported by the 93.Xr pcn 4 94driver. 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. 104Thus the 105.Xr pcn 4 106driver should be preferred for the latter. 107.Pp 108Generally, the 109.Nm 110driver aims at supporting as many different chips on as many different 111platforms as possible, 112partially at the cost of the best performance with some of these. 113.Pp 114The 115.Nm 116driver supports reception and transmission of extended frames for 117.Xr vlan 4 . 118Selective reception of multicast Ethernet frames is provided by a 64-bit mask; 119multicast destination addresses are hashed to a bit entry using the Ethernet 120CRC function. 121.Sh HARDWARE 122.Ss C-Bus and ISA 123The 124.Nm 125driver supports 126.Tn C-Bus 127and 128.Tn ISA 129bus Ethernet adapters which are based on the following chips: 130.Pp 131.Bl -bullet -compact 132.It 133.Tn AMD Am7990 and Am79C90 LANCE 134.It 135.Tn AMD Am79C960 PCnet-ISA 136.It 137.Tn AMD Am79C961 PCnet-ISA+ 138.It 139.Tn AMD Am79C961A PCnet-ISA II 140.El 141.Pp 142This includes support for the following Ethernet adapters: 143.Pp 144C-Bus non-PnP: 145.Pp 146.Bl -bullet -compact 147.It 148.Tn Contec C-NET(98)S 149.El 150.Pp 151ISA non-PnP: 152.Pp 153.Bl -bullet -compact 154.It 155.Tn BICC Isolan 156.\" .It 157.\" .Tn Digital DEPCA 158.It 159.Tn Novell NE2100 160.El 161.Pp 162ISA PnP: 163.Pp 164.Bl -bullet -compact 165.It 166.Tn AMD AM1500T/AM2100 167.It 168.Tn AMD PCnet-32 169.It 170.Tn AMD PCnet-ISA 171.It 172.Tn Allied Telesyn AT-1500 173.It 174.Tn Boca LANCard Combo 175.It 176.Tn Cabletron E2100 Series DNI 177.It 178.Tn Cabletron E2200 Single Chip 179.It 180.Tn Melco Inc. LGY-IV 181.It 182.Tn Novell NE2100 183.It 184.Tn Racal InterLan EtherBlaster 185.El 186.Pp 187The 188.Nm 189driver does not support the selection of media types and options via 190.Xr ifconfig 8 191with 192.Tn C-Bus 193and 194.Tn ISA 195bus Ethernet adapters. 196.\" .Ss EISA 197.\" The 198.\" .Tn EISA 199.\" bus Ethernet cards supported by the 200.\" .Nm 201.\" driver are: 202.\" .Pp 203.\" .Bl -bullet -compact 204.\" .It 205.\" .Tn DEC DE422 206.\" .El 207.\" .Ss MCA 208.\" The 209.\" .Tn MCA 210.\" bus Ethernet cards supported by the 211.\" .Nm 212.\" driver are: 213.\" .Pp 214.\" .Bl -bullet -compact 215.\" .It 216.\" .Tn SKNET Personal MC2 217.\" .It 218.\" .Tn SKNET MC2+ 219.\" .El 220.Ss PCI 221The 222.Tn PCI 223bus Ethernet chips supported by the 224.Nm 225driver are: 226.Pp 227.Bl -bullet -compact 228.It 229.Tn AMD Am53C974/Am79C970/Am79C974 PCnet-PCI 230.It 231.Tn AMD Am79C970A PCnet-PCI II 232.It 233.Tn AMD Am79C971 PCnet-FAST 234.It 235.Tn AMD Am79C972 PCnet-FAST+ 236.It 237.Tn AMD Am79C973/Am79C975 PCnet-FAST III 238.It 239.Tn AMD Am79C976 PCnet-PRO 240.It 241.Tn AMD Am79C978 PCnet-Home 242.El 243.Pp 244This includes support for the following Ethernet adapters: 245.Pp 246.Bl -bullet -compact 247.It 248.Tn AcerLAN NIC P20 249.It 250.Tn Allied Telesyn AT-2450 and AT-2700 series 251.It 252.Tn VMware emulated AMD Am79C970A PCnet-PCI II interface 253.El 254.Pp 255The 256.Nm 257driver supports the selection of the following media types via 258.Xr ifconfig 8 259with 260.Tn PCI 261bus Ethernet adapters: 262.Bl -tag -width ".Cm 10base5/AUI" 263.It Cm autoselect 264Enable autoselection of the media type. 265.It Cm 10baseT/UTP 266Select UTP media. 267.It Cm 10base5/AUI 268Select AUI/BNC media. 269.El 270.Pp 271The following media option is supported with these media types: 272.Bl -tag -width ".Cm full-duplex" 273.It Cm full-duplex 274Select full duplex operation. 275.El 276.Pp 277Note that unlike the 278.Xr pcn 4 279driver, the 280.Nm 281driver does not support selecting 100Mbps (Fast Ethernet) media types. 282.Ss sparc64 283The 284.Nm 285driver supports the on-board 286.Tn LANCE 287interfaces found in 288.Tn Sun Ultra 1 289machines. 290The 291.Nm 292driver allows the selection of the following media types via 293.Xr ifconfig 8 294with these on-board interfaces: 295.Bl -tag -width ".Cm 10base5/AUI" 296.It Cm autoselect 297Enable autoselection of the media type. 298.It Cm 10baseT/UTP 299Select UTP media. 300.It Cm 10base5/AUI 301Select AUI media. 302.El 303.Pp 304When using autoselection, a default media type is selected for use by 305examining all ports for carrier. 306The first media type with which a carrier is detected will be selected. 307Additionally, if carrier is dropped on a port, the driver will switch 308between the possible ports until one with carrier is found. 309.Pp 310The 311.Nm 312driver also supports the following 313.Tn Sun SBus 314Ethernet add-on adapters: 315.Pp 316.Bl -bullet -compact 317.It 318.Tn SCSI HBA and Buffered Ethernet 319.Pq SBE/S, P/N 501-1869 320.It 321.Tn Fast SCSI and Buffered Ethernet 322.Pq FSBE/S, P/N 501-2015 and 501-2981 323.El 324.Pp 325The 326.Nm 327driver does not support the selection of media types and options via 328.Xr ifconfig 8 329with 330.Tn SBus 331Ethernet add-on adapters. 332.Pp 333For further information on configuring media types and options, see 334.Xr ifconfig 8 . 335.Sh DIAGNOSTICS 336.Bl -diag 337.It "le%d: overflow" 338More packets came in from the Ethernet than there was space in the 339.Tn LANCE 340receive buffers. 341Packets were missed. 342.It "le%d: receive buffer error" 343The 344.Tn LANCE 345ran out of buffer space, packet dropped. 346.It "le%d: lost carrier" 347The Ethernet carrier disappeared during an attempt to transmit. 348The 349.Tn LANCE 350will finish transmitting the current packet, 351but will not automatically retry transmission if there is a collision. 352.It "le%d: excessive collisions, tdr %d" 353The Ethernet was extremely busy or jammed, 354outbound packets were dropped after 16 attempts to retransmit. 355.Pp 356TDR 357is the abbreviation of 358.Qq Time Domain Reflectometry . 359The optionally reported TDR value is an internal counter of the interval 360between the start of a transmission and the occurrence of a collision. 361This value can be used to determine the distance from the Ethernet tap to 362the point on the Ethernet cable that is shorted or open (unterminated). 363.It "le%d: dropping chained buffer" 364A packet did not fit into a single receive buffer and was dropped. 365Since the 366.Nm 367driver allocates buffers large enough to receive maximum sized Ethernet 368packets, this means some other station on the LAN transmitted a packet 369larger than allowed by the Ethernet standard. 370.It "le%d: transmit buffer error" 371The 372.Tn LANCE 373ran out of buffer space before finishing the transmission of a packet. 374If this error occurs, the driver software has a bug. 375.It "le%d: underflow" 376The 377.Tn LANCE 378ran out of buffer space before finishing the transmission of a packet. 379If this error occurs, the driver software has a bug. 380.It "le%d: controller failed to initialize" 381Driver failed to start the 382.Tn LANCE . 383This is potentially a hardware failure. 384.It "le%d: memory error" 385RAM failed to respond within the timeout when the 386.Tn LANCE 387wanted to read or write it. 388This is potentially a hardware failure. 389.It "le%d: receiver disabled" 390The receiver of the 391.Tn LANCE 392was turned off due to an error. 393.It "le%d: transmitter disabled" 394The transmitter of the 395.Tn LANCE 396was turned off due to an error. 397.El 398.Sh SEE ALSO 399.Xr altq 4 , 400.Xr arp 4 , 401.Xr intro 4 , 402.Xr netintro 4 , 403.Xr pcn 4 , 404.Xr vlan 4 , 405.Xr ifconfig 8 406.Sh HISTORY 407The 408.Nm 409driver was ported from 410.Nx 411and first appeared in 412.Fx 6.1 . 413The 414.Nx 415version in turn was derived from the 416.Nm 417driver which first appeared in 418.Bx 4.4 . 419.Sh AUTHORS 420The 421.Nm 422driver was ported by 423.An Marius Strobl Aq Mt marius@FreeBSD.org . 424.\" .Sh BUGS 425.\" The Am7990 Revision C chips have a bug which causes garbage to be inserted 426.\" in front of the received packet occasionally. 427.\" The work-around is to ignore packets with an invalid destination address 428.\" (garbage will usually not match), by double-checking the destination 429.\" address of every packet in the driver. 430.\" This work-around can be enabled with the 431.\" .Dv LANCE_REVC_BUG 432.\" kernel option. 433.\" .Pp 434.\" When 435.\" .Dv LANCE_REVC_BUG 436.\" is enabled, the 437.\" .Nm 438.\" driver executes one or two calls to an inline Ethernet address comparison 439.\" function for every received packet. 440.\" On the 441.\" .Tn MC68000 442.\" it is exactly eight instructions of 16 bits each. 443.\" There is one comparison for each unicast packet, and two comparisons for 444.\" each broadcast packet. 445.\" .Pp 446.\" In summary, the cost of the LANCE_REVC_BUG option is: 447.\" .Bl -enum -compact 448.\" .It 449.\" loss of multicast support, and 450.\" .It 451.\" eight extra 452.\" .Tn CPU 453.\" instructions per received packet, sometimes sixteen, depending on both the 454.\" processor, and the type of packet. 455.\" .El 456.\" .Pp 457.\" All sun3 systems are presumed to have this bad revision of the Am7990, 458.\" until proven otherwise. 459.\" Alas, the only way to prove what revision of the chip is in a particular 460.\" system is inspection of the date code on the chip package, 461.\" to compare against a list of what chip revisions were fabricated between 462.\" which dates. 463.\" .Pp 464.\" Alas, the Am7990 chip is so old that 465.\" .Tn AMD 466.\" has 467.\" .Qq de-archived 468.\" the production information about it; pending a search elsewhere, we do not 469.\" know how to identify the revision C chip from the date codes. 470