summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@intel.com>2008-04-08 21:30:18 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 04:16:49 (GMT)
commit21da84a89312dd8d014ca3352d1ab5c2279ec548 (patch)
tree148e28526110b173d73903191ed0166c5618c683 /arch
parent3cf2723432dd27402a4a4941ad2d04eae5dd639c (diff)
downloadlinux-21da84a89312dd8d014ca3352d1ab5c2279ec548.tar.xz
USB: ehci shutdown refactored
This patch refactors some shutdown code so it can be shared between ehci_stop() and ehci_shutdown(). This also fixes a couple potential bugs: - ehci_shutdown() was not locking ehci->lock before halting the HC. - ehci_shutdown() didn't disable the watchdog and IAA timers. - ehci_stop() was resetting the host controller when it may have been running, which the EHCI spec says "may result in undefined behavior". ehci_stop() was calling port_power() to turn off the ports, which waited 20ms after applying the port change. The msleep was for the case where the HC might take 20ms to turn the ports on; since we're shutting them off, we can avoid the msleep and just use ehci_turn_off_ports(). ehci_stop() doesn't need to clear the intr_enable register or revert ownership of the companion controllers to the BIOS, because the host controller reset should have done that. There might be a buggy host controller that doesn't follow the reset rules, but for now we assume it's redundant code and remove it. [ A subsequent patch will cancel the timers later ... this version carries forward existing bugs where timers could get re-armed after they're canceled. ] Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions