Retire the LMC driver, and its associated lmcconfig tool. LMC has been

mentioned repeatedly as a non-MP-safe driver that is hard to maintain,
and no one is taking care of it.

LMC was removed from OpenBSD three years ago, and from FreeBSD a few
months ago.
This commit is contained in:
maxv 2018-12-12 07:04:05 +00:00
parent 6b97a0ad63
commit 7bc6869364
17 changed files with 25 additions and 11053 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.1193 2018/11/09 21:33:50 abs Exp $
# $NetBSD: mi,v 1.1194 2018/12/12 07:04:05 maxv Exp $
#
# Note: Don't delete entries from here - mark them as "obsolete" instead,
# unless otherwise stated below.
@ -1762,7 +1762,7 @@
./usr/sbin/ldpd base-router-bin
./usr/sbin/link base-sysutil-bin
./usr/sbin/linkfarm base-obsolete obsolete
./usr/sbin/lmcconfig base-netutil-bin
./usr/sbin/lmcconfig base-obsolete obsolete
./usr/sbin/lmtp base-obsolete obsolete
./usr/sbin/lockstat base-sysutil-bin
./usr/sbin/lpc base-lpr-bin

View File

@ -1,4 +1,4 @@
# $NetBSD: rescue.mi,v 1.43 2018/09/23 07:24:19 maxv Exp $
# $NetBSD: rescue.mi,v 1.44 2018/12/12 07:04:05 maxv Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@ -67,7 +67,7 @@
./rescue/ldd base-rescue-root
./rescue/less base-rescue-root
./rescue/lfs_cleanerd base-rescue-root
./rescue/lmcconfig base-rescue-root
./rescue/lmcconfig base-obsolete obsolete
./rescue/lmcctl base-obsolete obsolete
./rescue/ln base-rescue-root
./rescue/ls base-rescue-root

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.2240 2018/12/01 02:43:43 kamil Exp $
# $NetBSD: mi,v 1.2241 2018/12/12 07:04:05 maxv Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
./etc/mtree/set.comp comp-sys-root
@ -643,7 +643,7 @@
./usr/include/dev/pci/if_fxpreg.h comp-obsolete obsolete
./usr/include/dev/pci/if_fxpvar.h comp-obsolete obsolete
./usr/include/dev/pci/if_levar.h comp-obsolete obsolete
./usr/include/dev/pci/if_lmc.h comp-c-include
./usr/include/dev/pci/if_lmc.h comp-obsolete obsolete
./usr/include/dev/pci/if_lmc_types.h comp-obsolete obsolete
./usr/include/dev/pci/if_lmcioctl.h comp-obsolete obsolete
./usr/include/dev/pci/if_lmcvar.h comp-obsolete obsolete

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.269 2018/10/01 08:23:53 jmcneill Exp $
# $NetBSD: mi,v 1.270 2018/12/12 07:04:05 maxv Exp $
./etc/mtree/set.debug comp-sys-root
./usr/lib comp-sys-usr compatdir
./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile
@ -1124,7 +1124,7 @@
./usr/libdata/debug/usr/sbin/lastlogin.debug comp-sysutil-debug debug
./usr/libdata/debug/usr/sbin/ldpd.debug comp-router-debug debug
./usr/libdata/debug/usr/sbin/link.debug comp-sysutil-debug debug
./usr/libdata/debug/usr/sbin/lmcconfig.debug comp-netutil-debug debug
./usr/libdata/debug/usr/sbin/lmcconfig.debug comp-obsolete obsolete
./usr/libdata/debug/usr/sbin/lockstat.debug comp-sysutil-debug debug
./usr/libdata/debug/usr/sbin/lpc.debug comp-lpr-debug debug
./usr/libdata/debug/usr/sbin/lpd.debug comp-lpr-debug debug

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.1630 2018/12/08 01:47:21 sevan Exp $
# $NetBSD: mi,v 1.1631 2018/12/12 07:04:05 maxv Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@ -1386,7 +1386,7 @@
./usr/share/man/cat4/lii.0 man-sys-catman .cat
./usr/share/man/cat4/lkm.0 man-obsolete obsolete
./usr/share/man/cat4/lm.0 man-sys-catman .cat
./usr/share/man/cat4/lmc.0 man-sys-catman .cat
./usr/share/man/cat4/lmc.0 man-obsolete obsolete
./usr/share/man/cat4/lmenv.0 man-sys-catman .cat
./usr/share/man/cat4/lmtemp.0 man-sys-catman .cat
./usr/share/man/cat4/lo.0 man-sys-catman .cat
@ -2671,7 +2671,7 @@
./usr/share/man/cat8/ldpd.0 man-router-catman .cat
./usr/share/man/cat8/lfs_cleanerd.0 man-sysutil-catman .cat
./usr/share/man/cat8/link.0 man-sysutil-catman .cat
./usr/share/man/cat8/lmcconfig.0 man-sysutil-catman .cat
./usr/share/man/cat8/lmcconfig.0 man-obsolete obsolete
./usr/share/man/cat8/lmcctl.0 man-obsolete obsolete
./usr/share/man/cat8/lmtp.0 man-postfix-catman postfix,.cat
./usr/share/man/cat8/local.0 man-postfix-catman postfix,.cat
@ -4507,7 +4507,7 @@
./usr/share/man/html4/lii.html man-sys-htmlman html
./usr/share/man/html4/lkm.html man-obsolete obsolete
./usr/share/man/html4/lm.html man-sys-htmlman html
./usr/share/man/html4/lmc.html man-sys-htmlman html
./usr/share/man/html4/lmc.html man-obsolete obsolete
./usr/share/man/html4/lmenv.html man-sys-htmlman html
./usr/share/man/html4/lmtemp.html man-sys-htmlman html
./usr/share/man/html4/lo.html man-sys-htmlman html
@ -5636,7 +5636,7 @@
./usr/share/man/html8/ldpd.html man-router-htmlman html
./usr/share/man/html8/lfs_cleanerd.html man-sysutil-htmlman html
./usr/share/man/html8/link.html man-sysutil-htmlman html
./usr/share/man/html8/lmcconfig.html man-sysutil-htmlman html
./usr/share/man/html8/lmcconfig.html man-obsolete obsolete
./usr/share/man/html8/lmtp.html man-postfix-htmlman postfix,html
./usr/share/man/html8/local.html man-postfix-htmlman postfix,html
./usr/share/man/html8/locate.updatedb.html man-sysutil-htmlman html
@ -7468,7 +7468,7 @@
./usr/share/man/man4/lii.4 man-sys-man .man
./usr/share/man/man4/lkm.4 man-obsolete obsolete
./usr/share/man/man4/lm.4 man-sys-man .man
./usr/share/man/man4/lmc.4 man-sys-man .man
./usr/share/man/man4/lmc.4 man-obsolete obsolete
./usr/share/man/man4/lmenv.4 man-sys-man .man
./usr/share/man/man4/lmtemp.4 man-sys-man .man
./usr/share/man/man4/lo.4 man-sys-man .man
@ -8753,7 +8753,7 @@
./usr/share/man/man8/ldpd.8 man-router-man .man
./usr/share/man/man8/lfs_cleanerd.8 man-sysutil-man .man
./usr/share/man/man8/link.8 man-sysutil-man .man
./usr/share/man/man8/lmcconfig.8 man-sysutil-man .man
./usr/share/man/man8/lmcconfig.8 man-obsolete obsolete
./usr/share/man/man8/lmcctl.8 man-obsolete obsolete
./usr/share/man/man8/lmtp.8 man-postfix-man postfix,.man
./usr/share/man/man8/local.8 man-postfix-man postfix,.man

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.674 2018/12/01 11:17:28 jdolecek Exp $
# $NetBSD: Makefile,v 1.675 2018/12/12 07:04:05 maxv Exp $
# @(#)Makefile 8.1 (Berkeley) 6/18/93
MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@ -105,7 +105,7 @@ MAN+= eisa.4 gpioiic.4 isa.4 isapnp.4 ofisa.4 pci.4 pcmcia.4
MAN+= podulebus.4 ieee1394if.4 spi.4
# machine-independent PCI devices
MAN+= cz.4 epic.4 lmc.4 viaenv.4
MAN+= cz.4 epic.4 viaenv.4
# machine-independent ISA devices
MAN+= aha.4 ai.4 aic.4 ast.4 ate.4 boca.4 cs.4 cy.4 ec.4 ef.4 \

