Subject: LMC1200P
To: None <tech-net@netbsd.org>
From: Hal Snyder <hal@vailsys.com>
List: tech-net
Date: 02/16/2001 17:43:38
I've made some progress getting NetBSD-1.5 to recognize LanMedia's
T1/E1+CSU card, the LMC1200P, mostly by shamelessly merging Chris
Cappuccio's fixes from the OpenBSD driver into NetBSD's if_lmc*. I've
sent an inquiry to Chris, but figured I'd ask on this list as well.

Local tests on the system with the card say that it is ok, but the
remote router doesn't respond to it. Still waiting for a callback from
LMC - planning to ask about recent firmware changes, D4 vs ESF, etc.

...

NetBSD-1.5-RELEASE wouldn't ID the LMC1200P, saying it was a de0. With
the patches, the lmc driver is initialized, ifconfig completes
successfully, etc.

(will fix "Corperation" typo in next patch)

If I plug a known good T1 into the card, the physical link goes up;
lmccontrol says
  lmc0: Lan Media Corperation LMC1200 (T1)
        Clock source: External/Line
        Approximate detected rate: 1536000
        HDLC Keepalive:  on
        CRC length: 16

ifconfig says
  lmc0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
        inet 63.63.63.42 -> 63.63.63.41 netmask 0xfffffffc
        inet6 fe80::2d0:b7ff:fe88:5bfa%lmc0 -> :: prefixlen 64 scopeid 0x1

Only the green LED is on, but attempting to ping the remote peer gives
no results. Tcpdump on lmc0 shows only the outgoing requests and
keep-alives.

>sudo tcpdump -i lmc0
tcpdump: listening on lmc0
16:32:14.260322 63.63.63.42 > 63.63.63.41: icmp: echo request
16:32:15.260322 63.63.63.42 > 63.63.63.41: icmp: echo request
16:32:16.001997 CISCO KEEP REQ 00000037 00000000 00000000 ffff-0008 
...



Supporting info:

A Cisco router, connected to the same circuit, pings its peer
successfully and reports the following:

Serial0/1 is up, line protocol is up 
  Hardware is PowerQUICC Serial
  Internet address is 63.63.63.42/30
  MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, 
     reliablility 255/255, txload 1/255, rxload 1/255
  Encapsulation HDLC, loopback not set
  Keepalive set (10 sec)
  Last input 00:00:08, output 00:00:06, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/15 (size/max/drops); Total output drops: 0
  Queueing strategy: weighted fair
  Output queue: 0/1000/64/0 (size/max total/threshold/drops) 
     Conversations  0/1/256 (active/max active/max total)
     Reserved Conversations 0/0 (allocated/max allocated)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     98265 packets input, 3759168 bytes, 0 no buffer
     Received 78373 broadcasts, 0 runts, 0 giants, 0 throttles
     73 input errors, 45 CRC, 26 frame, 0 overrun, 0 ignored, 2 abort
     498863 packets output, 28956574 bytes, 0 underruns
     0 output errors, 0 collisions, 82 interface resets
     0 output buffer failures, 0 output buffers swapped out
     2 carrier transitions
     DCD=up  DSR=up  DTR=up  RTS=up  CTS=up

driver patch, to be applied from /usr/src/sys/dev/pci
  ftp://ftp.enteract.com/users/hal/lmcpatch.txt

lmccontrol, compiled on NetBSD-1.5.
  ftp://ftp.enteract.com/users/hal/lmccontrol

kernel (1.5 GENERIC, with patched lmc driver)
  ftp://ftp.enteract.com/users/hal/netbsd-lmc

dmesg from the above kernel
  ftp://ftp.enteract.com/users/hal/dmesg.boot