aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/misc/ldusb.c
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@intel.com>2008-04-08 14:30:18 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-24 21:16:49 -0700
commit21da84a89312dd8d014ca3352d1ab5c2279ec548 (patch)
tree148e28526110b173d73903191ed0166c5618c683 /drivers/usb/misc/ldusb.c
parent3cf2723432dd27402a4a4941ad2d04eae5dd639c (diff)
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 'drivers/usb/misc/ldusb.c')
0 files changed, 0 insertions, 0 deletions