On Thu, Jun 30, 2011 at 05:09:29PM -0400, Alan Stern wrote: > On Thu, 30 Jun 2011, Greg KH wrote: > > > On Thu, Jun 30, 2011 at 01:26:37PM -0700, Sarah Sharp wrote: > > > Hi Alan, > > > > > > In an upcoming patchset, I'm going to need to walk the USB tree in the > > > xHCI driver in order to gather some information during a device > > > configuration or alt setting change. Is there anything stopping the USB > > > tree from changing while this operation is in progress? > > > > Not if you use the proper "walk the bus for all devices" functions that > > the driver core provides. Use them and you should be fine, right? > > bus_for_each_dev() is always a possibility. It doesn't tell you the > tree ordering, and it will include all device structures registered to > the usb_bus_type (including usb_interfaces as well as usb_devices, and > also including devices below non-xHCI controllers). If Sarah is okay > with these limitations, it's easier than explicitly going through the > tree by hand. Unfortunately, I really need to comprehend the whole tree structure. I need to do things like figure out whether there are any LS or FS devices under a HS hub. usb_tt doesn't keep a list of "active" TTs. I also don't want usb_interfaces. Sarah Sharp -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html