Merge tag 'usb-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patches from Greg KH: "Here's the big USB pull request for 3.15-rc1. The normal set of patches, lots of controller driver updates, and a smattering of individual USB driver updates as well. All have been in linux-next for a while" * tag 'usb-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (249 commits) xhci: Transition maintainership to Mathias Nyman. USB: disable reset-resume when USB_QUIRK_RESET is set USB: unbind all interfaces before rebinding any usb: phy: Add ulpi IDs for SMSC USB3320 and TI TUSB1210 usb: gadget: tcm_usb_gadget: stop format strings usb: gadget: f_fs: add missing spinlock and mutex unlock usb: gadget: composite: switch over to ERR_CAST() usb: gadget: inode: switch over to memdup_user() usb: gadget: f_subset: switch over to PTR_RET usb: gadget: lpc32xx_udc: fix wrong clk_put() sequence USB: keyspan: remove dead debugging code USB: serial: add missing newlines to dev_<level> messages. USB: serial: add missing braces USB: serial: continue to write on errors USB: serial: continue to read on errors USB: serial: make bulk_out_size a lower limit USB: cypress_m8: fix potential scheduling while atomic devicetree: bindings: document lsi,zevio-usb usb: chipidea: add support for USB OTG controller on LSI Zevio SoCs usb: chipidea: imx: Use dev_name() for ci_hdrc name to distinguish USBs ...
This commit is contained in:
@@ -10,9 +10,15 @@
|
||||
|
||||
enum {
|
||||
FUNCTIONFS_DESCRIPTORS_MAGIC = 1,
|
||||
FUNCTIONFS_STRINGS_MAGIC = 2
|
||||
FUNCTIONFS_STRINGS_MAGIC = 2,
|
||||
FUNCTIONFS_DESCRIPTORS_MAGIC_V2 = 3,
|
||||
};
|
||||
|
||||
enum functionfs_flags {
|
||||
FUNCTIONFS_HAS_FS_DESC = 1,
|
||||
FUNCTIONFS_HAS_HS_DESC = 2,
|
||||
FUNCTIONFS_HAS_SS_DESC = 4,
|
||||
};
|
||||
|
||||
#ifndef __KERNEL__
|
||||
|
||||
@@ -28,30 +34,40 @@ struct usb_endpoint_descriptor_no_audio {
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
/*
|
||||
* All numbers must be in little endian order.
|
||||
*/
|
||||
|
||||
struct usb_functionfs_descs_head {
|
||||
__le32 magic;
|
||||
__le32 length;
|
||||
__le32 fs_count;
|
||||
__le32 hs_count;
|
||||
} __attribute__((packed));
|
||||
|
||||
/*
|
||||
* Descriptors format:
|
||||
*
|
||||
* | off | name | type | description |
|
||||
* |-----+-----------+--------------+--------------------------------------|
|
||||
* | 0 | magic | LE32 | FUNCTIONFS_{FS,HS}_DESCRIPTORS_MAGIC |
|
||||
* | 0 | magic | LE32 | FUNCTIONFS_DESCRIPTORS_MAGIC_V2 |
|
||||
* | 4 | length | LE32 | length of the whole data chunk |
|
||||
* | 8 | flags | LE32 | combination of functionfs_flags |
|
||||
* | | fs_count | LE32 | number of full-speed descriptors |
|
||||
* | | hs_count | LE32 | number of high-speed descriptors |
|
||||
* | | ss_count | LE32 | number of super-speed descriptors |
|
||||
* | | fs_descrs | Descriptor[] | list of full-speed descriptors |
|
||||
* | | hs_descrs | Descriptor[] | list of high-speed descriptors |
|
||||
* | | ss_descrs | Descriptor[] | list of super-speed descriptors |
|
||||
*
|
||||
* Depending on which flags are set, various fields may be missing in the
|
||||
* structure. Any flags that are not recognised cause the whole block to be
|
||||
* rejected with -ENOSYS.
|
||||
*
|
||||
* Legacy descriptors format:
|
||||
*
|
||||
* | off | name | type | description |
|
||||
* |-----+-----------+--------------+--------------------------------------|
|
||||
* | 0 | magic | LE32 | FUNCTIONFS_DESCRIPTORS_MAGIC |
|
||||
* | 4 | length | LE32 | length of the whole data chunk |
|
||||
* | 8 | fs_count | LE32 | number of full-speed descriptors |
|
||||
* | 12 | hs_count | LE32 | number of high-speed descriptors |
|
||||
* | 16 | fs_descrs | Descriptor[] | list of full-speed descriptors |
|
||||
* | | hs_descrs | Descriptor[] | list of high-speed descriptors |
|
||||
*
|
||||
* descs are just valid USB descriptors and have the following format:
|
||||
* All numbers must be in little endian order.
|
||||
*
|
||||
* Descriptor[] is an array of valid USB descriptors which have the following
|
||||
* format:
|
||||
*
|
||||
* | off | name | type | description |
|
||||
* |-----+-----------------+------+--------------------------|
|
||||
|
@@ -102,7 +102,10 @@ struct usbdevfs_urb {
|
||||
int buffer_length;
|
||||
int actual_length;
|
||||
int start_frame;
|
||||
int number_of_packets;
|
||||
union {
|
||||
int number_of_packets; /* Only used for isoc urbs */
|
||||
unsigned int stream_id; /* Only used with bulk streams */
|
||||
};
|
||||
int error_count;
|
||||
unsigned int signr; /* signal to be sent on completion,
|
||||
or 0 if none should be sent. */
|
||||
@@ -144,6 +147,11 @@ struct usbdevfs_disconnect_claim {
|
||||
char driver[USBDEVFS_MAXDRIVERNAME + 1];
|
||||
};
|
||||
|
||||
struct usbdevfs_streams {
|
||||
unsigned int num_streams; /* Not used by USBDEVFS_FREE_STREAMS */
|
||||
unsigned int num_eps;
|
||||
unsigned char eps[0];
|
||||
};
|
||||
|
||||
#define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer)
|
||||
#define USBDEVFS_CONTROL32 _IOWR('U', 0, struct usbdevfs_ctrltransfer32)
|
||||
@@ -176,5 +184,7 @@ struct usbdevfs_disconnect_claim {
|
||||
#define USBDEVFS_RELEASE_PORT _IOR('U', 25, unsigned int)
|
||||
#define USBDEVFS_GET_CAPABILITIES _IOR('U', 26, __u32)
|
||||
#define USBDEVFS_DISCONNECT_CLAIM _IOR('U', 27, struct usbdevfs_disconnect_claim)
|
||||
#define USBDEVFS_ALLOC_STREAMS _IOR('U', 28, struct usbdevfs_streams)
|
||||
#define USBDEVFS_FREE_STREAMS _IOR('U', 29, struct usbdevfs_streams)
|
||||
|
||||
#endif /* _UAPI_LINUX_USBDEVICE_FS_H */
|
||||
|
Reference in New Issue
Block a user