View File

@ -1,686 +0,0 @@
.\"-
.\" Copyright (c) 2002-2006 David Boggs. (boggs@boggs.palo-alto.ca.us)
.\" All rights reserved. I wrote this man page from scratch.
.\"
.\" BSD License:
.\"
.\" 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.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
.\"
.\" GNU General Public License:
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the Free
.\" Software Foundation; either version 2 of the License, or (at your option)
.\" any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but WITHOUT
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
.\" more details.
.\"
.\" You should have received a copy of the GNU General Public License along with
.\" this program; if not, write to the Free Software Foundation, Inc., 59
.\" Temple Place - Suite 330, Boston, MA 02111-1307, USA.
.\"
.\" * * * * * * * * * * * * *
.\" * ATTENTION MDOC POLICE *
.\" * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
.\" * This device driver works on FIVE OSs with NO changes. *
.\" * IFDEFS are used to ignore C and Groff code that is *
.\" * not relevant to a particular Operating System. *
.\" * Author will merge local changes and re-sync copies. *
.\" * Please feel free to correct my groff usage, but... *
.\" * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
.\" * PLEASE DO NOT "UN-IFDEF" THIS FILE! *
.\" * * * * * * * * * * * * * * * * * * * * *
.\"
.\" $NetBSD: lmc.4,v 1.22 2014/03/18 18:20:39 riastradh Exp $
.\"
.Dd April 11, 2006
.Dt LMC 4
.Os
.Sh NAME
.Nm lmc
.Nd device driver for
.Tn LMC
(and some
.Tn SBE )
wide-area network interface cards
.Sh SYNOPSIS
This driver is built into the GENERIC kernel so it should "just work".
.Pp
The driver can be built into a kernel by adding the following to
.Pa /sys/arch/ARCH/conf/YOURKERNEL :
.Bd -unfilled -offset indent -compact
.Cd lmc* at pci?
.Cd options ALTQ
.Cd options ALTQ_HFSC # for altq example
.Cd pseudo-device sppp
.Cd pseudo-device bpfilter
.Ed
.Pp
The driver can send and receive raw IP packets even if
SPPP is not configured into the kernel.
.Sh DESCRIPTION
This is an open-source
.Tn Unix
device driver for PCI-bus wide-area network interface cards.
It sends and receives packets
in HDLC frames over synchronous circuits.
A computer plus
.Ux
plus some
.Tn LMC
cards makes an
.Em open
wide-area network router.
.Pp
The
.Nm
driver works with
.Fx ,
.Nx ,
.Ox ,
.Tn BSD/OS ,
and
.Tn Linux
OSs.
It has been tested on
.Tn i386
(SMP 32-bit little-end),
.Tn PowerPC
(32-bit big-end),
.Tn Alpha
(64-bit little-end), and
.Tn Sparc
(64-bit big-end) architectures.
.Pp
The
.Nm
driver works with the following cards:
.Bl -tag -width "LMC5200" -offset indent
.It Sy LMC5200
HSSI\[em]High Speed Serial Interface,
.Bd -unfilled -compact
EIA612/613, 50-pin connector,
0 to 52 Mb/s, DTE only.
.Ed
.It Sy LMC5245
T3, 2xBNC conns, 75 ohm
.Bd -unfilled -compact
C-Parity or M13 Framing,
DSX-3 up to 910 ft.
.Ed
.It Sy LMC1000
SSI\[em]Synchronous Serial Interface,
.Bd -unfilled -compact
V.35, X.21, EIA449, EIA530(A), EIA232,
0 to 10 Mb/s, DTE or DCE.
.Ed
.It Sy LMC1200
T1/E1, RJ45 conn, 100 or 120 ohms,
.Bd -unfilled -compact
T1-B8ZS-ESF, T1-AMI-SF, E1-HDB3-many,
DSX-1 up to 1500 ft; CSU up to 6 Kft.
.Ed
.El
.Pp
.Tn LMC
cards contain a high-performance
.Sy PCI
interface, an
.Sy HDLC
function and
either integrated
.Sy modems
(T1, T3) or
.Sy modem
interfaces (HSSI and SSI).
.Bl -tag -width "Modem" -offset indent
.It Sy PCI
The PCI interface is a
.Tn "DEC 21140A Tulip"
Fast Ethernet chip.
This chip has an efficient PCI implementation with scatter/gather DMA,
and can run at 100 Mb/s full duplex (twice as fast as needed here).
.It Sy HDLC
The HDLC functions (ISO-3309: flags, bit-stuffing, CRC) are implemented
in a Field Programmable Gate Array (FPGA) which talks to the Ethernet
chip through a Media Independent Interface (MII).
The hardware in the FPGA translates between Ethernet packets and
HDLC frames on-the-fly; think of it as a WAN PHY chip for Ethernet.
.It Sy Modem
The modem chips are the main differences between cards.
HSSI cards use ECL10K chips to implement the EIA-612/613 interface.
T3 cards use a
.Tn TranSwitch TXC-03401
framer chip.
SSI cards use
.Tn Linear Technology LTC1343
modem interface chips.
T1 cards use a
.Tn BrookTree/Conexant/Mindspeed Bt8370
framer and line interface chip.
.El
.Pp
Line protocol stacks exist above device drivers
and below internet protocol stacks.
They typically encapsulate packets in HDLC frames and deal with
higher-level issues like protocol multiplexing and security.
The driver is compatible with several line protocol stacks:
.Bl -tag -width "GenericHDLC" -offset indent
.It Sy SPPP
.Xr sppp 4
implements Synchronous-PPP and Cisco-HDLC in the kernel.
.It Sy RawIP
The null line protocol, built into the driver, sends and receives
raw IPv4 and IPv6 packets in HDLC frames with no extra bytes of
overhead and no state at the end points.
.El
.\"
.Sh EXAMPLES
.\"
.Ss ifconfig and lmcconfig
.\"
The program
.Xr lmcconfig 8
manipulates interface parameters beyond the scope of
.Xr ifconfig 8 .
.Ic lmcconfig
has many flags and options,
but in normal operation only a few are needed.
.Bd -unfilled -offset indent
.Ic lmcconfig lmc0
.Ed
displays interface configuration and status.
.Bd -unfilled -offset indent
.Ic lmcconfig lmc0 -X 1
.Ed
selects the built-in RawIP line protocol stack.
.Bd -unfilled -offset indent
.Ic lmcconfig lmc0 -X 2 -x 2
.Ed
selects the SPPP stack and the PPP protocol.
.Pp
Some configuration options are available through
.Ic ifconfig
as well as
.Ic lmcconfig .
.Bd -unfilled -offset indent -compact
.Ic ifconfig -m lmc0
.Ed
lists the available media options.
.Bd -unfilled -offset indent
.Ic ifconfig lmc0 mediaopt loopback
.Ed
loops the interface transmitter to the receiver for testing.
This loopback uses a path present in every card type.
.Ic lmcconfig
can select card-specific loopbacks, such as outbound payload loopback.
.Bd -unfilled -offset indent
.Ic ifconfig lmc0 debug
.Ed
enables debugging output from the device driver and from
the line protocol stack above it.
.Bd -unfilled -offset indent
.Ic lmcconfig lmc0 -D
.Ed
enables debugging output from the device driver.
.Pp
Debugging messages that appear on the console are also
written to file
.Pa /var/log/messages .
.Em Caution :
when
things go very wrong, a torrent of debugging messages
can swamp the console and bring a machine to its knees.
.\"
.Ss Operation
Configure a PPP link using SPPP with
.Bd -unfilled -offset indent -compact
.Ic lmcconfig lmc0 -X 2 -x 2
.Ic ifconfig lmc0 10.0.0.1 10.0.0.2
.Ed
.Pp
Configure a Cisco-HDLC link using SPPP with
.Bd -unfilled -offset indent -compact
.Ic lmcconfig lmc0 -X 2 -x 3
.Ic ifconfig lmc0 10.0.0.1 10.0.0.2
.Ed
.Pp
Configure a RAWIP link with
.Bd -unfilled -offset indent -compact
.Ic lmcconfig lmc0 -X 1
.Ic ifconfig lmc0 10.0.0.1 10.0.0.2
.Ed
.Sh TESTING
.Ss Testing with Loopbacks
Testing with loopbacks requires only one card and
can test everything on that card.
Packets can be looped back at many points: in the PCI chip,
in the modem chips, through a loopback plug, in the
local external equipment, or at the far end of a circuit.
.Pp
All cards can be looped through the PCI chip.
Cards with internal modems can be looped through
the modem framer and the modem line interface.
Cards for external modems can be looped through
the driver/receiver chips.
See
.Xr lmcconfig 8
for details.
.Pp
Configure the card with
.Bd -unfilled -offset indent -compact
.Ic ifconfig lmc0 10.0.0.1 10.0.0.1
.Ed
.Bl -tag -width "T1/E1" -offset indent
.It Sy HSSI
Loopback plugs can be ordered from SBE (and others).
Transmit clock is normally supplied by the external modem.
When an HSSI card is operated with a loopback plug, the PCI bus
clock must be used as the transmit clock, typically 33 MHz.
When testing an HSSI card with a loopback plug,
configure it with
.Bd -unfilled -offset indent -compact
.Ic lmcconfig lmc0 -a 2
.Ed
.Dq Fl a Li 2
selects the PCI bus clock as the transmit clock.
.It Sy T3
Connect the two BNC jacks with a short coax cable.
.It Sy SSI
Loopback plugs can be ordered from SBE (only).
Transmit clock is normally supplied by the external modem.
When an SSI card is operated with a loopback plug,
the on-board clock synthesizer must be used.
When testing an SSI card with a loopback plug,
configure it with
.Bd -unfilled -offset indent -compact
.Ic lmcconfig lmc0 -E -f 10000000
.Ed
.Bd -ragged -compact
.Dq Fl E
puts the card in DCE mode to source a transmit clock.
.Dq Fl f Li 10000000
sets the internal clock source to 10 Mb/s.
.Ed
.It Sy T1/E1
A loopback plug is a modular plug with two wires
connecting pin 1 to pin 4 and pin 2 to pin 5.
.El
.Pp
One can also test by connecting to a local modem (HSSI and SSI)
or NI (T1 and T3) configured to loop back.
Cards can generate signals to loopback remote equipment
so that complete circuits can be tested; see
.Xr lmcconfig 8
for details.
.Ss Testing with a Modem
Testing with a modem requires two cards of different types.
The cards can be in the same machine or different machines.
.Pp
Configure the two cards with
.Bd -unfilled -offset indent -compact
.Ic ifconfig lmc0 10.0.0.1 10.0.0.2
.Ic ifconfig lmc1 10.0.0.2 10.0.0.1
.Ed
.Bl -tag -width "T3/HSSI" -offset indent
.It Sy T3/HSSI
If you have a T3 modem with an HSSI interface
(made by Digital Link, Larscom, Kentrox etc.\&)
then use an HSSI card and a T3 card.
The coax cables between the card and the modem
must
.Dq "cross over"
(see below).
.It Sy T1/V.35
If you have a T1 (or E1) modem with a V.35, X.21 or EIA530 interface,
then use an SSI card and a T1 card.
Use a T1 null modem cable (see below) between
the external modem and the T1 card.
.El
.\"
.Ss Testing with a Null Modem Cable
.\"
Testing with a null modem cable requires two cards of the same type.
The cards can be in the same machine or different machines.
.Pp
Configure the two cards with
.Bd -unfilled -offset indent -compact
.Ic ifconfig lmc0 10.0.0.1 10.0.0.2
.Ic ifconfig lmc1 10.0.0.2 10.0.0.1
.Ed
.Bl -tag -width "T1/E1" -offset indent
.It Sy HSSI
Three-meter HSSI null-modem cables can be ordered from SBE.
In a pinch, a 50-pin SCSI-II cable up to a few meters will
work as a straight HSSI cable (not a null modem cable).
Longer cables should be purpose-built HSSI cables because
the cable impedance is different.
Transmit clock is normally supplied by the external modem.
When an HSSI card is connected by a null modem cable, the PCI bus
clock can be used as the transmit clock, typically 33 MHz.
When testing an HSSI card with a null modem cable,
configure it with
.Bd -unfilled -offset indent -compact
.Ic lmcconfig lmc0 -a 2
.Ed
.Dq Fl a Li 2
selects the PCI bus clock as the transmit clock.
.It Sy T3
T3 null modem cables are just 75-ohm coax cables with BNC connectors.
TX OUT on one card should be connected to RX IN on the other card.
In a pinch, 50-ohm thin Ethernet cables
.Em usually
work up to a few meters, but they will
.Em not
work for longer runs\[em]75-ohm coax is
.Em required .
.It Sy SSI
Three-meter SSI null modem cables can be ordered from SBE.
An SSI null modem cable reports a cable type of V.36/EIA449.
Transmit clock is normally supplied by the external modem.
When an SSI card is connected by a null modem cable,
an on-board clock synthesizer is used.
When testing an SSI card with a null modem cable,
configure it with
.Bd -unfilled -offset indent -compact
.Ic lmcconfig lmc0 -E -f 10000000
.Ed
.Bd -ragged -compact
.Dq Fl E
puts the card in DCE mode to source a transmit clock.
.Dq Fl f Li 10000000
sets the internal clock source to 10 Mb/s.
.Ed
.It Sy T1/E1
A T1 null modem cable has two twisted pairs that connect
pins 1 and 2 on one plug to pins 4 and 5 on the other plug.
Looking into the cable entry hole of a plug,
with the locking tab oriented down,
pin 1 is on the left.
A twisted pair Ethernet cable makes an excellent straight T1 cable.
Alas, Ethernet cross-over cables do not work as T1 null modem cables.
.El
.\"
.Sh OPERATING NOTES
.\"
.Ss LEDs
.\"
HSSI and SSI cards should be operational if all three green LEDs are
on (the upper-left one should be blinking) and the red LED is off.
.Bl -column "YELLOW" "upper-right" -offset indent -compact
.It "RED\0" Ta "upper-right" Ta "No Transmit clock"
.It "GREEN" Ta "upper-left" Ta "Device driver is alive if blinking"
.It "GREEN" Ta "lower-right" Ta "Modem signals are good"
.It "GREEN" Ta "lower-left" Ta "Cable is plugged in (SSI only)"
.El
.Pp
T1/E1 and T3 cards should be operational if the upper-left
green LED is blinking and all other LEDs are off.
For the T3 card, if other LEDs are on or blinking,
try swapping the coax cables!
.Bl -column "YELLOW" "upper-right" -offset indent -compact
.It "RED\0" Ta upper-right Ta "Received signal is wrong"
.It "GREEN" Ta upper-left Ta "Device driver is alive if blinking"
.It "BLUE" Ta lower-right Ta "Alarm Information Signal (AIS)"
.It "YELLOW" Ta lower-left Ta "Remote Alarm Indication (RAI)"
.El
.Pp
.Bl -column "YELLOW" -offset indent -compact
.It "RED\0" Ta "blinks if an outward loopback is active."
.It "GREEN" Ta "blinks if the device driver is alive."
.It "BLUE" Ta "blinks if sending AIS, on solid if receiving AIS."
.It "YELLOW" Ta "blinks if sending RAI, on solid if receiving RAI."
.El
.\"
.Ss Packet Lengths
.\"
.Bd -unfilled -compact
Maximum transmit and receive packet length is unlimited.
Minimum transmit and receive packet length is one byte.
.Ed
.Pp
Cleaning up after one packet and setting up for the next
packet involves making several DMA references.
This can take longer than the duration of a short packet,
causing the adapter to fall behind.
For typical PCI bus traffic levels and memory system latencies,
back-to-back packets longer than about 20 bytes will always
work (53 byte cells work), but a burst of several hundred
back-to-back packets shorter than 20 bytes will cause packets
to be dropped.
This usually is not a problem since an IPv4 packet header is
at least 20 bytes long.
.Pp
The device driver imposes no constraints on packet size.
Most operating systems set the default Maximum Transmission
Unit (MTU) to 1500 bytes; the legal range is usually (72..65535).
This can be changed with
.Bd -unfilled -offset indent -compact
.Ic ifconfig lmc0 mtu 2000
.Ed
SPPP enforces an MTU of 1500 bytes for PPP and Cisco-HDLC.
RAWIP sets the default MTU to 4032 bytes,
but allows it to be changed to anything.
.Ss ALTQ: Alternate Output Queue Disciplines
The driver has hooks for
.Xr altq 9 ,
the Alternate Queueing package.
To see ALTQ in action, use your favorite traffic generation
program to generate three flows sending down one T3 circuit.
Without ALTQ, the speeds of the three connections will vary chaotically.
Enable ALTQ and two of the connections will run at about 20 Mb/s and
the third will run at about 2 Mb/s.
.Pp
Enable
.Xr altqd 8
and add the following lines to
.Pa /etc/altq.conf :
.Bd -unfilled -offset indent -compact
.Ic interface lmc0 bandwidth 44M hfsc
.Ic class hfsc lmc0 a root pshare 48
.Ic filter lmc0 a 10.0.0.2 12345 10.0.0.1 0 6
.Ic filter lmc0 a 10.0.0.1 0 10.0.0.2 12345 6
.Ic class hfsc lmc0 b root pshare 48
.Ic filter lmc0 b 10.0.0.2 12346 10.0.0.1 0 6
.Ic filter lmc0 b 10.0.0.1 0 10.0.0.2 12346 6
.Ic class hfsc lmc0 c root pshare 4 default
.Ic filter lmc0 c 10.0.0.2 12347 10.0.0.1 0 6
.Ic filter lmc0 c 10.0.0.1 0 10.0.0.2 12347 6
.Ed
.Pp
The example above requires the
.Xr altq 4
Hierarchical Fair Service Curve
queue discipline to be configured in
.Pa conf/YOURKERNEL :
.Bd -unfilled -offset indent -compact
.Ic options ALTQ
.Ic options ALTQ_HFSC .
.Ed
.Ss BPF: Berkeley Packet Filter
The driver has hooks for
.Xr bpf 4 ,
the Berkeley Packet Filter, a protocol-independent
raw interface to data link layers.
.Pp
To test the BPF kernel interface,
bring up a link between two machines, then run
.Xr ping 8
and
.Xr tcpdump 8 :
.Bd -unfilled -offset indent -compact
.Ic ping 10.0.0.1
.Ed
and in a different window:
.Bd -unfilled -offset indent -compact
.Ic tcpdump -i lmc0
.Ed
The output from tcpdump should look like this:
.Bd -unfilled -offset indent -compact
.Ic 03:54:35.979965 10.0.0.2 > 10.0.0.1: icmp: echo request
.Ic 03:54:35.981423 10.0.0.1 > 10.0.0.2: icmp: echo reply
.Ed
Line protocol control packets may appear among the
ping packets occasionally.
.Pp
The kernel must be configured with
.Bd -unfilled -offset indent -compact
.Ic options bpfilter
.Ed
.Ss SNMP: Simple Network Management Protocol
The driver is aware of what is required to be a Network Interface
Object managed by an Agent of the Simple Network Management Protocol.
The driver exports SNMP-formatted configuration and status
information sufficient for an SNMP Agent to create MIBs for:
.Bl -tag -width "RFC-2233" -offset indent -compact
.It RFC-2233
.%T Interfaces group
.It RFC-2496
.%T DS3 interfaces
.It RFC-2495
.%T DS1/E1 interfaces
.It RFC-1659
.%T RS232-like interfaces
.El
.Pp
An SNMP Agent is a user program, not a kernel function.
Agents can retrieve configuration and status information
by using
.Xr ioctl 2
system calls.
User programs should poll
.Va sc->cfg.ticks
which increments once per second after the SNMP state has been updated.
.\"
.Ss E1 Framing
.\"
Phone companies usually insist that customers put a
.Em Frame Alignment Signal
(FAS) in time slot 0.
A Cyclic Redundancy Checksum (CRC) can also ride in time slot 0.
.Em Channel Associated Signalling
(CAS) uses Time Slot 16.
In telco-speak
.Em signalling
is on/off hook, ringing, busy, etc.
Signalling is not needed here and consumes 64 Kb/s.
Only use E1-CAS formats if the other end insists on it!
Use E1-FAS+CRC framing format on a public circuit.
Depending on the equipment installed in a private circuit,
it may be possible to use all 32 time slots for data (E1-NONE).
.\"
.Ss T3 Framing
.\"
M13 is a technique for multiplexing 28 T1s into a T3.
Muxes use the C-bits for speed-matching the tributaries.
Muxing is not needed here and usurps the FEBE and FEAC bits.
Only use T3-M13 format if the other end insists on it!
Use T3-CParity framing format if possible.
Loop Timing, Fractional T3, and HDLC packets in
the Facility Data Link are
.Em not
supported.
.\"
.Ss T1 & T3 Frame Overhead Functions
.\"
.Bd -unfilled -compact
Performance Report Messages (PRMs) are enabled in T1-ESF.
Bit Oriented Protocol (BOP) messages are enabled in T1-ESF.
In-band loopback control (framed or not) is enabled in T1-SF.
Far End Alarm and Control (FEAC) msgs are enabled in T3-CPar.
Far End Block Error (FEBE) reports are enabled in T3-CPar.
Remote Alarm Indication (RAI) is enabled in T3-Any.
Loopbacks initiated remotely time out after 300 seconds.
.Ed
.\"
.Ss T1/E1 'Fractional' 64 kb/s Time Slots
.\"
T1 uses time slots 24..1; E1 uses time slots 31..0.
E1 uses TS0 for FAS overhead and TS16 for CAS overhead.
E1-NONE has
.Em no
overhead, so all 32 TSs are available for data.
Enable/disable time slots by setting 32 1s/0s in a config param.
Enabling an E1 overhead time slot,
or enabling TS0 or TS25-TS31 for T1,
is ignored by the driver, which knows better.
The default TS param, 0xFFFFFFFF, enables the maximum number
of time slots for whatever frame format is selected.
56 Kb/s time slots are
.Em not
supported.
.\"
.Sh SEE ALSO
.Xr ioctl 2 ,
.Xr bpf 4 ,
.Xr de 4 ,
.Xr sppp 4 ,
.Xr altq.conf 5 ,
.Xr altqd 8 ,
.Xr ifconfig 8 ,
.Xr init 8 ,
.Xr lmcconfig 8 ,
.Xr modload 8 ,
.Xr ping 8 ,
.Xr tcpdump 8 ,
.Xr altq 9 ,
.Xr ifnet 9
.\"
.Sh HISTORY
.\"
.An Ron Crane
had the idea to use a Fast Ethernet chip as a PCI interface
and add an Ethernet-to-HDLC gate array to make a WAN card.
.An David Boggs
designed the Ethernet-to-HDLC gate array and PC cards.
We did this at our company,
.Tn "LAN Media Corporation (LMC)" .
.Tn "SBE Corporation"
acquired
.Tn LMC
and continues to make the cards.
.Pp
Since the cards use Tulip Ethernet chips, we started with
.An Matt Thomas Ns '
ubiquitous
.Xr de 4
driver.
.An Michael Graff
stripped out the Ethernet stuff and added HSSI stuff.
.An Basil Gunn
ported it to
.Tn Solaris
(lost) and
.An Rob Braun
ported it to
.Tn Linux .
.An Andrew Stanley-Jones
added support for three more cards.
.An David Boggs
rewrote everything and now feels responsible for it.
.\"
.Sh AUTHORS
.\"
.An David Boggs Aq Mt boggs@boggs.palo-alto.ca.us

