Retire lmc(4)

This driver supports legacy, 32-bit PCI devices, and had an ambiguous
license.  Supported devices were already reported to be rare in 2003
(when an earlier version of the driver was removed in r123201).

Reviewed by:	rgrimes
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D15245
This commit is contained in:
Ed Maste 2018-05-01 16:30:48 +00:00
parent e4eef18848
commit e6a376d196
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333144
18 changed files with 14 additions and 10041 deletions

View File

@ -38,6 +38,13 @@
# xargs -n1 | sort | uniq -d;
# done
# 20180501: retire lmc
OLD_FILES+=usr/include/dev/lmc/if_lmc.h
OLD_DIRS+=usr/include/dev/lmc
OLD_FILES+=usr/sbin/lmcconfig
OLD_FILES+=usr/share/man/man4/lmc.4.gz
OLD_FILES+=usr/share/man/man4/if_lmc.4.gz
OLD_FILES+=usr/share/man/man8/lmcconfig.8.gz
# 20180417: remove fuswintr and suswintr
OLD_FILES+=usr/share/man/man9/fuswintr.9.gz
OLD_FILES+=usr/share/man/man9/suswintr.9.gz

View File

@ -51,6 +51,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
****************************** SPECIAL WARNING: ******************************
20180501:
The lmc(4) driver has been removed. This was a WAN interface
card that was already reportedly rare in 2003, and had an ambiguous
license. If you have device lmc in your kernel config file it must
be removed.
20180413:
Support for Arcnet networks has been removed. If you have device
arcnet or device cm in your kernel config file they must be

View File

@ -45,7 +45,7 @@ LDIRS= bsm cam geom net net80211 netgraph netinet netinet6 \
LSUBDIRS= cam/ata cam/mmc cam/nvme cam/scsi \
dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \
dev/hwpmc dev/hyperv \
dev/ic dev/iicbus dev/io dev/lmc dev/mfi dev/mmc dev/nvme \
dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/nvme \
dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \
dev/speaker dev/tcp_log dev/vkbd dev/wi \
fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/nullfs \

View File

@ -120,9 +120,6 @@ CFLAGS+=-DPF
# Workaround duplicate declarations in <netinet/ip_compat.h>
CFLAGS.gcc.ioctl.c+= -Wno-redundant-decls
# Workaround warning for unused ssi_cables[] in <dev/lmc/if_lmc.h>
CFLAGS.gcc.ioctl.c+= -Wno-unused
CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}}
DEPENDOBJS+= tables.h

View File

@ -266,7 +266,6 @@ MAN= aac.4 \
${_linux.4} \
liquidio.4 \
lm75.4 \
lmc.4 \
lo.4 \
lp.4 \
lpbb.4 \
@ -688,7 +687,6 @@ MLINKS+=lagg.4 trunk.4
MLINKS+=lagg.4 if_lagg.4
MLINKS+=le.4 if_le.4
MLINKS+=lge.4 if_lge.4
MLINKS+=lmc.4 if_lmc.4
MLINKS+=lo.4 loop.4
MLINKS+=lp.4 plip.4
MLINKS+=malo.4 if_malo.4

View File

