On Wed, 6 May 2009, Oliver Neukum wrote: > Hi, > > as we very recently discussed resetting a hub (via hub_pre_reset) disconnects > all the hub's children. It seems to me unnecessarily rude. Could we not just > call pre_reset/post_reset on the children? After all we deal correctly with a > loss of power, should we do less in case of an error? This had occurred to me, but there are some nasty difficulties. We wouldn't be able to use the existing usb_reset_device() code, because it would do the pre_reset call at the wrong time: when the child is about to be reset, not before the hub is reset. There also are locking problems. Do we acquire all the locks on all the children? In what order? Or do we lock them one at a time? If yes, do we really want to send pre_reset and post_reset messages with the child unlocked in between? All in all, disconnecting the children is much simpler. (And if there was a _real_ loss of power, not just a suspend, we'd end up with a disconnection anyway.) 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