mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
usb: Add SSPlus device capability descriptor
Add the SuperSpeedPlus USB Device Capability descriptor and its field macros. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57203
This commit is contained in:
1 parent
2f79adc289
commit
23ef0bdb48
1 file changed
+28
@@ -331,6 +331,7 @@ struct usb_bos_cap_descriptor {
|
||||
#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 @@ struct usb_devcap_container_id_descriptor {
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user