# Understanding USB callback + assertion panic



## Farhan Khan (Mar 8, 2022)

Hi all,

I am trying to understand how FreeBSD's USB subsystem works and appear to be running into a kernel panic due to a failed assertion that I do not understand. the assertion in question is `/usr/src/sys/dev/usb/usb_transfer.c:1954`.

My understanding is that you first configure usbd_transfer_setup(9). To start a bulk transfer, you populate the appropriate list (typically an STAIL_* list), then initiate a transfer by calling usbd_transfer_start(9) with the correct transfer. In my case, my callback is a simple `printf()`.

Upon the usbd_transfer_start(9) call, I am hitting the assertion error. I have looked at other device drivers and have not identified what they are doing differently.

Any suggestions?
Thanks!


----------



## Beastie7 (Mar 8, 2022)

That would be a good quesiton to post on the mailing list for the USB stack.


----------



## Farhan Khan (Mar 9, 2022)

Sent!


----------



## grahamperrin@ (Mar 9, 2022)

Thanks,



Beastie7 said:


> … the mailing list for the USB stack. …



FreeBSD bug 256855 – lists.freebsd.org/archives/⋯ long lines are sometimes not wrapped

So, instead of <https://lists.freebsd.org/archives/freebsd-usb/2022-March/000337.html>, which can not be read without repeatedly scrolling from left to right:

<http://markmail.org/message/vhnbmvexzkteobw2>


----------

