Hi,

I observed a few crashes in rh_report_status recently.

Three problems:
- The timer is not always disabled when the data value is zeroed.
- If the root hub has vanished (somebody unplugged the PCMCIA card with
  the USB adapter at exactly the wrong time), hcd->self.root_hub may be
  zero.

These seem to be fixed by the patch appended below.
Please propagate to Linus' kernel.

- Some PCMCIA cards have an Opti OHCI chip. Random crashes ensue.
  Somebody remarked that Darwin has a couple of strange workarounds for
  that chip which obviously aren't in 2.6 yet.

  Is anybody working on this problem? If no, can somebody point me to
  the Darwin file where these workarounds can be examined?

  I have a client who has deployed 200+ machines with these cards.
  They need that problem fixed, preferably yesterday. :-/

Please apply this patch (off 2.6.10).

===== drivers/usb/core/hcd.c 1.104 vs edited =====
--- 1.104/drivers/usb/core/hcd.c        2004-11-07 23:31:07 +01:00
+++ edited/drivers/usb/core/hcd.c       2005-01-10 13:07:13 +01:00
@@ -538,6 +543,8 @@
                length = hcd->driver->hub_status_data (
                                        hcd, urb->transfer_buffer);
                if (length > 0) {
+                       if (hcd->rh_timer.data)
+                               del_timer_sync (&hcd->rh_timer);
                        hcd->rh_timer.data = 0;
                        urb->actual_length = length;
                        urb->status = 0;
@@ -1623,8 +1632,11 @@
        dev_err (hcd->self.controller, "HC died; cleaning up\n");
 
        /* make khubd clean up old urbs and devices */
-       usb_set_device_state(hcd->self.root_hub, USB_STATE_NOTATTACHED);
-       mod_timer(&hcd->rh_timer, jiffies);
+
+       if(hcd->self.root_hub) {
+               usb_set_device_state(hcd->self.root_hub, USB_STATE_NOTATTACHED);
+               mod_timer(&hcd->rh_timer, jiffies);
+       }
 }
 EXPORT_SYMBOL (usb_hc_died);
 
@@ -1635,6 +1648,8 @@
        struct usb_hcd *hcd;
 
        hcd = container_of (bus, struct usb_hcd, self);
+       if(hcd->rh_timer.data)
+               del_timer_sync (&hcd->rh_timer);
        kfree(hcd);
 }
 EXPORT_SYMBOL (usb_hcd_release);


-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  [EMAIL PROTECTED]


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to