diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2009-04-27 22:58:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-16 00:44:49 -0400 |
commit | 663c30d0829d556efabd5fbd98fb8473da7fe694 (patch) | |
tree | 1d2566aff3b6af6e05cf3a7a0fc1c1fb17bfe5db /include/linux/usb/ch9.h | |
parent | d0e96f5a71a032ced0c35f521c1cbd67e816922a (diff) |
USB: Parse and store the SuperSpeed endpoint companion descriptors.
The USB 3.0 bus specification added an "Endpoint Companion" descriptor that is
supposed to follow all SuperSpeed Endpoint descriptors. This descriptor is used
to extend the bus protocol to allow more packets to be sent to an endpoint per
"microframe". The word microframe was removed from the USB 3.0 specification
because the host controller does not send Start Of Frame (SOF) symbols down the
USB 3.0 wires.
The descriptor defines a bMaxBurst field, which indicates the number of packets
of wMaxPacketSize that a SuperSpeed device can send or recieve in a service
interval. All non-control endpoints may set this value as high as 16 packets
(bMaxBurst = 15).
The descriptor also allows isochronous endpoints to further specify that they
can send and receive multiple bursts per service interval. The bmAttributes
allows them to specify a "Mult" of up to 3 (bmAttributes = 2).
Bulk endpoints use bmAttributes to report the number of "Streams" they support.
This was an extension of the endpoint pipe concept to allow multiple mass
storage device commands to be outstanding for one bulk endpoint at a time. This
should allow USB 3.0 mass storage devices to support SCSI command queueing.
Bulk endpoints can say they support up to 2^16 (65,536) streams.
The information in the endpoint companion descriptor must be stored with the
other device, config, interface, and endpoint descriptors because the host
controller needs to access them quickly, and we need to install some default
values if a SuperSpeed device doesn't provide an endpoint companion descriptor.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb/ch9.h')
-rw-r--r-- | include/linux/usb/ch9.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 93bfe6352342..9e9c5c0a3d72 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -191,6 +191,8 @@ struct usb_ctrlrequest { | |||
191 | #define USB_DT_WIRE_ADAPTER 0x21 | 191 | #define USB_DT_WIRE_ADAPTER 0x21 |
192 | #define USB_DT_RPIPE 0x22 | 192 | #define USB_DT_RPIPE 0x22 |
193 | #define USB_DT_CS_RADIO_CONTROL 0x23 | 193 | #define USB_DT_CS_RADIO_CONTROL 0x23 |
194 | /* From the USB 3.0 spec */ | ||
195 | #define USB_DT_SS_ENDPOINT_COMP 0x30 | ||
194 | 196 | ||
195 | /* Conventional codes for class-specific descriptors. The convention is | 197 | /* Conventional codes for class-specific descriptors. The convention is |
196 | * defined in the USB "Common Class" Spec (3.11). Individual class specs | 198 | * defined in the USB "Common Class" Spec (3.11). Individual class specs |
@@ -535,6 +537,20 @@ static inline int usb_endpoint_is_isoc_out( | |||
535 | 537 | ||
536 | /*-------------------------------------------------------------------------*/ | 538 | /*-------------------------------------------------------------------------*/ |
537 | 539 | ||
540 | /* USB_DT_SS_ENDPOINT_COMP: SuperSpeed Endpoint Companion descriptor */ | ||
541 | struct usb_ep_comp_descriptor { | ||
542 | __u8 bLength; | ||
543 | __u8 bDescriptorType; | ||
544 | |||
545 | __u8 bMaxBurst; | ||
546 | __u8 bmAttributes; | ||
547 | __u16 wBytesPerInterval; | ||
548 | } __attribute__ ((packed)); | ||
549 | |||
550 | #define USB_DT_EP_COMP_SIZE 6 | ||
551 | |||
552 | /*-------------------------------------------------------------------------*/ | ||
553 | |||
538 | /* USB_DT_DEVICE_QUALIFIER: Device Qualifier descriptor */ | 554 | /* USB_DT_DEVICE_QUALIFIER: Device Qualifier descriptor */ |
539 | struct usb_qualifier_descriptor { | 555 | struct usb_qualifier_descriptor { |
540 | __u8 bLength; | 556 | __u8 bLength; |