On 01/10/2012 11:20 PM, Sarah Sharp wrote:
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 79d339e..1224a69 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -3142,6 +3147,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->speed != USB_SPEED_SUPER&& udev->bos&& udev->bos->ss_cap) { + dev_info(&udev->dev, "not running at top speed; " + "connect to a SuperSpeed port\n"); + } +} + static unsigned hub_power_remaining (struct usb_hub *hub) { @@ -3361,6 +3375,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&& + udev->speed == USB_SPEED_HIGH&&
You are checking speed twice. Here and in check_superspeed(). I would drop it here _or_ change it to <= USB_SPEED_SUPER and drop it in check_superspeed().
+ superspeed_hubs != 0) + check_superspeed(hub, udev, port1); /* Store the parent's children[] pointer. At this point * udev becomes globally accessible, although presumably
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