Skip to contentSkip to conversation

2.6.14-rc2-ge484585e: kexec into same kernel: irq 11 nobody cared; but ehci_hcd should

DISCUSSION David Brownell 1 participant 1 message Sep 25, 2005 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 11 lines

when i kexec into the same kernel i get this error message:

[17179593.108000] ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11
[17179593.108000] PCI: setting IRQ 11 as level-triggered
[17179593.108000] ACPI: PCI Interrupt 0000:00:10.3[D] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11
[17179593.108000] ehci_hcd 0000:00:10.3: EHCI Host Controller
[17179593.124000] ehci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 4
[17179593.936000] irq 11: nobody cared (try booting with the "irqpoll" option)

...

any ideas?

This patch (compile-tested only) ought to do it. Alternatively, try the "usb-handoff" kernel parameter; it happens that will also forcibly disable the IRQs.

(And notice how far that "usb-handoff" code has gotten out of sync with the HCDs ... for EHCI the bug is that only that "pci quirks" clone of the handoff code disables the IRQs, but for OHCI the bug is the other way around: only the HCD disables them. Bleech.)

- Dave

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.

drivers/usb/host/ehci-hcd.c +8 -0
@@ -182,6 +182,9 @@
 {
 	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;
 
@@ -297,12 +300,17 @@
 	spin_unlock_irqrestore (&ehci->lock, flags);
 }
 
+/* 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);