usb/80829: possible panic when loading USB-modules

Warner Losh imp at bsdimp.com
Mon May 9 14:35:05 PDT 2005


> I'm planning to use the stack method and have usbd_probe_and_attach() called 
> again from uhub_explore() via a call similar to usb_explore(). Leaving 
> devices after usbd_probe_and_attach() has returned, will _not_ work, except 
> for generic or specific USB drivers. It will not work for "ums", "ukbd" and 
> so on, because a device can have more than one configuration, and it is not 
> sure that the right configuration index is set when usbd_probe_and_attach() 
> returns after the generic probe. Have a look at this (almost finished):
> 
> Implement a new state-variable "udev->probed" and a refcount in "usbd_port" to 
> limit the calling of "usbd_probe_and_attach()".
> 
> Any comments?

I see why you are doing the reference count...  I also see some of the
problems involved.  The main reason that I went from the stack method
to the other method was so that the driver_added stuff would still
work.  That's the goal.  Part of the problem is that the NetBSD device
model ill fits newbus, for reasons that you're discovering...

Warner


More information about the freebsd-usb mailing list