1.\" Copyright (c) 1992, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This software was developed by the Computer Systems Engineering group 5.\" at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 6.\" contributed to Berkeley. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 3. All advertising materials mentioning features or use of this software 17.\" must display the following acknowledgement: 18.\" This product includes software developed by the University of 19.\" California, Berkeley and its contributors. 20.\" 4. Neither the name of the University nor the names of its contributors 21.\" may be used to endorse or promote products derived from this software 22.\" without specific prior written permission. 23.\" 24.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34.\" SUCH DAMAGE. 35.\" 36.\" from: Header: le.4,v 1.2 92/10/13 05:31:33 leres Exp 37.\" from: @(#)le.4 8.1 (Berkeley) 6/9/93 38.\" $NetBSD: le.4,v 1.10 2000/02/14 00:13:50 augustss Exp $ 39.\" 40.Dd June 9, 1993 41.Dt LE 4 42.Os 43.Sh NAME 44.Nm le 45.Nd AMD 7990, 79C90, 79C960, 79C970 LANCE Ethernet interface driver 46.Sh SYNOPSIS 47.Ss ISA boards 48.Cd "nele0 at isa? port 0x320 irq 9 drq 7 #NE2100" 49.Cd "le* at nele?" 50.Cd "bicc0 at isa? port 0x320 irq 10 drq 7 #BICC Isolan" 51.Cd "le* at bicc?" 52.Cd "depca0 at isa? port 0x300 iomem 0xc8000 iosiz 0x8000 irq 5 #DEC DEPCA" 53.Cd "le* at depca?" 54.Cd "le* at isapnp? #ISA-Plug-and-Play adapters" 55.Ss PCI boards and mainboard adapters 56.Cd "le* at pci? dev? function ?" 57.Ss Turbochannel PMAD-A or onboard (alpha, pmax) 58.Cd "le* at tc? slot ? offset ?" 59.Ss alpha 60.Cd "le* at ioasic? offset ?" 61.Ss amiga 62.Cd "le* at zbus0" 63.Ss atari 64.Cd "le0 at vme0 irq 4 # BVME410" 65.Cd "le0 at vme0 irq 5 # Riebl/PAM" 66.Ss hp300 67.Cd "le* at dio? scode ?" 68.Ss mvme68k 69.Cd "le0 at pcc? ipl 3 # MVME147" 70.Ss news68k 71.Cd "le0 at hb0 addr 0xe0f00000 ipl 4" 72.Ss newsmips 73.Cd "le0 at hb0 addr 0xbff80000 level 1" 74.Ss pmax 75.Cd "le* at ioasic? offset ?" 76.Cd "le* at ibus0 addr ?" 77.Ss sparc and sparc64 78.Cd "le* at sbus? slot ? offset ?" 79.Cd "le* at ledma0 slot ? offset ?" 80.Cd "le* at lebuffer? slot ? offset ?" 81.Ss sun3 82.Cd "le0 at obio0 addr 0x120000 ipl 3" 83.Cd "options LANCE_REVC_BUG" 84.Ss vax 85.Cd "le0 at vsbus0 csr 0x200e0000" 86.Sh DESCRIPTION 87The 88.Nm 89interface provides access to a 90.Tn Ethernet 91network via the 92.Tn AMD 93Am7990 and Am79C90 (CMOS, pin-compatible) 94.Tn LANCE 95(Local Area Network Controller - Ethernet) chip set. 96.Pp 97The 98.Nm 99driver also supports PCnet-PCI cards based on the 100.Tn AMD 79c970 101chipset, which is a single-chip implementation of a 102.Tn LANCE 103chip and 104.Tn PCI 105bus interface. 106.Pp 107Each of the host's network addresses 108is specified at boot time with an 109.Dv SIOCSIFADDR 110.Xr ioctl 2 . 111The 112.Nm 113interface employs the Address Resolution Protocol (ARP) described in 114.Xr arp 4 115to dynamically map between Internet and 116.Tn Ethernet 117addresses on the local network. 118.Pp 119Selective reception of multicast Ethernet frames is provided 120by a 64-bit mask; multicast destination addresses are hashed to a 121bit entry using the Ethernet CRC function. 122.Pp 123The use of 124.Qq trailer 125encapsulation to minimize copying data on input and output is 126supported by the interface but offers no advantage on systems with 127large page sizes. 128The use of trailers is automatically negotiated with 129.Tn ARP . 130This negotiation may be disabled, on a per-interface basis, with 131.Xr ifconfig 8 . 132.Sh HARDWARE 133.Ss amiga 134The 135.Nm 136interface supports the following Zorro II expansion cards: 137.Bl -tag -width "AMERISTAR" -offset indent 138.It Em A2065 139Commodore's Ethernet card, manufacturer\ 514, product\ 112 140.It Em AMERISTAR 141Ameristar's Ethernet card, manufacturer\ 1053, product\ 1 142.It Em ARIADNE 143Village Tronic's Ethernet card, manufacturer\ 2167, product\ 201 144.El 145.Pp 146The A2065 and Ameristar Ethernet cards supports only manual media selection. 147.Pp 148The Ariadne card supports a software media selection for it's two 149different connectors: 150.Pp 151.Bl -tag -width xxxxxxxxxxxxxx 152.It 10Base2/BNC 153also known as thinwire-Ethernet 154.It 10BaseT/UTP 155also known as twisted pair 156.El 157.Pp 158The Ariadne card uses an autoselect between UTP and BNC, so it uses 159UTP when an active UTP line is connected or otherwise BNC. 160See 161.Xr ifmedia 4 162for media selection options for 163.Xr ifconfig 8 . 164.Ss ISA 165The ISA-bus Ethernet cards supported by the 166.Nm 167interface are: 168.Pp 169.Bl -tag -width -offset indent -compact 170.It BICC Isolan 171.It Novell NE2100 172.It Digital DEPCA 173.El 174.Ss pmax 175All 176.Tn LANCE 177interfaces on 178.Tn DECstations 179are supported, as are interfaces on 180.Tn "Alpha AXP" 181machines with a 182.Tn TurboChannel 183bus. 184.Pp 185No support is provided for switching between media ports. 186The 187.Tn DECstation 1883100 provides both AUI and BNC (thinwire or 10base2) connectors. 189Port selection is via a manual switch and is not software configurable. 190.Pp 191The 192.Tn DECstation 193model 5000/200 194.Tn PMAD-AA 195baseboard device provides only a BNC connector. 196.Pp 197The 198.Nm ioasic 199baseboard devices and the 200.Tn PMAD-AA 201.Tn TurboChannel 202option card provide only an AUI port. 203.Ss sparc 204The 205.Tn Sbus 206.Tn Ethernet 207cards supported by the 208.Nm 209interface include: 210.Bl -tag -width -offset indent -compact 211.It SBE/S 212.Tn SCSI 213and Buffered 214.Tn Ethernet 215(sun part 501-1860) 216.It FSBE/S 217Fast 218.Tn SCSI 219and Buffered 220.Tn Ethernet 221(sun part 501-2015) 222.El 223.Pp 224Interfaces attached to an 225.Sy ledma0 226on SPARC systems typically have have two types of connectors: 227.Pp 228.Bl -tag -offset indent -width xxxxxxxxxxxxxxxxxx 229.It AUI/DIX 230Standard 15 pin connector 231.It 10BaseT 232UTP, also known as twisted pair 233.El 234.Pp 235The appropriate connector can be selected by supplying a 236.Cm media 237parameter to 238.Xr ifconfig 8 . 239The supported arguments for 240.Cm media 241are: 242.Bl -tag -offset indent -width xxxxxxxxxxxxxxxxxx 243.It Sy 10base5/AUI 244to select the AUI connector, or 245.It Sy 10baseT/UTP 246to select the UTP connector. 247.El 248.Pp 249If a 250.Cm media 251parameter is not specified, a default connector is selected for 252use by examining all media types for carrier. 253The first connector on which a carrier is detected will be selected. 254Additionally, if carrier is dropped on a port, the driver will 255switch between the possible ports until one with carrier is found. 256.Sh DIAGNOSTICS 257.Bl -diag 258.It "le%d: overflow" 259More packets came in from the Ethernet than there was space in the 260receive buffers. 261Packets were missed. 262.It "le%d: receive buffer error" 263Ran out of buffer space, packet dropped. 264.It "le%d: lost carrier" 265The Ethernet carrier disappeared during an attempt to transmit. 266It will finish transmitting the current packet, 267but will not automatically retry transmission if there is a collision. 268.It "le%d: excessive collisions, tdr %d" 269Ethernet extremely busy or jammed, 270outbound packets dropped after 16 attempts to retransmit. 271.Pp 272.Sy TDR 273is 274.Qq Time Domain Reflectometry . 275The 276.Tn LANCE 277TDR value is an internal counter of the interval between the start 278of a transmission, and the occurrence of a collision. 279This value can be used to determine the distance from the Ethernet 280tap to the point on the Ethernet cable that is shorted or open 281(unterminated). 282.It "le%d: dropping chained buffer" 283Packet didn't fit into a single receive buffer, packet dropped. 284Since the 285.Nm 286driver allocates buffers large enough to receive the maximum size 287.Tn Ethernet 288packet, this means some other station on the LAN transmitted a 289packet larger than allowed by the 290.Tn Ethernet 291standard. 292.It "le%d: transmit buffer error" 293.Tn LANCE 294ran out of buffer before finishing the transmission of a packet. 295If this error occurrs, the driver software has a bug. 296.It "le%d: underflow" 297.Tn LANCE 298ran out of buffer before finishing the transmission of a packet. 299If this error occurrs, the driver software has a bug. 300.It "le%d: controller failed to initialize" 301Driver failed to start the AM7990 302.Tn LANCE . 303This is potentially a hardware failure. 304.It "le%d: memory error" 305.Tn RAM 306failed to respond within the timeout when the 307.Tn LANCE 308wanted to read or write it. 309This is potentially a hardware failure. 310.It "le%d: receiver disabled" 311The 312.Tn LANCE 313receiver was turned off due to an error. 314.It "le%d: transmitter disabled" 315The 316.Tn LANCE 317transmitter was turned off due to an error. 318.El 319.Sh BUGS 320The Am7990 Revision C chips have a bug which causes garbage to 321be inserted in front of the received packet occasionally. 322The work-around is to ignore packets with an invalid destination 323address (garbage will usually not match), by double-checking the 324destination address of every packet in the driver. 325This work-around is enabled with the 326.Dv LANCE_REVC_BUG 327kernel option. 328.Pp 329When 330.Dv LANCE_REVC_BUG 331is enabled, the 332.Nm 333driver executes one or two calls to an inline Ethernet address 334comparison function for every received packet. 335On the 336.Tn mc68000 337it is exactly eight instructions of 16-bits each. 338There is one comparison for each unicast packet, and two 339comparisons for each broadcast packet. 340.Pp 341In summary, the cost of the LANCE_REVC_BUG option is: 342.Bl -enum -compact 343.It 344loss of multicast support, and 345.It 346eight extra 347.Tn CPU 348instructions per received packet, sometimes sixteen, 349depending on both the processor, and the type of packet. 350.El 351.Pp 352All sun3 systems are presumed to have this bad revision of the Am7990, 353until proven otherwise. 354Alas, the only way to prove what revision of the chip is in a 355particular system is inspection of the date code on the chip package, 356to compare against a list of what chip revisions were fabricated 357between which dates. 358.Pp 359Alas, the Am7990 chip is so old that 360.Tn AMD 361has 362.Qq de-archived 363the production information about it; pending a search elsewhere, 364we don't know how to identify the revision C chip from the date 365codes. 366.Pp 367On all pmax front-ends, performance is impaired by hardware which 368forces a software copy of packets to and from DMA buffers. 369The 370.Nm ioasic 371machines and the 372.Tn DECstation 3733100 must 374copy packets to and from non-contiguous DMA buffers. 375The 376.Tn DECstation 3775000/200 and the 378.Tn PMAD-AA 379must copy to and from an onboard SRAM DMA buffer. 380The CPU overhead is noticeable, but all machines 381can sustain full 10 Mb/s media speed. 382.Sh HISTORY 383The pmax 384.Nm 385driver is derived from a 386.Nm 387driver that first appeared in 388.Bx 4.4 . 389Support for multiple bus attachments first appeared in 390.Nx 1.2 . 391.Pp 392The 393.Tn Amiga 394.Nm 395interface first appeared in 396.Nx 1.0 397.Pp 398The Ariadne Ethernet card first appeared with the 399.Tn Amiga 400ae interface in 401.Nx 1.1 402and was converted to the 403.Tn Amiga 404.Nm 405interface in 406.Nx 1.3 407.Sh SEE ALSO 408.Xr intro 4 , 409.Xr inet 4 , 410.Xr arp 4 , 411.Xr ifmedia 4 , 412.Xr ifconfig 8 413.Rs 414.%R "Am79C90 - CMOS Local Area Network Controller for Ethernet" 415.%D May 1994 416.%N 17881 417.%O Advanced Micro Devices 418.Re 419