I'm trying to get my Sierra Wireless MC5720 modem to work and I'm not
having much luck. After editing usbdevs and regenerating (my card has
a product ID of 0x0218 instead of the 0x0018 listed, and too lazy to
ukc it on the fly) I've got it to successfully attach to umsm(4). Now
I'm stuck; mostly because I know next to nil about how this all works.
In a vain attempt to school myself, I've tried to ktrace and gdb my
way into figuring out why I can't get this card to work. Doing a "cu
-l /dev/cuaU0 -s<whatever>" ends in a hard lock. Hard lock as in
neither the escape signal, ^C, pkill cu, or kill -9 cu works (one
process is in IE+, the other is Z in ps). Even shutting down causes
the box to simply stop at "syncing disks..." and not a damn thing
works (keyboard input, etc). Oddly, though, I can drop in and out just
fine from ppp. The escape character works, but other than that
nothing. ktrace simply outputs 'EMUL "native"', and trying to run cu
from gdb has gdb hang at "Starting program: /usr/bin/cu -l /dev/cuaU0
-s <whatever>". I have to kill cu from another terminal and then gdb
will exit cleanly.
---actual question---
How do you guys do it? The device driver writers? How do I debug this?
I've read usb(4), the 4.3-RELEASE and -CURRENT umsm.c code, I
understand a bit about how things attach but I'm at a complete loss as
to how I get more information and start tweaking knobs. I'm sure I'm
using the wrong search terms because I couldn't find anything
interesting on *what* exactly I should be doing to debug device
drivers.
As always, a light tap of the cluebat is greatly appreciated.
Thanks,
aaron.glenn
# dmesg
OpenBSD 4.3 (GENERIC) #0: Mon May 12 10:39:57 PDT 2008
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Genuine Intel(R) CPU T2500 @ 2.00GHz ("GenuineIntel" 686-class) 2 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF,SSE3,MWAIT,VMX,EST,TM2,xTPR
real mem = 1072132096 (1022MB)
avail mem = 1028657152 (981MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 05/24/06, BIOS32 rev. 0 @
0xfd6b0, SMBIOS rev. 2.4 @ 0xe0010 (68 entries)
bios0: vendor LENOVO version "79ET61WW (1.06 )" date 05/24/2006
bios0: LENOVO 2623DDU
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET BOOT SSDT SSDT
SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) LURT(S3) DURT(S3) EXP0(S4)
EXP1(S4) EXP2(S4) EXP3(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3)
USB7(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus 4 (EXP2)
acpiprt5 at acpi0: bus 12 (EXP3)
acpiprt6 at acpi0: bus 21 (PCI1)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, C1, FVS, 2000, 1667, 1333, 1000 MHz
acpitz0 at acpi0: critical temperature 127 degC
acpitz1 at acpi0: critical temperature 99 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "92P1133" serial 1897 type LION oem "Panasonic"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit offline
acpidock at acpi0 not configured
bios0: ROM list: 0xc0000/0x10000 0xd0000/0x1000 0xd1000/0x1000
0xdc000/0x4000! 0xe0000/0x10000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
agp0 at pchb0: no integrated graphics
ppb0 at pci0 dev 1 function 0 "Intel 82945GM PCIE" rev 0x03: irq 11
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 vendor "ATI", unknown product 0x71c4 rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: irq 11
azalia0: codec[s]: Analog Devices/0x1981, Conexant/0x2bfa, using
Analog Devices/0x1981
audio0 at azalia0
ppb1 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: irq 11
pci2 at ppb1 bus 2
em0 at pci2 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: irq
11, address 00:16:41:56:8f:37
ppb2 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: irq 11
pci3 at ppb2 bus 3
ath0 at pci3 dev 0 function 0 "Atheros AR5212 (IBM MiniPCI)" rev 0x01: irq 11
ath0: ARxxxx 10.3 phy 6.1 rf 10.2, WOR2W, address 00:14:a4:60:fd:ba
ppb3 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: irq 11
pci4 at ppb3 bus 4
ppb4 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: irq 11
pci5 at ppb4 bus 12
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: irq 11
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: irq 11
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: irq 11
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: irq 11
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: irq 11
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb5 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci6 at ppb5 bus 21
cbb0 at pci6 dev 0 function 0 "TI PCI1510 CardBus" rev 0x00: irq 11
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 22 device 0 cacheline 0x8, lattimer 0xb0
pcmcia0 at cardslot0
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02: PM disabled
pciide0 at pci0 dev 31 function 2 "Intel 82801GBM SATA" rev 0x02: DMA,
channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <HTS721010G9SA00>
wd0: 16-sector PIO, LBA48, 95396MB, 195371568 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <HL-DT-ST, DVDRAM GSA-4083N, 1.08> SCSI0
5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: irq 11
iic0 at ichiic0
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
aps0 at isa0 port 0x1600/31
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
biomask edfd netmask edfd ttymask ffff
mtrr: Pentium Pro MTRR support
umsm0 at uhub2 port 1 "Sierra Wireless Sierra Wireless MC5720 Modem"
rev 1.10/0.01 addr 2
ucom0 at umsm0 portno 0
ugen0 at uhub4 port 1 "Broadcom Corp BCM2045B" rev 2.00/1.00 addr 2
ugen1 at uhub4 port 2 "STMicroelectronics Biometric Coprocessor" rev
1.00/0.01 addr 3
softraid0 at root
root on wd0a swap on wd0b dump on wd0b
# usbdevs -v
Controller /dev/usb0:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000),
Intel(0x8086), rev 1.00
port 1 powered
port 2 powered
port 3 powered
port 4 powered
port 5 powered
port 6 powered
port 7 powered
port 8 powered
Controller /dev/usb1:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000),
Intel(0x8086), rev 1.00
port 1 powered
port 2 powered
Controller /dev/usb2:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000),
Intel(0x8086), rev 1.00
port 1 addr 2: full speed, self powered, config 1, Sierra Wireless
MC5720 Modem(0x0218), Sierra Wireless(0x1199), rev 0.01
port 2 powered
Controller /dev/usb3:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000),
Intel(0x8086), rev 1.00
port 1 powered
port 2 powered
Controller /dev/usb4:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000),
Intel(0x8086), rev 1.00
port 1 addr 2: full speed, self powered, config 1, BCM2045B(0x2110),
Broadcom Corp(0x0a5c), rev 1.00
port 2 addr 3: full speed, power 100 mA, config 1, Biometric
Coprocessor(0x2016), STMicroelectronics(0x0483), rev 0.01