On Wed, 2 Feb 2005, Olaf Hering wrote:

> I just managed to permanently toast my testbox by setting
> CONFIG_TASK_SIZE=0xC0000000. Now the box gets either a machine check or
> it floods serial console as soon as usb traffic happens.
> 
> 
> ...
> uhci_hcd 0000:00:12.0: host controller process error, something bad happened!
> uhci_hcd 0000:00:12.0: host controller halted, very bad!
> uhci_hcd 0000:00:12.0: host system error, PCI problems?
> uhci_hcd 0000:00:12.0: host controller process error, something bad happened!
> ...
> 
> Can someone add a simple ratelimit to uhci_irq()? :)

In principle rate-limiting isn't needed, because when one of those errors 
occurs the host controller is supposed to turn itself off.  However I've 
seen other system logs showing the same sort of behavior, where the HC 
just keeps on running...

What do you think of this patch instead?  It's far from a perfect 
solution, but it ought to prevent the log flooding that you saw.

Alan Stern



===== drivers/usb/host/uhci-hcd.c 1.154 vs edited =====
--- 1.154/drivers/usb/host/uhci-hcd.c   2005-01-26 10:59:47 -05:00
+++ edited/drivers/usb/host/uhci-hcd.c  2005-02-02 14:19:12 -05:00
@@ -1678,6 +1678,11 @@
                                        "very bad!\n");
                        /* FIXME: Reset the controller, fix the offending TD */
                }
+               if (status & (USBSTS_HSE | USBSTS_HCPE | USBSTS_HCH)) {
+                       dev_info(uhci_dev(uhci), "Command register = %04x\n",
+                                       inw(io_addr + USBCMD));
+                       outw(0, io_addr + USBCMD);
+               }
        }
 
        if (status & USBSTS_RD)



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to