View File

@ -1,4 +1,4 @@
.\" $NetBSD: pci.4,v 1.98 2018/09/06 09:47:30 maxv Exp $
.\" $NetBSD: pci.4,v 1.99 2018/12/12 07:04:05 maxv Exp $
.\"
.\" Copyright (c) 1997 Jason R. Thorpe. All rights reserved.
.\" Copyright (c) 1997 Jonathan Stone
@ -29,7 +29,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd September 6, 2018
.Dd December 12, 2018
.Dt PCI 4
.Os
.Sh NAME
@ -264,8 +264,6 @@ interfaces.
Note, the
.Xr pcn 4
driver supersedes this driver.
.It lmc
LAN Media Corp WAN interfaces.
.It msk
Marvell Yukon 2 based Gigabit
.Tn Ethernet
@ -472,7 +470,6 @@ VGA graphics boards.
.Xr iop 4 ,
.Xr isp 4 ,
.Xr le 4 ,
.Xr lmc 4 ,
.Xr mfi 4 ,
.Xr mlx 4 ,
.Xr mly 4 ,

View File

@ -1,4 +1,4 @@
# $NetBSD: DEVNAMES,v 1.318 2018/09/23 09:21:03 maxv Exp $
# $NetBSD: DEVNAMES,v 1.319 2018/12/12 07:04:05 maxv Exp $
#
# This file contains all used device names and defined attributes in
# alphabetical order. New devices added to the system somewhere should first
@ -748,7 +748,6 @@ lkkbd vax
lkms vax
lm MI
lm700x MI
lmc MI
lmenv MI
lms bebox
lms i386

