On Fri, 1 Jul 2011, Sarah Sharp wrote: > Ok, that's why I was asking about locking order. :) But in the case > where I have to walk up the tree from a newly added device to get the > roothub port number, it's not very useful to lock from top-down. If a device is being newly added then it is already locked. Hence you don't have to worry about anything above it getting removed. > > To answer your question: The only way to prevent children from being > > added to hub 2 is to lock hub 2. You can prevent a child from being > > removed from hub 2 by locking hub 2, the child, or any of the child's > > descendants. > > If I take the bus list lock, does that prevent *any* device from being > added to or removed from the bus? Only the root hub. Everything else is unprotected. 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