--- src/sys/dev/usb/usb.h.orig 2015-05-28 15:54:12.000000000 +0900
+++ src/sys/dev/usb/usb.h 2015-06-02 11:38:22.000000000 +0900
@@ -395,15 +395,25 @@ typedef struct {
} UPACKED usb_devcap_platform_descriptor_t;
#define USB_DEVCAP_PLATFORM_DESCRIPTOR_SIZE 20
+/* usb 3.1 ch 9.6.2.4 */
typedef struct {
uByte bLength;
uByte bDescriptorType;
uByte bDevCapabilityType;
uByte bReserved;
uDWord bmAttributes;
+#define XHCI_DEVCAP_SSP_SSAC(x) __SHIFTOUT(x, __BITS(4,0))
+#define XHCI_DEVCAP_SSP_SSIC(x) __SHIFTOUT(x, __BITS(8,5))
uWord wFunctionalitySupport;
+#define XHCI_DEVCAP_SSP_SSID(x) __SHIFTOUT(x, __BITS(3,0))
+#define XHCI_DEVCAP_SSP_MIN_RXLANE_COUNT(x) __SHIFTOUT(x, __BITS(11,8))
+#define XHCI_DEVCAP_SSP_MIN_TXLANE_COUNT(x) __SHIFTOUT(x, __BITS(15,12))
uWord wReserved;
uDWord bmSublinkSpeedAttr[0];
+#define XHCI_DEVCAP_SSP_LSE(x) __SHIFTOUT(x, __BITS(5,4))
+#define XHCI_DEVCAP_SSP_ST(x) __SHIFTOUT(x, __BITS(7,6))
+#define XHCI_DEVCAP_SSP_LP(x) __SHIFTOUT(x, __BITS(15,14))
+#define XHCI_DEVCAP_SSP_LSM(x) __SHIFTOUT(x, __BITS(31,16))
} UPACKED usb_devcap_ssp_descriptor_t;
#define USB_DEVCAP_SSP_DESCRIPTOR_SIZE 12 /* variable length */