Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93349
b: refs/heads/master
c: 21da84a
h: refs/heads/master
i:
  93347: 962c69f
v: v3
  • Loading branch information
Sarah Sharp authored and Greg Kroah-Hartman committed Apr 25, 2008
1 parent 77ed306 commit 5b8044a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3cf2723432dd27402a4a4941ad2d04eae5dd639c
refs/heads/master: 21da84a89312dd8d014ca3352d1ab5c2279ec548
41 changes: 25 additions & 16 deletions trunk/drivers/usb/host/ehci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,17 +331,13 @@ static void ehci_turn_off_all_ports(struct ehci_hcd *ehci)
&ehci->regs->port_status[port]);
}

/* ehci_shutdown kick in for silicon on any bus (not just pci, etc).
* This forcibly disables dma and IRQs, helping kexec and other cases
* where the next system software may expect clean state.
/*
* Halt HC, turn off all ports, and let the BIOS use the companion controllers.
* Should be called with ehci->lock held.
*/
static void
ehci_shutdown (struct usb_hcd *hcd)
static void ehci_silence_controller(struct ehci_hcd *ehci)
{
struct ehci_hcd *ehci;

ehci = hcd_to_ehci (hcd);
(void) ehci_halt (ehci);
ehci_halt(ehci);
ehci_turn_off_all_ports(ehci);

/* make BIOS/etc use companion controller during reboot */
Expand All @@ -351,6 +347,22 @@ ehci_shutdown (struct usb_hcd *hcd)
ehci_readl(ehci, &ehci->regs->configured_flag);
}

/* ehci_shutdown kick in for silicon on any bus (not just pci, etc).
* This forcibly disables dma and IRQs, helping kexec and other cases
* where the next system software may expect clean state.
*/
static void ehci_shutdown(struct usb_hcd *hcd)
{
struct ehci_hcd *ehci = hcd_to_ehci(hcd);

del_timer_sync(&ehci->watchdog);
del_timer_sync(&ehci->iaa_watchdog);

spin_lock_irq(&ehci->lock);
ehci_silence_controller(ehci);
spin_unlock_irq(&ehci->lock);
}

static void ehci_port_power (struct ehci_hcd *ehci, int is_on)
{
unsigned port;
Expand Down Expand Up @@ -401,15 +413,15 @@ static void ehci_work (struct ehci_hcd *ehci)
timer_action (ehci, TIMER_IO_WATCHDOG);
}

/*
* Called when the ehci_hcd module is removed.
*/
static void ehci_stop (struct usb_hcd *hcd)
{
struct ehci_hcd *ehci = hcd_to_ehci (hcd);

ehci_dbg (ehci, "stop\n");

/* Turn off port power on all root hub ports. */
ehci_port_power (ehci, 0);

/* no more interrupts ... */
del_timer_sync (&ehci->watchdog);
del_timer_sync(&ehci->iaa_watchdog);
Expand All @@ -418,13 +430,10 @@ static void ehci_stop (struct usb_hcd *hcd)
if (HC_IS_RUNNING (hcd->state))
ehci_quiesce (ehci);

ehci_silence_controller(ehci);
ehci_reset (ehci);
ehci_writel(ehci, 0, &ehci->regs->intr_enable);
spin_unlock_irq(&ehci->lock);

/* let companion controllers work when we aren't */
ehci_writel(ehci, 0, &ehci->regs->configured_flag);

remove_companion_file(ehci);
remove_debug_files (ehci);

Expand Down

0 comments on commit 5b8044a

Please sign in to comment.