NetBSD/share/man/man4/le.4

443 lines
12 KiB
Groff

.\" $NetBSD: le.4,v 1.19 2003/03/31 12:34:49 bjh21 Exp $
.\"
.\" Copyright (c) 1992, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" This software was developed by the Computer Systems Engineering group
.\" at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
.\" contributed to Berkeley.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" from: Header: le.4,v 1.2 92/10/13 05:31:33 leres Exp
.\" from: @(#)le.4 8.1 (Berkeley) 6/9/93
.\"
.Dd April 27, 2001
.Dt LE 4
.Os
.Sh NAME
.Nm le
.Nd AMD 7990, 79C90, 79C960, 79C970 LANCE Ethernet interface driver
.Sh SYNOPSIS
.Ss ISA boards
.Cd "nele0 at isa? port 0x320 irq 9 drq 7 # NE2100"
.Cd "le* at nele?"
.Cd "bicc0 at isa? port 0x320 irq 10 drq 7 # BICC Isolan"
.Cd "le* at bicc?"
.Cd "depca0 at isa? port 0x300 iomem 0xc8000 iosiz 0x8000 irq 5 # DEC DEPCA"
.Cd "le* at depca?"
.Cd "le* at isapnp? # ISA-Plug-and-Play adapters"
.Ss EISA boards
.Cd "depca* at eisa? slot ? # DEC DE422"
.Cd "le* at depca?"
.Ss MCA boards
.Cd "le* at mca? slot ? # SKNET Personal/MC2+"
.Ss PCI boards and mainboard adapters
.Cd "le* at pci? dev? function ?"
.Ss TURBOchannel PMAD-A or onboard (alpha, pmax)
.Cd "le* at tc? slot ? offset ?"
.Ss alpha
.Cd "le* at ioasic? offset ?"
.Ss amiga
.Cd "le* at zbus0"
.Ss atari
.Cd "le0 at vme0 irq 4 # BVME410"
.Cd "le0 at vme0 irq 5 # Riebl/PAM"
.Ss hp300
.Cd "le* at dio? scode ?"
.Ss mvme68k
.Cd "le0 at pcc? ipl 3 # MVME147"
.Ss news68k
.Cd "le0 at hb0 addr 0xe0f00000 ipl 4"
.Ss newsmips
.Cd "le0 at hb0 addr 0xbff80000 level 1"
.Ss pmax
.Cd "le* at ioasic? offset ?"
.Cd "le* at ibus0 addr ?"
.Ss sparc and sparc64
.Cd "le* at sbus? slot ? offset ?"
.Cd "le* at ledma0 slot ? offset ?"
.Cd "le* at lebuffer? slot ? offset ?"
.Ss sun3
.Cd "le0 at obio0 addr 0x120000 ipl 3"
.Cd "options LANCE_REVC_BUG"
.Ss vax
.Cd "le0 at vsbus0 csr 0x200e0000"
.Sh DESCRIPTION
The
.Nm
interface provides access to a
.Tn Ethernet
network via the
.Tn AMD
Am7990 and Am79C90 (CMOS, pin-compatible)
.Tn LANCE
(Local Area Network Controller - Ethernet) chip set.
.Pp
The
.Nm
driver also supports PCnet-PCI cards based on the
.Tn AMD 79c970
chipset, which is a single-chip implementation of a
.Tn LANCE
chip and
.Tn PCI
bus interface.
.Pp
Each of the host's network addresses
is specified at boot time with an
.Dv SIOCSIFADDR
.Xr ioctl 2 .
The
.Nm
interface employs the Address Resolution Protocol (ARP) described in
.Xr arp 4
to dynamically map between Internet and
.Tn Ethernet
addresses on the local network.
.Pp
Selective reception of multicast Ethernet frames is provided
by a 64-bit mask; multicast destination addresses are hashed to a
bit entry using the Ethernet CRC function.
.Pp
The use of
.Qq trailer
encapsulation to minimize copying data on input and output is
supported by the interface but offers no advantage on systems with
large page sizes.
The use of trailers is automatically negotiated with
.Tn ARP .
This negotiation may be disabled, on a per-interface basis, with
.Xr ifconfig 8 .
.Sh HARDWARE
.Ss amiga
The
.Nm
interface supports the following Zorro II expansion cards:
.Bl -tag -width "AMERISTAR" -offset indent
.It Em A2065
Commodore's Ethernet card, manufacturer\ 514, product\ 112
.It Em AMERISTAR
Ameristar's Ethernet card, manufacturer\ 1053, product\ 1
.It Em ARIADNE
Village Tronic's Ethernet card, manufacturer\ 2167, product\ 201
.El
.Pp
The A2065 and Ameristar Ethernet cards supports only manual media selection.
.Pp
The Ariadne card supports a software media selection for its two
different connectors:
.Pp
.Bl -tag -width xxxxxxxxxxxxxx
.It 10Base2/BNC
also known as thinwire-Ethernet
.It 10BaseT/UTP
also known as twisted pair
.El
.Pp
The Ariadne card uses an autoselect between UTP and BNC, so it uses
UTP when an active UTP line is connected or otherwise BNC.
See
.Xr ifmedia 4
for media selection options for
.Xr ifconfig 8 .
.Ss ISA
The ISA-bus Ethernet cards supported by the
.Nm
interface are:
.Pp
.Bl -tag -width xxxx -offset indent -compact
.It BICC Isolan
.It Novell NE2100
.It Digital DEPCA
.El
.Ss EISA
The EISA-bus Ethernet cards supported by the
.Nm
interface are:
.Pp
.Bl -tag -width xxxx -offset indent -compact
.It DEC DE422
.El
.Ss MCA
The MCA-bus Ethernet cards supported by the
.Nm
interface are:
.Pp
.Bl -tag -width xxxx -offset indent -compact
.It SKNET Personal MC2
.It SKNET MC2+
.El
.Ss pmax
All
.Tn LANCE
interfaces on
.Tn DECstations
are supported, as are interfaces on
.Tn "Alpha AXP"
machines with a
.Tn TURBOchannel
bus.
.Pp
No support is provided for switching between media ports.
The
.Tn DECstation
3100 provides both AUI and BNC (thinwire or 10BASE2) connectors.
Port selection is via a manual switch and is not software configurable.
.Pp
The
.Tn DECstation
model 5000/200
.Tn PMAD-AA
baseboard device provides only a BNC connector.
.Pp
The
.Nm ioasic
baseboard devices and the
.Tn PMAD-AA
.Tn TURBOchannel
option card provide only an AUI port.
.Ss sparc
The
.Tn Sbus
.Tn Ethernet
cards supported by the
.Nm
interface include:
.Bl -tag -width xxxx -offset indent -compact
.It SBE/S
.Tn SCSI
and Buffered
.Tn Ethernet
(sun part 501-1860)
.It FSBE/S
Fast
.Tn SCSI
and Buffered
.Tn Ethernet
(sun part 501-2015)
.El
.Pp
Interfaces attached to an
.Sy ledma0
on SPARC systems typically have have two types of connectors:
.Pp
.Bl -tag -offset indent -width xxxxxxxxxxxxxxxxxx
.It AUI/DIX
Standard 15 pin connector
.It 10BaseT
UTP, also known as twisted pair
.El
.Pp
The appropriate connector can be selected by supplying a
.Cm media
parameter to
.Xr ifconfig 8 .
The supported arguments for
.Cm media
are:
.Bl -tag -offset indent -width xxxxxxxxxxxxxxxxxx
.It Sy 10base5/AUI
to select the AUI connector, or
.It Sy 10baseT/UTP
to select the UTP connector.
.El
.Pp
If a
.Cm media
parameter is not specified, a default connector is selected for
use by examining all media types for carrier.
The first connector on which a carrier is detected will be selected.
Additionally, if carrier is dropped on a port, the driver will
switch between the possible ports until one with carrier is found.
.Sh DIAGNOSTICS
.Bl -diag
.It "le%d: overflow"
More packets came in from the Ethernet than there was space in the
receive buffers.
Packets were missed.
.It "le%d: receive buffer error"
Ran out of buffer space, packet dropped.
.It "le%d: lost carrier"
The Ethernet carrier disappeared during an attempt to transmit.
It will finish transmitting the current packet,
but will not automatically retry transmission if there is a collision.
.It "le%d: excessive collisions, tdr %d"
Ethernet extremely busy or jammed,
outbound packets dropped after 16 attempts to retransmit.
.Pp
.Sy TDR
is
.Qq Time Domain Reflectometry .
The
.Tn LANCE
TDR value is an internal counter of the interval between the start
of a transmission, and the occurrence of a collision.
This value can be used to determine the distance from the Ethernet
tap to the point on the Ethernet cable that is shorted or open
(unterminated).
.It "le%d: dropping chained buffer"
Packet didn't fit into a single receive buffer, packet dropped.
Since the
.Nm
driver allocates buffers large enough to receive the maximum size
.Tn Ethernet
packet, this means some other station on the LAN transmitted a
packet larger than allowed by the
.Tn Ethernet
standard.
.It "le%d: transmit buffer error"
.Tn LANCE
ran out of buffer before finishing the transmission of a packet.
If this error occurs, the driver software has a bug.
.It "le%d: underflow"
.Tn LANCE
ran out of buffer before finishing the transmission of a packet.
If this error occurs, the driver software has a bug.
.It "le%d: controller failed to initialize"
Driver failed to start the AM7990
.Tn LANCE .
This is potentially a hardware failure.
.It "le%d: memory error"
.Tn RAM
failed to respond within the timeout when the
.Tn LANCE
wanted to read or write it.
This is potentially a hardware failure.
.It "le%d: receiver disabled"
The
.Tn LANCE
receiver was turned off due to an error.
.It "le%d: transmitter disabled"
The
.Tn LANCE
transmitter was turned off due to an error.
.El
.Sh SEE ALSO
.Xr arp 4 ,
.Xr ifmedia 4 ,
.Xr inet 4 ,
.Xr intro 4 ,
.Xr mca 4 ,
.Xr ifconfig 8
.Rs
.%R "Am79C90 - CMOS Local Area Network Controller for Ethernet"
.%D May 1994
.%N 17881
.%O Advanced Micro Devices
.Re
.Sh HISTORY
The pmax
.Nm
driver is derived from a
.Nm
driver that first appeared in
.Bx 4.4 .
Support for multiple bus attachments first appeared in
.Nx 1.2 .
.Pp
The
.Tn Amiga
.Nm
interface first appeared in
.Nx 1.0
.Pp
The Ariadne Ethernet card first appeared with the
.Tn Amiga
ae interface in
.Nx 1.1
and was converted to the
.Tn Amiga
.Nm
interface in
.Nx 1.3
.Sh BUGS
The Am7990 Revision C chips have a bug which causes garbage to
be inserted in front of the received packet occasionally.
The work-around is to ignore packets with an invalid destination
address (garbage will usually not match), by double-checking the
destination address of every packet in the driver.
This work-around is enabled with the
.Dv LANCE_REVC_BUG
kernel option.
.Pp
When
.Dv LANCE_REVC_BUG
is enabled, the
.Nm
driver executes one or two calls to an inline Ethernet address
comparison function for every received packet.
On the
.Tn mc68000
it is exactly eight instructions of 16-bits each.
There is one comparison for each unicast packet, and two
comparisons for each broadcast packet.
.Pp
In summary, the cost of the LANCE_REVC_BUG option is:
.Bl -enum -compact
.It
loss of multicast support, and
.It
eight extra
.Tn CPU
instructions per received packet, sometimes sixteen,
depending on both the processor, and the type of packet.
.El
.Pp
All sun3 systems are presumed to have this bad revision of the Am7990,
until proven otherwise.
Alas, the only way to prove what revision of the chip is in a
particular system is inspection of the date code on the chip package,
to compare against a list of what chip revisions were fabricated
between which dates.
.Pp
Alas, the Am7990 chip is so old that
.Tn AMD
has
.Qq de-archived
the production information about it; pending a search elsewhere,
we don't know how to identify the revision C chip from the date
codes.
.Pp
On all pmax front-ends, performance is impaired by hardware which
forces a software copy of packets to and from DMA buffers.
The
.Nm ioasic
machines and the
.Tn DECstation
3100 must
copy packets to and from non-contiguous DMA buffers.
The
.Tn DECstation
5000/200 and the
.Tn PMAD-AA
must copy to and from an onboard SRAM DMA buffer.
The CPU overhead is noticeable, but all machines
can sustain full 10 Mb/s media speed.