Re: [linux-usb-devel] USB autosuspend and turning of usb pendrive leds

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Hans de Goede <j.w.r.degoede@...>
Cc: linux-kernel <linux-kernel@...>, USB development list <linux-usb-devel@...>
Date: Friday, September 21, 2007 - 10:39 am

On Fri, 21 Sep 2007, Jiri Kosina wrote:


The correct answer is that HAL should top polling while the device is 
suspended.

In kernels starting with 2.6.23-rc6, the correct way to enable 
autosuspend for a USB device is basically like this:

	echo D >/sys/bus/usb/devices/.../power/autosuspend
	echo auto >/sys/bus/usb/devices/.../power/level

where D is the time (in seconds) the device should remain idle before 
it is autosuspended.  An autosuspended device will be woken up to 
respond to polls.  (Note however that in this kernel, autosuspend 
support for USB mass-storage devices was removed because it can 
cause problems related to spinning down disk drives.)

If instead you do

	echo suspend >/sys/bus/usb/devices/.../power/level

it will simply suspend the device immediately.  The device will not be 
woken up automatically and attempts to poll it (or do anything else) 
will fail.

Alan Stern

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
USB autosuspend and turning of usb pendrive leds, Hans de Goede, (Fri Sep 21, 9:28 am)
Re: USB autosuspend and turning of usb pendrive leds, Bill Davidsen, (Fri Sep 28, 4:48 pm)
Re: USB autosuspend and turning of usb pendrive leds, Jiri Kosina, (Fri Sep 21, 10:18 am)
Re: [linux-usb-devel] USB autosuspend and turning of usb pen..., Alan Stern, (Fri Sep 21, 10:39 am)
Re: USB autosuspend and turning of usb pendrive leds, Hans de Goede, (Fri Sep 21, 10:20 am)
Re: USB autosuspend and turning of usb pendrive leds, Jiri Kosina, (Fri Sep 21, 11:15 am)
Re: USB autosuspend and turning of usb pendrive leds, Oliver Neukum, (Mon Sep 24, 6:36 am)
Re: USB autosuspend and turning of usb pendrive leds, Hans de Goede, (Mon Sep 24, 7:38 am)
Re: USB autosuspend and turning of usb pendrive leds, Oliver Neukum, (Mon Sep 24, 9:25 am)