Hi,

On 08/04/2013 03:08 AM, Pete Batard wrote:
> On 2013.08.04 00:51, Alan Stern wrote:
>> Out of curiosity, what data do you need to request from the parent hub?
>
> Now that I've looked a bit through old e-mails, it seems that these are
> config descriptors, coming from a Windows
> IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION request. I'll have to
> re-check what goes on the bus though, as we also have an
> IOCTL_USB_GET_NODE_CONNECTION_INFORMATION elsewhere (which provides us
> data such as the device connection speed).
>
> So I may be misremembering things, as the data we seem to derive from
> the first IOCTL isn't used for the topology, but to cache the actual
> config descriptor (which libusb mandates us to cache) and it looks like
> it's really a matter of caching our descriptors on Windows after all.

Interesting, I think it indeed would be a good idea to have an ondemand
caching of the config descriptors, so do not do the
IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION ioctl until an app actually
asks for the relevant info, I know that currently our documentation says:

  * Get a USB configuration descriptor based on its index.
  * This is a non-blocking function which does not involve any requests being
  * sent to the device.

But we could change it to say that on some platforms this function may block
the first time it is called for a device, and that only subsequent calls
are guaranteed to be non-blocking. This is not an API / ABI change, so I
see no problem with doing things this way.

Since most apps will only want the config descriptor for one device, doing
things this way, should give a nice speedup of enumeration under Windows.

For starters we could this just inside libusb, without adding the global
daemon / service for caching it. But if you prefer to directly go all the
way that would be fine with me too.

Regards,

Hans

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to