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. Alan Stern -- 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