usb/uas: add usb_pipe_usage_descriptor
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 11 Jan 2012 11:45:57 +0000 (12:45 +0100)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 30 Apr 2012 18:15:15 +0000 (19:15 +0100)
BugLink: http://bugs.launchpad.net/bugs/901215

usb_pipe_usage_descriptor defines the struct which is used to describe
the type of the endpoint in UAS (status/command/data in+out). It will be
used by the UAS gadget, the host code is using a char array for the
access.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
(cherry picked from commit ee398b59ec1dc3ce1d60518f4ea644907893414b)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Herton Krzesinski <herton.krzesinski@canonical.com>

include/linux/usb/uas.h

index 856be7f..9a988e4 100644 (file)
@@ -47,6 +47,14 @@ struct sense_iu {
        __u8 sense[SCSI_SENSE_BUFFERSIZE];
 };
 
+struct usb_pipe_usage_descriptor {
+       __u8  bLength;
+       __u8  bDescriptorType;
+
+       __u8  bPipeID;
+       __u8  Reserved;
+} __attribute__((__packed__));
+
 enum {
        CMD_PIPE_ID             = 1,
        STATUS_PIPE_ID          = 2,