diff options
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 001629cd1a97..7454865ad148 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -475,7 +475,8 @@ struct usb3_lpm_parameters { | |||
475 | * @lpm_capable: device supports LPM | 475 | * @lpm_capable: device supports LPM |
476 | * @usb2_hw_lpm_capable: device can perform USB2 hardware LPM | 476 | * @usb2_hw_lpm_capable: device can perform USB2 hardware LPM |
477 | * @usb2_hw_lpm_besl_capable: device can perform USB2 hardware BESL LPM | 477 | * @usb2_hw_lpm_besl_capable: device can perform USB2 hardware BESL LPM |
478 | * @usb2_hw_lpm_enabled: USB2 hardware LPM enabled | 478 | * @usb2_hw_lpm_enabled: USB2 hardware LPM is enabled |
479 | * @usb2_hw_lpm_allowed: Userspace allows USB 2.0 LPM to be enabled | ||
479 | * @usb3_lpm_enabled: USB3 hardware LPM enabled | 480 | * @usb3_lpm_enabled: USB3 hardware LPM enabled |
480 | * @string_langid: language ID for strings | 481 | * @string_langid: language ID for strings |
481 | * @product: iProduct string, if present (static) | 482 | * @product: iProduct string, if present (static) |
@@ -548,6 +549,7 @@ struct usb_device { | |||
548 | unsigned usb2_hw_lpm_capable:1; | 549 | unsigned usb2_hw_lpm_capable:1; |
549 | unsigned usb2_hw_lpm_besl_capable:1; | 550 | unsigned usb2_hw_lpm_besl_capable:1; |
550 | unsigned usb2_hw_lpm_enabled:1; | 551 | unsigned usb2_hw_lpm_enabled:1; |
552 | unsigned usb2_hw_lpm_allowed:1; | ||
551 | unsigned usb3_lpm_enabled:1; | 553 | unsigned usb3_lpm_enabled:1; |
552 | int string_langid; | 554 | int string_langid; |
553 | 555 | ||
@@ -702,7 +704,7 @@ extern int usb_alloc_streams(struct usb_interface *interface, | |||
702 | unsigned int num_streams, gfp_t mem_flags); | 704 | unsigned int num_streams, gfp_t mem_flags); |
703 | 705 | ||
704 | /* Reverts a group of bulk endpoints back to not using stream IDs. */ | 706 | /* Reverts a group of bulk endpoints back to not using stream IDs. */ |
705 | extern void usb_free_streams(struct usb_interface *interface, | 707 | extern int usb_free_streams(struct usb_interface *interface, |
706 | struct usb_host_endpoint **eps, unsigned int num_eps, | 708 | struct usb_host_endpoint **eps, unsigned int num_eps, |
707 | gfp_t mem_flags); | 709 | gfp_t mem_flags); |
708 | 710 | ||
@@ -1209,11 +1211,13 @@ struct usb_anchor { | |||
1209 | struct list_head urb_list; | 1211 | struct list_head urb_list; |
1210 | wait_queue_head_t wait; | 1212 | wait_queue_head_t wait; |
1211 | spinlock_t lock; | 1213 | spinlock_t lock; |
1214 | atomic_t suspend_wakeups; | ||
1212 | unsigned int poisoned:1; | 1215 | unsigned int poisoned:1; |
1213 | }; | 1216 | }; |
1214 | 1217 | ||
1215 | static inline void init_usb_anchor(struct usb_anchor *anchor) | 1218 | static inline void init_usb_anchor(struct usb_anchor *anchor) |
1216 | { | 1219 | { |
1220 | memset(anchor, 0, sizeof(*anchor)); | ||
1217 | INIT_LIST_HEAD(&anchor->urb_list); | 1221 | INIT_LIST_HEAD(&anchor->urb_list); |
1218 | init_waitqueue_head(&anchor->wait); | 1222 | init_waitqueue_head(&anchor->wait); |
1219 | spin_lock_init(&anchor->lock); | 1223 | spin_lock_init(&anchor->lock); |
@@ -1574,6 +1578,8 @@ extern void usb_kill_anchored_urbs(struct usb_anchor *anchor); | |||
1574 | extern void usb_poison_anchored_urbs(struct usb_anchor *anchor); | 1578 | extern void usb_poison_anchored_urbs(struct usb_anchor *anchor); |
1575 | extern void usb_unpoison_anchored_urbs(struct usb_anchor *anchor); | 1579 | extern void usb_unpoison_anchored_urbs(struct usb_anchor *anchor); |
1576 | extern void usb_unlink_anchored_urbs(struct usb_anchor *anchor); | 1580 | extern void usb_unlink_anchored_urbs(struct usb_anchor *anchor); |
1581 | extern void usb_anchor_suspend_wakeups(struct usb_anchor *anchor); | ||
1582 | extern void usb_anchor_resume_wakeups(struct usb_anchor *anchor); | ||
1577 | extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor); | 1583 | extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor); |
1578 | extern void usb_unanchor_urb(struct urb *urb); | 1584 | extern void usb_unanchor_urb(struct urb *urb); |
1579 | extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, | 1585 | extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, |