Skip to contentSkip to conversation

ehci_hcd 0000:00:1d.0: HC died; cleaning up

DISCUSSION Martin 1 participant 1 message Apr 25, 2011

lore
Share & tools
lore

Martin

author
#0 lore raw
Quoted 8 lines · Martin

recently, when plugging in my webcam (UVC driver) my USB stack seems to collapse. All USB devices including the mouse & keyboard stop working, the syslog says:

Apr 24 19:03:45 arnold kernel: ehci_hcd 0000:00:1d.0: fatal error
Apr 24 19:03:45 arnold kernel: ehci_hcd 0000:00:1d.0: force halt;
handshake ffffc90000052024 00004000 00004000 -> -110
Apr 24 19:03:45 arnold kernel: ehci_hcd 0000:00:1d.0: HC died; cleaning up

I was dabbling a bit further and can re-play the final scene of what must have
happened: the IRQ routine detected a fatal error, threw the hands in the air and turned the computer into a brick. Question now is what caused the fatal error.

static irqreturn_t ehci_irq (struct usb_hcd *hcd)

{
        struct ehci_hcd         *ehci = hcd_to_ehci (hcd);
        u32                     status, masked_status, pcd_status = 0, cmd;
        int                     bh;

        spin_lock (&ehci->lock);

        status = ehci_readl(ehci, &ehci->regs->status);
[...]
        /* PCI errors [4.15.2.4] */
        if (unlikely ((status & STS_FATAL) != 0)) {
                ehci_err(ehci, "fatal error\n");
                dbg_cmd(ehci, "fatal", cmd);
                dbg_status(ehci, "fatal", status);
                ehci_halt(ehci);
dead:
                ehci_reset(ehci);
                ehci_writel(ehci, 0, &ehci->regs->configured_flag);
                /* generic layer kills/unlinks all urbs, then
                 * uses ehci_stop to clean up the rest
                 */
                bh = 1;
        }

        if (bh)
                ehci_work (ehci);
        spin_unlock (&ehci->lock);
        if (pcd_status)
                usb_hcd_poll_rh_status(hcd);
        return IRQ_HANDLED;
}