Sleeping in USB network drivers

Sergey Matveychuk sem at FreeBSD.org
Wed Jun 7 10:21:00 PDT 2006


Andrew Thompson wrote:
> Hi,
> 
> 
> I am looking into the reported panics with the if_aue driver and have
> come across a locking problem with usb adapters that is not obvious how
> to fix.
> 
> The problem is that usbd_do_request() may sleep and most drivers are
> careful to call it without any locks held. in_addmulti() will grab
> in_multi_mtx before calling if_addmulti() to update the cards multicast
> hash, this effectively means that the driver can not sleep in
> *_setmulti but this is unavoidable with USB.
> 
> Does anyone have any suggestions? (panic and bt below)

It was discussed in usb at . Shortly, USB stack should be rewritten.
The patch can be found at
http://www.turbocat.net/~hselasky/usb4bsd/index.html

-- 
Dixi.
Sem.



More information about the freebsd-net mailing list