Re: Understanding USB callback + assertion panic

From: Farhan Khan <>
Date: Wed, 09 Mar 2022 21:42:58 UTC
On Wed, 2022-03-09 at 20:26 +1030, Daniel O'Connor wrote:
> This one?
> 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);

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.