linux-stable/drivers
Alan Stern 1941044aa9 USB: add "last_busy" field for use in autosuspend
This patch (as877) adds a "last_busy" field to struct usb_device, for
use by the autosuspend framework.  Now if an autosuspend call comes at
a time when the device isn't busy but hasn't yet been idle for long
enough, the timer can be set to exactly the desired value.  And we
will be ready to handle things like HID drivers, which can't maintain
a useful usage count and must rely on the time-of-last-use to decide
when to autosuspend.

The patch also makes some related minor improvements:

	Move the calls to the autosuspend condition-checking routine
	into usb_suspend_both(), which is the only place where it
	really matters.

	If the autosuspend timer is already running, don't stop
	and restart it.

	Replace immediate returns with gotos so that the optional
	debugging ouput won't be bypassed.

	If autoresume is disabled but the device is already awake,
	don't return an error for an autoresume call.

	Don't try to autoresume a device if it isn't suspended.
	(Yes, this undercuts the previous change -- so sue me.)

	Don't duplicate existing code in the autosuspend work routine.

	Fix the kerneldoc in usb_autopm_put_interface(): If an
	autoresume call fails, the usage counter is left unchanged.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:39 -07:00
..
acorn [ARM] Acorn: move the i2c bus driver into drivers/i2c 2007-03-04 20:40:50 +00:00
acpi acpi-thermal: fix mod_timer() interval 2007-04-24 08:23:08 -07:00
amba uevent: use add_uevent_var() instead of open coding it 2007-04-27 10:57:29 -07:00
ata pata_sis: Fix oops on boot 2007-04-19 19:20:52 -04:00
atm [ATM]: Use mutex instead of binary semaphore in FORE Systems 200E-series driver 2007-04-26 01:41:49 -07:00
auxdisplay
base drivers/base/attribute_container.c: use mutex instead of binary semaphore 2007-04-27 10:57:34 -07:00
block ub: Bind to first endpoint, not to last 2007-04-27 13:28:34 -07:00
bluetooth [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset} 2007-04-25 22:28:23 -07:00
cdrom [PATCH] Fix soft lockup with iSeries viocd driver 2007-03-05 07:57:51 -08:00
char [NET]: random functions can use nsec resolution instead of usec 2007-04-25 22:28:25 -07:00
clocksource [PATCH] correct slow acpi_pm rating 2007-03-27 09:05:15 -07:00
connector [NETLINK]: Switch cb_lock spinlock to mutex and allow to override it 2007-04-25 22:29:03 -07:00
cpufreq [PATCH] Fix maxcpus=1 trigerring BUG() in cpufreq 2007-03-27 08:55:56 -07:00
crypto [PATCH] geode-aes: use unsigned long for spin_lock_irqsave 2007-03-06 09:30:25 -08:00
dio
dma [PATCH] rm pointless dmaengine exports 2007-03-16 19:25:03 -07:00
edac
eisa [PATCH] drivers/eisa/pci_eisa.c:pci_eisa_init() should be init 2007-03-27 09:05:15 -07:00
fc4
firmware
hid HID: Do not discard truncated input reports 2007-04-05 16:06:30 +02:00
hwmon hwmon/w83627ehf: Don't redefine REGION_OFFSET 2007-04-24 08:23:08 -07:00
i2c Minor bug fixes to i2c-pasemi 2007-04-17 16:36:28 -07:00
ide IDE: remove rwsem use from ide-proc core 2007-04-27 10:57:30 -07:00
ieee1394 IEEE1394: remove rwsem use from ieee1394 core 2007-04-27 10:57:30 -07:00
infiniband Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband 2007-04-27 09:39:27 -07:00
input Input: gameport - do not touch bus's rwsem 2007-04-27 10:57:30 -07:00
isdn [SK_BUFF]: Introduce skb_copy_to_linear_data{_offset} 2007-04-25 22:28:29 -07:00
kvm KVM: Fix off-by-one when writing to a nonpae guest pde 2007-04-19 18:39:26 +03:00
leds
macintosh drivers/macintosh/smu.c: fix locking snafu 2007-04-17 16:36:27 -07:00
mca
md [PATCH] md: fix calculation for size of filemap_attr array in md/bitmap 2007-04-12 15:31:42 -07:00
media [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset} 2007-04-25 22:28:23 -07:00
message [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset} 2007-04-25 22:28:23 -07:00
mfd [PATCH] drivers/mfd/sm501.c: fix an off-by-one 2007-04-02 10:06:08 -07:00
misc asus-laptop: make code static 2007-03-09 21:06:40 -05:00
mmc uevent: use add_uevent_var() instead of open coding it 2007-04-27 10:57:29 -07:00
mtd Merge branch 'for-linus' of git://git.infradead.org/ubi-2.6 2007-04-27 10:42:35 -07:00
net PHY: remove rwsem use from phy core 2007-04-27 10:57:31 -07:00
nubus
oprofile [PATCH] oprofile: fix potential deadlock on oprofilefs_lock 2007-03-28 13:58:02 -07:00
parisc [NET]: Inline net_device_stats 2007-04-25 22:28:26 -07:00
parport [PARPORT] SUNBPP: Fix OOPS when debugging is enabled. 2007-04-23 23:33:17 -07:00
pci define platform wakeup hook, use in pci_enable_wake() 2007-04-27 10:57:33 -07:00
pcmcia [PATCH] omap_cf: oops-on-suspend fix 2007-04-08 19:47:55 -07:00
pnp PNP: stop using the subsystem rwsem 2007-04-27 10:57:30 -07:00
ps3 [PATCH] C99 initializers, proper use of const in drivers/ps3 2007-03-14 15:27:50 -07:00
rapidio
rtc [PATCH] rtc-cmos lockdep fix, irq updates 2007-04-02 10:06:09 -07:00
s390 s390: cio: Delay uevents for subchannels 2007-04-27 10:57:32 -07:00
sbus [OPENPROM]: Use pci_device_to_OF_node(). 2007-04-26 01:54:59 -07:00
scsi SCSI: use the proper semaphore to protect the class lists 2007-04-27 10:57:30 -07:00
serial [SPARC/64] constify of_get_property return: drivers 2007-04-26 01:54:27 -07:00
sh
sn
spi spi: fix use of set_cs in spi_s3c24xx driver 2007-04-17 16:36:27 -07:00
tc [PATCH] Fix build error on zs serial driver 2007-04-04 21:12:47 -07:00
telephony
usb USB: add "last_busy" field for use in autosuspend 2007-04-27 13:28:39 -07:00
video [IGAFB]: Use pci_device_to_OF_node() on sparc. 2007-04-26 01:55:03 -07:00
w1
zorro
Kconfig
Makefile IB: Remove reference to obsolete CONFIG_IPATH_CORE 2007-04-18 20:20:53 -07:00