Resend with subject: No more non-MPSAFE network device drivers, please!

Hans Petter Selasky hselasky at c2i.net
Tue May 23 10:11:58 UTC 2006


On Tuesday 23 May 2006 00:46, Warner Losh wrote:
> > I'd be willing to help convert drivers if we can get the code into the
> > tree (maybe as usb-ng?).  Setting up a bounty for this stuff may be
> > worthwhile since having a solid USB stack would be a boon for
> > everyone.
> > I'm not sure if it's possible with the HPS driver, but it would be
> > nice if every USB device could expose ugen endpoints along with their
> > device specific nodes.

This is not impossible with my USB stack, but one will have to make ugen a 
special USB device driver then, hence every time the configuration value is 
changed, the device nodes , /dev/ugenX.Y, must be re-created. Two drivers can 
set the configuration value, ugen and the device specific driver. Maybe one 
has got to put some restrictions here, like disabling ugen from changing the 
configuration value if a USB device driver is attached. Else changing the 
configuration value can lead to a detach of attached device drivers. That is 
the problem from what I can see.

>
> Since I've been reviewing the HPS usb stack for a while now, I'd be
> happy to act as coordinator for efforts in this area.
>

One question is wether we should have the emulation layer for the old USB 
system or not. I mean it is not very solid, hence it can suddenly sleep due 
to memory allocations, when it is not allowed to sleep. And then the system 
will issue a panic(). Everything that is there to support the old USB API has 
been enclosed with:

#ifdef USB_COMPAT_OLD
#endif

You might consider it for removal.

I have volunteered to do some work on the USB stack and drivers as a part of 
summer of code, but it is not sure yet wether my project will be accepted or 
not.

--HPS


More information about the freebsd-arch mailing list