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