On Sunday, July 08, 2012, Alan Stern wrote: > On Sat, 7 Jul 2012, Rafael J. Wysocki wrote: > > > > Well, the quirk does make sense. What doesn't make sense is why moving > > > the runtime PM operation pointers from usb_bus_type to usb_device_type > > > should cause any change in the autosuspend behavior. That's what we > > > would like to know. > > > > I think the reason was the way rpm_suspend() worked at the time of that > > commit (it works a bit differently now, but not as much as to avoid the > > problem). > > > > Namely, before commit e1620d591a75a10b15cf61dbf8243a0b7e6731a2 the device > > had a device type without runtime PM callbacks. So, rpm_suspend() saw > > that dev->type was set and dev->type->pm was set, so it assigned NULL to > > callback. As a result, nothing happened when rpm_callback(callback, dev) > > was run. > > I don't follow. If that were the reason then no USB device would have > been runtime-suspended before the e1620d commit. > > Are you saying this actually was true for some period of time (such as > between the commit that added the "callback" variable and the e1620d > commit)? Yes, it was, unfortunately, which is entirely my fault. Namely, commit 9659cc0678b954f187290c6e8b247a673c5d37e1 Author: Rafael J. Wysocki <rjw@xxxxxxx> Date: Fri Feb 18 23:20:21 2011 +0100 PM: Make system-wide PM and runtime PM treat subsystems consistently changed the ordering in which subsystem callbacks were invoked and that apparently caused USB autosuspend to stop working. Commit e1620d591a75a10b15 simply made it work again. So, the bisection result is a red herring here, due to my mistake. Commit 9659cc0678b was introduced between 2.6.38 and 2.6.39-rc1 (i.e. during the 2.6.39 merge window) and commit e1620d591a75 first appeared in 2.6.39-rc1 too (accortind to "git tag --contains"), so fortunately there are no released kernels in which USB autosuspend doesn't work. But bisection results regarding USB autosuspend and pointing to between commits 9659cc0678b and e1620d591a75 cannot be trusted. Sorry for the confusion, Rafael -- 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