Skip to content

Commit

Permalink
[PATCH] USB: ehci.patch (earlier irq disable)
Browse files Browse the repository at this point in the history
This tweaks the EHCI reboot notifier to also halt the EHCI controller, and
makes that halt code force IRQs off.  Both should always have been done.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/host/ehci-hcd.c |    8 ++++++++
 1 file changed, 8 insertions(+)
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Oct 28, 2005
1 parent 7efe5d7 commit 72f30b6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/usb/host/ehci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ static int ehci_halt (struct ehci_hcd *ehci)
{
u32 temp = readl (&ehci->regs->status);

/* disable any irqs left enabled by previous code */
writel (0, &ehci->regs->intr_enable);

if ((temp & STS_HALT) != 0)
return 0;

Expand Down Expand Up @@ -335,12 +338,17 @@ static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap)

#endif

/* Reboot notifiers 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 int
ehci_reboot (struct notifier_block *self, unsigned long code, void *null)
{
struct ehci_hcd *ehci;

ehci = container_of (self, struct ehci_hcd, reboot_notifier);
(void) ehci_halt (ehci);

/* make BIOS/etc use companion controller during reboot */
writel (0, &ehci->regs->configured_flag);
Expand Down

0 comments on commit 72f30b6

Please sign in to comment.