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