ehci-hcd on CARDBUS hangs when stopping card service

From: Borsenkow Andrej (Andrej.Borsenkow@mow.siemens.ru)
Date: Thu May 23 2002 - 01:33:24 EST


There were several reports about Linux hanging on shutdown. In one case
hardware was Dell Inspirion 8100 with Cardbus slot (Texas Instruments
PCI4451) and Adaptec USB2connect (aua-1420) controller.

Logs that were shown were somewhat crippled; in the above case log is:

> Although, I still get the following hang on shutdown:
>
> {HIGH TONE BEEP HERE}
> usb.c: USB disconnect on device
> usb-ohci.c: bogus NDP=255 for OHCI usb - 09:00.1
> (the above two statements are repeated ~4x's)
>
> usb-ohci.c: USB HC Takeover failed!
> usb.c: USB bus 3 deregistered
> usb.c: USB disconnect on device
> usb-ohci.c: USB HDC TakeOver failed!
> usb.c: USB bus 4 deregistered
> hcd.c: remove: 09:00.2, state 3
> usb.c: USB disconnect on device
>
> {TOTAL SYSTEM HANG HERE!}

It appears system hangs in ehci-hcd driver when removing USB tree. What I
suspect happens is:

cs driver (shutdwon_socket()) first powers down card slot and then calls
cb_free() that finally unresgisters USB. It appears that PCI reads from
USB controller in this state return just zeros (that explains bogus NDP
message). In which case it is quite probable that ehci-hcd just loops in
this place in ehci_stop:

        while (readl (&ehci->regs->status) & (STS_ASS | STS_PSS))
                udelay (100);

Unfortunately I do not have corr. hardware to test and guy who initially
reported it won't recompile kernel with more debugging on. So I thought I
just pass it on even if I cannot give a patch.

IMHO sequence in cs driver should be reverted - it is not polite to remove
hardware before giving driver a chance to cleanup :-) Irrespectively,
endless loop in ehci_stop does not look nice.

TIA

-andrej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu May 23 2002 - 22:00:28 EST