]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/core/hub.h
usb: Support USB 3.1 extended port status request
[karo-tx-linux.git] / drivers / usb / core / hub.h
index 45d070dd1d0315cfca7b049e3e1d04e6e701645c..34c1a7e22aae020a2f48bce219a342a89d835650 100644 (file)
@@ -140,6 +140,13 @@ static inline int hub_is_superspeed(struct usb_device *hdev)
        return hdev->descriptor.bDeviceProtocol == USB_HUB_PR_SS;
 }
 
+static inline int hub_is_superspeedplus(struct usb_device *hdev)
+{
+       return (hdev->descriptor.bDeviceProtocol == USB_HUB_PR_SS &&
+               le16_to_cpu(hdev->descriptor.bcdUSB) >= 0x0310 &&
+               hdev->bos->ssp_cap);
+}
+
 static inline unsigned hub_power_on_good_delay(struct usb_hub *hub)
 {
        unsigned delay = hub->descriptor->bPwrOn2PwrGood * 2;