aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/hcd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb/hcd.h')
-rw-r--r--include/linux/usb/hcd.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index 9b867e64a0f4..f8f8fa7a56e8 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -89,19 +89,31 @@ struct usb_hcd {
89 */ 89 */
90 const struct hc_driver *driver; /* hw-specific hooks */ 90 const struct hc_driver *driver; /* hw-specific hooks */
91 91
92 /* Flags that need to be manipulated atomically */ 92 /* Flags that need to be manipulated atomically because they can
93 * change while the host controller is running. Always use
94 * set_bit() or clear_bit() to change their values.
95 */
93 unsigned long flags; 96 unsigned long flags;
94#define HCD_FLAG_HW_ACCESSIBLE 0x00000001 97#define HCD_FLAG_HW_ACCESSIBLE 0 /* at full power */
95#define HCD_FLAG_SAW_IRQ 0x00000002 98#define HCD_FLAG_SAW_IRQ 1
99#define HCD_FLAG_POLL_RH 2 /* poll for rh status? */
100#define HCD_FLAG_POLL_PENDING 3 /* status has changed? */
101
102 /* The flags can be tested using these macros; they are likely to
103 * be slightly faster than test_bit().
104 */
105#define HCD_HW_ACCESSIBLE(hcd) ((hcd)->flags & (1U << HCD_FLAG_HW_ACCESSIBLE))
106#define HCD_SAW_IRQ(hcd) ((hcd)->flags & (1U << HCD_FLAG_SAW_IRQ))
107#define HCD_POLL_RH(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_RH))
108#define HCD_POLL_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_PENDING))
96 109
110 /* Flags that get set only during HCD registration or removal. */
97 unsigned rh_registered:1;/* is root hub registered? */ 111 unsigned rh_registered:1;/* is root hub registered? */
98 unsigned rh_pollable:1; /* may we poll the root hub? */ 112 unsigned rh_pollable:1; /* may we poll the root hub? */
99 113
100 /* The next flag is a stopgap, to be removed when all the HCDs 114 /* The next flag is a stopgap, to be removed when all the HCDs
101 * support the new root-hub polling mechanism. */ 115 * support the new root-hub polling mechanism. */
102 unsigned uses_new_polling:1; 116 unsigned uses_new_polling:1;
103 unsigned poll_rh:1; /* poll for rh status? */
104 unsigned poll_pending:1; /* status has changed? */
105 unsigned wireless:1; /* Wireless USB HCD */ 117 unsigned wireless:1; /* Wireless USB HCD */
106 unsigned authorized_default:1; 118 unsigned authorized_default:1;
107 unsigned has_tt:1; /* Integrated TT in root hub */ 119 unsigned has_tt:1; /* Integrated TT in root hub */