History

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 ...

Linus Torvalds committed 12 years ago

Commit 3e75c6d2 parents cb15955 940ab8f156 files · +9148 −2183Browse files

Showing the changes to include/uapi/linux (2 of 156 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/usb/functionfs.h +30 −14
  2. include/uapi/linux/usbdevice_fs.h +11 −1
include/uapi/linux/usb/functionfs.h+30−14
@@ -10,9 +10,15 @@ · 9 unmodified lines
1010
1111 enum {
1212 FUNCTIONFS_DESCRIPTORS_MAGIC = 1,
13− FUNCTIONFS_STRINGS_MAGIC = 2
13+ FUNCTIONFS_STRINGS_MAGIC = 2,
14+ FUNCTIONFS_DESCRIPTORS_MAGIC_V2 = 3,
1415 };
1516
17+enum functionfs_flags {
18+ FUNCTIONFS_HAS_FS_DESC = 1,
19+ FUNCTIONFS_HAS_HS_DESC = 2,
20+ FUNCTIONFS_HAS_SS_DESC = 4,
21+};
1622
1723 #ifndef __KERNEL__
1824
@@ -28,30 +34,40 @@ struct usb_endpoint_descriptor_no_audio { · 9 unmodified lines
2834 } __attribute__((packed));
2935
3036
31−/*
32− * All numbers must be in little endian order.
33− */
34−
35−struct usb_functionfs_descs_head {
36− __le32 magic;
37− __le32 length;
38− __le32 fs_count;
39− __le32 hs_count;
40−} __attribute__((packed));
41−
4237 /*
4338 * Descriptors format:
4439 *
4540 * | off | name | type | description |
4641 * |-----+-----------+--------------+--------------------------------------|
47− * | 0 | magic | LE32 | FUNCTIONFS_{FS,HS}_DESCRIPTORS_MAGIC |
42+ * | 0 | magic | LE32 | FUNCTIONFS_DESCRIPTORS_MAGIC_V2 |
43+ * | 4 | length | LE32 | length of the whole data chunk |
44+ * | 8 | flags | LE32 | combination of functionfs_flags |
45+ * | | fs_count | LE32 | number of full-speed descriptors |
46+ * | | hs_count | LE32 | number of high-speed descriptors |
47+ * | | ss_count | LE32 | number of super-speed descriptors |
48+ * | | fs_descrs | Descriptor[] | list of full-speed descriptors |
49+ * | | hs_descrs | Descriptor[] | list of high-speed descriptors |
50+ * | | ss_descrs | Descriptor[] | list of super-speed descriptors |
51+ *
52+ * Depending on which flags are set, various fields may be missing in the
53+ * structure. Any flags that are not recognised cause the whole block to be
54+ * rejected with -ENOSYS.
55+ *
56+ * Legacy descriptors format:
57+ *
58+ * | off | name | type | description |
59+ * |-----+-----------+--------------+--------------------------------------|
60+ * | 0 | magic | LE32 | FUNCTIONFS_DESCRIPTORS_MAGIC |
4861 * | 4 | length | LE32 | length of the whole data chunk |
4962 * | 8 | fs_count | LE32 | number of full-speed descriptors |
5063 * | 12 | hs_count | LE32 | number of high-speed descriptors |
5164 * | 16 | fs_descrs | Descriptor[] | list of full-speed descriptors |
5265 * | | hs_descrs | Descriptor[] | list of high-speed descriptors |
5366 *
54− * descs are just valid USB descriptors and have the following format:
67+ * All numbers must be in little endian order.
68+ *
69+ * Descriptor[] is an array of valid USB descriptors which have the following
70+ * format:
5571 *
5672 * | off | name | type | description |
5773 * |-----+-----------------+------+--------------------------|
include/uapi/linux/usbdevice_fs.h+11−1
@@ -102,7 +102,10 @@ struct usbdevfs_urb { · 101 unmodified lines
102102 int buffer_length;
103103 int actual_length;
104104 int start_frame;
105− int number_of_packets;
105+ union {
106+ int number_of_packets; /* Only used for isoc urbs */
107+ unsigned int stream_id; /* Only used with bulk streams */
108+ };
106109 int error_count;
107110 unsigned int signr; /* signal to be sent on completion,
108111 or 0 if none should be sent. */
@@ -144,6 +147,11 @@ struct usbdevfs_disconnect_claim { · 35 unmodified lines
144147 char driver[USBDEVFS_MAXDRIVERNAME + 1];
145148 };
146149
150+struct usbdevfs_streams {
151+ unsigned int num_streams; /* Not used by USBDEVFS_FREE_STREAMS */
152+ unsigned int num_eps;
153+ unsigned char eps[0];
154+};
147155
148156 #define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer)
149157 #define USBDEVFS_CONTROL32 _IOWR('U', 0, struct usbdevfs_ctrltransfer32)
@@ -176,5 +184,7 @@ struct usbdevfs_disconnect_claim { · 26 unmodified lines
176184 #define USBDEVFS_RELEASE_PORT _IOR('U', 25, unsigned int)
177185 #define USBDEVFS_GET_CAPABILITIES _IOR('U', 26, __u32)
178186 #define USBDEVFS_DISCONNECT_CLAIM _IOR('U', 27, struct usbdevfs_disconnect_claim)
187+#define USBDEVFS_ALLOC_STREAMS _IOR('U', 28, struct usbdevfs_streams)
188+#define USBDEVFS_FREE_STREAMS _IOR('U', 29, struct usbdevfs_streams)
179189
180190 #endif /* _UAPI_LINUX_USBDEVICE_FS_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t