Re: Understanding USB callback + assertion panic

From: Farhan Khan <farhan_at_farhan.codes>
Date: Wed, 09 Mar 2022 23:39:01 UTC
On Wednesday 09 March 2022 16:42:58 PM (-05:00), Farhan Khan wrote:

 > ---------
 > 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?
 >

The mistake was on my end! My ATHN_LOCK code was incorrect and was not 
actually locking the mutex. The issue was resolved and it works.
Thank you! I'm learning and making a lot of mistakes along the way.