Subject: Re: USB GPS on NetBSD
To: Nick Hudson <>
From: David Howland <>
List: netbsd-users
Date: 05/04/2007 09:50:02
Nick Hudson wrote:
> hmm, that's not good. Can you get a full backtrace from ddb? At the db> prompt 
> type 't'.

Here is a gdb backtrace.  It dies with a page fault.

#21 0xc010b677 in calltrap ()
#22 0xc043c66d in sleepq_enqueue (sq=0xc0a299b0, pri=22, wchan=0xc15fb700,
     wmesg=0xc091c0fd "uhidevwi", sobj=0xc098d5d0) at 
#23 0xc043ca4a in sleepq_block (sq=0xc0a299b0, pri=22, wchan=0xc15fb700,
     wmesg=0xc091c0fd "uhidevwi", timo=0, catch=true, sobj=0xc098d5d0)
     at /usr/src/sys/kern/kern_sleepq.c:295
#24 0xc043f003 in ltsleep (ident=0xc15fb700, priority=278, 
wmesg=0xc091c0fd "uhidevwi", timo=0,
     interlock=0x0) at /usr/src/sys/kern/kern_synch.c:492
#25 0xc06a60f4 in usbd_intr_transfer (xfer=0xc15fb700, pipe=0xc164d300, 
flags=0, timeout=0,
     buf=0xc15bf620, size=0xcaf31e1c, lbl=0xc091c0fd "uhidevwi")
     at /usr/src/sys/dev/usb/usbdi_util.c:495
#26 0xc06b4936 in uhidev_write (sc=0x0, data=0xc15bf620, len=32)
     at /usr/src/sys/dev/usb/uhidev.c:644
#27 0xc06b91e5 in ucycomstart (tp=0xcaf02b84) at 
#28 0xc045fde8 in ttstart (tp=0xc098d5d0) at /usr/src/sys/kern/tty.c:1566
#29 0xc04620ac in ttyinput_wlock (c=-1063085648, tp=0xcaf02b84) at 
#30 0xc046440d in ttyinput (c=50, tp=0xc098d5d0) at 
#31 0xc06b8bbe in ucycom_intr (addr=0xc15c0d00, ibuf=0xc15bf600, len=32)
---Type <return> to continue, or q <return> to quit---
     at /usr/src/sys/dev/usb/ucycom.c:913
#32 0xc06b4db4 in uhidev_intr (xfer=0xc1524800, addr=0xc15c1e80, 
     at /usr/src/sys/dev/usb/uhidev.c:455
#33 0xc06a53ea in usb_transfer_complete (xfer=0xc1524800) at 
#34 0xc030da04 in uhci_idone (ii=<value optimized out>) at 
#35 0xc030e4d1 in uhci_softintr (v=0xc1527000) at 
#36 0xc04d2c5f in softintr_dispatch (which=1) at 
#37 0xc010b33a in Xsoftnet ()

The only thing I notice is the worrying "sc=0x0" argument to uhidev_write.

I've been looking at ucycom.c but I really don't know this code.  Any 
pointers would be appreciated.