[PATCH] USB: ehci.patch (earlier irq disable)

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 <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

 drivers/usb/host/ehci-hcd.c |    8 ++++++++
 1 file changed, 8 insertions(+)

---
commit 72f30b6f2f5f68dd426e9fe83817b882c2d04e50
tree 21f2785ff8dbd4c612f1f01cd9d2f8c6baef3dd5
parent 7efe5d7c3e3a82e43b0f8fb29c6797317bce7a9a
author David Brownell <[EMAIL PROTECTED]> Tue, 27 Sep 2005 10:19:39 -0700
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Fri, 28 Oct 2005 16:47:37 -0700

 drivers/usb/host/ehci-hcd.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index f5eb9e7..b3eb026 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 *e
 {
        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;
 
@@ -335,12 +338,17 @@ static int bios_handoff (struct ehci_hcd
 
 #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);



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to