aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/host/ehci-hcd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index f5eb9e7b5b18..b3eb02613bff 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -182,6 +182,9 @@ static int ehci_halt (struct ehci_hcd *ehci)
182{ 182{
183 u32 temp = readl (&ehci->regs->status); 183 u32 temp = readl (&ehci->regs->status);
184 184
185 /* disable any irqs left enabled by previous code */
186 writel (0, &ehci->regs->intr_enable);
187
185 if ((temp & STS_HALT) != 0) 188 if ((temp & STS_HALT) != 0)
186 return 0; 189 return 0;
187 190
@@ -335,12 +338,17 @@ static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap)
335 338
336#endif 339#endif
337 340
341/* Reboot notifiers kick in for silicon on any bus (not just pci, etc).
342 * This forcibly disables dma and IRQs, helping kexec and other cases
343 * where the next system software may expect clean state.
344 */
338static int 345static int
339ehci_reboot (struct notifier_block *self, unsigned long code, void *null) 346ehci_reboot (struct notifier_block *self, unsigned long code, void *null)
340{ 347{
341 struct ehci_hcd *ehci; 348 struct ehci_hcd *ehci;
342 349
343 ehci = container_of (self, struct ehci_hcd, reboot_notifier); 350 ehci = container_of (self, struct ehci_hcd, reboot_notifier);
351 (void) ehci_halt (ehci);
344 352
345 /* make BIOS/etc use companion controller during reboot */ 353 /* make BIOS/etc use companion controller during reboot */
346 writel (0, &ehci->regs->configured_flag); 354 writel (0, &ehci->regs->configured_flag);