diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 17:19:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 17:19:17 -0400 |
commit | 50f732ee63b91eb08a29974b36bd63e1150bb642 (patch) | |
tree | fdfc63411a34ffbe26a3b0a997aaeff742a0301b /include/linux | |
parent | aa5bc2b58e3344da57f26b62e99e13e91c9e0a94 (diff) | |
parent | a7205b30106a2d4ee268132644cdb292da2d9b41 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (78 commits)
USB: update MAINAINERS and CREDITS for Freescale USB driver
USB: update gadget files for fsl_usb2_udc driver
USB: add Freescale high-speed USB SOC device controller driver
USB: quirk for broken suspend of IT8152F/G
USB: iowarrior.c: timeouts too small in usb_control_msg calls
USB: dell device id for option.c
USB: Remove Huawei unusual_devs entry
USB: CP2101 New Device IDs
USB: add picdem device to ldusb
usbfs micro optimitation
USB: remove ancient/broken CRIS hcd
usb ethernet gadget, workaround network stack API glitch
USB: add "busnum" attribute for USB devices
USB: cxacru: ADSL state management
usbatm: Detect usb device shutdown and ignore failed urbs
USB: Remove duplicate define of OHCI_QUIRK_ZFMICRO
USB: BandRich BandLuxe HSDPA Data Card Driver
USB gadget rndis: fix struct rndis_packet_msg_type unaligned bug
USB Elan FTDI: check for driver registration status
USB: sierra: add more checks on shutdown
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/usb.h | 22 | ||||
-rw-r--r-- | include/linux/usb/cdc.h | 11 | ||||
-rw-r--r-- | include/linux/usb/ch9.h | 15 |
3 files changed, 38 insertions, 10 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 87dc75a6cee1..cfbd2bb8fa2c 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -299,8 +299,9 @@ struct usb_bus { | |||
299 | int bandwidth_int_reqs; /* number of Interrupt requests */ | 299 | int bandwidth_int_reqs; /* number of Interrupt requests */ |
300 | int bandwidth_isoc_reqs; /* number of Isoc. requests */ | 300 | int bandwidth_isoc_reqs; /* number of Isoc. requests */ |
301 | 301 | ||
302 | #ifdef CONFIG_USB_DEVICEFS | ||
302 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ | 303 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ |
303 | 304 | #endif | |
304 | struct class_device *class_dev; /* class device for this bus */ | 305 | struct class_device *class_dev; /* class device for this bus */ |
305 | 306 | ||
306 | #if defined(CONFIG_USB_MON) | 307 | #if defined(CONFIG_USB_MON) |
@@ -373,9 +374,12 @@ struct usb_device { | |||
373 | char *serial; /* iSerialNumber string, if present */ | 374 | char *serial; /* iSerialNumber string, if present */ |
374 | 375 | ||
375 | struct list_head filelist; | 376 | struct list_head filelist; |
376 | struct device *usbfs_dev; | 377 | #ifdef CONFIG_USB_DEVICE_CLASS |
378 | struct device *usb_classdev; | ||
379 | #endif | ||
380 | #ifdef CONFIG_USB_DEVICEFS | ||
377 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ | 381 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ |
378 | 382 | #endif | |
379 | /* | 383 | /* |
380 | * Child devices - these can be either new devices | 384 | * Child devices - these can be either new devices |
381 | * (if this is a hub device), or different instances | 385 | * (if this is a hub device), or different instances |
@@ -394,10 +398,13 @@ struct usb_device { | |||
394 | struct delayed_work autosuspend; /* for delayed autosuspends */ | 398 | struct delayed_work autosuspend; /* for delayed autosuspends */ |
395 | struct mutex pm_mutex; /* protects PM operations */ | 399 | struct mutex pm_mutex; /* protects PM operations */ |
396 | 400 | ||
397 | unsigned autosuspend_delay; /* in jiffies */ | 401 | unsigned long last_busy; /* time of last use */ |
402 | int autosuspend_delay; /* in jiffies */ | ||
398 | 403 | ||
399 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | 404 | unsigned auto_pm:1; /* autosuspend/resume in progress */ |
400 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ | 405 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ |
406 | unsigned autosuspend_disabled:1; /* autosuspend and autoresume */ | ||
407 | unsigned autoresume_disabled:1; /* disabled by the user */ | ||
401 | #endif | 408 | #endif |
402 | }; | 409 | }; |
403 | #define to_usb_device(d) container_of(d, struct usb_device, dev) | 410 | #define to_usb_device(d) container_of(d, struct usb_device, dev) |
@@ -437,6 +444,11 @@ static inline void usb_autopm_disable(struct usb_interface *intf) | |||
437 | usb_autopm_set_interface(intf); | 444 | usb_autopm_set_interface(intf); |
438 | } | 445 | } |
439 | 446 | ||
447 | static inline void usb_mark_last_busy(struct usb_device *udev) | ||
448 | { | ||
449 | udev->last_busy = jiffies; | ||
450 | } | ||
451 | |||
440 | #else | 452 | #else |
441 | 453 | ||
442 | static inline int usb_autopm_set_interface(struct usb_interface *intf) | 454 | static inline int usb_autopm_set_interface(struct usb_interface *intf) |
@@ -451,6 +463,8 @@ static inline void usb_autopm_enable(struct usb_interface *intf) | |||
451 | { } | 463 | { } |
452 | static inline void usb_autopm_disable(struct usb_interface *intf) | 464 | static inline void usb_autopm_disable(struct usb_interface *intf) |
453 | { } | 465 | { } |
466 | static inline void usb_mark_last_busy(struct usb_device *udev) | ||
467 | { } | ||
454 | #endif | 468 | #endif |
455 | 469 | ||
456 | /*-------------------------------------------------------------------------*/ | 470 | /*-------------------------------------------------------------------------*/ |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 956edf3bbecb..2204ae22c381 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -91,6 +91,17 @@ struct usb_cdc_union_desc { | |||
91 | /* ... and there could be other slave interfaces */ | 91 | /* ... and there could be other slave interfaces */ |
92 | } __attribute__ ((packed)); | 92 | } __attribute__ ((packed)); |
93 | 93 | ||
94 | /* "Country Selection Functional Descriptor" from CDC spec 5.2.3.9 */ | ||
95 | struct usb_cdc_country_functional_desc { | ||
96 | __u8 bLength; | ||
97 | __u8 bDescriptorType; | ||
98 | __u8 bDescriptorSubType; | ||
99 | |||
100 | __u8 iCountryCodeRelDate; | ||
101 | __le16 wCountyCode0; | ||
102 | /* ... and there can be a lot of country codes */ | ||
103 | } __attribute__ ((packed)); | ||
104 | |||
94 | /* "Network Channel Terminal Functional Descriptor" from CDC spec 5.2.3.11 */ | 105 | /* "Network Channel Terminal Functional Descriptor" from CDC spec 5.2.3.11 */ |
95 | struct usb_cdc_network_terminal_desc { | 106 | struct usb_cdc_network_terminal_desc { |
96 | __u8 bLength; | 107 | __u8 bLength; |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 1122a6c2c1a3..6169438ec5a2 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -181,12 +181,15 @@ struct usb_ctrlrequest { | |||
181 | #define USB_DT_WIRE_ADAPTER 0x21 | 181 | #define USB_DT_WIRE_ADAPTER 0x21 |
182 | #define USB_DT_RPIPE 0x22 | 182 | #define USB_DT_RPIPE 0x22 |
183 | 183 | ||
184 | /* conventional codes for class-specific descriptors */ | 184 | /* Conventional codes for class-specific descriptors. The convention is |
185 | #define USB_DT_CS_DEVICE 0x21 | 185 | * defined in the USB "Common Class" Spec (3.11). Individual class specs |
186 | #define USB_DT_CS_CONFIG 0x22 | 186 | * are authoritative for their usage, not the "common class" writeup. |
187 | #define USB_DT_CS_STRING 0x23 | 187 | */ |
188 | #define USB_DT_CS_INTERFACE 0x24 | 188 | #define USB_DT_CS_DEVICE (USB_TYPE_CLASS | USB_DT_DEVICE) |
189 | #define USB_DT_CS_ENDPOINT 0x25 | 189 | #define USB_DT_CS_CONFIG (USB_TYPE_CLASS | USB_DT_CONFIG) |
190 | #define USB_DT_CS_STRING (USB_TYPE_CLASS | USB_DT_STRING) | ||
191 | #define USB_DT_CS_INTERFACE (USB_TYPE_CLASS | USB_DT_INTERFACE) | ||
192 | #define USB_DT_CS_ENDPOINT (USB_TYPE_CLASS | USB_DT_ENDPOINT) | ||
190 | 193 | ||
191 | /* All standard descriptors have these 2 fields at the beginning */ | 194 | /* All standard descriptors have these 2 fields at the beginning */ |
192 | struct usb_descriptor_header { | 195 | struct usb_descriptor_header { |