On Wed, 9 Feb 2011, Sarah Sharp wrote: > On Wed, Feb 09, 2011 at 05:10:32PM -0500, Alan Stern wrote: > > On Wed, 9 Feb 2011, Sarah Sharp wrote: > > > > > I've been testing a 3G modem that uses the option driver in 2.6.37, and > > > we noticed that the device wasn't going into autosuspend. Upon further > > > investigation, we found that remote wakeup is disabled by default, and > > > the option driver will only suspend the device between transmissions if > > > remote wakeup is enabled by userspace. > > > > No, you have misunderstood. Autosuspend fails if the device _doesn't > > support_ remote wakeup -- this has nothing to do with the user's > > setting of the power/wakeup attribute. > > > > Also, I'm not sure what you mean by "between transmissions". The > > option driver requires remote wakeup while the device file is open but > > not while the file is closed. Hence there should be nothing > > preventing autosuspend when the device is not in use. > > This particular modem has crappy firmware, and transmits useless > messages every 2 seconds. I've just found that out, so that explains > why the device wasn't going into suspend. Or was going into suspend and then waking up shortly thereafter. > > > Is there a reason remote wakeup is disabled by default? > > > > The power/wakeup attribute applies to system sleep (suspend or > > hibernation), not runtime suspend. It is supposed to be disabled by > > default for all devices except those normally expected to wake up a > > sleeping computer (power button, lid, keyboard, maybe network > > interface). > > > > It is not enabled by default for USB hubs, for example, even though all > > hubs support remote wakeup. Otherwise your sleeping laptop would wake > > up the moment you unplugged the USB mouse. > > Ah, ok, I was confused about the sysfs files. I guess I'll have to look > at the Documentation directory again. You might also want to look at include/linux/pm_wakeup.h. 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