]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
USB: simplify hub_restart() logic
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 28 Apr 2008 15:06:42 +0000 (11:06 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Jul 2008 22:15:50 +0000 (15:15 -0700)
commit6ee0b270c733027b2b716b1c80b9aced41e08d20
tree8ad1db0a6bb5410a75381e98cf1ecfe390d6322d
parent9e5eace734a7b4e96a4ba4cf1f85622446e95e17
USB: simplify hub_restart() logic

This patch (as1081) straightens out the logic of the hub_restart()
routine.  Each port of the hub is scanned and the driver makes sure
that ports which are supposed to be disabled really _are_ disabled.
Any ports with a significant change in status are flagged in
hub->change_bits, so that khubd can focus on them without the need to
scan all the ports a second time -- which means the hub->activating
flag is no longer needed.

Also, it is now recognized explicitly that the only reason for
resuming a port which was not suspended is to carry out a reset-resume
operation, which happens only in a non-CONFIG_USB_SUSPEND setting.

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