On Mon, 15 Nov 2010, Oliver Neukum wrote: > Am Montag, 15. November 2010, 21:57:58 schrieb Alan Stern: > > This patch (as1434) cleans up the uses of usb_mark_last_busy() in > > usbcore. The function will be called when a device is resumed and > > whenever a usage count is decremented. A call that was missing from > > the hub driver is added: A hub is used whenever one of its ports gets > > suspended (this prevents hubs from suspending immediately after their > > last child). > > Is that behavior really bad? It seems to that hubs are rarely > active independently of their devices. So, I see little benefit > in hubs not sleeping while all devices are sleeping. This behavior is already present, but implemented in a slightly different and more awkward manner. You can see it in the patch: @@ -1660,11 +1660,6 @@ static int usb_runtime_suspend(struct de return -EAGAIN; status = usb_suspend_both(udev, PMSG_AUTO_SUSPEND); - - /* Prevent the parent from suspending immediately after */ - if (status == 0 && udev->parent) - usb_mark_last_busy(udev->parent); - return status; } This doesn't prevent hubs from sleeping; it merely prevents them from suspending _immediately_ after the last child. Now whether this behavior should be removed entirely is a reasonable question. I've gotten used to seeing hubs suspend a few seconds after their children, but there doesn't seem to be any compelling reason they can't suspend more quickly. 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