diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-04-07 05:15:40 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-07 05:15:40 -0400 |
commit | 5e34437840d33554f69380584311743b39e8fbeb (patch) | |
tree | e081135619ee146af5efb9ee883afca950df5757 /include/linux/usb | |
parent | 77d05632baee21b1cef8730d7c06aa69601e4dca (diff) | |
parent | d508afb437daee7cf07da085b635c44a4ebf9b38 (diff) |
Merge branch 'linus' into core/softlockup
Conflicts:
kernel/sysctl.c
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/ch9.h | 183 | ||||
-rw-r--r-- | include/linux/usb/composite.h | 8 | ||||
-rw-r--r-- | include/linux/usb/gadget.h | 6 | ||||
-rw-r--r-- | include/linux/usb/otg.h | 8 | ||||
-rw-r--r-- | include/linux/usb/quirks.h | 3 | ||||
-rw-r--r-- | include/linux/usb/rndis_host.h | 85 | ||||
-rw-r--r-- | include/linux/usb/serial.h | 3 | ||||
-rw-r--r-- | include/linux/usb/usbnet.h | 5 | ||||
-rw-r--r-- | include/linux/usb/wusb.h | 3 |
9 files changed, 253 insertions, 51 deletions
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 9b42baed3900..b145119a90da 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -102,7 +102,7 @@ | |||
102 | #define USB_REQ_LOOPBACK_DATA_READ 0x16 | 102 | #define USB_REQ_LOOPBACK_DATA_READ 0x16 |
103 | #define USB_REQ_SET_INTERFACE_DS 0x17 | 103 | #define USB_REQ_SET_INTERFACE_DS 0x17 |
104 | 104 | ||
105 | /* The Link Power Mangement (LPM) ECN defines USB_REQ_TEST_AND_SET command, | 105 | /* The Link Power Management (LPM) ECN defines USB_REQ_TEST_AND_SET command, |
106 | * used by hubs to put ports into a new L1 suspend state, except that it | 106 | * used by hubs to put ports into a new L1 suspend state, except that it |
107 | * forgot to define its number ... | 107 | * forgot to define its number ... |
108 | */ | 108 | */ |
@@ -353,6 +353,185 @@ struct usb_endpoint_descriptor { | |||
353 | #define USB_ENDPOINT_XFER_INT 3 | 353 | #define USB_ENDPOINT_XFER_INT 3 |
354 | #define USB_ENDPOINT_MAX_ADJUSTABLE 0x80 | 354 | #define USB_ENDPOINT_MAX_ADJUSTABLE 0x80 |
355 | 355 | ||
356 | /*-------------------------------------------------------------------------*/ | ||
357 | |||
358 | /** | ||
359 | * usb_endpoint_num - get the endpoint's number | ||
360 | * @epd: endpoint to be checked | ||
361 | * | ||
362 | * Returns @epd's number: 0 to 15. | ||
363 | */ | ||
364 | static inline int usb_endpoint_num(const struct usb_endpoint_descriptor *epd) | ||
365 | { | ||
366 | return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; | ||
367 | } | ||
368 | |||
369 | /** | ||
370 | * usb_endpoint_type - get the endpoint's transfer type | ||
371 | * @epd: endpoint to be checked | ||
372 | * | ||
373 | * Returns one of USB_ENDPOINT_XFER_{CONTROL, ISOC, BULK, INT} according | ||
374 | * to @epd's transfer type. | ||
375 | */ | ||
376 | static inline int usb_endpoint_type(const struct usb_endpoint_descriptor *epd) | ||
377 | { | ||
378 | return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; | ||
379 | } | ||
380 | |||
381 | /** | ||
382 | * usb_endpoint_dir_in - check if the endpoint has IN direction | ||
383 | * @epd: endpoint to be checked | ||
384 | * | ||
385 | * Returns true if the endpoint is of type IN, otherwise it returns false. | ||
386 | */ | ||
387 | static inline int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) | ||
388 | { | ||
389 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN); | ||
390 | } | ||
391 | |||
392 | /** | ||
393 | * usb_endpoint_dir_out - check if the endpoint has OUT direction | ||
394 | * @epd: endpoint to be checked | ||
395 | * | ||
396 | * Returns true if the endpoint is of type OUT, otherwise it returns false. | ||
397 | */ | ||
398 | static inline int usb_endpoint_dir_out( | ||
399 | const struct usb_endpoint_descriptor *epd) | ||
400 | { | ||
401 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT); | ||
402 | } | ||
403 | |||
404 | /** | ||
405 | * usb_endpoint_xfer_bulk - check if the endpoint has bulk transfer type | ||
406 | * @epd: endpoint to be checked | ||
407 | * | ||
408 | * Returns true if the endpoint is of type bulk, otherwise it returns false. | ||
409 | */ | ||
410 | static inline int usb_endpoint_xfer_bulk( | ||
411 | const struct usb_endpoint_descriptor *epd) | ||
412 | { | ||
413 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
414 | USB_ENDPOINT_XFER_BULK); | ||
415 | } | ||
416 | |||
417 | /** | ||
418 | * usb_endpoint_xfer_control - check if the endpoint has control transfer type | ||
419 | * @epd: endpoint to be checked | ||
420 | * | ||
421 | * Returns true if the endpoint is of type control, otherwise it returns false. | ||
422 | */ | ||
423 | static inline int usb_endpoint_xfer_control( | ||
424 | const struct usb_endpoint_descriptor *epd) | ||
425 | { | ||
426 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
427 | USB_ENDPOINT_XFER_CONTROL); | ||
428 | } | ||
429 | |||
430 | /** | ||
431 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type | ||
432 | * @epd: endpoint to be checked | ||
433 | * | ||
434 | * Returns true if the endpoint is of type interrupt, otherwise it returns | ||
435 | * false. | ||
436 | */ | ||
437 | static inline int usb_endpoint_xfer_int( | ||
438 | const struct usb_endpoint_descriptor *epd) | ||
439 | { | ||
440 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
441 | USB_ENDPOINT_XFER_INT); | ||
442 | } | ||
443 | |||
444 | /** | ||
445 | * usb_endpoint_xfer_isoc - check if the endpoint has isochronous transfer type | ||
446 | * @epd: endpoint to be checked | ||
447 | * | ||
448 | * Returns true if the endpoint is of type isochronous, otherwise it returns | ||
449 | * false. | ||
450 | */ | ||
451 | static inline int usb_endpoint_xfer_isoc( | ||
452 | const struct usb_endpoint_descriptor *epd) | ||
453 | { | ||
454 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
455 | USB_ENDPOINT_XFER_ISOC); | ||
456 | } | ||
457 | |||
458 | /** | ||
459 | * usb_endpoint_is_bulk_in - check if the endpoint is bulk IN | ||
460 | * @epd: endpoint to be checked | ||
461 | * | ||
462 | * Returns true if the endpoint has bulk transfer type and IN direction, | ||
463 | * otherwise it returns false. | ||
464 | */ | ||
465 | static inline int usb_endpoint_is_bulk_in( | ||
466 | const struct usb_endpoint_descriptor *epd) | ||
467 | { | ||
468 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd)); | ||
469 | } | ||
470 | |||
471 | /** | ||
472 | * usb_endpoint_is_bulk_out - check if the endpoint is bulk OUT | ||
473 | * @epd: endpoint to be checked | ||
474 | * | ||
475 | * Returns true if the endpoint has bulk transfer type and OUT direction, | ||
476 | * otherwise it returns false. | ||
477 | */ | ||
478 | static inline int usb_endpoint_is_bulk_out( | ||
479 | const struct usb_endpoint_descriptor *epd) | ||
480 | { | ||
481 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd)); | ||
482 | } | ||
483 | |||
484 | /** | ||
485 | * usb_endpoint_is_int_in - check if the endpoint is interrupt IN | ||
486 | * @epd: endpoint to be checked | ||
487 | * | ||
488 | * Returns true if the endpoint has interrupt transfer type and IN direction, | ||
489 | * otherwise it returns false. | ||
490 | */ | ||
491 | static inline int usb_endpoint_is_int_in( | ||
492 | const struct usb_endpoint_descriptor *epd) | ||
493 | { | ||
494 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd)); | ||
495 | } | ||
496 | |||
497 | /** | ||
498 | * usb_endpoint_is_int_out - check if the endpoint is interrupt OUT | ||
499 | * @epd: endpoint to be checked | ||
500 | * | ||
501 | * Returns true if the endpoint has interrupt transfer type and OUT direction, | ||
502 | * otherwise it returns false. | ||
503 | */ | ||
504 | static inline int usb_endpoint_is_int_out( | ||
505 | const struct usb_endpoint_descriptor *epd) | ||
506 | { | ||
507 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd)); | ||
508 | } | ||
509 | |||
510 | /** | ||
511 | * usb_endpoint_is_isoc_in - check if the endpoint is isochronous IN | ||
512 | * @epd: endpoint to be checked | ||
513 | * | ||
514 | * Returns true if the endpoint has isochronous transfer type and IN direction, | ||
515 | * otherwise it returns false. | ||
516 | */ | ||
517 | static inline int usb_endpoint_is_isoc_in( | ||
518 | const struct usb_endpoint_descriptor *epd) | ||
519 | { | ||
520 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd)); | ||
521 | } | ||
522 | |||
523 | /** | ||
524 | * usb_endpoint_is_isoc_out - check if the endpoint is isochronous OUT | ||
525 | * @epd: endpoint to be checked | ||
526 | * | ||
527 | * Returns true if the endpoint has isochronous transfer type and OUT direction, | ||
528 | * otherwise it returns false. | ||
529 | */ | ||
530 | static inline int usb_endpoint_is_isoc_out( | ||
531 | const struct usb_endpoint_descriptor *epd) | ||
532 | { | ||
533 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd)); | ||
534 | } | ||
356 | 535 | ||
357 | /*-------------------------------------------------------------------------*/ | 536 | /*-------------------------------------------------------------------------*/ |
358 | 537 | ||
@@ -584,8 +763,8 @@ enum usb_device_state { | |||
584 | /* chapter 9 and authentication (wireless) device states */ | 763 | /* chapter 9 and authentication (wireless) device states */ |
585 | USB_STATE_ATTACHED, | 764 | USB_STATE_ATTACHED, |
586 | USB_STATE_POWERED, /* wired */ | 765 | USB_STATE_POWERED, /* wired */ |
587 | USB_STATE_UNAUTHENTICATED, /* auth */ | ||
588 | USB_STATE_RECONNECTING, /* auth */ | 766 | USB_STATE_RECONNECTING, /* auth */ |
767 | USB_STATE_UNAUTHENTICATED, /* auth */ | ||
589 | USB_STATE_DEFAULT, /* limited function */ | 768 | USB_STATE_DEFAULT, /* limited function */ |
590 | USB_STATE_ADDRESS, | 769 | USB_STATE_ADDRESS, |
591 | USB_STATE_CONFIGURED, /* most functions */ | 770 | USB_STATE_CONFIGURED, /* most functions */ |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 935c380ffe47..acd7b0f06c8a 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
@@ -244,6 +244,10 @@ int usb_add_config(struct usb_composite_dev *, | |||
244 | * value; it should return zero on successful initialization. | 244 | * value; it should return zero on successful initialization. |
245 | * @unbind: Reverses @bind(); called as a side effect of unregistering | 245 | * @unbind: Reverses @bind(); called as a side effect of unregistering |
246 | * this driver. | 246 | * this driver. |
247 | * @suspend: Notifies when the host stops sending USB traffic, | ||
248 | * after function notifications | ||
249 | * @resume: Notifies configuration when the host restarts USB traffic, | ||
250 | * before function notifications | ||
247 | * | 251 | * |
248 | * Devices default to reporting self powered operation. Devices which rely | 252 | * Devices default to reporting self powered operation. Devices which rely |
249 | * on bus powered operation should report this in their @bind() method. | 253 | * on bus powered operation should report this in their @bind() method. |
@@ -268,6 +272,10 @@ struct usb_composite_driver { | |||
268 | 272 | ||
269 | int (*bind)(struct usb_composite_dev *); | 273 | int (*bind)(struct usb_composite_dev *); |
270 | int (*unbind)(struct usb_composite_dev *); | 274 | int (*unbind)(struct usb_composite_dev *); |
275 | |||
276 | /* global suspend hooks */ | ||
277 | void (*suspend)(struct usb_composite_dev *); | ||
278 | void (*resume)(struct usb_composite_dev *); | ||
271 | }; | 279 | }; |
272 | 280 | ||
273 | extern int usb_composite_register(struct usb_composite_driver *); | 281 | extern int usb_composite_register(struct usb_composite_driver *); |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 0460a746480c..bbf45d500b6d 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -598,6 +598,7 @@ static inline int usb_gadget_clear_selfpowered(struct usb_gadget *gadget) | |||
598 | /** | 598 | /** |
599 | * usb_gadget_vbus_connect - Notify controller that VBUS is powered | 599 | * usb_gadget_vbus_connect - Notify controller that VBUS is powered |
600 | * @gadget:The device which now has VBUS power. | 600 | * @gadget:The device which now has VBUS power. |
601 | * Context: can sleep | ||
601 | * | 602 | * |
602 | * This call is used by a driver for an external transceiver (or GPIO) | 603 | * This call is used by a driver for an external transceiver (or GPIO) |
603 | * that detects a VBUS power session starting. Common responses include | 604 | * that detects a VBUS power session starting. Common responses include |
@@ -636,6 +637,7 @@ static inline int usb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA) | |||
636 | /** | 637 | /** |
637 | * usb_gadget_vbus_disconnect - notify controller about VBUS session end | 638 | * usb_gadget_vbus_disconnect - notify controller about VBUS session end |
638 | * @gadget:the device whose VBUS supply is being described | 639 | * @gadget:the device whose VBUS supply is being described |
640 | * Context: can sleep | ||
639 | * | 641 | * |
640 | * This call is used by a driver for an external transceiver (or GPIO) | 642 | * This call is used by a driver for an external transceiver (or GPIO) |
641 | * that detects a VBUS power session ending. Common responses include | 643 | * that detects a VBUS power session ending. Common responses include |
@@ -792,19 +794,20 @@ struct usb_gadget_driver { | |||
792 | /** | 794 | /** |
793 | * usb_gadget_register_driver - register a gadget driver | 795 | * usb_gadget_register_driver - register a gadget driver |
794 | * @driver:the driver being registered | 796 | * @driver:the driver being registered |
797 | * Context: can sleep | ||
795 | * | 798 | * |
796 | * Call this in your gadget driver's module initialization function, | 799 | * Call this in your gadget driver's module initialization function, |
797 | * to tell the underlying usb controller driver about your driver. | 800 | * to tell the underlying usb controller driver about your driver. |
798 | * The driver's bind() function will be called to bind it to a | 801 | * The driver's bind() function will be called to bind it to a |
799 | * gadget before this registration call returns. It's expected that | 802 | * gadget before this registration call returns. It's expected that |
800 | * the bind() functions will be in init sections. | 803 | * the bind() functions will be in init sections. |
801 | * This function must be called in a context that can sleep. | ||
802 | */ | 804 | */ |
803 | int usb_gadget_register_driver(struct usb_gadget_driver *driver); | 805 | int usb_gadget_register_driver(struct usb_gadget_driver *driver); |
804 | 806 | ||
805 | /** | 807 | /** |
806 | * usb_gadget_unregister_driver - unregister a gadget driver | 808 | * usb_gadget_unregister_driver - unregister a gadget driver |
807 | * @driver:the driver being unregistered | 809 | * @driver:the driver being unregistered |
810 | * Context: can sleep | ||
808 | * | 811 | * |
809 | * Call this in your gadget driver's module cleanup function, | 812 | * Call this in your gadget driver's module cleanup function, |
810 | * to tell the underlying usb controller that your driver is | 813 | * to tell the underlying usb controller that your driver is |
@@ -813,7 +816,6 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver); | |||
813 | * to unbind() and clean up any device state, before this procedure | 816 | * to unbind() and clean up any device state, before this procedure |
814 | * finally returns. It's expected that the unbind() functions | 817 | * finally returns. It's expected that the unbind() functions |
815 | * will in in exit sections, so may not be linked in some kernels. | 818 | * will in in exit sections, so may not be linked in some kernels. |
816 | * This function must be called in a context that can sleep. | ||
817 | */ | 819 | */ |
818 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); | 820 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); |
819 | 821 | ||
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 94df4fe6c6c0..1aaa826396a1 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -80,12 +80,17 @@ struct otg_transceiver { | |||
80 | 80 | ||
81 | /* for board-specific init logic */ | 81 | /* for board-specific init logic */ |
82 | extern int otg_set_transceiver(struct otg_transceiver *); | 82 | extern int otg_set_transceiver(struct otg_transceiver *); |
83 | #ifdef CONFIG_NOP_USB_XCEIV | ||
84 | extern void usb_nop_xceiv_register(void); | ||
85 | extern void usb_nop_xceiv_unregister(void); | ||
86 | #endif | ||
83 | 87 | ||
84 | 88 | ||
85 | /* for usb host and peripheral controller drivers */ | 89 | /* for usb host and peripheral controller drivers */ |
86 | extern struct otg_transceiver *otg_get_transceiver(void); | 90 | extern struct otg_transceiver *otg_get_transceiver(void); |
87 | extern void otg_put_transceiver(struct otg_transceiver *); | 91 | extern void otg_put_transceiver(struct otg_transceiver *); |
88 | 92 | ||
93 | /* Context: can sleep */ | ||
89 | static inline int | 94 | static inline int |
90 | otg_start_hnp(struct otg_transceiver *otg) | 95 | otg_start_hnp(struct otg_transceiver *otg) |
91 | { | 96 | { |
@@ -102,6 +107,8 @@ otg_set_host(struct otg_transceiver *otg, struct usb_bus *host) | |||
102 | 107 | ||
103 | 108 | ||
104 | /* for usb peripheral controller drivers */ | 109 | /* for usb peripheral controller drivers */ |
110 | |||
111 | /* Context: can sleep */ | ||
105 | static inline int | 112 | static inline int |
106 | otg_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *periph) | 113 | otg_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *periph) |
107 | { | 114 | { |
@@ -114,6 +121,7 @@ otg_set_power(struct otg_transceiver *otg, unsigned mA) | |||
114 | return otg->set_power(otg, mA); | 121 | return otg->set_power(otg, mA); |
115 | } | 122 | } |
116 | 123 | ||
124 | /* Context: can sleep */ | ||
117 | static inline int | 125 | static inline int |
118 | otg_set_suspend(struct otg_transceiver *otg, int suspend) | 126 | otg_set_suspend(struct otg_transceiver *otg, int suspend) |
119 | { | 127 | { |
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index 7f6c603db654..2526f3bbd273 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h | |||
@@ -16,4 +16,7 @@ | |||
16 | /* device can't handle Set-Interface requests */ | 16 | /* device can't handle Set-Interface requests */ |
17 | #define USB_QUIRK_NO_SET_INTF 0x00000004 | 17 | #define USB_QUIRK_NO_SET_INTF 0x00000004 |
18 | 18 | ||
19 | /* device can't handle its Configuration or Interface strings */ | ||
20 | #define USB_QUIRK_CONFIG_INTF_STRINGS 0x00000008 | ||
21 | |||
19 | #endif /* __LINUX_USB_QUIRKS_H */ | 22 | #endif /* __LINUX_USB_QUIRKS_H */ |
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h index 0a6e6d4b929a..37836b937d97 100644 --- a/include/linux/usb/rndis_host.h +++ b/include/linux/usb/rndis_host.h | |||
@@ -49,48 +49,45 @@ struct rndis_msg_hdr { | |||
49 | */ | 49 | */ |
50 | #define RNDIS_CONTROL_TIMEOUT_MS (5 * 1000) | 50 | #define RNDIS_CONTROL_TIMEOUT_MS (5 * 1000) |
51 | 51 | ||
52 | 52 | #define RNDIS_MSG_COMPLETION cpu_to_le32(0x80000000) | |
53 | #define ccpu2 __constant_cpu_to_le32 | ||
54 | |||
55 | #define RNDIS_MSG_COMPLETION ccpu2(0x80000000) | ||
56 | 53 | ||
57 | /* codes for "msg_type" field of rndis messages; | 54 | /* codes for "msg_type" field of rndis messages; |
58 | * only the data channel uses packet messages (maybe batched); | 55 | * only the data channel uses packet messages (maybe batched); |
59 | * everything else goes on the control channel. | 56 | * everything else goes on the control channel. |
60 | */ | 57 | */ |
61 | #define RNDIS_MSG_PACKET ccpu2(0x00000001) /* 1-N packets */ | 58 | #define RNDIS_MSG_PACKET cpu_to_le32(0x00000001) /* 1-N packets */ |
62 | #define RNDIS_MSG_INIT ccpu2(0x00000002) | 59 | #define RNDIS_MSG_INIT cpu_to_le32(0x00000002) |
63 | #define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION) | 60 | #define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION) |
64 | #define RNDIS_MSG_HALT ccpu2(0x00000003) | 61 | #define RNDIS_MSG_HALT cpu_to_le32(0x00000003) |
65 | #define RNDIS_MSG_QUERY ccpu2(0x00000004) | 62 | #define RNDIS_MSG_QUERY cpu_to_le32(0x00000004) |
66 | #define RNDIS_MSG_QUERY_C (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION) | 63 | #define RNDIS_MSG_QUERY_C (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION) |
67 | #define RNDIS_MSG_SET ccpu2(0x00000005) | 64 | #define RNDIS_MSG_SET cpu_to_le32(0x00000005) |
68 | #define RNDIS_MSG_SET_C (RNDIS_MSG_SET|RNDIS_MSG_COMPLETION) | 65 | #define RNDIS_MSG_SET_C (RNDIS_MSG_SET|RNDIS_MSG_COMPLETION) |
69 | #define RNDIS_MSG_RESET ccpu2(0x00000006) | 66 | #define RNDIS_MSG_RESET cpu_to_le32(0x00000006) |
70 | #define RNDIS_MSG_RESET_C (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION) | 67 | #define RNDIS_MSG_RESET_C (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION) |
71 | #define RNDIS_MSG_INDICATE ccpu2(0x00000007) | 68 | #define RNDIS_MSG_INDICATE cpu_to_le32(0x00000007) |
72 | #define RNDIS_MSG_KEEPALIVE ccpu2(0x00000008) | 69 | #define RNDIS_MSG_KEEPALIVE cpu_to_le32(0x00000008) |
73 | #define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) | 70 | #define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) |
74 | 71 | ||
75 | /* codes for "status" field of completion messages */ | 72 | /* codes for "status" field of completion messages */ |
76 | #define RNDIS_STATUS_SUCCESS ccpu2(0x00000000) | 73 | #define RNDIS_STATUS_SUCCESS cpu_to_le32(0x00000000) |
77 | #define RNDIS_STATUS_FAILURE ccpu2(0xc0000001) | 74 | #define RNDIS_STATUS_FAILURE cpu_to_le32(0xc0000001) |
78 | #define RNDIS_STATUS_INVALID_DATA ccpu2(0xc0010015) | 75 | #define RNDIS_STATUS_INVALID_DATA cpu_to_le32(0xc0010015) |
79 | #define RNDIS_STATUS_NOT_SUPPORTED ccpu2(0xc00000bb) | 76 | #define RNDIS_STATUS_NOT_SUPPORTED cpu_to_le32(0xc00000bb) |
80 | #define RNDIS_STATUS_MEDIA_CONNECT ccpu2(0x4001000b) | 77 | #define RNDIS_STATUS_MEDIA_CONNECT cpu_to_le32(0x4001000b) |
81 | #define RNDIS_STATUS_MEDIA_DISCONNECT ccpu2(0x4001000c) | 78 | #define RNDIS_STATUS_MEDIA_DISCONNECT cpu_to_le32(0x4001000c) |
82 | 79 | ||
83 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ | 80 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ |
84 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED ccpu2(0x00000000) | 81 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED cpu_to_le32(0x00000000) |
85 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN ccpu2(0x00000001) | 82 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN cpu_to_le32(0x00000001) |
86 | #define RNDIS_PHYSICAL_MEDIUM_CABLE_MODEM ccpu2(0x00000002) | 83 | #define RNDIS_PHYSICAL_MEDIUM_CABLE_MODEM cpu_to_le32(0x00000002) |
87 | #define RNDIS_PHYSICAL_MEDIUM_PHONE_LINE ccpu2(0x00000003) | 84 | #define RNDIS_PHYSICAL_MEDIUM_PHONE_LINE cpu_to_le32(0x00000003) |
88 | #define RNDIS_PHYSICAL_MEDIUM_POWER_LINE ccpu2(0x00000004) | 85 | #define RNDIS_PHYSICAL_MEDIUM_POWER_LINE cpu_to_le32(0x00000004) |
89 | #define RNDIS_PHYSICAL_MEDIUM_DSL ccpu2(0x00000005) | 86 | #define RNDIS_PHYSICAL_MEDIUM_DSL cpu_to_le32(0x00000005) |
90 | #define RNDIS_PHYSICAL_MEDIUM_FIBRE_CHANNEL ccpu2(0x00000006) | 87 | #define RNDIS_PHYSICAL_MEDIUM_FIBRE_CHANNEL cpu_to_le32(0x00000006) |
91 | #define RNDIS_PHYSICAL_MEDIUM_1394 ccpu2(0x00000007) | 88 | #define RNDIS_PHYSICAL_MEDIUM_1394 cpu_to_le32(0x00000007) |
92 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN ccpu2(0x00000008) | 89 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN cpu_to_le32(0x00000008) |
93 | #define RNDIS_PHYSICAL_MEDIUM_MAX ccpu2(0x00000009) | 90 | #define RNDIS_PHYSICAL_MEDIUM_MAX cpu_to_le32(0x00000009) |
94 | 91 | ||
95 | struct rndis_data_hdr { | 92 | struct rndis_data_hdr { |
96 | __le32 msg_type; /* RNDIS_MSG_PACKET */ | 93 | __le32 msg_type; /* RNDIS_MSG_PACKET */ |
@@ -228,24 +225,24 @@ struct rndis_keepalive_c { /* IN (optionally OUT) */ | |||
228 | * there are gobs more that may optionally be supported. We'll avoid as much | 225 | * there are gobs more that may optionally be supported. We'll avoid as much |
229 | * of that mess as possible. | 226 | * of that mess as possible. |
230 | */ | 227 | */ |
231 | #define OID_802_3_PERMANENT_ADDRESS ccpu2(0x01010101) | 228 | #define OID_802_3_PERMANENT_ADDRESS cpu_to_le32(0x01010101) |
232 | #define OID_GEN_MAXIMUM_FRAME_SIZE ccpu2(0x00010106) | 229 | #define OID_GEN_MAXIMUM_FRAME_SIZE cpu_to_le32(0x00010106) |
233 | #define OID_GEN_CURRENT_PACKET_FILTER ccpu2(0x0001010e) | 230 | #define OID_GEN_CURRENT_PACKET_FILTER cpu_to_le32(0x0001010e) |
234 | #define OID_GEN_PHYSICAL_MEDIUM ccpu2(0x00010202) | 231 | #define OID_GEN_PHYSICAL_MEDIUM cpu_to_le32(0x00010202) |
235 | 232 | ||
236 | /* packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */ | 233 | /* packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */ |
237 | #define RNDIS_PACKET_TYPE_DIRECTED ccpu2(0x00000001) | 234 | #define RNDIS_PACKET_TYPE_DIRECTED cpu_to_le32(0x00000001) |
238 | #define RNDIS_PACKET_TYPE_MULTICAST ccpu2(0x00000002) | 235 | #define RNDIS_PACKET_TYPE_MULTICAST cpu_to_le32(0x00000002) |
239 | #define RNDIS_PACKET_TYPE_ALL_MULTICAST ccpu2(0x00000004) | 236 | #define RNDIS_PACKET_TYPE_ALL_MULTICAST cpu_to_le32(0x00000004) |
240 | #define RNDIS_PACKET_TYPE_BROADCAST ccpu2(0x00000008) | 237 | #define RNDIS_PACKET_TYPE_BROADCAST cpu_to_le32(0x00000008) |
241 | #define RNDIS_PACKET_TYPE_SOURCE_ROUTING ccpu2(0x00000010) | 238 | #define RNDIS_PACKET_TYPE_SOURCE_ROUTING cpu_to_le32(0x00000010) |
242 | #define RNDIS_PACKET_TYPE_PROMISCUOUS ccpu2(0x00000020) | 239 | #define RNDIS_PACKET_TYPE_PROMISCUOUS cpu_to_le32(0x00000020) |
243 | #define RNDIS_PACKET_TYPE_SMT ccpu2(0x00000040) | 240 | #define RNDIS_PACKET_TYPE_SMT cpu_to_le32(0x00000040) |
244 | #define RNDIS_PACKET_TYPE_ALL_LOCAL ccpu2(0x00000080) | 241 | #define RNDIS_PACKET_TYPE_ALL_LOCAL cpu_to_le32(0x00000080) |
245 | #define RNDIS_PACKET_TYPE_GROUP ccpu2(0x00001000) | 242 | #define RNDIS_PACKET_TYPE_GROUP cpu_to_le32(0x00001000) |
246 | #define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL ccpu2(0x00002000) | 243 | #define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL cpu_to_le32(0x00002000) |
247 | #define RNDIS_PACKET_TYPE_FUNCTIONAL ccpu2(0x00004000) | 244 | #define RNDIS_PACKET_TYPE_FUNCTIONAL cpu_to_le32(0x00004000) |
248 | #define RNDIS_PACKET_TYPE_MAC_FRAME ccpu2(0x00008000) | 245 | #define RNDIS_PACKET_TYPE_MAC_FRAME cpu_to_le32(0x00008000) |
249 | 246 | ||
250 | /* default filter used with RNDIS devices */ | 247 | /* default filter used with RNDIS devices */ |
251 | #define RNDIS_DEFAULT_FILTER ( \ | 248 | #define RNDIS_DEFAULT_FILTER ( \ |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 0b8617a9176d..b95842542590 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -130,7 +130,8 @@ struct usb_serial { | |||
130 | struct usb_device *dev; | 130 | struct usb_device *dev; |
131 | struct usb_serial_driver *type; | 131 | struct usb_serial_driver *type; |
132 | struct usb_interface *interface; | 132 | struct usb_interface *interface; |
133 | unsigned char disconnected; | 133 | unsigned char disconnected:1; |
134 | unsigned char suspending:1; | ||
134 | unsigned char minor; | 135 | unsigned char minor; |
135 | unsigned char num_ports; | 136 | unsigned char num_ports; |
136 | unsigned char num_port_pointers; | 137 | unsigned char num_port_pointers; |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 7d3822243074..36fabb95c7d3 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -176,6 +176,11 @@ struct skb_data { /* skb->cb is one of these */ | |||
176 | size_t length; | 176 | size_t length; |
177 | }; | 177 | }; |
178 | 178 | ||
179 | extern int usbnet_open (struct net_device *net); | ||
180 | extern int usbnet_stop (struct net_device *net); | ||
181 | extern int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net); | ||
182 | extern void usbnet_tx_timeout (struct net_device *net); | ||
183 | extern int usbnet_change_mtu (struct net_device *net, int new_mtu); | ||
179 | 184 | ||
180 | extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *); | 185 | extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *); |
181 | extern void usbnet_defer_kevent (struct usbnet *, int); | 186 | extern void usbnet_defer_kevent (struct usbnet *, int); |
diff --git a/include/linux/usb/wusb.h b/include/linux/usb/wusb.h index 5f401b644ed5..429c631d2aad 100644 --- a/include/linux/usb/wusb.h +++ b/include/linux/usb/wusb.h | |||
@@ -80,8 +80,7 @@ struct wusb_ckhdid { | |||
80 | u8 data[16]; | 80 | u8 data[16]; |
81 | } __attribute__((packed)); | 81 | } __attribute__((packed)); |
82 | 82 | ||
83 | const static | 83 | static const struct wusb_ckhdid wusb_ckhdid_zero = { .data = { 0 } }; |
84 | struct wusb_ckhdid wusb_ckhdid_zero = { .data = { 0 } }; | ||
85 | 84 | ||
86 | #define WUSB_CKHDID_STRSIZE (3 * sizeof(struct wusb_ckhdid) + 1) | 85 | #define WUSB_CKHDID_STRSIZE (3 * sizeof(struct wusb_ckhdid) + 1) |
87 | 86 | ||