2011-04-24 23:05:19

by Martin

[permalink] [raw]
Subject: ehci_hcd 0000:00:1d.0: HC died; cleaning up

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
Apr 24 19:03:45 arnold kernel: usb 2-1.3: device descriptor read/all, error
-108
Apr 24 19:03:45 arnold kernel: hub 2-1:1.0: cannot disable port 3 (err = -19)
Apr 24 19:03:45 arnold kernel: hub 2-1:1.0: cannot reset port 3 (err = -19)
Apr 24 19:03:45 arnold kernel: hub 2-1:1.0: cannot disable port 3 (err = -19)
Apr 24 19:03:45 arnold kernel: hub 2-1:1.0: cannot reset port 3 (err = -19)
Apr 24 19:03:45 arnold kernel: hub 2-1:1.0: cannot disable port 3 (err = -19)
Apr 24 19:03:45 arnold kernel: hub 2-1:1.0: cannot reset port 3 (err = -19)
Apr 24 19:03:45 arnold kernel: hub 2-1:1.0: cannot disable port 3 (err = -19)
Apr 24 19:03:45 arnold kernel: hub 2-1:1.0: unable to enumerate USB device on
port 3
Apr 24 19:03:45 arnold kernel: hub 2-1:1.0: cannot disable port 3 (err = -19)

Cycling through run level 1 (which restarts udev etc.) doesn't help, only
remedy I found is a reboot.

So far it is only the UVC webcam causing the problem. Memory sticks seem to
work as expected.

I seem to remember it used to work previously and most likely one of my recent
kernel upgrades is the trigger (currently on 2.6.38.4). However, before I
delve into bisecting (the weather forecast for Easter Monday is too good): can
someone tell what's going on from those error codes in the syslog?

Thanks,

Martin


2011-04-25 08:18:12

by Martin

[permalink] [raw]
Subject: Re: ehci_hcd 0000:00:1d.0: HC died; cleaning up

Martin wrote:

> 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;
}