@ -1,771 +0,0 @@
.\"
.\" $FreeBSD$
.\"
.\" Copyright (c) 2002-2005 David Boggs. (boggs@boggs.palo-alto.ca.us)
.\" All rights reserved.
.\"
.\" 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.
.\"
.Dd April 24, 2018
.Dt LMC 4
.Os
.\"
.Sh NAME
.\"
.Nm lmc
.Nd device driver for
.Tn LMC
(now
.Tn SBE )
wide-area network interface cards
.\"
.Sh SYNOPSIS
.\"
To wire this driver into your kernel,
add the following line to your kernel configuration file:
.Bd -ragged -offset indent
.Cd "device lmc"
.Ed
.Pp
Alternatively, to load this module at boot time, add
.Bd -literal -offset indent
if_lmc_load="YES"
.Ed
.Pp
to
.Pa /boot/loader.conf ;
see
.Xr loader.conf 5 .
.Pp
To wire a line protocol into your kernel, add:
.Bd -ragged -offset indent
.Cd "options NETGRAPH"
.Cd "device sppp"
.Ed
.Pp
It is not necessary to wire line protocols into your kernel,
they can be loaded later with
.Xr kldload 8 .
The driver can send and receive raw IP packets even if neither
SPPP nor Netgraph are configured into the kernel.
Netgraph and SPPP can both be enabled; Netgraph will be used if the
.Va rawdata
hook is connected.
.\"
.Sh DEPRECATION NOTICE
The
.Nm
driver is not present in
.Fx 12.0
and later.
.\"
.Sh DESCRIPTION
.\"
This is an open-source
.Ux
device driver for PCI-bus WAN interface cards.
It sends and receives packets in HDLC frames over synchronous circuits.
A generic PC plus
.Ux
plus some
.Tn LMC / SBE
cards makes an
.Em open
router.
This driver works with
.Fx ,
.Nx ,
.Ox ,
.Bsx
and
.Tn Linux
OSs.
It has been tested on i386 (SMP 32-bit little-endian) and Sparc (64-bit big-endian)
architectures.
.Pp
The
.Nm
driver works with the following cards:
.Bl -bullet
.It
SBE wanADAPT-HSSI (LMC5200)
.Pp
High Speed Serial Interface,
EIA612/613, 50-pin connector,
0 to 52 Mb/s, DTE only.
.It
SBE wanADAPT-T3 (LMC5245)
.Pp
T3: two 75-ohm BNC connectors,
C-Parity or M13 Framing,
44.736 Mb/s, up to 950 ft.
.It
SBE wanADAPT-SSI (LMC1000)
.Pp
Synchronous Serial Interface,
V.35, X.21, EIA449, EIA530(A), EIA232,
0 to 10 Mb/s, DTE or DCE.
.It
SBE wanADAPT-T1E1 (LMC1200)
.Pp
T1 or E1: RJ45 conn, 100 or 120 ohms,
T1-ESF-B8ZS, T1-SF-AMI, E1-(many)-HDB3,
1.544 Mb/s or 2.048 Mb/s, up to 6 Kft.
.El
.Pp
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"
.It Sy "PCI"
The PCI interface is a 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 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 TranSwitch TXC-03401 framer chip.
SSI cards use Linear Technology LTC1343 modem interface chips.
T1 cards use a BrookTree/Conexant/Mindspeed Bt8370 framer
and line interface chip.
.El
.Pp
Line protocols exist above device drivers and below internet protocols.
They typically encapsulate packets in HDLC frames and deal with
higher-level issues like protocol multiplexing and security.
This driver is compatible with several line protocol packages:
.Bl -tag -width "Generic HDLC"
.It Sy "Netgraph"
.Xr netgraph 4
implements many basic packet-handling functions as kernel loadable modules.
They can be interconnected in a graph to implement many protocols.
Configuration is done from userland without rebuilding the kernel.
Packets are sent and received through this interface if the driver's
.Em rawdata
hook is connected, otherwise the ifnet interface (SPPP and RawIP) is used.
ASCII configuration control messages are
.Em not
currently supported.
.It Sy "SPPP"
.Xr sppp 4
implements Synchronous-PPP, Frame-Relay and Cisco-HDLC in the kernel.
.It Sy "RawIP"
This null line protocol, built into the driver, sends and receives
raw IPv4 and IPv6 packets in HDLC frames (aka IP-in-HDLC) 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 .
In normal operation only a few arguments are needed:
.Pp
.Bl -tag -width ".Fl X" -offset indent -compact
.It Fl X
selects the external
SPPP
line protocol package.
.It Fl x
selects the built-in RawIP line protocol package.
.It Fl Z
selects PPP line protocol.
.It Fl z
selects Cisco-HDLC line protocol.
.It Fl F
selects Frame-Relay line protocol.
.El
.Bl -tag -width indent
.It Li "lmcconfig lmc0"
displays interface configuration and status.
.It Li "lmcconfig lmc0 -D"
enables debugging output from the device driver only.
.It Li "ifconfig lmc0 debug"
enables debugging output from the device driver and from
the line protocol module above it.
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.
.El
.\"
.Ss Operation
.\"
Activate a PPP link using SPPP and Netgraph with:
.Bd -literal -offset indent
ngctl mkpeer lmc0: sppp rawdata downstream
ifconfig sppp0 10.0.0.1 10.0.0.2
.Ed
.Pp
Activate a PPP link using only SPPP with:
.Bd -literal -offset indent
lmcconfig lmc0 -XYZ
ifconfig lmc0 10.0.0.1 10.0.0.2
.Ed
.Pp
Activate a Cisco-HDLC link using SPPP and Netgraph with:
.Bd -literal -offset indent
ngctl mkpeer lmc0: sppp rawdata downstream
ifconfig sppp0 10.0.0.1 10.0.0.2 link2
.Ed
.Pp
Activate a Cisco-HDLC link using only SPPP with:
.Bd -literal -offset indent
lmcconfig lmc0 -XYz
ifconfig lmc0 10.0.0.1 10.0.0.2
.Ed
.Pp
Activate a Cisco-HDLC link using only Netgraph with:
.Bd -literal -offset indent
ngctl mkpeer lmc0: cisco rawdata downstream
ngctl mkpeer lmc0:rawdata iface inet inet
ifconfig ng0 10.0.0.1 10.0.0.2
.Ed
.Pp
Activate a Frame-Relay DTE link using SPPP with:
.Bd -literal -offset indent
lmcconfig lmc0 -XYF
ifconfig lmc0 10.0.0.1 10.0.0.2
.Ed
.Pp
(SPPP implements the ANSI T1.617 annex D LMI.)
.Pp
Activate a Frame-Relay DTE link using Netgraph with:
.Bd -literal -offset indent
ngctl mkpeer lmc0: frame_relay rawdata downstream
ngctl mkpeer lmc0:rawdata lmi dlci0 auto0
ngctl connect lmc0:rawdata dlci0 dlci1023 auto1023
ngctl mkpeer lmc0:rawdata rfc1490 dlci500 downstream
ngctl mkpeer lmc0:rawdata.dlci500 iface inet inet
ifconfig ng0 10.0.0.1 10.0.0.2
.Ed
This is
.Em ONE
possible Frame Relay configuration; there are many.
.Pp
Activate a RAWIP link using only the driver with:
.Bd -literal -offset indent
lmcconfig lmc0 -x
ifconfig lmc0 10.0.0.1 10.0.0.2
.Ed
.Pp
Activate a RAWIP link using Netgraph with:
.Bd -literal -offset indent
ngctl mkpeer lmc0: iface rawdata inet
ifconfig ng0 10.0.0.1 10.0.0.2
.Ed
.Pp
If the driver is unloaded and then loaded, reconnect hooks by:
.Pp
.Dl "ngctl connect lmc0: ng0: rawdata inet"
.\"
.Sh TESTING
.\"
.Ss Testing with Loopbacks
.\"
Testing with loopbacks requires only one 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
Activate the card with
.Xr ifconfig 8 :
.Pp
.Dl "ifconfig lmc0 10.0.0.1 10.0.0.1"
.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
Loopback plugs test everything on the card.
.Bl -tag -width ".Sy T1/E1"
.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
.Xr lmcconfig 8 :
.Pp
.Dl "lmcconfig lmc0 -a 2"
.Pp
.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
.Xr lmcconfig 8 :
.Pp
.Dl "lmcconfig lmc0 -E -f 10000000"
.Pp
.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.
.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.
.Bl -tag -width ".Sy T3/HSSI"
.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 in one machine and a T3 card in the other machine.
The T3 coax cables must use the null modem configuration (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 in one machine and a T1 card in the other machine.
Use a T1 null modem cable (see below).
.El
.\"
.Ss Testing with a Null Modem Cable
.\"
Testing with a null modem cable requires two cards of the same type.
.Bl -tag -width ".Sy T1/E1"
.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
.Xr lmcconfig 8 :
.Pp
.Dl "lmcconfig lmc0 -a 2"
.Pp
.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
.Xr lmcconfig 8 :
.Pp
.Dl "lmcconfig lmc0 -E -f 10000000"
.Pp
.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.
.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 OPERATION NOTES
.\"
.Ss Packet Lengths
Maximum transmit and receive packet length is unlimited.
Minimum transmit and receive packet length is one byte.
.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
This 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
.Pp
.Dl "ifconfig lmc0 mtu 2000"
.Pp
SPPP enforces an MTU of (128..far-end-MRU) for PPP
and 1500 bytes for Cisco-HDLC.
RAWIP sets the default MTU to 4032 bytes,
but it can be changed to anything.
.\"
.Ss BPF - Berkeley Packet Filter
.\"
This driver has hooks for
.Xr bpf 4 ,
the Berkeley Packet Filter.
The line protocol header length reported to BPF is four bytes
for SPPP and P2P line protocols and zero bytes for RawIP.
.Pp
To include BPF support into your kernel,
add the following line to
.Pa conf/YOURKERNEL :
.Pp
.Dl "device bpf"
.Pp
To test the BPF kernel interface,
bring up a link between two machines, then run
.Xr ping 8
and
.Xr tcpdump 1 :
.Pp
.Dl "ping 10.0.0.1"
.Pp
and in a different window:
.Pp
.Dl "tcpdump -i lmc0"
.Pp
The output from
.Xr tcpdump 1
should look like this:
.Bd -literal -offset indent
03:54:35.979965 10.0.0.2 > 10.0.0.1: icmp: echo request
03:54:35.981423 10.0.0.1 > 10.0.0.2: icmp: echo reply
.Ed
.Pp
Line protocol control packets will appear among the
.Xr ping 8
packets occasionally.
.\"
.Ss Device Polling
.\"
A T3 receiver can generate over 100K interrupts per second,
this can cause a system to
.Dq live-lock :
spend all of its
time servicing interrupts.
.Fx
has a polling mechanism to prevent live-lock.
.Pp
.Fx Ns 's
mechanism permanently disables interrupts from the card
and instead the card's interrupt service routine is called each
time the kernel is entered (syscall, timer interrupt, etc.\&) and
from the kernel idle loop; this adds some latency.
The driver is permitted to process a limited number of packets.
The percentage of the CPU that can be consumed this way is settable.
.Pp
See the
.Xr polling 4
manpage for details on how to enable the polling mode.
.\"
.Ss SNMP: Simple Network Management Protocol
.\"
This 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:
.Pp
.Bl -item -offset indent -compact
.It
.%T "RFC-2233: Interfaces group" ,
.It
.%T "RFC-2496: DS3 interfaces" ,
.It
.%T "RFC-2495: DS1/E1 interfaces" ,
.It
.%T "RFC-1659: 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
Netgraph control messages or
.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 HSSI and SSI LEDs
.\"
The card should be operational if all three green LEDs are on
(the upper-left one should be blinking) and the red LED is off.
All four LEDs turn on at power-on and module unload.
.Pp
.Bl -column -compact -offset indent "YELLOW" "upper-right" "Software"
.It "RED" 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
.\"
.Ss T1E1 and T3 LEDs
.\"
The card 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!
All four LEDs turn on at power-on and module unload.
.Pp
.Bl -column -compact -offset indent "YELLOW" "upper-right" "Received"
.It "RED" 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 \" YELLOW
.Pp
.Bl -column -compact "The yellow" "LED"
.It "The green" Ta "LED blinks if the device driver is alive."
.It "The red" Ta "LED blinks if an outward loopback is active."
.It "The blue" Ta "LED blinks if sending AIS, on solid if receiving AIS."
.It "The yellow" Ta "LED blinks if sending RAI, on solid if receiving RAI."
.El \" LED
.\"
.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
.\"
.Bl -item -compact
.It
Performance Report Messages (PRMs) are enabled in T1-ESF.
.It
Bit Oriented Protocol (BOP) messages are enabled in T1-ESF.
.It
In-band loopback control (framed or not) is enabled in T1-SF.
.It
Far End Alarm and Control (FEAC) msgs are enabled in T3-CPar.
.It
Far End Block Error (FEBE) reports are enabled in T3-CPar.
.It
Remote Alarm Indication (RAI) is enabled in T3-Any.
.It
Loopbacks initiated remotely time out after 300 seconds.
.El
.\"
.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.
.\"
.Ss T1 Raw Mode
.\"
Special gate array microcode exists for the T1/E1 card.
Each T1 frame of 24 bytes is treated as a packet.
A raw T1 byte stream can be delivered to main memory
and transmitted from main memory.
The T1 card adds or deletes framing bits but does not
touch the data.
ATM cells can be transmitted and received this way, with
the software doing all the work.
But that is not hard; after all it is only 1.5 Mb/s second!
.\"
.Ss T3 Circuit Emulation Mode
.\"
Special gate array microcode exists for the T3 card.
Each T3 frame of 595 bytes is treated as a packet.
A raw T3 signal can be
.Em packetized ,
transported through a
packet network (using some protocol) and then
.Em reconstituted
as a T3 signal at the far end.
The output transmitter's
bit rate can be controlled from software so that it can be
.Em frequency locked
to the distant input signal.
.\"
.Ss HSSI and SSI Transmit Clocks
.\"
Synchronous interfaces use two transmit clocks to eliminate
.Em skew
caused by speed-of-light delays in the modem cable.
DCEs (modems) drive ST, Send Timing, the first transmit clock.
DTEs (hosts) receive ST and use it to clock transmit data, TD,
onto the modem cable.
DTEs also drive a copy of ST back towards the DCE and call it TT,
Transmit Timing, the second transmit clock.
DCEs receive TT and TD and use TT to clock TD into a flip flop.
TT experiences the same delay as (and has no
.Em skew
relative to) TD.
Thus, cable length does not affect data/clock timing.
.\"
.Sh SEE ALSO
.\"
.Xr tcpdump 1 ,
.Xr ioctl 2 ,
.Xr bpf 4 ,
.Xr kld 4 ,
.Xr netgraph 4 ,
.Xr polling 4 ,
.Xr sppp 4 ,
.Xr loader.conf 5 ,
.Xr ifconfig 8 ,
.Xr lmcconfig 8 ,
.Xr mpd 8 Pq Pa ports/net/mpd ,
.Xr ngctl 8 ,
.Xr ping 8 ,
.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, LAN Media Corporation
.Tn (LMC) .
.Tn SBE
Corp.\& 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
.Tn Rob Braun
ported it to
.Tn Linux .
.An Andrew Stanley-Jones
added support
for three more cards and wrote the first version of
.Xr lmcconfig 8 .
.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

@ -1982,7 +1982,6 @@ device xmphy # XaQti XMAC II
# Yukon II Gigabit controllers, including 88E8021, 88E8022, 88E8061,
# 88E8062, 88E8035, 88E8036, 88E8038, 88E8050, 88E8052, 88E8053,
# 88E8055, 88E8056 and D-Link 560T/550SX.
# lmc: Support for the LMC/SBE wide-area network interface cards.
# mlx5: Mellanox ConnectX-4 and ConnectX-4 LX IB and Eth shared code module.
# mlx5en:Mellanox ConnectX-4 and ConnectX-4 LX PCIe Ethernet adapters.
# my: Myson Fast Ethernet (MTD80X, MTD89X)
@ -2136,9 +2135,6 @@ device txp # 3Com 3cR990 (``Typhoon'')
device vx # 3Com 3c590, 3c595 (``Vortex'')
device vxge # Exar/Neterion XFrame 3100 10GbE
# PCI WAN adapters.
device lmc
# PCI IEEE 802.11 Wireless NICs
device ath # Atheros pci/cardbus NIC's
device ath_hal # pci/cardbus chip support

View File

@ -2373,7 +2373,6 @@ lio_23xx_nic.bin.fw optional lio \
compile-with "${NORMAL_FW}" \
no-obj no-implicit-rule \
clean "lio_23xx_nic.bin.fw"
dev/lmc/if_lmc.c optional lmc
dev/malo/if_malo.c optional malo
dev/malo/if_malohal.c optional malo
dev/malo/if_malo_pci.c optional malo pci

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -226,7 +226,6 @@ SUBDIR= \
${_linux64} \
linuxkpi \
${_lio} \
lmc \
lpt \
mac_biba \
mac_bsdextended \

View File

@ -1,15 +0,0 @@
# $FreeBSD$
KMOD = if_lmc
.PATH: ${SRCTOP}/sys/dev/lmc
SRCS = if_lmc.c if_lmc.h
SRCS += device_if.h bus_if.h pci_if.h
SRCS += opt_inet.h opt_inet6.h
SRCS += opt_netgraph.h
SRCS += opt_bpf.h
opt_netgraph.h:
echo "#define NETGRAPH 1" > ${.TARGET}
.include <bsd.kmod.mk>

View File

@ -1,21 +0,0 @@
# Doxyfile 1.5.2
# $FreeBSD$
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "FreeBSD kernel LMC device code"
OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_lmc/
EXTRACT_ALL = YES # for undocumented src, no warnings enabled
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = $(DOXYGEN_SRC_PATH)/dev/lmc/ \
$(NOTREVIEWED)
GENERATE_TAGFILE = dev_lmc/dev_lmc.tag
@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
@INCLUDE = common-Doxyfile

View File

@ -162,7 +162,6 @@ SUBDIR.${MK_MAN_UTILS}+= manctl
SUBDIR.${MK_NAND}+= nandsim
SUBDIR.${MK_NAND}+= nandtool
SUBDIR.${MK_NETGRAPH}+= flowctl
SUBDIR.${MK_NETGRAPH}+= lmcconfig
SUBDIR.${MK_NETGRAPH}+= ngctl
SUBDIR.${MK_NETGRAPH}+= nghook
SUBDIR.${MK_NIS}+= rpc.yppasswdd

View File

@ -1,10 +0,0 @@
# $FreeBSD$
PROG= lmcconfig
MAN= lmcconfig.8
LIBADD= netgraph
WARNS?= 3
.include <bsd.prog.mk>

View File

@ -1,18 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libnetgraph \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -1,723 +0,0 @@
.\" Copyright (c) 2003 David Boggs. (boggs@boggs.palo-alto.ca.us)
.\" All rights reserved.
.\"
.\" 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.
.\"
.\" $FreeBSD$
.\"
.Dd October 3, 2005
.Dt LMCCONFIG 8
.Os
.Sh NAME
.Nm lmcconfig
.Nd configuration program for
.Tn SBE
(formerly
.Tn LMC )
wide-area network interface cards
.Sh SYNOPSIS
.Nm
.Ar interface
.Op Fl abBcCdDeEfhLmMpPrsStTuwxXyYzZ?
.Nm
.Ar interface
.Fl 1
.Op Fl aABceEfFgiIlLpPstTuUxX
.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,
that are beyond the scope of
.Xr ifconfig 8 .
.Pp
The
.Nm
utility
displays the interface status when no parameters are specified;
see example below.
For this case only, if no
.Ar interface
is specified, it defaults to
.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 indent
.It Ar interface
This is the name of the interface; the default is
.Dq Li lmc0 .
If
.Xr netgraph 4
is present and the interface name ends with a colon
then Netgraph control messages are used,
otherwise the
.Xr ifnet 9
kernel interface and socket
.Xr ioctl 2
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 Commands for all cards
The following parameters apply to more than one card type.
.Bl -tag -width indent
.It Fl a Ar number
Set Transmitter clock source to
.Ar number .
.Pp
.Bl -column "1" "External connector" "T1E1, HSSIc" -offset 2m -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 CRC polynomial: X^16+X^12+X^5+1 (default).
.It Fl C
Use HDLC's 32-bit CRC polynomial:
X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X+1
.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 F
Set SPPP line protocol to Frame-Relay.
Only works for
.Fx 5.4
and later.
.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/rcvrsxxx" "HSSI, SSI" -offset 1m -compact
.It "1" Ta "none" Ta "default" Ta \&
.It "2" Ta "payload" Ta "outward thru framer" Ta "T1E1. T3"
.It "3" Ta "line" Ta "outward thru line if" Ta "T1E1, T3, HSSIc"
.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" -offset 1m -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 MII PHYID
.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 CSR number
.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.
Not needed during normal operation; just for testing.
.It Fl v
Set verbose mode: print more stuff.
.It Fl V
Print the card configuration \[em] see the
.Sx EXAMPLES
section.
.It Fl w
Load gate array from on-board ROM.
Not needed during normal operation; just for testing.
.It Fl W Ar filename
Load gate array microcode from
.Ar filename .
.It Fl x
Select RAWIP mode \[em] bypass line protocol code.
.It Fl X
Select line protocol code rather than RAWIP mode.
.It Fl y
Disable SPPP keep-alive packets.
.It Fl Y
Enable SPPP keep-alive packets.
.It Fl z
Set SPPP line protocol to Cisco-HDLC.
.It Fl Z
Set SPPP line protocol to PPP.
.It Fl ?\&
Print help (usage message).
.El
.Ss Commands for T1E1 cards
The following parameters apply to the T1E1 card type:
.Bl -tag -width indent
.It Fl a Sm Cm y | a | b Sm
Stop sending alarm signal.
.Pp
.Bl -column "y" "Yellow Alarm" "unframed all ones; aka AIS" -offset 1m -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 A Sm Cm y | a | b Sm
Start sending alarm signal (see table above).
.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 DSU/CSU \[em] see the
.Sx EXAMPLES
section.
.It Fl e Ar number
Set the framing format to
.Ar number :
.Pp
.Bl -column "99" -offset 1m -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" "auto-set based on cable length (default)" -offset 1m -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-SF only).
.It Fl I
Send a
.Em CSU loopback activate
inband command (T1-SF 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 \[em] see the
.Sx EXAMPLES
section.
.It Fl t
Stop sending test pattern.
.It Fl T Ar number
Start sending test pattern
.Ar number :
.Pp
.Bl -column "99" -offset 1m -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 "99" -offset 1m -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" "FCC option A" -offset 1m -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)" Ta \&
.El
.Pp
This is only applicable if the pulse shape is T1-CSU.
.It Fl v
Set verbose mode: print more stuff.
.It Fl x
Disable transmitter outputs.
.It Fl X
Enable transmitter outputs.
.El
.Ss Commands for T3 cards
The following parameters apply to the T3 card type:
.Bl -tag -width indent
.It Fl a Sm Cm y | a | b | i Sm
Stop sending alarm signal.
.Pp
.Bl -column "y" "Yellow Alarm" "framed 1010... aka AIS" -offset 1m -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 A Sm Cm y | a | b | i Sm
Start sending alarm signal (see table above).
.It Fl B Ar number
Send a BOP (Bit Oriented Protocol) 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 T3 DSU \[em] see the
.Sx EXAMPLES
section.
.It Fl e Ar number
Set the framing format to
.Ar number :
.Pp
.Bl -column "100" -offset 1m -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 \[em] see the
.Sx EXAMPLES
section.
.It Fl S Ar number
Set payload scrambler polynomial to
.Ar number :
.Pp
.Bl -column "9" -offset 1m -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
Payload scrambler polynomials are not standardized.
.It Fl v
Set verbose mode: print more stuff.
.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 ".Va underruns"
.It Va ibytes
Bytes received in packets with good ending status.
.It Va obytes
Bytes transmitted.
.It Va ipackets
Packets received with good ending status.
.It Va opackets
Packets transmitted.
.It Va ierrors
Packets received with bad ending status.
.It Va oerrors
Packets transmitted with bad ending status.
.It Va idiscards
Packets received but discarded because
the input queue was full or the interface was down.
.It Va odiscards
Packets presented for transmission but discarded because
the output queue was full or the interface was down.
.It Va txdma
Packets presented for transmission but queued and retried later
because no DMA descriptors were available.
This can happen during normal operation and is not an indication of trouble.
.It Va fifo-overrun
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.
.It Va fifo-underrun
Packets that started to transmit but were aborted because
the card was unable to DMA data from the memory fast enough
to prevent the transmitter fifo from underflowing.
When this happens, the transmitter threshold is increased,
so that more bytes are required to be in the fifo
before the transmitter is started.
.It Va missed
Packets that are missed because the receiver is stopped.
.It Va overruns
Packets that are missed because the receiver
had no DMA descriptors available.
.It Va fdl_pkts
Packets received on the T1 Facility Data Link.
.It Va crc-errs
Cyclic Redundancy Checksum errors detected by the CRC-6 in
T1 Extended SuperFrames (ESF) or the CRC-4 in E1 frames.
.It Va lcv-errs
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 frm-errs
T1 or T3 bit errors in the frame alignment signal.
.It Va febe-errs
Far End Block Errors:
T1 or T3 bit errors detected by the device at the far end of the link.
.It Va par-errs
T3 bit errors detected by the hop-by-hop parity mechanism.
.It Va cpar-errs
T3 bit errors detected by the end-to-end parity mechanism.
.It Va mfrm-errs
T3 bit errors in the multi-frame alignment signal.
.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 idle circuit reports a Tx speed equal to its bit rate,
and a busy 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 2m
Card name: lmc0
Card type: SBE/LMC T1E1 card
Link status: Up
Tx Speed: 1548288
Line Prot/Pkg: Frame-Relay/SPPP
SPPP Keep-alives: OFF
CRC length: 16 bits
Loopback: None
Tx Clk src: Internal source
Format-Frame/Code: T1-ESF/B8ZS
TimeSlot [31-0]: 0x01FFFFFE
Cable length: 10 meters
Tx pulse shape: auto-set to T1-DSX: 0 to 40 meters
Rx gain max: auto-set to 20.0 dB
Current time: Thu Sep 29 21:48:51 2005
Cntrs reset: Thu Sep 29 16:21:05 2005
RX bytes: 15053836
RX packets: 23271
TX bytes: 1732169
TX packets: 20526
Rx fdl pkts: 5443
.Ed
.Pp
When
.Dq Li lmc0
is a T1E1 card,
.Dq Li "lmcconfig lmc0 -1 -d"
generates the following output:
.Bd -literal -offset 2m
Format-Frame/Code: T1-ESF/B8ZS
TimeSlot [31-0]: 0x01FFFFFE
Tx Clk src: Internal source
Tx Speed: 1548288
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: 3.1 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
Last Tx BOP msg: 0x00 (Yellow Alarm (far end LOF))
Last Rx BOP msg: 0x00 (Yellow Alarm (far end LOF))
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=1 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
SEQ=0 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
SEQ=2 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 ,
.Xr netgraph 4 ,
.Xr ifconfig 8 ,
.Xr ifnet 9
.Pp
.Pa http://www.sbei.com/
.Sh HISTORY
This is a total rewrite of the program
.Nm lmcctl
by
.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