USB hub: simplify remote-wakeup handling
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 20 Nov 2006 16:14:30 +0000 (11:14 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:25:52 +0000 (14:25 -0800)
commitd25450c68767481f7c9cc4823a6da8235db40be6
tree1a982e5b7ed83f1911bbc3e58a02552d765d192a
parentce3615879ae85373c03744b45b7c2d7ae5e29b2a
USB hub: simplify remote-wakeup handling

This patch (as817) simplifies the remote-wakeup processing in the hub
driver.  Now instead of using a specialized code path, it relies on
the standard USB resume routines.  The hub_port_resume() function does
an initial get_port_status() to see whether the port has already
resumed itself (as it does when a remote-wakeup request is sent).
This will slow down handling of other resume events slightly, but not
enough to matter.

The patch also changes the hub_port_status() routine, making it return
an error if a short reply is received.

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