What's the right way to wait for an USB transfer to complete ?

Sebastien B sebastien.b at swissinfo.org
Tue Mar 29 01:21:39 PST 2005


Hello,

> Havn't looked at your code yet, but the panic is by accessing a
> memory location near address 0, so it's very likely that you are
> accesing a structure member from a NULL pointer.
> A stack trace from kernel debugger should easily tell you which
> function made the access

Yes, I already did that ; the panic is inside propagate_priority, called by 
turnstile_wait. Really confusing :-(

> > You mean I must hold Giant every time I call any USB function ? I've
> > never seen any driver doing this...
>
> Yes - holding GIANT ist required.
> You don't see this because currently all USB drivers are already
> entered with GIANT held.

Ok, thanks for the info. I'll lock Giant in the software interrupt handlers 
which access USB, maybe the crash is because of that (race condition damaging 
kernel structures ?)

Regards,
Sebastien



More information about the freebsd-usb mailing list