alistair23-linux/drivers
Alan Stern f07600cf9e USB: add reset_resume method
This patch (as918) introduces a new USB driver method: reset_resume.
It is called when a device needs to be reset as part of a resume
procedure (whether because of a device quirk or because of the
USB-Persist facility), thereby taking over a role formerly assigned to
the post_reset method.  As a consequence, post_reset no longer needs
an argument indicating whether it is being called as part of a
reset-resume.  This separation of functions makes the code clearer.

In addition, the pre_reset and post_reset method return types are
changed; they now must return an error code.  The return value is
unused at present, but at some later time we may unbind drivers and
re-probe if they encounter an error during reset handling.

The existing pre_reset and post_reset methods in the usbhid,
usb-storage, and hub drivers are updated to match the new
requirements.  For usbhid the post_reset routine is also used for
reset_resume (duplicate method pointers); for the other drivers a new
reset_resume routine is added.  The change to hub.c looks bigger than
it really is, because mark_children_for_reset_resume() gets moved down
next to the new hub_reset_resume() routine.

A minor change to usb-storage makes the usb_stor_report_bus_reset()
routine acquire the host lock instead of requiring the caller to hold
it already.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:30 -07:00
..
acorn
acpi PCI: Change all drivers to use pci_device->revision 2007-07-11 16:02:10 -07:00
amba
ata Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-07-12 13:40:57 -07:00
atm PCI: ATM: lanai, change VENDOR to DEVICE 2007-07-11 16:02:10 -07:00
auxdisplay
base sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
block sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
bluetooth
cdrom
char Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart 2007-07-12 13:41:54 -07:00
clocksource PCI: Change all drivers to use pci_device->revision 2007-07-11 16:02:10 -07:00
connector
cpufreq Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq 2007-07-12 13:42:43 -07:00
crypto
dio
dma
edac
eisa
fc4
firewire
firmware sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
hid USB: add reset_resume method 2007-07-12 16:34:30 -07:00
hwmon
i2c Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-07-12 13:40:57 -07:00
ide Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-07-12 13:40:57 -07:00
ieee1394
infiniband Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-07-12 13:40:57 -07:00
input sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
isdn PCI: Change all drivers to use pci_device->revision 2007-07-11 16:02:10 -07:00
kvm
leds
macintosh Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2007-07-12 13:40:20 -07:00
mca
md dm mpath: rdac 2007-07-12 15:01:23 -07:00
media PCI: Change all drivers to use pci_device->revision 2007-07-11 16:02:10 -07:00
message
mfd
misc sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
mmc Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2007-07-12 14:17:12 -07:00
mtd
net Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-07-12 13:40:57 -07:00
nubus
oprofile
parisc sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
parport
pci Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2007-07-12 13:41:29 -07:00
pcmcia sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
pnp
power
ps3
rapidio sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
rtc Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2007-07-12 13:40:20 -07:00
s390 sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
sbus
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-07-12 13:40:57 -07:00
serial Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-07-12 13:40:57 -07:00
sh
sn
spi sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
tc [MIPS] DEC: Fix modpost warning. 2007-07-12 17:41:07 +01:00
telephony
usb USB: add reset_resume method 2007-07-12 16:34:30 -07:00
video Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-07-12 13:40:57 -07:00
w1 sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
zorro sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
Kconfig
Makefile