Re: ugen and newbus



On Thursday 28 May 2009 6:26:30 pm Andrew Thompson wrote:
Hi,


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
to /dev.

That is, I would store the 'cdev' for ugenX.Y in the ivars for each USB
device_t.

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.

--
John Baldwin
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: USB drivers
    ... Usb is a little complicated in this area, ... >mentioned that a pointer must be present for a driver to attach to a ... If there is only one pointer for a device, only one driver may ... >functionality is there and is compatible with FreeBSD drivers, ...
    (freebsd-current)
  • Re: Why this flash drive not detected in devd?
    ... Could I know why the flash drive is not detected on attach? ... The USB subsystem isn't currently equipped to notify devd (technically, ... no predictable link between a USB device and a disk device, ...
    (freebsd-questions)
  • Re: USB 2.0
    ... Most devices that attach via USB require the driver be installed before ... > It asks to install the driver but does not find it. ...
    (microsoft.public.windowsxp.general)
  • USBD.sys... where are you?
    ... Does anyone know where in Win2K registry you can get a filter driver to ... attach to USBD.sys (the bus driver for USB)? ... I have a lower USB class filter that I want to be able to use on all devices ...
    (microsoft.public.development.device.drivers)
  • Re: [PATCH 0/7] [RFC] Sizing zones and holes in an architecture independent manner V2
    ... RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize ... SCSI device sda: drive cache: write back w/ FUA ... usbcore: registered new driver hub ... hub 1-0:1.0: USB hub found ...
    (Linux-Kernel)