Subject: Novatel Merlin CDPD modem
To: None <current-users@netbsd.org>
From: John Nemeth <jnemeth@victoria.tc.ca>
List: current-users
Date: 11/09/2003 21:15:32
     I have a strange problem with a Novatel Merlin CDPD modem.  It
works fine under 1.5.2, but fails with all subsequent versions of
NetBSD.  It has been tried with various versions of 1.6 and -current
(the latest being built from Oct. 20, 2003 source code).  It is a
PCMCIA card that emulates a serial port.  You talk to it using PPP and
it establishes the connection with the CDPD network.

     Under 1.5.2 it works fine.  Under -current, PPP will establish a
connection, but after that no traffic appears to flow.  I ran tcpdump
on the PPP interface to try to see what happens.  When I try to ping
outbound, I didn't see any packets going out.  When I tried to ping
inbound from a different machine, I saw normal traffic.  I was not able
to establish any kind of outbound connection since no packets went
out.  When I tried to establish an inbound SSH connection, I could see
the packets coming in, but there seemed to be lots of missing outbound
packets.

     Does anybody have any ideas?  It's looks like some kind of flow
control / interrupt issue to me.  Anyways, here is the pertinent dmesg
info from the laptop:

NetBSD 1.5.2 (LAPTOP) #4: Wed Mar 19 19:32:44 PST 2003
   root@laptop:/usr/src/sys/arch/i386/compile/LAPTOP
cpu0: Intel Celeron (Mendocino) (686-class), 298.55 MHz
total memory = 255 MB
avail memory = 233 MB
using 3296 buffers containing 13184 KB of memory
BIOS32 rev. 0 found at 0xfd7a0
PCI BIOS rev. 2.1 found at 0xfd9c5
pcibios: config mechanism [1][x], special cycles [x][x], last bus 4
PCI IRQ Routing Table rev. 1.0 found at 0xfdf40, size 160 bytes (8 entries)
PCI Interrupt Router at 000:02:0 (Intel 82371FB PCI-to-ISA Bridge (PIIX))
------------------------------------------
 device vendor product pin PIRQ IRQ stage
------------------------------------------
000:02:2 0x8086 0x7112   D  0x03  11  0    already assigned
000:03:0 0x104c 0xac1d   A  0x00  11  0    already assigned
000:03:1 0x104c 0xac1d   A  0x00  11  0    already assigned
000:06:0 0x11c1 0x0449   A  0x02  11  0    already assigned
000:07:0 0x125d 0x1969   A  0x01   5  0    already assigned
001:00:0 0x10c8 0x0005   A  0x00  11  0    already assigned
------------------------------------------
PCI bridge 0: primary 0, secondary 1, subordinate 1
PCI bridge 1: primary 0, secondary 2, subordinate 2
PCI bridge 2: primary 0, secondary 3, subordinate 3
PCI bus #3 is the last bus
[System BIOS Setting]-----------------------
 device vendor product
 register space address    size
--------------------------------------------
000:00:0 0x8086 0x7190
       10h mem  0xf8000000 0x04000000
               [OK]
000:01:0 0x8086 0x7191
               [OK]
000:02:0 0x8086 0x7110
               [OK]
000:02:1 0x8086 0x7111
       20h port 0x0000fc90 0x00000010
               [OK]
000:02:2 0x8086 0x7112
       20h port 0x0000fca0 0x00000020
               [OK]
000:02:3 0x8086 0x7113
               [OK]
000:03:0 0x104c 0xac1d
       10h mem  0x10000000 0x00001000
               [OK]
000:03:1 0x104c 0xac1d
       10h mem  0x20000000 0x00001000
               [OK]
000:06:0 0x11c1 0x0449
       10h mem  0xfedffc00 0x00000100
       14h port 0x0000fc88 0x00000008
       18h port 0x0000f800 0x00000100
               [OK]
000:07:0 0x125d 0x1969
       10h port 0x0000fcc0 0x00000040
       14h port 0x0000fc60 0x00000010
       18h port 0x0000fc70 0x00000010
       1ch port 0x0000fc58 0x00000004
       20h port 0x0000fc5c 0x00000004
               [OK]
001:00:0 0x10c8 0x0005
       10h mem  0xf6000000 0x01000000
       14h mem  0xfe400000 0x00400000
       18h mem  0xfeb00000 0x00100000
               [OK]
--------------------------[  0 devices bogus]
Physical memory end: 0x0ffed000
PCI memory mapped I/O space start: 0x10000000
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82443BX Host Bridge/Controller (rev. 0x03)
ppb0 at pci0 dev 1 function 0: Intel 82443BX AGP Interface (rev. 0x03)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
...
cbb0 at pci0 dev 3 function 0: Texas Instruments PCI1251 PCI-CardBus Bridge (rev. 0x01)
cbb1 at pci0 dev 3 function 1: Texas Instruments PCI1251 PCI-CardBus Bridge (rev. 0x01)
...
cbb0: interrupting at irq 11
cbb0: cacheline 0x0 lattimer 0x80
cbb0: bhlc 0x821000 lscp 0x80020200
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 2 device 0 cacheline 0x0, lattimer 0x80
pcmcia0 at cardslot0
cbb1: interrupting at irq 11
cbb1: cacheline 0x0 lattimer 0x80
cbb1: bhlc 0x821000 lscp 0x80030300
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 3 device 0 cacheline 0x0, lattimer 0x80
pcmcia1 at cardslot1
biomask ef4d netmask ef4d ttymask ffcf
...
pcmcia0: CIS version PC Card Standard 6.1
pcmcia0: CIS info: Novatel Wireless, Merlin Type II Wireless IP Modem, NRM6831,
pcmcia0: Manufacturer code 0xa4, product 0x1aaf
pcmcia0: function 0: serial port, ccr addr 200 mask 3
pcmcia0: function 0, config table entry 32: I/O card; irq mask 10; iomask 3, iospace 3f8-3ff; io8 irqlevel powerdown
pcmcia0: function 0, config table entry 33: I/O card; irq mask 8; iomask 3, iospace 2f8-2ff; io8 irqlevel powerdown
pcmcia0: function 0, config table entry 34: I/O card; irq mask 10; iomask 3, iospace 3e8-3ef; io8 irqlevel powerdown
pcmcia0: function 0, config table entry 35: I/O card; irq mask 8; iomask 3, iospace 2e8-2ef; io8 irqlevel powerdown
pcmcia0: function 0, config table entry 36: I/O card; irq mask ffff; iomask 3, iospace 0-7; io8 irqlevel powerdown
com2 at pcmcia0 function 0: serial device
com2: ns16550a, working fifo

Here is the PPP config:

/etc/ppp/chat.cdpd:

REPORT CONNECT
HELLO ATDT\T

/etc/ppp/options:

115200
crtscts
defaultroute
lock
mru 296
mtu 576
noipdefault
modem
netmask 255.255.255.255
noauth

/etc/ppp/peers/cdpd:

57600
connect "chat -f /etc/ppp/chat.cdpd -r /etc/ppp/connect-report -T 10.0.0.1"
N.N.N.N:
persist