On 07/08/2012 09:52 AM, 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)? I think this is, in fact, what happened. See rpm_suspend() before and after commit 9659cc0; I suspect that between commit 9659cc0 and commit e1620d5, no USB device was being runtime-suspended. Since this was after v2.6.38 and before v2.6.39-rc1, though, it wouldn't have been widely seen or tested, right? However, that doesn't fully explain why the webcam wouldn't have been autosuspended in v2.6.38 -- perhaps you all can guess at this more quickly than I can? Was enough changed in the runtime PM architecture from v2.6.38 to e1620d to explain this difference? Eric -- 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