usbcore: refine warm reset logic
authorAndiry Xu <andiry.xu@amd.com>
Tue, 13 Sep 2011 23:41:11 +0000 (16:41 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 20 Sep 2011 19:33:49 +0000 (12:33 -0700)
commit75d7cf72ab9fa01dc70877aa5c68e8ef477229dc
tree7c318e28fc09fc1991a5fd2982931ca5276d39db
parentd78265992425ccb5753db9c56d9703c91b963e4b
usbcore: refine warm reset logic

Current waiting time for warm(BH) reset in hub_port_warm_reset() is too short
for xHC host to complete the warm reset and report a BH reset change.

This patch increases the waiting time for warm reset and merges the function
into hub_port_reset(), so it can handle both cold reset and warm reset, and
factor out hub_port_finish_reset() to make the code looks cleaner.

This fixes the issue that driver fails to clear BH reset change and port is
"dead".

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hub.c