static int usb_reset_and_verify_device(struct usb_device *udev);
 
-static inline char *portspeed(int portstatus)
+static inline char *portspeed(struct usb_hub *hub, int portstatus)
 {
+       if (hub_is_superspeed(hub->hdev))
+               return "5.0 Gb/s";
        if (portstatus & USB_PORT_STAT_HIGH_SPEED)
                return "480 Mb/s";
        else if (portstatus & USB_PORT_STAT_LOW_SPEED)
                return "1.5 Mb/s";
-       else if (portstatus & USB_PORT_STAT_SUPER_SPEED)
-               return "5.0 Gb/s";
        else
                return "12 Mb/s";
 }
                        u16 tmp = *status & USB_SS_PORT_STAT_MASK;
                        if (*status & USB_SS_PORT_STAT_POWER)
                                tmp |= USB_PORT_STAT_POWER;
-                       if ((*status & USB_SS_PORT_STAT_SPEED) ==
-                                       USB_PORT_STAT_SPEED_5GBPS)
-                               tmp |= USB_PORT_STAT_SUPER_SPEED;
                        *status = tmp;
                }
 
                         * USB3 protocol ports will automatically transition
                         * to Enabled state when detect an USB3.0 device attach.
                         * Do not disable USB3 protocol ports.
-                        * FIXME: USB3 root hub and external hubs are treated
-                        * differently here.
                         */
-                       if (hdev->descriptor.bDeviceProtocol != 3 ||
-                           (!hdev->parent &&
-                            !(portstatus & USB_PORT_STAT_SUPER_SPEED))) {
+                       if (!hub_is_superspeed(hdev)) {
                                clear_port_feature(hdev, port1,
                                                   USB_PORT_FEAT_ENABLE);
                                portstatus &= ~USB_PORT_STAT_ENABLE;
                    (portstatus & USB_PORT_STAT_ENABLE)) {
                        if (hub_is_wusb(hub))
                                udev->speed = USB_SPEED_WIRELESS;
-                       else if (portstatus & USB_PORT_STAT_SUPER_SPEED)
+                       else if (hub_is_superspeed(hub->hdev))
                                udev->speed = USB_SPEED_SUPER;
                        else if (portstatus & USB_PORT_STAT_HIGH_SPEED)
                                udev->speed = USB_SPEED_HIGH;
                        else if (portstatus & USB_PORT_STAT_LOW_SPEED)
                                udev->speed = USB_SPEED_LOW;
-                       else if (portstatus & USB_PORT_STAT_SUPER_SPEED)
-                               udev->speed = USB_SPEED_SUPER;
                        else
                                udev->speed = USB_SPEED_FULL;
                        return 0;
 
        dev_dbg (hub_dev,
                "port %d, status %04x, change %04x, %s\n",
-               port1, portstatus, portchange, portspeed (portstatus));
+               port1, portstatus, portchange, portspeed(hub, portstatus));
 
        if (hub->has_indicators) {
                set_port_led(hub, port1, HUB_LED_AUTO);
                udev->level = hdev->level + 1;
                udev->wusb = hub_is_wusb(hub);
 
-               /*
-                * USB 3.0 devices are reset automatically before the connect
-                * port status change appears, and the root hub port status
-                * shows the correct speed.  We also get port change
-                * notifications for USB 3.0 devices from the USB 3.0 portion of
-                * an external USB 3.0 hub, but this isn't handled correctly yet
-                * FIXME.
-                */
-
-               if (!(hcd->driver->flags & HCD_USB3))
-                       udev->speed = USB_SPEED_UNKNOWN;
-               else if ((hdev->parent == NULL) &&
-                               (portstatus & USB_PORT_STAT_SUPER_SPEED))
+               /* Only USB 3.0 devices are connected to SuperSpeed hubs. */
+               if (hub_is_superspeed(hub->hdev))
                        udev->speed = USB_SPEED_SUPER;
                else
                        udev->speed = USB_SPEED_UNKNOWN;