On Wed, 21 Jan 2004, Rogério Brito wrote:

> Attached is the edited dmesg of that patch. I hope that I have not cut
> any essential information. I tried to indicate clearly what I did there
> (I have the hotplug scripts disabled, as you advised).

This is weird.  The internal hub is failing at a different place at 
different times.  You can see it if you compare this log to your previous 
one.  This one failed right after the "enabling power on all ports" 
message, but before it got past that point.

Here's another patch to try.  It adds more diagnostic output and it adds 
it delay during the power-on procedure for the ports.

Alan Stern


--- 2.6/drivers/usb/core/hub.c.orig     Tue Jan 20 16:10:29 2004
+++ 2.6/drivers/usb/core/hub.c  Wed Jan 21 16:19:25 2004
@@ -270,13 +270,18 @@
 {
        struct usb_device *dev;
        int i;
+       int ret;
 
        /* Enable power to the ports */
        dev_dbg(hubdev(interface_to_usbdev(hub->intf)),
                "enabling power on all ports\n");
        dev = interface_to_usbdev(hub->intf);
-       for (i = 0; i < hub->descriptor->bNbrPorts; i++)
-               set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER);
+       for (i = 0; i < hub->descriptor->bNbrPorts; i++) {
+               ret = set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER);
+               dev_dbg(hubdev(interface_to_usbdev(hub->intf)),
+                       "power on: %d\n", ret);
+               wait_ms(1000);
+       }
 
        /* Wait for power to be enabled */
        wait_ms(hub->descriptor->bPwrOn2PwrGood * 2);
@@ -741,6 +746,8 @@
 
                /* read and decode port status */
                ret = hub_port_status(hub, port, &portstatus, &portchange);
+               dev_dbg(hubdev(hub), "wait_reset %d, port %d, status %x, change %x\n",
+                               ret, port+1, portstatus, portchange);
                if (ret < 0) {
                        return -1;
                }
@@ -785,7 +792,8 @@
 
        /* Reset the port */
        for (i = 0; i < HUB_RESET_TRIES; i++) {
-               set_port_feature(hub, port + 1, USB_PORT_FEAT_RESET);
+               status = set_port_feature(hub, port + 1, USB_PORT_FEAT_RESET);
+               dev_dbg(hubdev(hub), "port reset = %d\n", status);
 
                /* return on disconnect or reset */
                status = hub_port_wait_reset(hub, port, dev, delay);
@@ -855,6 +863,8 @@
                wait_ms(HUB_DEBOUNCE_STEP);
 
                ret = hub_port_status(hub, port, &portstatus, &portchange);
+               dev_dbg(hubdev(hub), "port_status= %d, port %d status %x change %x\n",
+                       ret, port+1, portstatus, portchange);
                if (ret < 0)
                        return -1;
 
@@ -869,7 +879,8 @@
                connection = portstatus & USB_PORT_STAT_CONNECTION;
 
                if ((portchange & USB_PORT_STAT_C_CONNECTION)) {
-                       clear_port_feature(hub, port+1, USB_PORT_FEAT_C_CONNECTION);
+                       ret = clear_port_feature(hub, port+1, 
USB_PORT_FEAT_C_CONNECTION);
+                       dev_dbg(hubdev(hub), "clear C_CONNECTION2 = %d\n", ret);
                }
        }
 
@@ -893,7 +904,8 @@
                port + 1, portstatus, portchange, portspeed (portstatus));
 
        /* Clear the connection change status */
-       clear_port_feature(hub, port + 1, USB_PORT_FEAT_C_CONNECTION);
+       i = clear_port_feature(hub, port + 1, USB_PORT_FEAT_C_CONNECTION);
+       dev_dbg(&hubstate->intf->dev, "clear C_CONNECTION1 = %d\n", i);
 
        /* Disconnect any existing devices under this port */
        if (hub->children[port])
@@ -1064,6 +1076,8 @@
 
                for (i = 0; i < hub->descriptor->bNbrPorts; i++) {
                        ret = hub_port_status(dev, i, &portstatus, &portchange);
+                       dev_dbg(hubdev(dev),
+                               "initial port %d status: ret = %d\n", i+1, ret);
                        if (ret < 0) {
                                continue;
                        }




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to