ugen and newbus
jhb at freebsd.org
Fri May 29 14:21:44 UTC 2009
On Thursday 28 May 2009 6:26:30 pm Andrew Thompson wrote:
> On the new usb stack the ugen driver attaches to all usb devices and
> generates a devd attach event but doesnt actually have a device entry.
> It either needs to be a device or use a different devd notification. It
> would be easier if it was a device as that takes care of the housekeeping.
> I am not sure that the best way to attach it into the device tree, a
> ugen device represents a physical unit and may have multiple usb drivers
> attach (like a 3g device with a built in sd reader).
I don't think ugen0 should be a new-bus device. I think it is fine for the
USB bus driver to just create suitable devices in /dev to allow side-band
access to devices from userland. Just as /dev/pci is not represented by a
new-bus device_t, but is a service provided by the PCI driver that is exposed
That is, I would store the 'cdev' for ugenX.Y in the ivars for each USB
There are other places in the device tree that need similar changes. For
example, 'smbX' should not be a device_t, instead each smbusX device should
just create the file in /dev directly. Similarly for iicbusX and /dev/iicX.
More information about the freebsd-current