On Fri, 15 Oct 2004, Moritz Heiber wrote:

> The patch works. My laptop is longer locking up when removing the AC and
> the mouse. So it is indeed the suspend_hc that causes my lockups. I have
> absolutely no idea why or how .. and I'd love to investigate further ..
> you'd just need to tell me how ;-)

If you're really interested, below is a patch that will print out some
diagnostic messages to the system log.  It's meant to apply _without_ the
previous patch, so you'll have to undo that one first.  The only way to
try it out will be for you to unplug the mouse while the power cord is
detached, so you better make sure log messages are sent to the screen!  
(Use Alt-SysRq-9.)

> But first of all .. thank you for your kindness and patience. Even though
> the patch might look simple to you it saved me from a _lot_ of work and
> finally, and this is the most important thing, lets me carry my laptop to
> work again. Thanks!

You're welcome.

> So, if you have any idea on how to eliminate that behaviour .. tell me
> about it. I'll gladly help you.

I don't really have any good ideas.  Most probably there's an error in the 
laptop's BIOS ACPI driver (just a wild guess).  Even if that turns out to 
be true, I don't know any way to fix it.

Alan Stern


===== drivers/usb/host/uhci-hcd.c 1.134 vs edited =====
--- 1.134/drivers/usb/host/uhci-hcd.c   2004-09-30 13:58:40 -04:00
+++ edited/drivers/usb/host/uhci-hcd.c  2004-10-15 11:45:03 -04:00
@@ -1647,6 +1647,8 @@
        if (!(status & ~USBSTS_HCH))    /* shared interrupt, not mine */
                return IRQ_NONE;
        outw(status, io_addr + USBSTS);         /* Clear it */
+if (uhci->state == UHCI_SUSPENDED)
+dev_info(uhci_dev(uhci), "IRQ during suspend: %x\n", status);
 
        if (status & ~(USBSTS_USBINT | USBSTS_ERROR | USBSTS_RD)) {
                if (status & USBSTS_HSE)
@@ -1728,7 +1730,9 @@
        dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__);
        uhci->state = UHCI_SUSPENDED;
        uhci->resume_detect = 0;
+dev_info(uhci_dev(uhci), "just before suspend\n");
        outw(USBCMD_EGSM, io_addr + USBCMD);
+dev_info(uhci_dev(uhci), "just after suspend\n");
 }
 
 static void wakeup_hc(struct uhci_hcd *uhci)
===== drivers/usb/host/uhci-hub.c 1.11 vs edited =====
--- 1.11/drivers/usb/host/uhci-hub.c    2004-09-09 14:26:05 -04:00
+++ edited/drivers/usb/host/uhci-hub.c  2004-10-15 11:47:28 -04:00
@@ -37,7 +37,12 @@
 {
        struct uhci_hcd *uhci = hcd_to_uhci(hcd);
        int port;
+static int cnt;
 
+if (uhci->state == UHCI_SUSPENDED && cnt < 3) {
+++cnt;
+dev_info(uhci_dev(uhci), "hub status during suspend: %d\n", cnt);
+}
        *buf = 0;
        for (port = 0; port < uhci->rh_numports; ++port) {
                if ((inw(uhci->io_addr + USBPORTSC1 + port * 2) & RWC_BITS) ||



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to