none
USB Hub as part of composite device RRS feed

  • Question

  • Hi All,

     I’m working on a new USB device, it will be based on an existing hub device with some added functions.  I was planning on making it a composite device to avoid using multiple USB addresses since there may be many of these in the same tree and I didn’t want to limit the number based on available slots in an xHCI host controller.  I ran across the following in the USB on Windows FAQ http://msdn.microsoft.com/en-us/library/windows/hardware/dn423379(v=vs.85).aspx#supportcomposite :

    A composite USB device cannot expose a function that serves as a hub. Windows does not enumerate such hubs properly and attempting to install the device might cause a system crash.

    I’m wondering if I can use a filter driver to only expose the first (hub) interface to the standard hub driver and then create a control device in the filter that will handle access to the other functions via a custom IOCTL interface. 

    Originally I was thinking an upper filter driver on the composite device driver but then I realized at that point windows has already decided to load the composite driver so even if I modify what usbccg sees, it would still try to load the hub driver under the composite driver.   My current thought is a lower filter on the standard hub driver to modify the configuration descriptor its reading from the device as it is enumerated?

    I’m more familiar with Host and hub drivers than with device/filter drivers so I’m hoping someone here will help point me in the right direction or tell me why if it’s just not possible.

    Thanks for any help

    Eric

    Thursday, November 21, 2013 10:37 PM

Answers

  • A composite hub is very unlikely to work, even with a filter driver approach. From a driver perspective, the filter has no control over when the hub is powered up, powered down, or reset; the hub driver will control these device-wide states with no knowledge of the needs of the composite function and its driver.

    Another problem: Since the controller hardware knows that a device slot is being used for a hub, it could also be making assumptions based on that information. Also the hardware will need to be aware that it is a composite device (for example for LPM, etc.).

    Note that in addition to the number of slots, the controller also might have a limit on the number of endpoints. So if the number of slots limit is being hit, the number of endpoints limit might become an issue too, which won’t be solved by making the hub appear as a composite device.

    Monday, November 25, 2013 7:29 PM

All replies

  • Anyone?
    Monday, November 25, 2013 7:24 PM
  • A composite hub is very unlikely to work, even with a filter driver approach. From a driver perspective, the filter has no control over when the hub is powered up, powered down, or reset; the hub driver will control these device-wide states with no knowledge of the needs of the composite function and its driver.

    Another problem: Since the controller hardware knows that a device slot is being used for a hub, it could also be making assumptions based on that information. Also the hardware will need to be aware that it is a composite device (for example for LPM, etc.).

    Note that in addition to the number of slots, the controller also might have a limit on the number of endpoints. So if the number of slots limit is being hit, the number of endpoints limit might become an issue too, which won’t be solved by making the hub appear as a composite device.

    Monday, November 25, 2013 7:29 PM