Date: Sat, 26 Mar 2005 21:58:31 +0000 From: Sebastien B <sebastien.b@swissinfo.org> To: ticso@cicely.de Cc: freebsd-usb@freebsd.org Subject: Re: What's the right way to wait for an USB transfer to complete ? Message-ID: <200503262158.32320.sebastien.b@swissinfo.org> In-Reply-To: <20050326181317.GE14532@cicely12.cicely.de> References: <200503261558.21943.sebastien.b@swissinfo.org> <20050326181317.GE14532@cicely12.cicely.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, > > Locking the mutex in the software interrupt handler causes a kernel panic > > in propagate_priority (it seems to occur only when the mutex is already > > held by another thread, therefore mtx_lock() blocks) : > > > > Fatal trap 12: page fault while in kernel mode > > fault virtual address = 0x24 > > Likely you are using a NULL pointer as mutex. No, it is not NULL, the instruction I believe to have caused the fault is "mtx_lock(&sc->brg_rx.comp_mp)". "&sc->brg_rx.comp_mp" can't be NULL, AFAIK. You can have a look at my code, it's at http://yoshiyo.ath.cx/seb/download/prism54u-bsd-20050326.tar.bz2 See the "bottom halves" section of usb_transport.c > If you want your driver GIANT free that's fine, but don't forget > that calling USB layer requires you to acquire GIANT first. You mean I must hold Giant every time I call any USB function ? I've never seen any driver doing this... Regards, Sebastien
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503262158.32320.sebastien.b>