On 02/22/2012 04:26 PM, Sebastian Andrzej Siewior wrote: > On 02/22/2012 01:46 AM, Sarah Sharp wrote: >> @@ -3230,6 +3235,15 @@ check_highspeed (struct usb_hub *hub, struct >> usb_device *udev, int port1) >> kfree(qual); >> } >> >> +static void check_superspeed(struct usb_hub *hub, struct usb_device >> *udev, >> + int port1) >> +{ >> + if (udev->bos&& udev->bos->ss_cap) { > > && udev->bos->ss_cap->wSpeedSupported & cpu_to_le16(USB_5GBPS_OPERATION) > > This is probably over protective as I don't know how realistic it is to > make a device without this bit set. > I have question about this. The wSpeedsSupported field description says "Bitmap encoding of the speed supported by this device when operating in SuperSpeed mode." Does this mean the field may be different if the device is connected via a HS cable or to the EHCI host? Thanks, Andiry >> + dev_info(&udev->dev, "not running at top speed; " >> + "connect to a SuperSpeed port\n"); >> + } >> +} >> + >> static unsigned >> hub_power_remaining (struct usb_hub *hub) > >> @@ -3449,6 +3463,10 @@ static void hub_port_connect_change(struct >> usb_hub *hub, int port1, >> && udev->speed == USB_SPEED_FULL >> && highspeed_hubs != 0) >> check_highspeed (hub, udev, port1); >> + if (le16_to_cpu(udev->descriptor.bcdUSB)>= 0x0201&& > > I think you could drop this bcdUSB check because the same one is done > before fetching the BOS descriptor and setting ss_cap a few lines up > via hub_port_init(). Other than that, it looks good :) > >> + udev->speed< USB_SPEED_SUPER&& >> + superspeed_hubs != 0) >> + check_superspeed(hub, udev, port1); > > Sebastian > -- > 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 > -- 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