summaryrefslogtreecommitdiff
path: root/drivers/usb/host/uhci-hcd.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2011-04-05 21:35:53 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-14 03:36:06 +0400
commit99083f16f04e050eab0059167b4980cd67e7aa5a (patch)
tree6958edd91d9534376bcbbc68b1241af370f5dd82 /drivers/usb/host/uhci-hcd.c
parent7d670a2ed770a3405a7edb1159e3fa9b3f43fe46 (diff)
downloadlinux-99083f16f04e050eab0059167b4980cd67e7aa5a.tar.xz
USB: UHCI: don't try to revive a dead controller
This patch (as1457) abandons the curious strategy of declaring a controller dead following hibernation merely in order to reset and then revive it. The core no longer allow dead controllers to spring back to life when the system resumes, so there's no reason to declare a working controller temporarily dead. Instead we do an explicit reset. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/uhci-hcd.c')
-rw-r--r--drivers/usb/host/uhci-hcd.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index 73db5569f57b..83344d688ff0 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -140,8 +140,6 @@ static void finish_reset(struct uhci_hcd *uhci)
uhci->rh_state = UHCI_RH_RESET;
uhci->is_stopped = UHCI_IS_STOPPED;
clear_bit(HCD_FLAG_POLL_RH, &uhci_to_hcd(uhci)->flags);
-
- uhci->dead = 0; /* Full reset resurrects the controller */
}
/*
@@ -837,16 +835,17 @@ static int uhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
spin_lock_irq(&uhci->lock);
/* Make sure resume from hibernation re-enumerates everything */
- if (hibernated)
- uhci_hc_died(uhci);
+ if (hibernated) {
+ uhci_reset_hc(to_pci_dev(uhci_dev(uhci)), uhci->io_addr);
+ finish_reset(uhci);
+ }
- /* The firmware or a boot kernel may have changed the controller
- * settings during a system wakeup. Check it and reconfigure
- * to avoid problems.
+ /* The firmware may have changed the controller settings during
+ * a system wakeup. Check it and reconfigure to avoid problems.
*/
- check_and_reset_hc(uhci);
-
- /* If the controller was dead before, it's back alive now */
+ else {
+ check_and_reset_hc(uhci);
+ }
configure_hc(uhci);
/* Tell the core if the controller had to be reset */