On Thursday, May 08, 2014 08:56:24 AM Dan Williams wrote: > On Thu, May 8, 2014 at 4:09 AM, Rafael J. Wysocki <rjw@xxxxxxxxxxxxx> wrote: > > On Wednesday, May 07, 2014 10:37:24 PM Dan Williams wrote: > >> Unconditionally wake up the child device when the power session is > >> recovered. > > > > [cut] > > > >> + /* > >> + * Revalidate the device if it was requested by > >> + * usb_port_runtime_resume. > >> + */ > >> + if (test_and_clear_bit(i, hub->wakeup_bits) && udev) { > >> + pm_runtime_get_noresume(&udev->dev); > >> + pm_runtime_barrier(&udev->dev); > >> + pm_runtime_put_autosuspend(&udev->dev); > > > > It looks like you could just call pm_runtime_idle(&udev->dev) after the barrier > > without the _get and _put around it. Wouldn't that work? > > > > Sure, but the surprise was that an auto suspend enabled device stops > auto suspending after a barrier. I see. Well, _barrier() works pretty much as documented, but its interaction with autosuspend is weird due to the way the latter is implemented. I guess we could add a second argument to _barrier() telling it to do pm_runtime_put() instead of pm_runtime_put_noidle(). Thanks! -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- 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