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.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index d2784c10bfe2..f89c24bd53a4 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -58,12 +58,6 @@
58 * 58 *
59 * Since "struct usb_bus" is so thin, you can't share much code in it. 59 * Since "struct usb_bus" is so thin, you can't share much code in it.
60 * This framework is a layer over that, and should be more sharable. 60 * This framework is a layer over that, and should be more sharable.
61 *
62 * @authorized_default: Specifies if new devices are authorized to
63 * connect by default or they require explicit
64 * user space authorization; this bit is settable
65 * through /sys/class/usb_host/X/authorized_default.
66 * For the rest is RO, so we don't lock to r/w it.
67 */ 61 */
68 62
69/*-------------------------------------------------------------------------*/ 63/*-------------------------------------------------------------------------*/
@@ -120,6 +114,8 @@ struct usb_hcd {
120#define HCD_FLAG_WAKEUP_PENDING 4 /* root hub is resuming? */ 114#define HCD_FLAG_WAKEUP_PENDING 4 /* root hub is resuming? */
121#define HCD_FLAG_RH_RUNNING 5 /* root hub is running? */ 115#define HCD_FLAG_RH_RUNNING 5 /* root hub is running? */
122#define HCD_FLAG_DEAD 6 /* controller has died? */ 116#define HCD_FLAG_DEAD 6 /* controller has died? */
117#define HCD_FLAG_INTF_AUTHORIZED 7 /* authorize interfaces? */
118#define HCD_FLAG_DEV_AUTHORIZED 8 /* authorize devices? */
123 119
124 /* The flags can be tested using these macros; they are likely to 120 /* The flags can be tested using these macros; they are likely to
125 * be slightly faster than test_bit(). 121 * be slightly faster than test_bit().
@@ -131,6 +127,22 @@ struct usb_hcd {
131#define HCD_RH_RUNNING(hcd) ((hcd)->flags & (1U << HCD_FLAG_RH_RUNNING)) 127#define HCD_RH_RUNNING(hcd) ((hcd)->flags & (1U << HCD_FLAG_RH_RUNNING))
132#define HCD_DEAD(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEAD)) 128#define HCD_DEAD(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEAD))
133 129
130 /*
131 * Specifies if interfaces are authorized by default
132 * or they require explicit user space authorization; this bit is
133 * settable through /sys/class/usb_host/X/interface_authorized_default
134 */
135#define HCD_INTF_AUTHORIZED(hcd) \
136 ((hcd)->flags & (1U << HCD_FLAG_INTF_AUTHORIZED))
137
138 /*
139 * Specifies if devices are authorized by default
140 * or they require explicit user space authorization; this bit is
141 * settable through /sys/class/usb_host/X/authorized_default
142 */
143#define HCD_DEV_AUTHORIZED(hcd) \
144 ((hcd)->flags & (1U << HCD_FLAG_DEV_AUTHORIZED))
145
134 /* Flags that get set only during HCD registration or removal. */ 146 /* Flags that get set only during HCD registration or removal. */
135 unsigned rh_registered:1;/* is root hub registered? */ 147 unsigned rh_registered:1;/* is root hub registered? */
136 unsigned rh_pollable:1; /* may we poll the root hub? */ 148 unsigned rh_pollable:1; /* may we poll the root hub? */
@@ -141,7 +153,6 @@ struct usb_hcd {
141 * support the new root-hub polling mechanism. */ 153 * support the new root-hub polling mechanism. */
142 unsigned uses_new_polling:1; 154 unsigned uses_new_polling:1;
143 unsigned wireless:1; /* Wireless USB HCD */ 155 unsigned wireless:1; /* Wireless USB HCD */
144 unsigned authorized_default:1;
145 unsigned has_tt:1; /* Integrated TT in root hub */ 156 unsigned has_tt:1; /* Integrated TT in root hub */
146 unsigned amd_resume_bug:1; /* AMD remote wakeup quirk */ 157 unsigned amd_resume_bug:1; /* AMD remote wakeup quirk */
147 unsigned can_do_streams:1; /* HC supports streams */ 158 unsigned can_do_streams:1; /* HC supports streams */
@@ -239,6 +250,7 @@ struct hc_driver {
239#define HCD_USB2 0x0020 /* USB 2.0 */ 250#define HCD_USB2 0x0020 /* USB 2.0 */
240#define HCD_USB25 0x0030 /* Wireless USB 1.0 (USB 2.5)*/ 251#define HCD_USB25 0x0030 /* Wireless USB 1.0 (USB 2.5)*/
241#define HCD_USB3 0x0040 /* USB 3.0 */ 252#define HCD_USB3 0x0040 /* USB 3.0 */
253#define HCD_USB31 0x0050 /* USB 3.1 */
242#define HCD_MASK 0x0070 254#define HCD_MASK 0x0070
243#define HCD_BH 0x0100 /* URB complete in BH context */ 255#define HCD_BH 0x0100 /* URB complete in BH context */
244 256