diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:26:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:26:12 -0400 |
commit | 7a9b149212f3716c598afe973b6261fd58453b7a (patch) | |
tree | 477716d84c71da124448b72278e98da28aadbd3d /include/linux/usb/cdc.h | |
parent | 3d62e3fdce8ef265a3706c52ae1ca6ab84e30f0e (diff) | |
parent | e26bcf37234c67624f62d9fc95f922b8dbda1363 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits)
USB: remove unused usb_buffer_alloc and usb_buffer_free macros
usb: musb: update gfp/slab.h includes
USB: ftdi_sio: fix legacy SIO-device header
USB: kl5usb105: reimplement using generic framework
USB: kl5usb105: minor clean ups
USB: kl5usb105: fix memory leak
USB: io_ti: use kfifo to implement write buffering
USB: io_ti: remove unsused private counter
USB: ti_usb: use kfifo to implement write buffering
USB: ir-usb: fix incorrect write-buffer length
USB: aircable: fix incorrect write-buffer length
USB: safe_serial: straighten out read processing
USB: safe_serial: reimplement read using generic framework
USB: safe_serial: reimplement write using generic framework
usb-storage: always print quirks
USB: usb-storage: trivial debug improvements
USB: oti6858: use port write fifo
USB: oti6858: use kfifo to implement write buffering
USB: cypress_m8: use kfifo to implement write buffering
USB: cypress_m8: remove unused drain define
...
Fix up conflicts (due to usb_buffer_alloc/free renaming) in
drivers/input/tablet/acecad.c
drivers/input/tablet/kbtab.c
drivers/input/tablet/wacom_sys.c
drivers/media/video/gspca/gspca.c
sound/usb/usbaudio.c
Diffstat (limited to 'include/linux/usb/cdc.h')
-rw-r--r-- | include/linux/usb/cdc.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index c24124a42ce5..c117a68d04a7 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define USB_CDC_SUBCLASS_MDLM 0x0a | 18 | #define USB_CDC_SUBCLASS_MDLM 0x0a |
19 | #define USB_CDC_SUBCLASS_OBEX 0x0b | 19 | #define USB_CDC_SUBCLASS_OBEX 0x0b |
20 | #define USB_CDC_SUBCLASS_EEM 0x0c | 20 | #define USB_CDC_SUBCLASS_EEM 0x0c |
21 | #define USB_CDC_SUBCLASS_NCM 0x0d | ||
21 | 22 | ||
22 | #define USB_CDC_PROTO_NONE 0 | 23 | #define USB_CDC_PROTO_NONE 0 |
23 | 24 | ||
@@ -49,6 +50,7 @@ | |||
49 | #define USB_CDC_MDLM_DETAIL_TYPE 0x13 /* mdlm_detail_desc */ | 50 | #define USB_CDC_MDLM_DETAIL_TYPE 0x13 /* mdlm_detail_desc */ |
50 | #define USB_CDC_DMM_TYPE 0x14 | 51 | #define USB_CDC_DMM_TYPE 0x14 |
51 | #define USB_CDC_OBEX_TYPE 0x15 | 52 | #define USB_CDC_OBEX_TYPE 0x15 |
53 | #define USB_CDC_NCM_TYPE 0x1a | ||
52 | 54 | ||
53 | /* "Header Functional Descriptor" from CDC spec 5.2.3.1 */ | 55 | /* "Header Functional Descriptor" from CDC spec 5.2.3.1 */ |
54 | struct usb_cdc_header_desc { | 56 | struct usb_cdc_header_desc { |
@@ -174,6 +176,15 @@ struct usb_cdc_obex_desc { | |||
174 | __le16 bcdVersion; | 176 | __le16 bcdVersion; |
175 | } __attribute__ ((packed)); | 177 | } __attribute__ ((packed)); |
176 | 178 | ||
179 | /* "NCM Control Model Functional Descriptor" */ | ||
180 | struct usb_cdc_ncm_desc { | ||
181 | __u8 bLength; | ||
182 | __u8 bDescriptorType; | ||
183 | __u8 bDescriptorSubType; | ||
184 | |||
185 | __le16 bcdNcmVersion; | ||
186 | __u8 bmNetworkCapabilities; | ||
187 | } __attribute__ ((packed)); | ||
177 | /*-------------------------------------------------------------------------*/ | 188 | /*-------------------------------------------------------------------------*/ |
178 | 189 | ||
179 | /* | 190 | /* |
@@ -197,6 +208,17 @@ struct usb_cdc_obex_desc { | |||
197 | #define USB_CDC_GET_ETHERNET_PM_PATTERN_FILTER 0x42 | 208 | #define USB_CDC_GET_ETHERNET_PM_PATTERN_FILTER 0x42 |
198 | #define USB_CDC_SET_ETHERNET_PACKET_FILTER 0x43 | 209 | #define USB_CDC_SET_ETHERNET_PACKET_FILTER 0x43 |
199 | #define USB_CDC_GET_ETHERNET_STATISTIC 0x44 | 210 | #define USB_CDC_GET_ETHERNET_STATISTIC 0x44 |
211 | #define USB_CDC_GET_NTB_PARAMETERS 0x80 | ||
212 | #define USB_CDC_GET_NET_ADDRESS 0x81 | ||
213 | #define USB_CDC_SET_NET_ADDRESS 0x82 | ||
214 | #define USB_CDC_GET_NTB_FORMAT 0x83 | ||
215 | #define USB_CDC_SET_NTB_FORMAT 0x84 | ||
216 | #define USB_CDC_GET_NTB_INPUT_SIZE 0x85 | ||
217 | #define USB_CDC_SET_NTB_INPUT_SIZE 0x86 | ||
218 | #define USB_CDC_GET_MAX_DATAGRAM_SIZE 0x87 | ||
219 | #define USB_CDC_SET_MAX_DATAGRAM_SIZE 0x88 | ||
220 | #define USB_CDC_GET_CRC_MODE 0x89 | ||
221 | #define USB_CDC_SET_CRC_MODE 0x8a | ||
200 | 222 | ||
201 | /* Line Coding Structure from CDC spec 6.2.13 */ | 223 | /* Line Coding Structure from CDC spec 6.2.13 */ |
202 | struct usb_cdc_line_coding { | 224 | struct usb_cdc_line_coding { |
@@ -247,4 +269,76 @@ struct usb_cdc_notification { | |||
247 | __le16 wLength; | 269 | __le16 wLength; |
248 | } __attribute__ ((packed)); | 270 | } __attribute__ ((packed)); |
249 | 271 | ||
272 | /*-------------------------------------------------------------------------*/ | ||
273 | |||
274 | /* | ||
275 | * Class Specific structures and constants | ||
276 | * | ||
277 | * CDC NCM parameter structure, CDC NCM subclass 6.2.1 | ||
278 | * | ||
279 | */ | ||
280 | |||
281 | struct usb_cdc_ncm_ntb_parameter { | ||
282 | __le16 wLength; | ||
283 | __le16 bmNtbFormatSupported; | ||
284 | __le32 dwNtbInMaxSize; | ||
285 | __le16 wNdpInDivisor; | ||
286 | __le16 wNdpInPayloadRemainder; | ||
287 | __le16 wNdpInAlignment; | ||
288 | __le16 wPadding1; | ||
289 | __le32 dwNtbOutMaxSize; | ||
290 | __le16 wNdpOutDivisor; | ||
291 | __le16 wNdpOutPayloadRemainder; | ||
292 | __le16 wNdpOutAlignment; | ||
293 | __le16 wPadding2; | ||
294 | } __attribute__ ((packed)); | ||
295 | |||
296 | /* | ||
297 | * CDC NCM transfer headers, CDC NCM subclass 3.2 | ||
298 | */ | ||
299 | |||
300 | #define NCM_NTH16_SIGN 0x484D434E /* NCMH */ | ||
301 | #define NCM_NTH32_SIGN 0x686D636E /* ncmh */ | ||
302 | |||
303 | struct usb_cdc_ncm_nth16 { | ||
304 | __le32 dwSignature; | ||
305 | __le16 wHeaderLength; | ||
306 | __le16 wSequence; | ||
307 | __le16 wBlockLength; | ||
308 | __le16 wFpIndex; | ||
309 | } __attribute__ ((packed)); | ||
310 | |||
311 | struct usb_cdc_ncm_nth32 { | ||
312 | __le32 dwSignature; | ||
313 | __le16 wHeaderLength; | ||
314 | __le16 wSequence; | ||
315 | __le32 dwBlockLength; | ||
316 | __le32 dwFpIndex; | ||
317 | } __attribute__ ((packed)); | ||
318 | |||
319 | /* | ||
320 | * CDC NCM datagram pointers, CDC NCM subclass 3.3 | ||
321 | */ | ||
322 | |||
323 | #define NCM_NDP16_CRC_SIGN 0x314D434E /* NCM1 */ | ||
324 | #define NCM_NDP16_NOCRC_SIGN 0x304D434E /* NCM0 */ | ||
325 | #define NCM_NDP32_CRC_SIGN 0x316D636E /* ncm1 */ | ||
326 | #define NCM_NDP32_NOCRC_SIGN 0x306D636E /* ncm0 */ | ||
327 | |||
328 | struct usb_cdc_ncm_ndp16 { | ||
329 | __le32 dwSignature; | ||
330 | __le16 wLength; | ||
331 | __le16 wNextFpIndex; | ||
332 | __u8 data[0]; | ||
333 | } __attribute__ ((packed)); | ||
334 | |||
335 | struct usb_cdc_ncm_ndp32 { | ||
336 | __le32 dwSignature; | ||
337 | __le16 wLength; | ||
338 | __le16 wReserved6; | ||
339 | __le32 dwNextFpIndex; | ||
340 | __le32 dwReserved12; | ||
341 | __u8 data[0]; | ||
342 | } __attribute__ ((packed)); | ||
343 | |||
250 | #endif /* __LINUX_USB_CDC_H */ | 344 | #endif /* __LINUX_USB_CDC_H */ |