diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-05-30 19:38:58 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-12 23:34:30 (GMT) |
commit | 54515fe528d8c6f9bfaf7d0b9fffb908deecad78 (patch) | |
tree | 02f9205eed99bbf836dc9827f11db8584e93d443 /drivers/usb/core/generic.c | |
parent | f07600cf9eb3ee92777b2001e564faa413144a99 (diff) | |
download | linux-54515fe528d8c6f9bfaf7d0b9fffb908deecad78.tar.xz |
USB: unify reset_resume and normal resume
This patch (as919) unifies the code paths used for normal resume and
for reset-resume. Earlier I had failed to note a section in the USB
spec which requires the host to resume a suspended port before
resetting it if the attached device is enabled for remote wakeup.
Since the port has to be resumed anyway, we might as well reuse the
existing code.
The main changes are:
usb_reset_suspended_device() is eliminated.
usb_root_hub_lost_power() is moved down next to the
hub_reset_resume() routine, to which it is logically
related.
finish_port_resume() does a port reset() if the device's
reset_resume flag is set.
usb_port_resume() doesn't check whether the port is initially
enabled if this is a USB-Persist sort of resume.
Code to perform the port reset is added to the resume pathway
for the non-CONFIG_USB_SUSPEND case.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/generic.c')
-rw-r--r-- | drivers/usb/core/generic.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c index 4cbe7b3..b2fc2b1 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c @@ -219,8 +219,6 @@ static int generic_resume(struct usb_device *udev) */ if (!udev->parent) rc = hcd_bus_resume(udev); - else if (udev->reset_resume) - rc = usb_reset_suspended_device(udev); else rc = usb_port_resume(udev); return rc; |