aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/ch9.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/usb/ch9.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/linux/usb/ch9.h')
-rw-r--r--include/linux/usb/ch9.h84
1 files changed, 81 insertions, 3 deletions
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index da2ed77d3e8d..0fd3fbdd8283 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -123,8 +123,33 @@
123#define USB_DEVICE_A_ALT_HNP_SUPPORT 5 /* (otg) other RH port does */ 123#define USB_DEVICE_A_ALT_HNP_SUPPORT 5 /* (otg) other RH port does */
124#define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */ 124#define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */
125 125
126/*
127 * Test Mode Selectors
128 * See USB 2.0 spec Table 9-7
129 */
130#define TEST_J 1
131#define TEST_K 2
132#define TEST_SE0_NAK 3
133#define TEST_PACKET 4
134#define TEST_FORCE_EN 5
135
136/*
137 * New Feature Selectors as added by USB 3.0
138 * See USB 3.0 spec Table 9-6
139 */
140#define USB_DEVICE_U1_ENABLE 48 /* dev may initiate U1 transition */
141#define USB_DEVICE_U2_ENABLE 49 /* dev may initiate U2 transition */
142#define USB_DEVICE_LTM_ENABLE 50 /* dev may send LTM */
143#define USB_INTRF_FUNC_SUSPEND 0 /* function suspend */
144
145#define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00
146
126#define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */ 147#define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */
127 148
149/* Bit array elements as returned by the USB_REQ_GET_STATUS request. */
150#define USB_DEV_STAT_U1_ENABLED 2 /* transition into U1 state */
151#define USB_DEV_STAT_U2_ENABLED 3 /* transition into U2 state */
152#define USB_DEV_STAT_LTM_ENABLED 4 /* Latency tolerance messages */
128 153
129/** 154/**
130 * struct usb_ctrlrequest - SETUP data for a USB device control request 155 * struct usb_ctrlrequest - SETUP data for a USB device control request
@@ -554,12 +579,14 @@ struct usb_ss_ep_comp_descriptor {
554 579
555 __u8 bMaxBurst; 580 __u8 bMaxBurst;
556 __u8 bmAttributes; 581 __u8 bmAttributes;
557 __u16 wBytesPerInterval; 582 __le16 wBytesPerInterval;
558} __attribute__ ((packed)); 583} __attribute__ ((packed));
559 584
560#define USB_DT_SS_EP_COMP_SIZE 6 585#define USB_DT_SS_EP_COMP_SIZE 6
561/* Bits 4:0 of bmAttributes if this is a bulk endpoint */ 586/* Bits 4:0 of bmAttributes if this is a bulk endpoint */
562#define USB_SS_MAX_STREAMS(p) (1 << (p & 0x1f)) 587#define USB_SS_MAX_STREAMS(p) (1 << ((p) & 0x1f))
588/* Bits 1:0 of bmAttributes if this is an isoc endpoint */
589#define USB_SS_MULT(p) (1 + ((p) & 0x3))
563 590
564/*-------------------------------------------------------------------------*/ 591/*-------------------------------------------------------------------------*/
565 592
@@ -675,6 +702,7 @@ struct usb_bos_descriptor {
675 __u8 bNumDeviceCaps; 702 __u8 bNumDeviceCaps;
676} __attribute__((packed)); 703} __attribute__((packed));
677 704
705#define USB_DT_BOS_SIZE 5
678/*-------------------------------------------------------------------------*/ 706/*-------------------------------------------------------------------------*/
679 707
680/* USB_DT_DEVICE_CAPABILITY: grouped with BOS */ 708/* USB_DT_DEVICE_CAPABILITY: grouped with BOS */
@@ -712,16 +740,56 @@ struct usb_wireless_cap_descriptor { /* Ultra Wide Band */
712 __u8 bReserved; 740 __u8 bReserved;
713} __attribute__((packed)); 741} __attribute__((packed));
714 742
743/* USB 2.0 Extension descriptor */
715#define USB_CAP_TYPE_EXT 2 744#define USB_CAP_TYPE_EXT 2
716 745
717struct usb_ext_cap_descriptor { /* Link Power Management */ 746struct usb_ext_cap_descriptor { /* Link Power Management */
718 __u8 bLength; 747 __u8 bLength;
719 __u8 bDescriptorType; 748 __u8 bDescriptorType;
720 __u8 bDevCapabilityType; 749 __u8 bDevCapabilityType;
721 __u8 bmAttributes; 750 __le32 bmAttributes;
722#define USB_LPM_SUPPORT (1 << 1) /* supports LPM */ 751#define USB_LPM_SUPPORT (1 << 1) /* supports LPM */
723} __attribute__((packed)); 752} __attribute__((packed));
724 753
754#define USB_DT_USB_EXT_CAP_SIZE 7
755
756/*
757 * SuperSpeed USB Capability descriptor: Defines the set of SuperSpeed USB
758 * specific device level capabilities
759 */
760#define USB_SS_CAP_TYPE 3
761struct usb_ss_cap_descriptor { /* Link Power Management */
762 __u8 bLength;
763 __u8 bDescriptorType;
764 __u8 bDevCapabilityType;
765 __u8 bmAttributes;
766#define USB_LTM_SUPPORT (1 << 1) /* supports LTM */
767 __le16 wSpeedSupported;
768#define USB_LOW_SPEED_OPERATION (1) /* Low speed operation */
769#define USB_FULL_SPEED_OPERATION (1 << 1) /* Full speed operation */
770#define USB_HIGH_SPEED_OPERATION (1 << 2) /* High speed operation */
771#define USB_5GBPS_OPERATION (1 << 3) /* Operation at 5Gbps */
772 __u8 bFunctionalitySupport;
773 __u8 bU1devExitLat;
774 __le16 bU2DevExitLat;
775} __attribute__((packed));
776
777#define USB_DT_USB_SS_CAP_SIZE 10
778
779/*
780 * Container ID Capability descriptor: Defines the instance unique ID used to
781 * identify the instance across all operating modes
782 */
783#define CONTAINER_ID_TYPE 4
784struct usb_ss_container_id_descriptor {
785 __u8 bLength;
786 __u8 bDescriptorType;
787 __u8 bDevCapabilityType;
788 __u8 bReserved;
789 __u8 ContainerID[16]; /* 128-bit number */
790} __attribute__((packed));
791
792#define USB_DT_USB_SS_CONTN_ID_SIZE 20
725/*-------------------------------------------------------------------------*/ 793/*-------------------------------------------------------------------------*/
726 794
727/* USB_DT_WIRELESS_ENDPOINT_COMP: companion descriptor associated with 795/* USB_DT_WIRELESS_ENDPOINT_COMP: companion descriptor associated with
@@ -808,4 +876,14 @@ enum usb_device_state {
808 */ 876 */
809}; 877};
810 878
879/*-------------------------------------------------------------------------*/
880
881/*
882 * As per USB compliance update, a device that is actively drawing
883 * more than 100mA from USB must report itself as bus-powered in
884 * the GetStatus(DEVICE) call.
885 * http://compliance.usb.org/index.asp?UpdateFile=Electrical&Format=Standard#34
886 */
887#define USB_SELF_POWER_VBUS_MAX_DRAW 100
888
811#endif /* __LINUX_USB_CH9_H */ 889#endif /* __LINUX_USB_CH9_H */