diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -331,6 +331,7 @@ #define USB_DEVCAP_USB2EXT 0x02 #define USB_DEVCAP_SUPER_SPEED 0x03 #define USB_DEVCAP_CONTAINER_ID 0x04 +#define USB_DEVCAP_SUPERSPEED_PLUS 0x0A /* data ... */ } __packed; typedef struct usb_bos_cap_descriptor usb_bos_cap_descriptor_t; @@ -371,6 +372,33 @@ typedef struct usb_devcap_container_id_descriptor usb_devcap_container_id_descriptor_t; +struct usb_devcap_ss_plus_descriptor_header { + uByte bLength; + uByte bDescriptorType; + uByte bDevCapabilityType; + uByte bReserved; +#define USB_DEVCAP_SSPLUS_SSAC_GET(x) ((x) & 0x1F) +#define USB_DEVCAP_SSPLUS_SSAC_SET(v) ((v) & 0x1F) +#define USB_DEVCAP_SSPLUS_SSIC_SET(v) (((v) & 0x0F) << 5) + uDWord bmAttributes; + uWord wFunctionalitySupport; + uWord wReserved; +} __packed; + +struct usb_devcap_ss_plus_descriptor { + struct usb_devcap_ss_plus_descriptor_header hdr; +#define USB_DEVCAP_SSPLUS_SSID_GET(x) ((x) & 0x0F) +#define USB_DEVCAP_SSPLUS_LSE_GET(x) (((x) >> 4) & 0x03) +#define USB_DEVCAP_SSPLUS_ST_GET(x) (((x) >> 6) & 0x03) +#define USB_DEVCAP_SSPLUS_LP_GET(x) (((x) >> 14) & 0x03) +#define USB_DEVCAP_SSPLUS_LP_SS 0 +#define USB_DEVCAP_SSPLUS_LP_SSP 1 +#define USB_DEVCAP_SSPLUS_LSM_GET(x) (((x) >> 16) & 0xFFFF) + uDWord bmSublinkSpeedAttr[]; +} __packed; +typedef struct usb_devcap_ss_plus_descriptor + usb_devcap_ss_plus_descriptor_t; + /* Device class codes */ #define UDCLASS_IN_INTERFACE 0x00 #define UDCLASS_COMM 0x02