linux_dsm_epyc7002/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
acpi
amba
ata
atm
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
cdrom
char
clocksource
connector
cpufreq
crypto
dio
dma
edac
eisa
fc4
firmware
hid
hwmon
i2c
ide
ieee1394
infiniband
input
isdn
kvm
leds
macintosh
mca
md
media
message
mfd
misc
mmc
mtd
net
nubus
oprofile
parisc
parport
pci
pcmcia
pnp
ps3
rapidio
rtc
s390
sbus
scsi
serial
sh
sn
spi
tc
telephony
usb USB: add "last_busy" field for use in autosuspend 2007-04-27 13:28:39 -07:00
video
w1
zorro
Kconfig
Makefile