USB: separate root and non-root suspend/resume
commit686314cfbdac21c9019c0e04487b5d940db62406
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 30 May 2007 19:34:36 +0000 (30 15:34 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 12 Jul 2007 23:34:29 +0000 (12 16:34 -0700)
tree245810b09a9b19dc74e668a244e1d5ad88ff6bee
parent4956eccdd6101c5abb71966079e8183d12796d6c
USB: separate root and non-root suspend/resume

This patch (as916) completes the separation of code paths for suspend
and resume of root hubs as opposed to non-root devices.  Root hubs
will be power-managed through their bus_suspend and bus_resume
methods, whereas normal devices will use usb_port_suspend() and
usb_port_resume().

Changes to the hcd_bus_{suspend,resume} routines mostly represent
motion of code that was already present elsewhere.  They include:

Adding debugging log messages,

Setting the device state appropriately, and

Adding a resume recovery time delay.

Changes to the port-suspend and port-resume routines in hub.c include:

Removal of checks for root devices (since they will never
be triggered), and

Removal of checks for NULL or invalid device pointers (these
were left over from earlier kernel versions and aren't needed
at all).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/generic.c
drivers/usb/core/hcd.c
drivers/usb/core/hcd.h
drivers/usb/core/hub.c