On Wed, 3 Mar 2010, Sarah Sharp wrote: > > This can't be right. There _is_ no SUPERSPEED feature; the macro > > definition in hub.h is bogus. (For that matter, there is no HIGHSPEED > > feature either -- that ought to be cleaned up.) Note that (1 << > > USB_PORT_FEAT_SUPERSPEED) is actually equal to USB_PORT_STAT_TEST -- > > which is certainly not what you want. > > Hmm, well, I just copied the high speed case when I created > USB_PORT_FEAT_SUPERSPEED. I really had no idea what the hub driver was > doing. Maybe you can relook at the xhci-hub.c code and the > modifications I made to khubd? Okay. One thing might be troublesome: The definition of PORT_STAT_POWER is wrong for USB-3.0. (What were the USB-IF members smoking when they changed that bit from its USB-2.0 position?) Luckily, I don't think it gets used anywhere. People tend to fall into the trap of thinking there's a 1-1 relation between port feature values and the corresponding port status bit positions, given by a simple bit shift. That's not true in general, and with USB-3.0 it's a lot less true than it used to be. > > I'm not sure exactly what is the right thing to test here; certainly > > you need to check whether the hub supports USB-3.0. However it's not > > clear exactly how external hubs will behave; the USB-3.0 spec says that > > hubs are the only devices allowed to function at high-speed and > > SuperSpeed at the same time, but it doesn't explain what that entails. > > AFAIK, you'll see two hub attaches, one is a SuperSpeed only hub, and > the other is a USB 2.0 hub. When you unplug the USB 3.0 hub, both of > the devices go away. So a single physical device will show up as two separate devices on the same bus? And it will end up getting assigned two separate addresses? In that case what I said was correct; the test should be for whether the hub is USB 3.0 instead of checking the port speed. That's because, as you said, the USB-3.0 incarnation of the hub is SuperSpeed only. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html