On Sun, 4 Apr 2010, Dominik Brodowski wrote: > Alan, Oliver, > > On Sun, Apr 04, 2010 at 07:42:33PM +0200, Dominik Brodowski wrote: > > Oliver, > > > > Unfortunately, autosuspend of btusb does not seem to work on my notebook > > with 2.6.34-rc3: > > Debugging this a bit further (that's what long train rides are for): > > 1) btusb_open() gets called, which contains a pair of > usb_autopm_get_interface(), usb_autopm_put_interface() calls. It > sets needs_remote_wakeup = 1; in between there are two calls to > usb_mark_last_busy(). > > 2) There follow a few usb_mark_last_busy() calls. > > 3) Then, btusb_close() gets called, which again contains a pair of > usb_autopm_{get,put}_interface() calls. Once btusb_close() returns, > atomic_read(&intf->dev.power.usage_count) returns 0. > > This means that after startup, this usage_count is 0. Nonetheless, > btusb's suspend callback is never called, despite the following settings: > > # cat /sys/module/usbcore/parameters/autosuspend > 2 > > # cat /sys/bus/usb/devices/7-1/power/level > auto The logic for autosuspend is more or less contained in drivers/usb/core/driver.c:autosuspend_check(). It gets called from usb_autopm_do_interface(), called by usb_autopm_put_interface(). (That's in 2.6.33; in 2.6.34-rc the arrangement is a little different but not too much.) If you add some debugging statements to those routines you ought to be able to figure out what's going on. 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