diff options
author | hselasky <hselasky@FreeBSD.org> | 2012-04-02 07:51:30 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2012-04-02 07:51:30 +0000 |
commit | 0a4ce326a73bdc8b6b96ff8028c64860d1e775f1 (patch) | |
tree | ac77863678e77055eb470d5ecf0682d535b8f568 /sys/dev/usb/usb.h | |
parent | 6dfa60e0bf7108729fa98dcc5d5a4f38a306ea03 (diff) | |
download | FreeBSD-src-0a4ce326a73bdc8b6b96ff8028c64860d1e775f1.zip FreeBSD-src-0a4ce326a73bdc8b6b96ff8028c64860d1e775f1.tar.gz |
Add definitions and structures for USB 2.0 Link Power Management, LPM.
MFC after: 2 weeks
Diffstat (limited to 'sys/dev/usb/usb.h')
-rw-r--r-- | sys/dev/usb/usb.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index eac2762..38ddc2d 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -225,7 +225,8 @@ typedef struct usb_device_request usb_device_request_t; #define UR_RESET_TT 0x09 #define UR_GET_TT_STATE 0x0a #define UR_STOP_TT 0x0b -#define UR_SET_HUB_DEPTH 0x0c +#define UR_SET_AND_TEST 0x0c /* USB 2.0 only */ +#define UR_SET_HUB_DEPTH 0x0c /* USB 3.0 only */ #define USB_SS_HUB_DEPTH_MAX 5 #define UR_GET_PORT_ERR_COUNT 0x0d @@ -248,6 +249,7 @@ typedef struct usb_device_request usb_device_request_t; #define UHF_PORT_LINK_STATE 5 #define UHF_PORT_POWER 8 #define UHF_PORT_LOW_SPEED 9 +#define UHF_PORT_L1 10 #define UHF_C_PORT_CONNECTION 16 #define UHF_C_PORT_ENABLE 17 #define UHF_C_PORT_SUSPEND 18 @@ -255,6 +257,7 @@ typedef struct usb_device_request usb_device_request_t; #define UHF_C_PORT_RESET 20 #define UHF_PORT_TEST 21 #define UHF_PORT_INDICATOR 22 +#define UHF_C_PORT_L1 23 /* SuperSpeed HUB specific features */ #define UHF_PORT_U1_TIMEOUT 23 @@ -324,7 +327,12 @@ struct usb_devcap_usb2ext_descriptor { uByte bDescriptorType; uByte bDevCapabilityType; uDWord bmAttributes; -#define USB_V2EXT_LPM 0x02 +#define USB_V2EXT_LPM (1U << 1) +#define USB_V2EXT_BESL_SUPPORTED (1U << 2) +#define USB_V2EXT_BESL_BASELINE_VALID (1U << 3) +#define USB_V2EXT_BESL_DEEP_VALID (1U << 4) +#define USB_V2EXT_BESL_BASELINE_GET(x) (((x) >> 8) & 0xF) +#define USB_V2EXT_BESL_DEEP_GET(x) (((x) >> 12) & 0xF) } __packed; typedef struct usb_devcap_usb2ext_descriptor usb_devcap_usb2ext_descriptor_t; @@ -671,6 +679,7 @@ struct usb_port_status { #define UPS_SUSPEND 0x0004 #define UPS_OVERCURRENT_INDICATOR 0x0008 #define UPS_RESET 0x0010 +#define UPS_PORT_L1 0x0020 /* USB 2.0 only */ /* The link-state bits are valid for Super-Speed USB HUBs */ #define UPS_PORT_LINK_STATE_GET(x) (((x) >> 5) & 0xF) #define UPS_PORT_LINK_STATE_SET(x) (((x) & 0xF) << 5) @@ -701,7 +710,8 @@ struct usb_port_status { #define UPS_C_SUSPEND 0x0004 #define UPS_C_OVERCURRENT_INDICATOR 0x0008 #define UPS_C_PORT_RESET 0x0010 -#define UPS_C_BH_PORT_RESET 0x0020 +#define UPS_C_PORT_L1 0x0020 /* USB 2.0 only */ +#define UPS_C_BH_PORT_RESET 0x0020 /* USB 3.0 only */ #define UPS_C_PORT_LINK_STATE 0x0040 #define UPS_C_PORT_CONFIG_ERROR 0x0080 } __packed; |