diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-i386/idle.h | 14 | ||||
-rw-r--r-- | include/asm-i386/processor.h | 8 | ||||
-rw-r--r-- | include/asm-mips/ptrace.h | 4 | ||||
-rw-r--r-- | include/asm-mips/sigcontext.h | 4 | ||||
-rw-r--r-- | include/asm-mips/stackframe.h | 30 | ||||
-rw-r--r-- | include/asm-x86_64/hw_irq.h | 25 | ||||
-rw-r--r-- | include/linux/device.h | 2 | ||||
-rw-r--r-- | include/linux/irq.h | 11 | ||||
-rw-r--r-- | include/linux/kmod.h | 2 | ||||
-rw-r--r-- | include/linux/pm.h | 37 | ||||
-rw-r--r-- | include/linux/sysfs.h | 30 | ||||
-rw-r--r-- | include/linux/usb.h | 4 | ||||
-rw-r--r-- | include/linux/usb/ch9.h | 22 | ||||
-rw-r--r-- | include/linux/usb/iowarrior.h | 33 | ||||
-rw-r--r-- | include/linux/usb/quirks.h | 11 |
15 files changed, 172 insertions, 65 deletions
diff --git a/include/asm-i386/idle.h b/include/asm-i386/idle.h deleted file mode 100644 index 87ab939111..0000000000 --- a/include/asm-i386/idle.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #ifndef _ASM_I386_IDLE_H | ||
2 | #define _ASM_I386_IDLE_H 1 | ||
3 | |||
4 | #define IDLE_START 1 | ||
5 | #define IDLE_END 2 | ||
6 | |||
7 | struct notifier_block; | ||
8 | void idle_notifier_register(struct notifier_block *n); | ||
9 | void idle_notifier_unregister(struct notifier_block *n); | ||
10 | |||
11 | void exit_idle(void); | ||
12 | void enter_idle(void); | ||
13 | |||
14 | #endif | ||
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index edfbe46a5e..11bf899de8 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -257,14 +257,6 @@ static inline void __mwait(unsigned long eax, unsigned long ecx) | |||
257 | : :"a" (eax), "c" (ecx)); | 257 | : :"a" (eax), "c" (ecx)); |
258 | } | 258 | } |
259 | 259 | ||
260 | static inline void __sti_mwait(unsigned long eax, unsigned long ecx) | ||
261 | { | ||
262 | /* "mwait %eax,%ecx;" */ | ||
263 | asm volatile( | ||
264 | "sti; .byte 0x0f,0x01,0xc9;" | ||
265 | : :"a" (eax), "c" (ecx)); | ||
266 | } | ||
267 | |||
268 | extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); | 260 | extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); |
269 | 261 | ||
270 | /* from system description table in BIOS. Mostly for MCA use, but | 262 | /* from system description table in BIOS. Mostly for MCA use, but |
diff --git a/include/asm-mips/ptrace.h b/include/asm-mips/ptrace.h index 8a1f2b6f04..1906938285 100644 --- a/include/asm-mips/ptrace.h +++ b/include/asm-mips/ptrace.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #define FPC_EIR 70 | 21 | #define FPC_EIR 70 |
22 | #define DSP_BASE 71 /* 3 more hi / lo register pairs */ | 22 | #define DSP_BASE 71 /* 3 more hi / lo register pairs */ |
23 | #define DSP_CONTROL 77 | 23 | #define DSP_CONTROL 77 |
24 | #define ACX 78 | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * This struct defines the way the registers are stored on the stack during a | 27 | * This struct defines the way the registers are stored on the stack during a |
@@ -39,6 +40,9 @@ struct pt_regs { | |||
39 | unsigned long cp0_status; | 40 | unsigned long cp0_status; |
40 | unsigned long hi; | 41 | unsigned long hi; |
41 | unsigned long lo; | 42 | unsigned long lo; |
43 | #ifdef CONFIG_CPU_HAS_SMARTMIPS | ||
44 | unsigned long acx; | ||
45 | #endif | ||
42 | unsigned long cp0_badvaddr; | 46 | unsigned long cp0_badvaddr; |
43 | unsigned long cp0_cause; | 47 | unsigned long cp0_cause; |
44 | unsigned long cp0_epc; | 48 | unsigned long cp0_epc; |
diff --git a/include/asm-mips/sigcontext.h b/include/asm-mips/sigcontext.h index 972947474e..9ce0607d7a 100644 --- a/include/asm-mips/sigcontext.h +++ b/include/asm-mips/sigcontext.h | |||
@@ -23,7 +23,7 @@ struct sigcontext { | |||
23 | unsigned long long sc_pc; | 23 | unsigned long long sc_pc; |
24 | unsigned long long sc_regs[32]; | 24 | unsigned long long sc_regs[32]; |
25 | unsigned long long sc_fpregs[32]; | 25 | unsigned long long sc_fpregs[32]; |
26 | unsigned int sc_ownedfp; /* Unused */ | 26 | unsigned int sc_acx; /* Was sc_ownedfp */ |
27 | unsigned int sc_fpc_csr; | 27 | unsigned int sc_fpc_csr; |
28 | unsigned int sc_fpc_eir; /* Unused */ | 28 | unsigned int sc_fpc_eir; /* Unused */ |
29 | unsigned int sc_used_math; | 29 | unsigned int sc_used_math; |
@@ -79,7 +79,7 @@ struct sigcontext32 { | |||
79 | __u64 sc_pc; | 79 | __u64 sc_pc; |
80 | __u64 sc_regs[32]; | 80 | __u64 sc_regs[32]; |
81 | __u64 sc_fpregs[32]; | 81 | __u64 sc_fpregs[32]; |
82 | __u32 sc_ownedfp; /* Unused */ | 82 | __u32 sc_acx; /* Only MIPS32; was sc_ownedfp */ |
83 | __u32 sc_fpc_csr; | 83 | __u32 sc_fpc_csr; |
84 | __u32 sc_fpc_eir; /* Unused */ | 84 | __u32 sc_fpc_eir; /* Unused */ |
85 | __u32 sc_used_math; | 85 | __u32 sc_used_math; |
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h index 1fae5dc581..7afa1fdf70 100644 --- a/include/asm-mips/stackframe.h +++ b/include/asm-mips/stackframe.h | |||
@@ -29,16 +29,25 @@ | |||
29 | .endm | 29 | .endm |
30 | 30 | ||
31 | .macro SAVE_TEMP | 31 | .macro SAVE_TEMP |
32 | #ifdef CONFIG_CPU_HAS_SMARTMIPS | ||
33 | mflhxu v1 | ||
34 | LONG_S v1, PT_LO(sp) | ||
35 | mflhxu v1 | ||
36 | LONG_S v1, PT_HI(sp) | ||
37 | mflhxu v1 | ||
38 | LONG_S v1, PT_ACX(sp) | ||
39 | #else | ||
32 | mfhi v1 | 40 | mfhi v1 |
41 | LONG_S v1, PT_HI(sp) | ||
42 | mflo v1 | ||
43 | LONG_S v1, PT_LO(sp) | ||
44 | #endif | ||
33 | #ifdef CONFIG_32BIT | 45 | #ifdef CONFIG_32BIT |
34 | LONG_S $8, PT_R8(sp) | 46 | LONG_S $8, PT_R8(sp) |
35 | LONG_S $9, PT_R9(sp) | 47 | LONG_S $9, PT_R9(sp) |
36 | #endif | 48 | #endif |
37 | LONG_S v1, PT_HI(sp) | ||
38 | mflo v1 | ||
39 | LONG_S $10, PT_R10(sp) | 49 | LONG_S $10, PT_R10(sp) |
40 | LONG_S $11, PT_R11(sp) | 50 | LONG_S $11, PT_R11(sp) |
41 | LONG_S v1, PT_LO(sp) | ||
42 | LONG_S $12, PT_R12(sp) | 51 | LONG_S $12, PT_R12(sp) |
43 | LONG_S $13, PT_R13(sp) | 52 | LONG_S $13, PT_R13(sp) |
44 | LONG_S $14, PT_R14(sp) | 53 | LONG_S $14, PT_R14(sp) |
@@ -182,16 +191,25 @@ | |||
182 | .endm | 191 | .endm |
183 | 192 | ||
184 | .macro RESTORE_TEMP | 193 | .macro RESTORE_TEMP |
194 | #ifdef CONFIG_CPU_HAS_SMARTMIPS | ||
195 | LONG_L $24, PT_ACX(sp) | ||
196 | mtlhx $24 | ||
197 | LONG_L $24, PT_HI(sp) | ||
198 | mtlhx $24 | ||
185 | LONG_L $24, PT_LO(sp) | 199 | LONG_L $24, PT_LO(sp) |
200 | mtlhx $24 | ||
201 | #else | ||
202 | LONG_L $24, PT_LO(sp) | ||
203 | mtlo $24 | ||
204 | LONG_L $24, PT_HI(sp) | ||
205 | mthi $24 | ||
206 | #endif | ||
186 | #ifdef CONFIG_32BIT | 207 | #ifdef CONFIG_32BIT |
187 | LONG_L $8, PT_R8(sp) | 208 | LONG_L $8, PT_R8(sp) |
188 | LONG_L $9, PT_R9(sp) | 209 | LONG_L $9, PT_R9(sp) |
189 | #endif | 210 | #endif |
190 | mtlo $24 | ||
191 | LONG_L $24, PT_HI(sp) | ||
192 | LONG_L $10, PT_R10(sp) | 211 | LONG_L $10, PT_R10(sp) |
193 | LONG_L $11, PT_R11(sp) | 212 | LONG_L $11, PT_R11(sp) |
194 | mthi $24 | ||
195 | LONG_L $12, PT_R12(sp) | 213 | LONG_L $12, PT_R12(sp) |
196 | LONG_L $13, PT_R13(sp) | 214 | LONG_L $13, PT_R13(sp) |
197 | LONG_L $14, PT_R14(sp) | 215 | LONG_L $14, PT_R14(sp) |
diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h index 552df5f10a..2e4b7a5ed1 100644 --- a/include/asm-x86_64/hw_irq.h +++ b/include/asm-x86_64/hw_irq.h | |||
@@ -32,9 +32,30 @@ | |||
32 | #define IA32_SYSCALL_VECTOR 0x80 | 32 | #define IA32_SYSCALL_VECTOR 0x80 |
33 | 33 | ||
34 | 34 | ||
35 | /* Reserve the lowest usable priority level 0x20 - 0x2f for triggering | ||
36 | * cleanup after irq migration. | ||
37 | */ | ||
38 | #define IRQ_MOVE_CLEANUP_VECTOR FIRST_EXTERNAL_VECTOR | ||
39 | |||
35 | /* | 40 | /* |
36 | * Vectors 0x20-0x2f are used for ISA interrupts. | 41 | * Vectors 0x20-0x2f are used for ISA interrupts. |
37 | */ | 42 | */ |
43 | #define IRQ0_VECTOR FIRST_EXTERNAL_VECTOR + 0x10 | ||
44 | #define IRQ1_VECTOR IRQ0_VECTOR + 1 | ||
45 | #define IRQ2_VECTOR IRQ0_VECTOR + 2 | ||
46 | #define IRQ3_VECTOR IRQ0_VECTOR + 3 | ||
47 | #define IRQ4_VECTOR IRQ0_VECTOR + 4 | ||
48 | #define IRQ5_VECTOR IRQ0_VECTOR + 5 | ||
49 | #define IRQ6_VECTOR IRQ0_VECTOR + 6 | ||
50 | #define IRQ7_VECTOR IRQ0_VECTOR + 7 | ||
51 | #define IRQ8_VECTOR IRQ0_VECTOR + 8 | ||
52 | #define IRQ9_VECTOR IRQ0_VECTOR + 9 | ||
53 | #define IRQ10_VECTOR IRQ0_VECTOR + 10 | ||
54 | #define IRQ11_VECTOR IRQ0_VECTOR + 11 | ||
55 | #define IRQ12_VECTOR IRQ0_VECTOR + 12 | ||
56 | #define IRQ13_VECTOR IRQ0_VECTOR + 13 | ||
57 | #define IRQ14_VECTOR IRQ0_VECTOR + 14 | ||
58 | #define IRQ15_VECTOR IRQ0_VECTOR + 15 | ||
38 | 59 | ||
39 | /* | 60 | /* |
40 | * Special IRQ vectors used by the SMP architecture, 0xf0-0xff | 61 | * Special IRQ vectors used by the SMP architecture, 0xf0-0xff |
@@ -66,10 +87,10 @@ | |||
66 | 87 | ||
67 | /* | 88 | /* |
68 | * First APIC vector available to drivers: (vectors 0x30-0xee) | 89 | * First APIC vector available to drivers: (vectors 0x30-0xee) |
69 | * we start at 0x31 to spread out vectors evenly between priority | 90 | * we start at 0x41 to spread out vectors evenly between priority |
70 | * levels. (0x80 is the syscall vector) | 91 | * levels. (0x80 is the syscall vector) |
71 | */ | 92 | */ |
72 | #define FIRST_DEVICE_VECTOR 0x31 | 93 | #define FIRST_DEVICE_VECTOR (IRQ15_VECTOR + 2) |
73 | #define FIRST_SYSTEM_VECTOR 0xef /* duplicated in irq.h */ | 94 | #define FIRST_SYSTEM_VECTOR 0xef /* duplicated in irq.h */ |
74 | 95 | ||
75 | 96 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index d1a3a27c39..39a3199a82 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -294,8 +294,6 @@ extern void class_device_initialize(struct class_device *); | |||
294 | extern int __must_check class_device_add(struct class_device *); | 294 | extern int __must_check class_device_add(struct class_device *); |
295 | extern void class_device_del(struct class_device *); | 295 | extern void class_device_del(struct class_device *); |
296 | 296 | ||
297 | extern int class_device_rename(struct class_device *, char *); | ||
298 | |||
299 | extern struct class_device * class_device_get(struct class_device *); | 297 | extern struct class_device * class_device_get(struct class_device *); |
300 | extern void class_device_put(struct class_device *); | 298 | extern void class_device_put(struct class_device *); |
301 | 299 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index aa5b3e6178..b0a44b8e02 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -200,17 +200,6 @@ extern int setup_irq(unsigned int irq, struct irqaction *new); | |||
200 | #endif | 200 | #endif |
201 | 201 | ||
202 | #ifdef CONFIG_SMP | 202 | #ifdef CONFIG_SMP |
203 | static inline void set_native_irq_info(int irq, cpumask_t mask) | ||
204 | { | ||
205 | irq_desc[irq].affinity = mask; | ||
206 | } | ||
207 | #else | ||
208 | static inline void set_native_irq_info(int irq, cpumask_t mask) | ||
209 | { | ||
210 | } | ||
211 | #endif | ||
212 | |||
213 | #ifdef CONFIG_SMP | ||
214 | 203 | ||
215 | #if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) | 204 | #if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) |
216 | 205 | ||
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index cc8e674ae2..10f505c843 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -28,10 +28,8 @@ | |||
28 | #ifdef CONFIG_KMOD | 28 | #ifdef CONFIG_KMOD |
29 | /* modprobe exit status on success, -ve on error. Return value | 29 | /* modprobe exit status on success, -ve on error. Return value |
30 | * usually useless though. */ | 30 | * usually useless though. */ |
31 | extern void kmod_sysfs_init(void); | ||
32 | extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2))); | 31 | extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2))); |
33 | #else | 32 | #else |
34 | static inline void kmod_sysfs_init(void) {}; | ||
35 | static inline int request_module(const char * name, ...) { return -ENOSYS; } | 33 | static inline int request_module(const char * name, ...) { return -ENOSYS; } |
36 | #endif | 34 | #endif |
37 | 35 | ||
diff --git a/include/linux/pm.h b/include/linux/pm.h index 070394e846..21db05ac7c 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -120,15 +120,48 @@ typedef int __bitwise suspend_disk_method_t; | |||
120 | #define PM_DISK_TESTPROC ((__force suspend_disk_method_t) 6) | 120 | #define PM_DISK_TESTPROC ((__force suspend_disk_method_t) 6) |
121 | #define PM_DISK_MAX ((__force suspend_disk_method_t) 7) | 121 | #define PM_DISK_MAX ((__force suspend_disk_method_t) 7) |
122 | 122 | ||
123 | /** | ||
124 | * struct pm_ops - Callbacks for managing platform dependent suspend states. | ||
125 | * @valid: Callback to determine whether the given state can be entered. | ||
126 | * If %CONFIG_SOFTWARE_SUSPEND is set then %PM_SUSPEND_DISK is | ||
127 | * always valid and never passed to this call. | ||
128 | * If not assigned, all suspend states are advertised as valid | ||
129 | * in /sys/power/state (but can still be rejected by prepare or enter.) | ||
130 | * | ||
131 | * @prepare: Prepare the platform for the given suspend state. Can return a | ||
132 | * negative error code if necessary. | ||
133 | * | ||
134 | * @enter: Enter the given suspend state, must be assigned. Can return a | ||
135 | * negative error code if necessary. | ||
136 | * | ||
137 | * @finish: Called when the system has left the given state and all devices | ||
138 | * are resumed. The return value is ignored. | ||
139 | * | ||
140 | * @pm_disk_mode: Set to the disk method that the user should be able to | ||
141 | * configure for suspend-to-disk. Since %PM_DISK_SHUTDOWN, | ||
142 | * %PM_DISK_REBOOT, %PM_DISK_TEST and %PM_DISK_TESTPROC | ||
143 | * are always allowed, currently only %PM_DISK_PLATFORM | ||
144 | * makes sense. If the user then choses %PM_DISK_PLATFORM, | ||
145 | * the @prepare call will be called before suspending to disk | ||
146 | * (if present), the @enter call should be present and will | ||
147 | * be called after all state has been saved and the machine | ||
148 | * is ready to be shut down/suspended/..., and the @finish | ||
149 | * callback is called after state has been restored. All | ||
150 | * these calls are called with %PM_SUSPEND_DISK as the state. | ||
151 | */ | ||
123 | struct pm_ops { | 152 | struct pm_ops { |
124 | suspend_disk_method_t pm_disk_mode; | ||
125 | int (*valid)(suspend_state_t state); | 153 | int (*valid)(suspend_state_t state); |
126 | int (*prepare)(suspend_state_t state); | 154 | int (*prepare)(suspend_state_t state); |
127 | int (*enter)(suspend_state_t state); | 155 | int (*enter)(suspend_state_t state); |
128 | int (*finish)(suspend_state_t state); | 156 | int (*finish)(suspend_state_t state); |
157 | suspend_disk_method_t pm_disk_mode; | ||
129 | }; | 158 | }; |
130 | 159 | ||
131 | extern void pm_set_ops(struct pm_ops *); | 160 | /** |
161 | * pm_set_ops - set platform dependent power management ops | ||
162 | * @pm_ops: The new power management operations to set. | ||
163 | */ | ||
164 | extern void pm_set_ops(struct pm_ops *pm_ops); | ||
132 | extern struct pm_ops *pm_ops; | 165 | extern struct pm_ops *pm_ops; |
133 | extern int pm_suspend(suspend_state_t state); | 166 | extern int pm_suspend(suspend_state_t state); |
134 | 167 | ||
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 192de3afa9..21805b500a 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -17,6 +17,7 @@ | |||
17 | struct kobject; | 17 | struct kobject; |
18 | struct module; | 18 | struct module; |
19 | struct nameidata; | 19 | struct nameidata; |
20 | struct dentry; | ||
20 | 21 | ||
21 | struct attribute { | 22 | struct attribute { |
22 | const char * name; | 23 | const char * name; |
@@ -68,18 +69,6 @@ struct sysfs_ops { | |||
68 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); | 69 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); |
69 | }; | 70 | }; |
70 | 71 | ||
71 | struct sysfs_dirent { | ||
72 | atomic_t s_count; | ||
73 | struct list_head s_sibling; | ||
74 | struct list_head s_children; | ||
75 | void * s_element; | ||
76 | int s_type; | ||
77 | umode_t s_mode; | ||
78 | struct dentry * s_dentry; | ||
79 | struct iattr * s_iattr; | ||
80 | atomic_t s_event; | ||
81 | }; | ||
82 | |||
83 | #define SYSFS_ROOT 0x0001 | 72 | #define SYSFS_ROOT 0x0001 |
84 | #define SYSFS_DIR 0x0002 | 73 | #define SYSFS_DIR 0x0002 |
85 | #define SYSFS_KOBJ_ATTR 0x0004 | 74 | #define SYSFS_KOBJ_ATTR 0x0004 |
@@ -126,6 +115,11 @@ void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr); | |||
126 | int __must_check sysfs_create_group(struct kobject *, | 115 | int __must_check sysfs_create_group(struct kobject *, |
127 | const struct attribute_group *); | 116 | const struct attribute_group *); |
128 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); | 117 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); |
118 | int sysfs_add_file_to_group(struct kobject *kobj, | ||
119 | const struct attribute *attr, const char *group); | ||
120 | void sysfs_remove_file_from_group(struct kobject *kobj, | ||
121 | const struct attribute *attr, const char *group); | ||
122 | |||
129 | void sysfs_notify(struct kobject * k, char *dir, char *attr); | 123 | void sysfs_notify(struct kobject * k, char *dir, char *attr); |
130 | 124 | ||
131 | 125 | ||
@@ -210,6 +204,18 @@ static inline void sysfs_remove_group(struct kobject * k, const struct attribute | |||
210 | ; | 204 | ; |
211 | } | 205 | } |
212 | 206 | ||
207 | static inline int sysfs_add_file_to_group(struct kobject *kobj, | ||
208 | const struct attribute *attr, const char *group) | ||
209 | { | ||
210 | return 0; | ||
211 | } | ||
212 | |||
213 | static inline void sysfs_remove_file_from_group(struct kobject *kobj, | ||
214 | const struct attribute *attr, const char *group); | ||
215 | { | ||
216 | ; | ||
217 | } | ||
218 | |||
213 | static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) | 219 | static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) |
214 | { | 220 | { |
215 | } | 221 | } |
diff --git a/include/linux/usb.h b/include/linux/usb.h index a8e8d1eceb..87dc75a6ce 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -388,10 +388,14 @@ struct usb_device { | |||
388 | struct usb_device *children[USB_MAXCHILDREN]; | 388 | struct usb_device *children[USB_MAXCHILDREN]; |
389 | 389 | ||
390 | int pm_usage_cnt; /* usage counter for autosuspend */ | 390 | int pm_usage_cnt; /* usage counter for autosuspend */ |
391 | u32 quirks; /* quirks of the whole device */ | ||
392 | |||
391 | #ifdef CONFIG_PM | 393 | #ifdef CONFIG_PM |
392 | struct delayed_work autosuspend; /* for delayed autosuspends */ | 394 | struct delayed_work autosuspend; /* for delayed autosuspends */ |
393 | struct mutex pm_mutex; /* protects PM operations */ | 395 | struct mutex pm_mutex; /* protects PM operations */ |
394 | 396 | ||
397 | unsigned autosuspend_delay; /* in jiffies */ | ||
398 | |||
395 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | 399 | unsigned auto_pm:1; /* autosuspend/resume in progress */ |
396 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ | 400 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ |
397 | #endif | 401 | #endif |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 245c725312..1122a6c2c1 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -1,8 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * This file holds USB constants and structures that are needed for USB | 2 | * This file holds USB constants and structures that are needed for |
3 | * device APIs. These are used by the USB device model, which is defined | 3 | * USB device APIs. These are used by the USB device model, which is |
4 | * in chapter 9 of the USB 2.0 specification. Linux has several APIs in C | 4 | * defined in chapter 9 of the USB 2.0 specification and in the |
5 | * that need these: | 5 | * Wireless USB 1.0 (spread around). Linux has several APIs in C that |
6 | * need these: | ||
6 | * | 7 | * |
7 | * - the master/host side Linux-USB kernel driver API; | 8 | * - the master/host side Linux-USB kernel driver API; |
8 | * - the "usbfs" user space API; and | 9 | * - the "usbfs" user space API; and |
@@ -14,6 +15,19 @@ | |||
14 | * | 15 | * |
15 | * There's also "Wireless USB", using low power short range radios for | 16 | * There's also "Wireless USB", using low power short range radios for |
16 | * peripheral interconnection but otherwise building on the USB framework. | 17 | * peripheral interconnection but otherwise building on the USB framework. |
18 | * | ||
19 | * Note all descriptors are declared '__attribute__((packed))' so that: | ||
20 | * | ||
21 | * [a] they never get padded, either internally (USB spec writers | ||
22 | * probably handled that) or externally; | ||
23 | * | ||
24 | * [b] so that accessing bigger-than-a-bytes fields will never | ||
25 | * generate bus errors on any platform, even when the location of | ||
26 | * its descriptor inside a bundle isn't "naturally aligned", and | ||
27 | * | ||
28 | * [c] for consistency, removing all doubt even when it appears to | ||
29 | * someone that the two other points are non-issues for that | ||
30 | * particular descriptor type. | ||
17 | */ | 31 | */ |
18 | 32 | ||
19 | #ifndef __LINUX_USB_CH9_H | 33 | #ifndef __LINUX_USB_CH9_H |
diff --git a/include/linux/usb/iowarrior.h b/include/linux/usb/iowarrior.h new file mode 100644 index 0000000000..cbbe020a4f --- /dev/null +++ b/include/linux/usb/iowarrior.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef _IOWARRIOR_H_ | ||
2 | #define _IOWARRIOR_H_ | ||
3 | |||
4 | #define CODEMERCS_MAGIC_NUMBER 0xC0 /* like COde Mercenaries */ | ||
5 | |||
6 | /* Define the ioctl commands for reading and writing data */ | ||
7 | #define IOW_WRITE _IOW(CODEMERCS_MAGIC_NUMBER, 1, __u8 *) | ||
8 | #define IOW_READ _IOW(CODEMERCS_MAGIC_NUMBER, 2, __u8 *) | ||
9 | |||
10 | /* | ||
11 | A struct for available device info which is read | ||
12 | with the ioctl IOW_GETINFO. | ||
13 | To be compatible with 2.4 userspace which didn't have an easy way to get | ||
14 | this information. | ||
15 | */ | ||
16 | struct iowarrior_info { | ||
17 | __u32 vendor; /* vendor id : supposed to be USB_VENDOR_ID_CODEMERCS in all cases */ | ||
18 | __u32 product; /* product id : depends on type of chip (USB_DEVICE_ID_CODEMERCS_XXXXX) */ | ||
19 | __u8 serial[9]; /* the serial number of our chip (if a serial-number is not available this is empty string) */ | ||
20 | __u32 revision; /* revision number of the chip */ | ||
21 | __u32 speed; /* USB-speed of the device (0=UNKNOWN, 1=LOW, 2=FULL 3=HIGH) */ | ||
22 | __u32 power; /* power consumption of the device in mA */ | ||
23 | __u32 if_num; /* the number of the endpoint */ | ||
24 | __u32 report_size; /* size of the data-packets on this interface */ | ||
25 | }; | ||
26 | |||
27 | /* | ||
28 | Get some device-information (product-id , serial-number etc.) | ||
29 | in order to identify a chip. | ||
30 | */ | ||
31 | #define IOW_GETINFO _IOR(CODEMERCS_MAGIC_NUMBER, 3, struct iowarrior_info) | ||
32 | |||
33 | #endif /* _IOWARRIOR_H_ */ | ||
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h new file mode 100644 index 0000000000..6bac8faacb --- /dev/null +++ b/include/linux/usb/quirks.h | |||
@@ -0,0 +1,11 @@ | |||
1 | /* | ||
2 | * This file holds the definitions of quirks found in USB devices. | ||
3 | * Only quirks that affect the whole device, not an interface, | ||
4 | * belong here. | ||
5 | */ | ||
6 | |||
7 | /* device must not be autosuspended */ | ||
8 | #define USB_QUIRK_NO_AUTOSUSPEND 0x00000001 | ||
9 | |||
10 | /* string descriptors must not be fetched using a 255-byte read */ | ||
11 | #define USB_QUIRK_STRING_FETCH_255 0x00000002 | ||