On Wed, 25 Jun 2003, Paul Mackerras wrote:

> Sorry I didn't get back to you earlier about this one.
> 
> Unfortunately this patch doesn't work for me.  With this patch (which
> is now in Linus' tree), my powerbook laptop will hang during the
> suspend process and not actually go to sleep.  It hangs sometime
> during the mdelay(500) at line 157 of drivers/usb/host/ochi-pci.c
> while it is trying to suspend the second of the two OHCI controllers
> on the machine.
> 
> I am currently using the patch below, which works fine.  This is
> against Linus' current BK tree.  I think it basically achieves the
> same effect as your patch but in a slightly different way.
> 
> Comments?

How does this work?  It's a smaller change, against BK-current.  
But maybe David will prefer to change ohci-pci.c instead.

Alan Stern


===== hcd.c 1.107 vs edited =====
--- 1.107/drivers/usb/core/hcd.c        Thu Jun 12 10:28:01 2003
+++ edited/drivers/usb/core/hcd.c       Wed Jun 25 10:02:25 2003
@@ -483,7 +483,7 @@
 {
        struct urb      *urb;
        struct usb_hcd  *hcd;
-       int             length;
+       int             length = 0;
        unsigned long   flags;
 
        urb = (struct urb *) ptr;
@@ -499,7 +499,9 @@
                return;
        }
 
-       length = hcd->driver->hub_status_data (hcd, urb->transfer_buffer);
+       if (!HCD_IS_SUSPENDED (hcd->state))
+               length = hcd->driver->hub_status_data (
+                                       hcd, urb->transfer_buffer);
 
        /* complete the status urb, or retrigger the timer */
        spin_lock (&hcd_data_lock);



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to