View File

@ -1,11 +1,11 @@
# $NetBSD: Makefile,v 1.14 2015/03/28 14:41:28 msaitoh Exp $
# $NetBSD: Makefile,v 1.15 2018/12/12 07:04:05 maxv Exp $
# use 'make -f Makefile.pcidevs' to make pcidevs.h and pcidevs_data.h
INCSDIR= /usr/include/dev/pci
# Only install includes which are used by userland
INCS= amrreg.h amrio.h if_lmc.h mlyio.h mlyreg.h \
INCS= amrreg.h amrio.h mlyio.h mlyreg.h \
pcidevs.h pcidevs_data.h pciio.h pcireg.h \
tgareg.h twereg.h tweio.h

View File

@ -1,4 +1,4 @@
# $NetBSD: files.pci,v 1.411 2018/12/07 09:36:26 msaitoh Exp $
# $NetBSD: files.pci,v 1.412 2018/12/12 07:04:05 maxv Exp $
#
# Config file and device description for machine-independent PCI code.
# Included by ports that need it. Requires that the SCSI files be
@ -426,11 +426,6 @@ file dev/pci/if_tl.c tl
attach ntwoc at pci with ntwoc_pci
file dev/pci/if_ntwoc_pci.c ntwoc_pci
# Lan Media Corporation T1/HSSI/DS3 driver
device lmc: ifnet, sppp
attach lmc at pci
file dev/pci/if_lmc.c lmc
# Essential Communications HIPPI interface
# device declaration in sys/conf/files
attach esh at pci with esh_pci

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.279 2018/09/23 07:24:20 maxv Exp $
# $NetBSD: Makefile,v 1.280 2018/12/12 07:04:06 maxv Exp $
# from: @(#)Makefile 5.20 (Berkeley) 6/12/93
.include <bsd.own.mk>
@ -14,7 +14,7 @@ SUBDIR= ac accton acpitools altq apm apmd arp autofs \
i2cscan ifwatchd inetd installboot intrctl iopctl iostat ipwctl irdaattach \
isibootd iteconfig iwictl \
kgmon \
lastlogin ldpd link lmcconfig lockstat lpr \
lastlogin ldpd link lockstat lpr \
mailwrapper makefs map-mbone mdconfig memswitch mlxctl mmcformat \
mopd mountd moused mrinfo mrouted mscdlabel mtrace mtree \
ndbootd netgroup_mkdb nfsd \

