Re: 3G modem autosuspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

> > 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.

> >  Is there a
> > history of devices that use the option driver having issues with
> > auto-suspend?  It seems like if the USB device advertises remote wakeup
> > and the device is self-powered, then we should turn on remote wakeup by
> > default.
> 
> This question doesn't mean what you think it means.  Besides, are you 
> really sure the device advertises remote wakeup capability?  Can you 
> post the "lsusb -v" output for the modem?

I don't have access to the device right now, but I did eyeball the
output and I saw "remote wakeup" in the modem listing.  It's definitely
self-powered too.

My understanding was that when the device receives an incoming message
while suspended, it will issue a remote wakeup.  When I saw the value of
the wakeup sysfs file was disabled, I thought the USB core was disabling
remote wakeup from auto-suspend, and thus not letting the device go into
autosuspend at all because remote wakeup was required.  Hence the
confusion.

Sarah Sharp
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux