On Tue, 5 Jul 2005, Daniel Haensse wrote:

> Dear Alan,
> 
> make modules_install
> 
> were the missing magic words :-). Stupid me.

Okay, good.  The log was very informative.

> remarks: 
> - if I detach the sandisk and reattach it, no log is generated.
> - if I detach the hub and reattach it, I get the following log:

<snip>

> hub 5-4:1.0: USB hub found
> hub 5-4:1.0: 7 ports detected
> hub 5-4:1.0: compound device; port removable status: FFFFFFF
> hub 5-4:1.0: no power switching (usb 1.0)

The line above means that the hub reports it has no capability for 
switching power off to individual ports.  The ports are supposed to be 
always powered on.

For that matter, that part about "removable status: FFFFFFF" two lines
above means the hub's ports are all Fixed internal to the hub itself, so
you can't plug any devices into them.  I have a feeling that both lines
are wrong.

> hub 5-4:1.0: no over-current protection
> hub 5-4:1.0: Single TT
> hub 5-4:1.0: TT requires at most 16 FS bit times
> hub 5-4:1.0: power on to power good time: 0ms
> hub 5-4:1.0: local power source is good
> usb 5-4: link qh256-0001/f6b84200 start 255 [7/0 us]
> hub 5-4:1.0: state 5 ports 7 chg 00fe evt 00ff
> hub 5-4:1.0: port 1, status 0000, change 0000, 12 Mb/s
> hub 5-4:1.0: port 2, status 0000, change 0000, 12 Mb/s
> hub 5-4:1.0: port 3, status 0000, change 0000, 12 Mb/s
> hub 5-4:1.0: port 4, status 0000, change 0000, 12 Mb/s
> hub 5-4:1.0: port 5, status 0000, change 0000, 12 Mb/s
> hub 5-4:1.0: port 6, status 0000, change 0000, 12 Mb/s
> hub 5-4:1.0: port 7, status 0000, change 0000, 12 Mb/s

The seven lines above indicate that all seven ports have no power.

So we have a misbehaving hub: It says that the ports don't have power and
it has no way to turn their power on.  On the assumption that the hub is
reporting its capabilities wrongly, here's a patch that will try to turn
on power to the ports regardless of whether the hub says it supports power
switching.  See if it makes any difference.

Alan Stern



Index: usb-2.6/drivers/usb/core/hub.c
===================================================================
--- usb-2.6.orig/drivers/usb/core/hub.c
+++ usb-2.6/drivers/usb/core/hub.c
@@ -436,8 +436,14 @@ static void hub_power_on(struct usb_hub 
 {
        int port1;
 
+#if 0
        /* if hub supports power switching, enable power on each port */
        if ((hub->descriptor->wHubCharacteristics & HUB_CHAR_LPSM) < 2) {
+#else
+       /* Try to turn on power to the ports regardless of the hub's 
+        * ability to support power switching */
+       {
+#endif
                dev_dbg(hub->intfdev, "enabling power on all ports\n");
                for (port1 = 1; port1 <= hub->descriptor->bNbrPorts; port1++)
                        set_port_feature(hub->hdev, port1,



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to