Date: Wed, 09 Mar 2022 16:42:58 -0500 From: Farhan Khan <farhan@farhan.codes> To: Daniel O'Connor <darius@dons.net.au> Cc: freebsd-usb@freebsd.org Subject: Re: Understanding USB callback + assertion panic Message-ID: <7abd641a74526552a8cc1692f7453cb3c1279034.camel@farhan.codes> In-Reply-To: <AA05F39D-1CDB-45FA-A176-BF3BE3A794A1@dons.net.au> References: <69696561-822a-4808-b142-4a22d3f6b6b2@farhan.codes> <AA05F39D-1CDB-45FA-A176-BF3BE3A794A1@dons.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2022-03-09 at 20:26 +1030, Daniel O'Connor wrote: > > This one? > > USB_XFER_LOCK_ASSERT(xfer, MA_OWNED); > > > I think that assertion is saying you have to have acquired the USB > transfer lock USB_XFER_LOCK() et al, although I am not entirely sure > how you do that 'bare'. I have only called usbd_transfer_start in the > USB FIFO setup routines. > Hi Daniel and Hans! In my case, I am hitting the assertion panic even though I have this: --------- error = usbd_transfer_setup(uaa->device, &iface_index, usc->usc_xfer, athn_config_common, ATHN_N_TRANSFERS, usc, &sc->sc_mtx); ATHN_LOCK(sc); usbd_transfer_start(usc->usc_xfer[ATHN_BULK_TX_DATA]); ATHN_UNLOCK(sc); --------- Considering this is quite similar to how other drivers do this, what might I be doing wrong? I removed the error checking on 'error' for brevity, but it returns 0. Thanks! Farhan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7abd641a74526552a8cc1692f7453cb3c1279034.camel>