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