View File

@ -1,13 +0,0 @@
# $NetBSD: Makefile,v 1.2 2013/11/09 21:39:28 christos Exp $
.include <bsd.own.mk>
PROG= lmcconfig
MAN= lmcconfig.8
CPPFLAGS+=-I${NETBSDSRCDIR}/sys/dev/pci
.if ${MACHINE_ARCH} == "vax"
COPTS.lmcconfig.c=-O0
.endif
.include <bsd.prog.mk>

View File

@ -1,804 +0,0 @@
.\"-
.\" Copyright (c) 2003-2006 David Boggs. (boggs@boggs.palo-alto.ca.us)
.\" All rights reserved. I wrote this man page from scratch.
.\"
.\" BSD License:
.\"
.\" 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.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
.\"
.\" GNU General Public License:
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the Free
.\" Software Foundation; either version 2 of the License, or (at your option)
.\" any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but WITHOUT
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
.\" more details.
.\"
.\" You should have received a copy of the GNU General Public License along with
.\" this program; if not, write to the Free Software Foundation, Inc., 59
.\" Temple Place - Suite 330, Boston, MA 02111-1307, USA.
.\"
.\" $NetBSD: lmcconfig.8,v 1.7 2013/12/09 09:35:17 wiz Exp $
.\"
.Dd April 11, 2006
.Dt LMCCONFIG 8
.Os
.ie (\n(.y < 19) .nr ssfix 1
.el .nr ssfix 0
.\" Is the OS name FreeBSD?
.ie "\*[operating-system]"" .ds aa \*(oS
.el .ds aa \*[operating-system]
.substring aa (0+\n[ssfix] (6+\n[ssfix])
.ie "\*(aa"FreeBSD" .nr fbsd 1
.el .nr fbsd 0
.\" Is the OS name BSD (i.e. Linux)?
.ie "\*[operating-system]"" .ds aa \*(oS
.el .ds aa \*[operating-system]
.ie "\*(aa"BSD" .nr linux 1
.el .nr linux 0
.\"
.Sh NAME
.\"
.Nm lmcconfig
.Nd configuration program for
.Tn LMC
(and some
.Tn SBE )
wide-area network interface cards
.\"
.Sh SYNOPSIS
.\"
.Nm
.Ar interface
.Op Fl abBcCdDeEfgGhiLmMpPsStTuUvVwxXyY?
.Nm
.Ar interface
.Fl 1
.Op Fl aABcdeEfFgiIlLpPstTuUxX
.Nm
.Ar interface
.Fl 3
.Op Fl aABcefFlLsSV
.\"
.Sh DESCRIPTION
.\"
The
.Nm
utility is the configuration program for the
.Xr lmc 4
wide-area network device driver.
It sets control values, such as T3 framing format,
and it displays status, such as that of integrated modems,
which are beyond the scope of
.Xr ifconfig 8 .
.Pp
The
.Nm
utility displays the interface status when no parameters are specified;
see the
.Sx EXAMPLES
section.
For this case only, if no
.Ar interface
is specified, it defaults to
.ie \n[linux] .Dq Li hdlc0 .
.el .Dq Li lmc0 .
.Pp
Only the super-user may modify the configuration of a network interface.
.Pp
The following options are available:
.Bl -tag -width "interface"
.It Ar interface
This is the name of the interface; the default is
.ie \n[linux] .Dq Li hdlc0 .
.el .Dq Li lmc0 .
.if \n[fbsd] \{\
If
.Xr netgraph 4
is present and the interface name ends with a colon
then Netgraph control messages are used,
otherwise the
.if (\n[fbsd] : \n[nbsd] : \n[obsd] : \n[bsdi]) .Xr ifnet 9
.if \n[linux] netdevice
kernel interface and socket
.if (\n[fbsd] : \n[nbsd] : \n[obsd] : \n[bsdi]) .Xr ioctl 2
.if \n[linux] ioctl
system calls are used.
.\}
.It Fl 1
All parameters after this apply to the T1E1 card.
.It Fl 3
All parameters after this apply to the T3 card.
.El
.\"
.Ss Parameters for all cards
.\"
The following parameters apply to more than one card type.
.Bl -tag -width "-W addr data"
.It Fl a Ar number
Set Transmitter clock source to
.Ar number .
.Pp
.Bl -column "1" "External connector" "T1E1, HSSIc" -compact
.It 1 Ta "TxClk from modem" Ta "T1E1, HSSI" Ta "(default)"
.It 2 Ta "Internal source" Ta "T1E1, HSSI"
.It 3 Ta "RxClk from modem" Ta "T1E1, HSSIc" Ta "(loop timed)"
.It 4 Ta "External connector" Ta "T1E1, HSSIc"
.El
.Pp
An HSSI card normally takes its Tx clock from the modem connector
(it is a DTE) but can use the PCI bus clock (typically 33 MHz)
for loopback and null modem testing; values 3 and 4 are only
applicable to a few rare CompactPCI/HSSI cards.
.Pp
A T1E1 card uses an on-board synthesized oscillator
if the value is 1 or 2; it
.Em loop times
(uses the clock recovered by the receiver as the transmitter clock)
if the value is 3; and it uses a clock from a header connector on
the card if the value is 4.
.Pp
TxClk source is not applicable to other card types.
.It Fl b
Read BIOS ROM.
Print the first 256 locations.
The BIOS ROM is not used and not present on some cards.
.It Fl B
Write BIOS ROM.
Write the first 256 locations with an address pattern.
.It Fl c
Use HDLC's 16-bit Cyclic Redundancy Checksum (CRC).
.It Fl C
Use HDLC's 32-bit Cyclic Redundancy Checksum (CRC).
.It Fl d
Clear the driver-level debug flag.
Non-critical log messages are suppressed.
.It Fl D
Set the driver-level debug flag.
The driver generates more log messages.
The driver also generates more log messages if
the interface-level debug flag is set by
.Xr ifconfig 8 .
.It Fl e
Set DTE (Data Terminal Equipment) mode (default).
An SSI card transmitter uses the Tx clock signal from the
modem connector and receives the Data Carrier Detect pin (DCD).
DTE/DCE is not applicable to other card types
except a few rare CompactPCI/HSSI cards.
.It Fl E
Set DCE (Data Communication Equipment) mode.
An SSI card transmitter uses an on-board synthesized oscillator
and drives the Data Carrier Detect pin (DCD).
.It Fl f Ar number
Set the frequency of the built-in synthesized oscillator to
.Ar number
bits/second.
The nearest frequency that the synthesizer can generate will be used.
Only SSI cards and a few rare CompactPCI/HSSI cards have synthesizers.
.It Fl g
Load gate array microcode from on-board ROM; see also
.Fl U.
.It Fl G Ar filename
Load gate array microcode from
.Ar filename ;
see also
.Fl U.
.It Fl h
Print help (usage message).
.It Fl i
Set interface name (e.g.\&
.Dq Li lmc0 ) .
.It Fl L Ar number
Set loopback mode to
.Ar number .
.Pp
.Bl -column "99" "payload" "inward thru drvrs/rcvrs" -compact
.It 1 Ta "none" Ta "default"
.It 2 Ta "payload" Ta "outward thru framer" Ta "T1E1. T3"
.It 3 Ta "line" Ta "outward thru line if" Ta "T1E1, T3"
.It 4 Ta "other" Ta "inward thru line if" Ta "T1E1, T3"
.It 5 Ta "inward" Ta "inward thru framer" Ta "T1E1, T3"
.It 6 Ta "dual" Ta "inward and outward" Ta "T1E1, T3"
.It 16 Ta "tulip" Ta "inward thru Tulip chip" Ta "all cards"
.It 17 Ta "pins" Ta "inward thru drvrs/rcvrs" Ta "SSI"
.It 18 Ta "LA/LL" Ta "assert LA/LL modem pin" Ta "HSSI, SSI"
.It 19 Ta "LB/RL" Ta "assert LB/RL modem pin" Ta "HSSI, SSI"
.El
.It Fl m
Read Tulip MII registers.
Print the 32 16-bit registers in the Media Independent Interface.
.It Fl M Ar addr Ar data
Write Tulip MII register.
Write
.Ar data
into register
.Ar addr .
.It Fl p
Read Tulip PCI configuration registers.
Print the first 16 32-bit registers in the PCI configuration space.
.It Fl P Ar addr Ar data
Write Tulip PCI configuration register.
Write
.Ar data
into register
.Ar addr .
.It Fl s
Read Tulip SROM.
Print the 64 16-bit locations.
The PCI subsystem vendor and device IDs are kept here.
.It Fl S Ar number
Write Tulip SROM.
Initializes the Tulip SROM to card type
.Ar number .
.Pp
.Bl -column "9" -compact
.It 3 Ta "HSSI"
.It 4 Ta "T3"
.It 5 Ta "SSI"
.It 6 Ta "T1E1"
.It 7 Ta "HSSIc"
.It 8 Ta "SDSL"
.It 0 Ta "auto-set from uCode type"
.El
.Pp
If
.Ar number
is zero, then the card type is computed from the gate array
microcode version field in the MII PHYID register.
.Em CAUTION :
if the SROM is incorrect, the card will be unusable!
This command is
.Em so
dangerous that
.Nm
must be edited and recompiled to enable it.
.It Fl t
Read Tulip CSRs.
Print the 16 32-bit Control and Status Registers.
.It Fl T Ar addr Ar data
Write Tulip CSR.
Write
.Ar data
into register
.Ar addr .
Note that
.Ar addr
is a CSR number (0-15) not a byte offset into CSR space.
.It Fl u
Reset event counters to zero.
The driver counts events like packets in and out, errors, discards, etc.
The time when the counters are reset is remembered.
.It Fl U
Reset gate array microcode.
.It Fl v
Set verbose mode: print more stuff.
.It Fl V
Print the card configuration; see the
.Sx EXAMPLES
section.
.It Fl x Ar number
Set the line control protocol to
.Ar number .
Line control protocols are listed below along with the operating
systems that implement them and the stacks that include them.
.Pp
.Bl -column "1" "FrameRelay" "fnobl" "dspgsn" -compact
.It x Ta Em Protocol Ta Em OpSys Ta Em Stack
.It 1 Ta "IPinHDLC" Ta "FNOBL" Ta "D--G-N"
.It 2 Ta "PPP" Ta "FNOBL" Ta "-SPGYN"
.It 3 Ta "CiscoHDLC" Ta "FNOBL" Ta "-SPGYN"
.It 4 Ta "FrameRelay" Ta "F--BL" Ta "-SPG-N"
.It 5 Ta "EthInHDLC" Ta "F---L" Ta "---G-N"
.El
.Bd -unfilled
OpSys: FreeBSD NetBSD OpenBSD BSD/OS Linux.
Stack: Driver SPPP P2P GenHDLC sYncPPP Netgraph.
.Ed
.It Fl X Ar number
Set the line control protocol stack to
.Ar number .
Line control protocol stacks are listed below along with the operating
systems that include them and the protocols that they implement.
.Pp
.Bl -column "1" "FrameRelay" "fnobl" "ipcfe" -compact
.It X Ta Em Stack Ta Em OpSys Ta Em Protocol
.It 1 Ta "Driver" Ta "FNOBL" Ta "I----"
.It 2 Ta "SPPP" Ta "FNO--" Ta "-PCF-"
.It 3 Ta "P2P" Ta "---B-" Ta "-PCF-"
.It 4 Ta "GenHDLC" Ta "----L" Ta "IPCFE"
.It 5 Ta "SyncPPP" Ta "----L" Ta "-PC--"
.It 6 Ta "Netgraph" Ta "F----" Ta "IPCFE"
.El
.Bd -unfilled
OpSys: FreeBSD NetBSD OpenBSD BSD/OS Linux.
Protocol: IPinHDLC PPP CiscoHDLC FrmRly EthInHDLC.
.Ed
.It Fl y
Disable SPPP/SyncPPP keep-alive packets,
.It Fl Y
Enable SPPP/SyncPPP keep-alive packets.
.It Fl ?\&
Print help (usage message).
.El
.\"
.Ss Parameters for T1E1 cards
.\"
The following parameters apply to the T1E1 card type:
.Bl -tag -width "-W addr data"
.It Fl "a" Sm Cm y | a | b Sm
Stop sending alarm signal (see table below).
.It Fl "A" Sm Cm y | a | b Sm
Start sending alarm signal.
.Pp
.Bl -column "y" "Yellow Alarm" -compact
.It y Ta "Yellow Alarm" Ta "varies with framing"
.It a Ta "Red Alarm" Ta "unframed all ones; aka AIS"
.It b Ta "Blue Alarm" Ta "unframed all ones"
.El
.Pp
Red alarm, also known as AIS (Alarm Indication Signal),
and Blue alarm are identical in T1.
.It Fl B Ar number
Send a Bit Oriented Protocol (BOP) message with code
.Ar number .
BOP codes are six bits.
.It Fl c Ar number
Set cable length to
.Ar number
meters (default: 10 meters).
This is used to set receiver sensitivity
and transmitter line build-out.
.It Fl d
Print the status of the on-board T1 DSU/CSU; see the
.Sx EXAMPLES
section.
.It Fl e Ar number
Set the framing format to
.Ar number .
.Pp
.Bl -column "99" -compact
.It 9 Ta "T1-SF/AMI"
.It 27 Ta "T1-ESF/B8ZS (default)"
.It 0 Ta "E1-FAS"
.It 8 Ta "E1-FAS+CRC"
.It 16 Ta "E1-FAS+CAS"
.It 24 Ta "E1-FAS+CRC+CAS"
.It 32 Ta "E1-NO-framing"
.El
.It Fl E Ar number
Enable 64Kb time slots (TSs) for the T1E1 card.
The
.Ar number
argument is a 32-bit hex number (default 0xFFFFFFFF).
The LSB is TS0 and the MSB is TS31.
TS0 and TS25-31 are ignored in T1 mode.
TS0 and TS16 are determined by the framing format in E1 mode.
.It Fl f
Read framer registers.
Print the 512 8-bit registers in the framer chip.
.It Fl F Ar addr Ar data
Write framer register.
Write
.Ar data
into register
.Ar addr .
.It Fl g Ar number
Set receiver gain range to
.Ar number .
.Pp
.Bl -column "0x00" "Medium" -compact
.It 0x24 Ta "Short" Ta "0 to 20 dB of equalized gain"
.It 0x2C Ta "Medium" Ta "0 to 30 dB of equalized gain"
.It 0x34 Ta "Long" Ta "0 to 40 dB of equalized gain"
.It 0x3F Ta "Extend" Ta "0 to 64 dB of equalized gain (wide open)"
.It 0xFF Ta "Auto" Ta "auto-set based on cable length (default)"
.El
.Pp
This sets the level at which
.Em Loss-Of-Signal
is declared.
.It Fl i
Send a
.Em CSU loopback deactivate
inband command (T1 only).
.It Fl I
Send a
.Em CSU loopback activate
inband command (T1 only).
.It Fl l
Send a
.Em line loopback deactivate
BOP message (T1-ESF only).
.It Fl L
Send a
.Em line loopback activate
BOP message (T1-ESF only).
.It Fl p
Send a
.Em payload loopback deactivate
BOP message (T1-ESF only).
.It Fl P
Send a
.Em payload loopback activate
BOP message (T1-ESF only).
.It Fl s
Print the status of the on-board DSU/CSU; see the
.Sx EXAMPLES
section.
.It Fl t
Stop sending test pattern (see table below).
.It Fl T Ar number
Start sending test pattern
.Ar number .
.Pp
.Bl -column "99" -compact
.It 0 Ta "unframed X^11+X^9+1"
.It 1 Ta "unframed X^15+X^14+1"
.It 2 Ta "unframed X^20+X^17+1"
.It 3 Ta "unframed X^23+X^18+1"
.It 4 Ta "unframed X^11+X^9+1 with 7ZS"
.It 5 Ta "unframed X^15+X^14+1 with 7ZS"
.It 6 Ta "unframed X^20+X^17+1 with 14ZS (QRSS)"
.It 7 Ta "unframed X^23+X^18+1 with 14ZS"
.It 8 Ta " framed X^11+X^9+1"
.It 9 Ta " framed X^15+X^14+1"
.It 10 Ta " framed X^20+X^17+1"
.It 11 Ta " framed X^23+X^18+1"
.It 12 Ta " framed X^11+X^9+1 with 7ZS"
.It 13 Ta " framed X^15+X^14+1 with 7ZS"
.It 14 Ta " framed X^20+X^17+1 with 14ZS (QRSS)"
.It 15 Ta " framed X^23+X^18+1 with 14ZS"
.El
.It Fl u Ar number
Set transmit pulse shape to
.Ar number .
.Pp
.Bl -column "255" -compact
.It 0 Ta "T1 DSX 0 to 40 meters"
.It 2 Ta "T1 DSX 40 to 80 meters"
.It 4 Ta "T1 DSX 80 to 120 meters"
.It 6 Ta "T1 DSX 120 to 160 meters"
.It 8 Ta "T1 DSX 160 to 200 meters"
.It 10 Ta "E1 75-ohm coax pair"
.It 12 Ta "E1 120-ohm twisted pairs"
.It 14 Ta "T1 CSU 200 to 2000 meters; set LBO"
.It 255 Ta "auto-set based on cable length and framing format (default)"
.El
.It Fl U Ar number
Set transmit line build-out to
.Ar number .
.Pp
.Bl -column "255" "22.5 dB" -compact
.It 0 Ta "0 dB" Ta "FCC option A"
.It 16 Ta "7.5 dB" Ta "FCC option B"
.It 32 Ta "15 dB" Ta "FCC option C"
.It 48 Ta "22.5 dB" Ta "final span"
.It 255 Ta "auto-set based on cable length (default)"
.El
.Pp
This is only applicable if the pulse shape is T1-CSU.
.It Fl x
Disable transmitter outputs.
.It Fl X
Enable transmitter outputs.
.El
.\"
.Ss Parameters for T3 cards
.\"
The following parameters apply to the T3 card type:
.Bl -tag -width "-W addr data"
.It Fl "a" Sm Cm y | a | b | i Sm
Stop sending alarm signal (see table below).
.It Fl "A" Sm Cm y | a | b | i Sm
Start sending alarm signal.
.Pp
.Bl -column "y" "Yellow Alarm" -compact
.It y Ta "Yellow Alarm" Ta "X-bits set to 0"
.It a Ta "Red Alarm" Ta "framed 1010... aka AIS"
.It b Ta "Blue Alarm" Ta "unframed all-ones"
.It i Ta "Idle signal" Ta "framed 11001100..."
.El
.It Fl B Ar number
Send a Far End Alarm and Control (FEAC) message with code
.Ar number .
FEAC codes are six bits.
.It Fl c Ar number
Set cable length to
.Ar number
meters (default: 10 meters).
This is used to set receiver sensitivity
and transmitter line build-out.
.It Fl d
Print the status of the on-board T3 DSU; see the
.Sx EXAMPLES
section.
.It Fl e Ar number
Set the framing format to
.Ar number .
.Pp
.Bl -column "100" -compact
.It 100 Ta "T3-C-bit parity"
.It 101 Ta "T3-M13 format"
.El
.It Fl f
Read framer registers.
Print the 22 8-bit registers in the framer chip.
.It Fl F Ar addr Ar data
Write framer register.
Write
.Ar data
into register
.Ar addr .
.It Fl l
Send a
.Em line loopback deactivate
BOP message.
.It Fl L
Send a
.Em line loopback activate
BOP message.
.It Fl s
Print the status of the on-board T3 DSU; see the
.Sx EXAMPLES
section.
.It Fl S Ar number
Set payload scrambler polynominal to
.Ar number .
.Pp
.Bl -column "9" -compact
.It 1 Ta "payload scrambler disabled"
.It 2 Ta "X^43+1: DigitalLink and Kentrox"
.It 3 Ta "X^20+X^17+1 w/28ZS: Larscom"
.El
.Pp
Payload scrambler polynomials are not standardized.
.It Fl V Ar number
Set transmit frequency offset to
.Ar number .
Some T3 cards can offset the transmitter frequency from 44.736 MHz.
.Ar Number
is in the range (0..4095); 2048 is zero offset; step size is about 3 Hz.
A
.Ar number
is written to a Digital-Analog Converter (DAC) which connects
to a Voltage Controlled Crystal Oscillator (VCXO).
.El
.\"
.Ss Event Counters
.\"
The device driver counts many interesting events such as
packets in and out, errors and discards.
The table below lists the event counters and describes what they count.
.Bl -tag -width "Tx fifo underruns"
.It Va "Rx bytes"
Bytes received in packets with good ending status.
.It Va "Tx bytes"
Bytes transmitted in packets with good ending status.
.It Va "Rx packets"
Packets received with good ending status.
.It Va "Tx packets"
Packets transmitted with good ending status.
.It Va "Rx errors"
Packets received with bad ending status.
.It Va "Tx errors"
Packets transmitted with bad ending status.
.It Va "Rx drops"
Packets received but discarded by software because
the input queue was full or the link was down.
.It Va "Rx missed"
Packets that were missed by hardware because
the receiver was enabled but had no DMA descriptors.
.It Va "Tx drops"
Packets presented for transmission but discarded by software because
the output queue was full or the link was down.
.It Va "Rx fifo overruns"
Packets that started to arrive, but were aborted because
the card was unable to DMA data to memory fast enough
to prevent the receiver fifo from overflowing.
This is reported in the ending status of DMA descriptors.
.It Va "Rx overruns"
Rx Fifo overruns reported by the Tulip chip in the Status CSR.
The driver stops the receiver and restarts it to work around
a potential hardware hangup.
.It Va "Tx fifo underruns"
Packets that started to transmit but were aborted because
the card was unable to DMA data from memory fast enough
to prevent the transmitter fifo from underflowing.
This is reported in the ending status of DMA descriptors.
.It Va "Tx underruns"
Tx Fifo underruns reported by the Tulip chip in the Status CSR.
The driver increases the transmitter threshold,
requiring more bytes to be in the fifo before the transmitter is started.
.It Va "Rx FDL pkts"
Packets received on the T1 Facility Data Link.
.It Va "Rx CRC"
Cyclic Redundancy Checksum errors detected by the CRC-6 in
T1 Extended SuperFrames (ESF) or the CRC-4 in E1 frames.
.It Va "Rx line code"
Line Coding Violation errors:
Alternate Mark Inversion (AMI) errors for T1-SF,
Bipolar 8-Zero Substitution (B8ZS) errors for T1-ESF, or
High Density Bipolar with 3-Zero Substitution (HDB3) errors for E1 or
Bipolar 3-Zero Substitution (B3ZS) errors for T3.
.It Va "Rx F-bits"
T1 or T3 bit errors in the frame alignment signal.
.It Va "Rx FEBE"
Far End Block Errors:
T1 or T3 bit errors detected by the device at the far end of the link.
.It Va "Rx P-parity"
T3 bit errors detected by the hop-by-hop parity mechanism.
.It Va "Rx C-parity"
T3 bit errors detected by the end-to-end parity mechanism.
.It Va "Rx M-bits"
T3 bit errors in the multi-frame alignment signal.
.El
.Pp
If driver debug mode is enabled, more event counters are displayed.
.Bl -tag -width "Tx fifo underruns"
.It Va "Rx no bufs"
Failure to allocate a replacement packet buffer
for an incoming packet.
The buffer allocation is retried later.
.It Va "Tx no descs"
Failure to allocate a DMA descriptor
for an outgoing packet.
The descriptor allocation is retried later.
.It Va "Lock watch"
The watchdog routine conflicted with an IOCTL syscall.
.It Va "Lock intr"
A CPU tried to enter the interrupt handler
while another CPU was already inside.
The second CPU simply walks away.
.It Va "Spare1-4"
Nameless events of interest to the device driver maintainer.
.El
.\"
.Ss Transmit Speed
.\"
The hardware counts transmit clocks divided by 2048.
The software computes
.Dq Tx speed
from this (see
.Sx EXAMPLES
below).
The transmit clock is the bit rate of the circuit divided by two if the
circuit is idle and divided by four if the circuit is carrying a packet.
So an empty circuit reports a Tx speed equal to its bit rate,
and a full circuit reports a Tx speed equal to half its bit rate.
.Pp
This
.Dq bit rate
does not include circuit-level overhead bits
(such as T1 or T3 frame bits) but does include HDLC stuff bits.
An idle T1 circuit with a raw bit rate of 1544000 and a
bit-rate-minus-overhead of 1536000 will report a
.Dq Tx speed
of ((1536000 bitand 4095) plus or minus 4096).
Sometimes it will even get the correct answer of 1536000, and
if the link is fully loaded it will report about 768000 bits/sec.
.Pp
It is not a perfect bit rate meter (the circuit must be idle),
but it is a useful circuit utilization meter if you know the
circuit bit rate and do some arithmetic.
Software recalculates Tx speed once a second;
the measurement period has some jitter.
.\"
.Sh EXAMPLES
.\"
When
.Dq Li lmc0
is a T1E1 card,
.Dq Li lmcconfig lmc0
generates the following output:
.Bd -literal -offset indent
Card name: lmc0
Card type: T1E1 (lmc1200)
Link status: Up
Tx Speed: 1536000
Line Prot/Pkg: PPP/P2P
CRC length: 16 bits
Tx Clk src: Modem Rx Clk (loop timed)
Format-Frame/Code: T1-ESF/B8ZS
TimeSlots [31-0]: 0x01FFFFFE
Cable length: 10 meters
Current time: Wed Jan 4 05:35:10 2006
Cntrs reset: Fri Dec 16 19:23:45 2005
Rx bytes: 176308259
Tx bytes: 35194717
Rx packets: 383162
Tx packets: 357792
.Ed
.Pp
When
.Dq Li lmc0
is a T1E1 card,
.Dq Li lmcconfig lmc0 -1 -d
generates the following output:
.Bd -literal -offset indent
Format-Frame/Code: T1-ESF/B8ZS
TimeSlots [31-0]: 0x01FFFFFE
Tx Clk src: Modem Rx Clk (loop timed)
Tx Speed: 1536000
Tx pulse shape: T1-DSX: 0 to 40 meters
Tx outputs: Enabled
Line impedance: 100 ohms
Max line loss: 20.0 dB
Cur line loss: 0.0 dB
Invert data: No
Line loop: No
Payload loop: No
Framer loop: No
Analog loop: No
Tx AIS: No
Rx AIS: No
Tx BOP RAI: No
Rx BOP RAI: No
Rx LOS analog: No
Rx LOS digital: No
Rx LOF: No
Tx QRS: No
Rx QRS: No
LCV errors: 0
CRC errors: 0
Frame errors: 0
Sev Err Frms: 0
Change of Frm align: 0
Loss of Frame events: 0
SNMP Near-end performance data:
LCV=0 LOS=0 FE=0 CRC=0 AIS=0 SEF=0 OOF=0 RAI=0
ANSI Far-end performance reports:
SEQ=0 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
SEQ=1 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
SEQ=2 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
SEQ=3 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
.Ed
.\"
.Sh DIAGNOSTICS
.\"
Messages indicating the specified interface does not exist, or
the user is not privileged and tried to alter an interface's configuration.
.\"
.Sh SEE ALSO
.\"
.Xr ioctl 2 ,
.Xr lmc 4 ,
.if \n[fbsd] .Xr netgraph 4 ,
.Xr ifconfig 8 ,
.Xr ifnet 9
.\"
.Sh HISTORY
.\"
This is a total rewrite of the program
.Nm lmcctl
by
.An Michael Graff ,
.An Rob Braun
and
.An Andrew Stanley-Jones .
.\"
.Sh AUTHORS
.\"
.An David Boggs Aq Mt boggs@boggs.palo-alto.ca.us

File diff suppressed because it is too large Load Diff