diff options
Diffstat (limited to 'include/linux')
37 files changed, 591 insertions, 663 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index 3901b0022cda..6617c9f8f2ca 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -250,8 +250,6 @@ enum { | |||
250 | ATA_CMD_MEDIA_UNLOCK = 0xDF, | 250 | ATA_CMD_MEDIA_UNLOCK = 0xDF, |
251 | /* marked obsolete in the ATA/ATAPI-7 spec */ | 251 | /* marked obsolete in the ATA/ATAPI-7 spec */ |
252 | ATA_CMD_RESTORE = 0x10, | 252 | ATA_CMD_RESTORE = 0x10, |
253 | /* EXABYTE specific */ | ||
254 | ATA_EXABYTE_ENABLE_NEST = 0xF0, | ||
255 | 253 | ||
256 | /* READ_LOG_EXT pages */ | 254 | /* READ_LOG_EXT pages */ |
257 | ATA_LOG_SATA_NCQ = 0x10, | 255 | ATA_LOG_SATA_NCQ = 0x10, |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 67e5dbfc2961..4fa2810b675e 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -36,7 +36,8 @@ | |||
36 | * 1500 - 1599 kernel LSPP events | 36 | * 1500 - 1599 kernel LSPP events |
37 | * 1600 - 1699 kernel crypto events | 37 | * 1600 - 1699 kernel crypto events |
38 | * 1700 - 1799 kernel anomaly records | 38 | * 1700 - 1799 kernel anomaly records |
39 | * 1800 - 1999 future kernel use (maybe integrity labels and related events) | 39 | * 1800 - 1899 kernel integrity events |
40 | * 1900 - 1999 future kernel use | ||
40 | * 2000 is for otherwise unclassified kernel audit messages (legacy) | 41 | * 2000 is for otherwise unclassified kernel audit messages (legacy) |
41 | * 2001 - 2099 unused (kernel) | 42 | * 2001 - 2099 unused (kernel) |
42 | * 2100 - 2199 user space anomaly records | 43 | * 2100 - 2199 user space anomaly records |
@@ -125,6 +126,12 @@ | |||
125 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 | 126 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 |
126 | #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */ | 127 | #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */ |
127 | #define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */ | 128 | #define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */ |
129 | #define AUDIT_INTEGRITY_DATA 1800 /* Data integrity verification */ | ||
130 | #define AUDIT_INTEGRITY_METADATA 1801 /* Metadata integrity verification */ | ||
131 | #define AUDIT_INTEGRITY_STATUS 1802 /* Integrity enable status */ | ||
132 | #define AUDIT_INTEGRITY_HASH 1803 /* Integrity HASH type */ | ||
133 | #define AUDIT_INTEGRITY_PCR 1804 /* PCR invalidation msgs */ | ||
134 | #define AUDIT_INTEGRITY_RULE 1805 /* policy rule */ | ||
128 | 135 | ||
129 | #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ | 136 | #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ |
130 | 137 | ||
diff --git a/include/linux/console.h b/include/linux/console.h index a67a90cf8268..dcca5339ceb3 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -137,8 +137,8 @@ extern void resume_console(void); | |||
137 | int mda_console_init(void); | 137 | int mda_console_init(void); |
138 | void prom_con_init(void); | 138 | void prom_con_init(void); |
139 | 139 | ||
140 | void vcs_make_sysfs(struct tty_struct *tty); | 140 | void vcs_make_sysfs(int index); |
141 | void vcs_remove_sysfs(struct tty_struct *tty); | 141 | void vcs_remove_sysfs(int index); |
142 | 142 | ||
143 | /* Some debug stub to catch some of the obvious races in the VT code */ | 143 | /* Some debug stub to catch some of the obvious races in the VT code */ |
144 | #if 1 | 144 | #if 1 |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 1f2e9020acc6..ec29fa268b94 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -40,6 +40,7 @@ | |||
40 | #define CRYPTO_ALG_TYPE_SHASH 0x00000009 | 40 | #define CRYPTO_ALG_TYPE_SHASH 0x00000009 |
41 | #define CRYPTO_ALG_TYPE_AHASH 0x0000000a | 41 | #define CRYPTO_ALG_TYPE_AHASH 0x0000000a |
42 | #define CRYPTO_ALG_TYPE_RNG 0x0000000c | 42 | #define CRYPTO_ALG_TYPE_RNG 0x0000000c |
43 | #define CRYPTO_ALG_TYPE_PCOMPRESS 0x0000000f | ||
43 | 44 | ||
44 | #define CRYPTO_ALG_TYPE_HASH_MASK 0x0000000e | 45 | #define CRYPTO_ALG_TYPE_HASH_MASK 0x0000000e |
45 | #define CRYPTO_ALG_TYPE_AHASH_MASK 0x0000000c | 46 | #define CRYPTO_ALG_TYPE_AHASH_MASK 0x0000000c |
@@ -548,9 +549,6 @@ struct crypto_attr_u32 { | |||
548 | * Transform user interface. | 549 | * Transform user interface. |
549 | */ | 550 | */ |
550 | 551 | ||
551 | struct crypto_tfm *crypto_alloc_tfm(const char *alg_name, | ||
552 | const struct crypto_type *frontend, | ||
553 | u32 type, u32 mask); | ||
554 | struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask); | 552 | struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask); |
555 | void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm); | 553 | void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm); |
556 | 554 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index 47f343c7bdda..2918c0e8fdfd 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #define BUS_ID_SIZE 20 | 28 | #define BUS_ID_SIZE 20 |
29 | 29 | ||
30 | struct device; | 30 | struct device; |
31 | struct device_private; | ||
31 | struct device_driver; | 32 | struct device_driver; |
32 | struct driver_private; | 33 | struct driver_private; |
33 | struct class; | 34 | struct class; |
@@ -147,7 +148,7 @@ extern void put_driver(struct device_driver *drv); | |||
147 | extern struct device_driver *driver_find(const char *name, | 148 | extern struct device_driver *driver_find(const char *name, |
148 | struct bus_type *bus); | 149 | struct bus_type *bus); |
149 | extern int driver_probe_done(void); | 150 | extern int driver_probe_done(void); |
150 | extern int wait_for_device_probe(void); | 151 | extern void wait_for_device_probe(void); |
151 | 152 | ||
152 | 153 | ||
153 | /* sysfs interface for exporting driver attributes */ | 154 | /* sysfs interface for exporting driver attributes */ |
@@ -367,15 +368,11 @@ struct device_dma_parameters { | |||
367 | }; | 368 | }; |
368 | 369 | ||
369 | struct device { | 370 | struct device { |
370 | struct klist klist_children; | ||
371 | struct klist_node knode_parent; /* node in sibling list */ | ||
372 | struct klist_node knode_driver; | ||
373 | struct klist_node knode_bus; | ||
374 | struct device *parent; | 371 | struct device *parent; |
375 | 372 | ||
373 | struct device_private *p; | ||
374 | |||
376 | struct kobject kobj; | 375 | struct kobject kobj; |
377 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ | ||
378 | unsigned uevent_suppress:1; | ||
379 | const char *init_name; /* initial name of the device */ | 376 | const char *init_name; /* initial name of the device */ |
380 | struct device_type *type; | 377 | struct device_type *type; |
381 | 378 | ||
@@ -387,8 +384,13 @@ struct device { | |||
387 | struct device_driver *driver; /* which driver has allocated this | 384 | struct device_driver *driver; /* which driver has allocated this |
388 | device */ | 385 | device */ |
389 | void *driver_data; /* data private to the driver */ | 386 | void *driver_data; /* data private to the driver */ |
390 | void *platform_data; /* Platform specific data, device | 387 | |
391 | core doesn't touch it */ | 388 | void *platform_data; /* We will remove platform_data |
389 | field if all platform devices | ||
390 | pass its platform specific data | ||
391 | from platform_device->platform_data, | ||
392 | other kind of devices should not | ||
393 | use platform_data. */ | ||
392 | struct dev_pm_info power; | 394 | struct dev_pm_info power; |
393 | 395 | ||
394 | #ifdef CONFIG_NUMA | 396 | #ifdef CONFIG_NUMA |
@@ -427,8 +429,7 @@ struct device { | |||
427 | 429 | ||
428 | static inline const char *dev_name(const struct device *dev) | 430 | static inline const char *dev_name(const struct device *dev) |
429 | { | 431 | { |
430 | /* will be changed into kobject_name(&dev->kobj) in the near future */ | 432 | return kobject_name(&dev->kobj); |
431 | return dev->bus_id; | ||
432 | } | 433 | } |
433 | 434 | ||
434 | extern int dev_set_name(struct device *dev, const char *name, ...) | 435 | extern int dev_set_name(struct device *dev, const char *name, ...) |
@@ -463,6 +464,16 @@ static inline void dev_set_drvdata(struct device *dev, void *data) | |||
463 | dev->driver_data = data; | 464 | dev->driver_data = data; |
464 | } | 465 | } |
465 | 466 | ||
467 | static inline unsigned int dev_get_uevent_suppress(const struct device *dev) | ||
468 | { | ||
469 | return dev->kobj.uevent_suppress; | ||
470 | } | ||
471 | |||
472 | static inline void dev_set_uevent_suppress(struct device *dev, int val) | ||
473 | { | ||
474 | dev->kobj.uevent_suppress = val; | ||
475 | } | ||
476 | |||
466 | static inline int device_is_registered(struct device *dev) | 477 | static inline int device_is_registered(struct device *dev) |
467 | { | 478 | { |
468 | return dev->kobj.state_in_sysfs; | 479 | return dev->kobj.state_in_sysfs; |
@@ -483,7 +494,8 @@ extern int device_for_each_child(struct device *dev, void *data, | |||
483 | extern struct device *device_find_child(struct device *dev, void *data, | 494 | extern struct device *device_find_child(struct device *dev, void *data, |
484 | int (*match)(struct device *dev, void *data)); | 495 | int (*match)(struct device *dev, void *data)); |
485 | extern int device_rename(struct device *dev, char *new_name); | 496 | extern int device_rename(struct device *dev, char *new_name); |
486 | extern int device_move(struct device *dev, struct device *new_parent); | 497 | extern int device_move(struct device *dev, struct device *new_parent, |
498 | enum dpm_order dpm_order); | ||
487 | 499 | ||
488 | /* | 500 | /* |
489 | * Root device objects for grouping under /sys/devices | 501 | * Root device objects for grouping under /sys/devices |
@@ -570,7 +582,7 @@ extern const char *dev_driver_string(const struct device *dev); | |||
570 | #if defined(DEBUG) | 582 | #if defined(DEBUG) |
571 | #define dev_dbg(dev, format, arg...) \ | 583 | #define dev_dbg(dev, format, arg...) \ |
572 | dev_printk(KERN_DEBUG , dev , format , ## arg) | 584 | dev_printk(KERN_DEBUG , dev , format , ## arg) |
573 | #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 585 | #elif defined(CONFIG_DYNAMIC_DEBUG) |
574 | #define dev_dbg(dev, format, ...) do { \ | 586 | #define dev_dbg(dev, format, ...) do { \ |
575 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ | 587 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ |
576 | } while (0) | 588 | } while (0) |
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h new file mode 100644 index 000000000000..baabf33be244 --- /dev/null +++ b/include/linux/dynamic_debug.h | |||
@@ -0,0 +1,88 @@ | |||
1 | #ifndef _DYNAMIC_DEBUG_H | ||
2 | #define _DYNAMIC_DEBUG_H | ||
3 | |||
4 | /* dynamic_printk_enabled, and dynamic_printk_enabled2 are bitmasks in which | ||
5 | * bit n is set to 1 if any modname hashes into the bucket n, 0 otherwise. They | ||
6 | * use independent hash functions, to reduce the chance of false positives. | ||
7 | */ | ||
8 | extern long long dynamic_debug_enabled; | ||
9 | extern long long dynamic_debug_enabled2; | ||
10 | |||
11 | /* | ||
12 | * An instance of this structure is created in a special | ||
13 | * ELF section at every dynamic debug callsite. At runtime, | ||
14 | * the special section is treated as an array of these. | ||
15 | */ | ||
16 | struct _ddebug { | ||
17 | /* | ||
18 | * These fields are used to drive the user interface | ||
19 | * for selecting and displaying debug callsites. | ||
20 | */ | ||
21 | const char *modname; | ||
22 | const char *function; | ||
23 | const char *filename; | ||
24 | const char *format; | ||
25 | char primary_hash; | ||
26 | char secondary_hash; | ||
27 | unsigned int lineno:24; | ||
28 | /* | ||
29 | * The flags field controls the behaviour at the callsite. | ||
30 | * The bits here are changed dynamically when the user | ||
31 | * writes commands to <debugfs>/dynamic_debug/ddebug | ||
32 | */ | ||
33 | #define _DPRINTK_FLAGS_PRINT (1<<0) /* printk() a message using the format */ | ||
34 | #define _DPRINTK_FLAGS_DEFAULT 0 | ||
35 | unsigned int flags:8; | ||
36 | } __attribute__((aligned(8))); | ||
37 | |||
38 | |||
39 | int ddebug_add_module(struct _ddebug *tab, unsigned int n, | ||
40 | const char *modname); | ||
41 | |||
42 | #if defined(CONFIG_DYNAMIC_DEBUG) | ||
43 | extern int ddebug_remove_module(char *mod_name); | ||
44 | |||
45 | #define __dynamic_dbg_enabled(dd) ({ \ | ||
46 | int __ret = 0; \ | ||
47 | if (unlikely((dynamic_debug_enabled & (1LL << DEBUG_HASH)) && \ | ||
48 | (dynamic_debug_enabled2 & (1LL << DEBUG_HASH2)))) \ | ||
49 | if (unlikely(dd.flags)) \ | ||
50 | __ret = 1; \ | ||
51 | __ret; }) | ||
52 | |||
53 | #define dynamic_pr_debug(fmt, ...) do { \ | ||
54 | static struct _ddebug descriptor \ | ||
55 | __used \ | ||
56 | __attribute__((section("__verbose"), aligned(8))) = \ | ||
57 | { KBUILD_MODNAME, __func__, __FILE__, fmt, DEBUG_HASH, \ | ||
58 | DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ | ||
59 | if (__dynamic_dbg_enabled(descriptor)) \ | ||
60 | printk(KERN_DEBUG KBUILD_MODNAME ":" pr_fmt(fmt), \ | ||
61 | ##__VA_ARGS__); \ | ||
62 | } while (0) | ||
63 | |||
64 | |||
65 | #define dynamic_dev_dbg(dev, fmt, ...) do { \ | ||
66 | static struct _ddebug descriptor \ | ||
67 | __used \ | ||
68 | __attribute__((section("__verbose"), aligned(8))) = \ | ||
69 | { KBUILD_MODNAME, __func__, __FILE__, fmt, DEBUG_HASH, \ | ||
70 | DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ | ||
71 | if (__dynamic_dbg_enabled(descriptor)) \ | ||
72 | dev_printk(KERN_DEBUG, dev, \ | ||
73 | KBUILD_MODNAME ": " pr_fmt(fmt),\ | ||
74 | ##__VA_ARGS__); \ | ||
75 | } while (0) | ||
76 | |||
77 | #else | ||
78 | |||
79 | static inline int ddebug_remove_module(char *mod) | ||
80 | { | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | #define dynamic_pr_debug(fmt, ...) do { } while (0) | ||
85 | #define dynamic_dev_dbg(dev, format, ...) do { } while (0) | ||
86 | #endif | ||
87 | |||
88 | #endif | ||
diff --git a/include/linux/dynamic_printk.h b/include/linux/dynamic_printk.h deleted file mode 100644 index 2d528d009074..000000000000 --- a/include/linux/dynamic_printk.h +++ /dev/null | |||
@@ -1,93 +0,0 @@ | |||
1 | #ifndef _DYNAMIC_PRINTK_H | ||
2 | #define _DYNAMIC_PRINTK_H | ||
3 | |||
4 | #define DYNAMIC_DEBUG_HASH_BITS 6 | ||
5 | #define DEBUG_HASH_TABLE_SIZE (1 << DYNAMIC_DEBUG_HASH_BITS) | ||
6 | |||
7 | #define TYPE_BOOLEAN 1 | ||
8 | |||
9 | #define DYNAMIC_ENABLED_ALL 0 | ||
10 | #define DYNAMIC_ENABLED_NONE 1 | ||
11 | #define DYNAMIC_ENABLED_SOME 2 | ||
12 | |||
13 | extern int dynamic_enabled; | ||
14 | |||
15 | /* dynamic_printk_enabled, and dynamic_printk_enabled2 are bitmasks in which | ||
16 | * bit n is set to 1 if any modname hashes into the bucket n, 0 otherwise. They | ||
17 | * use independent hash functions, to reduce the chance of false positives. | ||
18 | */ | ||
19 | extern long long dynamic_printk_enabled; | ||
20 | extern long long dynamic_printk_enabled2; | ||
21 | |||
22 | struct mod_debug { | ||
23 | char *modname; | ||
24 | char *logical_modname; | ||
25 | char *flag_names; | ||
26 | int type; | ||
27 | int hash; | ||
28 | int hash2; | ||
29 | } __attribute__((aligned(8))); | ||
30 | |||
31 | int register_dynamic_debug_module(char *mod_name, int type, char *share_name, | ||
32 | char *flags, int hash, int hash2); | ||
33 | |||
34 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | ||
35 | extern int unregister_dynamic_debug_module(char *mod_name); | ||
36 | extern int __dynamic_dbg_enabled_helper(char *modname, int type, | ||
37 | int value, int hash); | ||
38 | |||
39 | #define __dynamic_dbg_enabled(module, type, value, level, hash) ({ \ | ||
40 | int __ret = 0; \ | ||
41 | if (unlikely((dynamic_printk_enabled & (1LL << DEBUG_HASH)) && \ | ||
42 | (dynamic_printk_enabled2 & (1LL << DEBUG_HASH2)))) \ | ||
43 | __ret = __dynamic_dbg_enabled_helper(module, type, \ | ||
44 | value, hash);\ | ||
45 | __ret; }) | ||
46 | |||
47 | #define dynamic_pr_debug(fmt, ...) do { \ | ||
48 | static char mod_name[] \ | ||
49 | __attribute__((section("__verbose_strings"))) \ | ||
50 | = KBUILD_MODNAME; \ | ||
51 | static struct mod_debug descriptor \ | ||
52 | __used \ | ||
53 | __attribute__((section("__verbose"), aligned(8))) = \ | ||
54 | { mod_name, mod_name, NULL, TYPE_BOOLEAN, DEBUG_HASH, DEBUG_HASH2 };\ | ||
55 | if (__dynamic_dbg_enabled(KBUILD_MODNAME, TYPE_BOOLEAN, \ | ||
56 | 0, 0, DEBUG_HASH)) \ | ||
57 | printk(KERN_DEBUG KBUILD_MODNAME ":" fmt, \ | ||
58 | ##__VA_ARGS__); \ | ||
59 | } while (0) | ||
60 | |||
61 | #define dynamic_dev_dbg(dev, format, ...) do { \ | ||
62 | static char mod_name[] \ | ||
63 | __attribute__((section("__verbose_strings"))) \ | ||
64 | = KBUILD_MODNAME; \ | ||
65 | static struct mod_debug descriptor \ | ||
66 | __used \ | ||
67 | __attribute__((section("__verbose"), aligned(8))) = \ | ||
68 | { mod_name, mod_name, NULL, TYPE_BOOLEAN, DEBUG_HASH, DEBUG_HASH2 };\ | ||
69 | if (__dynamic_dbg_enabled(KBUILD_MODNAME, TYPE_BOOLEAN, \ | ||
70 | 0, 0, DEBUG_HASH)) \ | ||
71 | dev_printk(KERN_DEBUG, dev, \ | ||
72 | KBUILD_MODNAME ": " format, \ | ||
73 | ##__VA_ARGS__); \ | ||
74 | } while (0) | ||
75 | |||
76 | #else | ||
77 | |||
78 | static inline int unregister_dynamic_debug_module(const char *mod_name) | ||
79 | { | ||
80 | return 0; | ||
81 | } | ||
82 | static inline int __dynamic_dbg_enabled_helper(char *modname, int type, | ||
83 | int value, int hash) | ||
84 | { | ||
85 | return 0; | ||
86 | } | ||
87 | |||
88 | #define __dynamic_dbg_enabled(module, type, value, level, hash) ({ 0; }) | ||
89 | #define dynamic_pr_debug(fmt, ...) do { } while (0) | ||
90 | #define dynamic_dev_dbg(dev, format, ...) do { } while (0) | ||
91 | #endif | ||
92 | |||
93 | #endif | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 92734c0012e6..5bc81c4a98c1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -141,6 +141,7 @@ struct inodes_stat_t { | |||
141 | #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ | 141 | #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ |
142 | #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ | 142 | #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ |
143 | #define MS_I_VERSION (1<<23) /* Update inode I_version field */ | 143 | #define MS_I_VERSION (1<<23) /* Update inode I_version field */ |
144 | #define MS_STRICTATIME (1<<24) /* Always perform atime updates */ | ||
144 | #define MS_ACTIVE (1<<30) | 145 | #define MS_ACTIVE (1<<30) |
145 | #define MS_NOUSER (1<<31) | 146 | #define MS_NOUSER (1<<31) |
146 | 147 | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 25087aead657..854eba8b2ba3 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
27 | #include <asm/mutex.h> | 27 | #include <asm/mutex.h> |
28 | 28 | ||
29 | #if defined(CONFIG_CRIS) || defined(CONFIG_FRV) | 29 | #if defined(CONFIG_CRIS) || defined(CONFIG_FRV) || defined(CONFIG_MN10300) |
30 | # define SUPPORT_VLB_SYNC 0 | 30 | # define SUPPORT_VLB_SYNC 0 |
31 | #else | 31 | #else |
32 | # define SUPPORT_VLB_SYNC 1 | 32 | # define SUPPORT_VLB_SYNC 1 |
@@ -193,24 +193,8 @@ static inline void ide_std_init_ports(hw_regs_t *hw, | |||
193 | hw->io_ports.ctl_addr = ctl_addr; | 193 | hw->io_ports.ctl_addr = ctl_addr; |
194 | } | 194 | } |
195 | 195 | ||
196 | /* for IDE PCI controllers in legacy mode, temporary */ | 196 | #if defined(CONFIG_ARM) || defined(CONFIG_M68K) || defined(CONFIG_MIPS) || \ |
197 | static inline int __ide_default_irq(unsigned long base) | 197 | defined(CONFIG_PARISC) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) |
198 | { | ||
199 | switch (base) { | ||
200 | #ifdef CONFIG_IA64 | ||
201 | case 0x1f0: return isa_irq_to_vector(14); | ||
202 | case 0x170: return isa_irq_to_vector(15); | ||
203 | #else | ||
204 | case 0x1f0: return 14; | ||
205 | case 0x170: return 15; | ||
206 | #endif | ||
207 | } | ||
208 | return 0; | ||
209 | } | ||
210 | |||
211 | #if defined(CONFIG_ARM) || defined(CONFIG_FRV) || defined(CONFIG_M68K) || \ | ||
212 | defined(CONFIG_MIPS) || defined(CONFIG_MN10300) || defined(CONFIG_PARISC) \ | ||
213 | || defined(CONFIG_PPC) || defined(CONFIG_SPARC) || defined(CONFIG_SPARC64) | ||
214 | #include <asm/ide.h> | 198 | #include <asm/ide.h> |
215 | #else | 199 | #else |
216 | #include <asm-generic/ide_iops.h> | 200 | #include <asm-generic/ide_iops.h> |
@@ -866,7 +850,7 @@ struct ide_host { | |||
866 | ide_hwif_t *ports[MAX_HOST_PORTS + 1]; | 850 | ide_hwif_t *ports[MAX_HOST_PORTS + 1]; |
867 | unsigned int n_ports; | 851 | unsigned int n_ports; |
868 | struct device *dev[2]; | 852 | struct device *dev[2]; |
869 | unsigned int (*init_chipset)(struct pci_dev *); | 853 | int (*init_chipset)(struct pci_dev *); |
870 | irq_handler_t irq_handler; | 854 | irq_handler_t irq_handler; |
871 | unsigned long host_flags; | 855 | unsigned long host_flags; |
872 | void *host_priv; | 856 | void *host_priv; |
@@ -1146,11 +1130,14 @@ int generic_ide_ioctl(ide_drive_t *, struct block_device *, unsigned, unsigned l | |||
1146 | extern int ide_vlb_clk; | 1130 | extern int ide_vlb_clk; |
1147 | extern int ide_pci_clk; | 1131 | extern int ide_pci_clk; |
1148 | 1132 | ||
1149 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); | 1133 | int ide_end_request(ide_drive_t *, int, int); |
1150 | int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, | 1134 | int ide_end_dequeued_request(ide_drive_t *, struct request *, int, int); |
1151 | int uptodate, int nr_sectors); | 1135 | void ide_kill_rq(ide_drive_t *, struct request *); |
1152 | 1136 | ||
1153 | extern void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry); | 1137 | void __ide_set_handler(ide_drive_t *, ide_handler_t *, unsigned int, |
1138 | ide_expiry_t *); | ||
1139 | void ide_set_handler(ide_drive_t *, ide_handler_t *, unsigned int, | ||
1140 | ide_expiry_t *); | ||
1154 | 1141 | ||
1155 | void ide_execute_command(ide_drive_t *, u8, ide_handler_t *, unsigned int, | 1142 | void ide_execute_command(ide_drive_t *, u8, ide_handler_t *, unsigned int, |
1156 | ide_expiry_t *); | 1143 | ide_expiry_t *); |
@@ -1169,13 +1156,14 @@ int ide_busy_sleep(ide_hwif_t *, unsigned long, int); | |||
1169 | 1156 | ||
1170 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); | 1157 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); |
1171 | 1158 | ||
1159 | ide_startstop_t ide_do_park_unpark(ide_drive_t *, struct request *); | ||
1160 | ide_startstop_t ide_do_devset(ide_drive_t *, struct request *); | ||
1161 | |||
1172 | extern ide_startstop_t ide_do_reset (ide_drive_t *); | 1162 | extern ide_startstop_t ide_do_reset (ide_drive_t *); |
1173 | 1163 | ||
1174 | extern int ide_devset_execute(ide_drive_t *drive, | 1164 | extern int ide_devset_execute(ide_drive_t *drive, |
1175 | const struct ide_devset *setting, int arg); | 1165 | const struct ide_devset *setting, int arg); |
1176 | 1166 | ||
1177 | extern void ide_do_drive_cmd(ide_drive_t *, struct request *); | ||
1178 | |||
1179 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); | 1167 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); |
1180 | 1168 | ||
1181 | void ide_tf_dump(const char *, struct ide_taskfile *); | 1169 | void ide_tf_dump(const char *, struct ide_taskfile *); |
@@ -1200,10 +1188,6 @@ void SELECT_MASK(ide_drive_t *, int); | |||
1200 | u8 ide_read_error(ide_drive_t *); | 1188 | u8 ide_read_error(ide_drive_t *); |
1201 | void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); | 1189 | void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); |
1202 | 1190 | ||
1203 | extern int drive_is_ready(ide_drive_t *); | ||
1204 | |||
1205 | void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8); | ||
1206 | |||
1207 | int ide_check_atapi_device(ide_drive_t *, const char *); | 1191 | int ide_check_atapi_device(ide_drive_t *, const char *); |
1208 | 1192 | ||
1209 | void ide_init_pc(struct ide_atapi_pc *); | 1193 | void ide_init_pc(struct ide_atapi_pc *); |
@@ -1251,6 +1235,8 @@ int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); | |||
1251 | 1235 | ||
1252 | int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long); | 1236 | int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long); |
1253 | 1237 | ||
1238 | int ide_dev_read_id(ide_drive_t *, u8, u16 *); | ||
1239 | |||
1254 | extern int ide_driveid_update(ide_drive_t *); | 1240 | extern int ide_driveid_update(ide_drive_t *); |
1255 | extern int ide_config_drive_speed(ide_drive_t *, u8); | 1241 | extern int ide_config_drive_speed(ide_drive_t *, u8); |
1256 | extern u8 eighty_ninty_three (ide_drive_t *); | 1242 | extern u8 eighty_ninty_three (ide_drive_t *); |
@@ -1280,7 +1266,7 @@ static inline int ide_pci_is_in_compatibility_mode(struct pci_dev *dev) | |||
1280 | return 0; | 1266 | return 0; |
1281 | } | 1267 | } |
1282 | 1268 | ||
1283 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, | 1269 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, |
1284 | hw_regs_t *, hw_regs_t **); | 1270 | hw_regs_t *, hw_regs_t **); |
1285 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); | 1271 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); |
1286 | 1272 | ||
@@ -1349,10 +1335,6 @@ enum { | |||
1349 | IDE_HFLAG_ERROR_STOPS_FIFO = (1 << 19), | 1335 | IDE_HFLAG_ERROR_STOPS_FIFO = (1 << 19), |
1350 | /* serialize ports */ | 1336 | /* serialize ports */ |
1351 | IDE_HFLAG_SERIALIZE = (1 << 20), | 1337 | IDE_HFLAG_SERIALIZE = (1 << 20), |
1352 | /* use legacy IRQs */ | ||
1353 | IDE_HFLAG_LEGACY_IRQS = (1 << 21), | ||
1354 | /* force use of legacy IRQs */ | ||
1355 | IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22), | ||
1356 | /* host is TRM290 */ | 1338 | /* host is TRM290 */ |
1357 | IDE_HFLAG_TRM290 = (1 << 23), | 1339 | IDE_HFLAG_TRM290 = (1 << 23), |
1358 | /* use 32-bit I/O ops */ | 1340 | /* use 32-bit I/O ops */ |
@@ -1380,7 +1362,7 @@ enum { | |||
1380 | 1362 | ||
1381 | struct ide_port_info { | 1363 | struct ide_port_info { |
1382 | char *name; | 1364 | char *name; |
1383 | unsigned int (*init_chipset)(struct pci_dev *); | 1365 | int (*init_chipset)(struct pci_dev *); |
1384 | void (*init_iops)(ide_hwif_t *); | 1366 | void (*init_iops)(ide_hwif_t *); |
1385 | void (*init_hwif)(ide_hwif_t *); | 1367 | void (*init_hwif)(ide_hwif_t *); |
1386 | int (*init_dma)(ide_hwif_t *, | 1368 | int (*init_dma)(ide_hwif_t *, |
@@ -1471,6 +1453,7 @@ static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; } | |||
1471 | 1453 | ||
1472 | void ide_dma_lost_irq(ide_drive_t *); | 1454 | void ide_dma_lost_irq(ide_drive_t *); |
1473 | void ide_dma_timeout(ide_drive_t *); | 1455 | void ide_dma_timeout(ide_drive_t *); |
1456 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); | ||
1474 | 1457 | ||
1475 | #else | 1458 | #else |
1476 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } | 1459 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } |
@@ -1482,21 +1465,24 @@ static inline void ide_dma_on(ide_drive_t *drive) { ; } | |||
1482 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } | 1465 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } |
1483 | static inline int ide_set_dma(ide_drive_t *drive) { return 1; } | 1466 | static inline int ide_set_dma(ide_drive_t *drive) { return 1; } |
1484 | static inline void ide_check_dma_crc(ide_drive_t *drive) { ; } | 1467 | static inline void ide_check_dma_crc(ide_drive_t *drive) { ; } |
1468 | static inline ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) { return ide_stopped; } | ||
1485 | static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; } | 1469 | static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; } |
1486 | #endif /* CONFIG_BLK_DEV_IDEDMA */ | 1470 | #endif /* CONFIG_BLK_DEV_IDEDMA */ |
1487 | 1471 | ||
1488 | #ifdef CONFIG_BLK_DEV_IDEACPI | 1472 | #ifdef CONFIG_BLK_DEV_IDEACPI |
1473 | int ide_acpi_init(void); | ||
1489 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); | 1474 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); |
1490 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); | 1475 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); |
1491 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); | 1476 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); |
1492 | extern void ide_acpi_init(ide_hwif_t *hwif); | 1477 | void ide_acpi_init_port(ide_hwif_t *); |
1493 | void ide_acpi_port_init_devices(ide_hwif_t *); | 1478 | void ide_acpi_port_init_devices(ide_hwif_t *); |
1494 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); | 1479 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); |
1495 | #else | 1480 | #else |
1481 | static inline int ide_acpi_init(void) { return 0; } | ||
1496 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } | 1482 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } |
1497 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } | 1483 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } |
1498 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } | 1484 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } |
1499 | static inline void ide_acpi_init(ide_hwif_t *hwif) { ; } | 1485 | static inline void ide_acpi_init_port(ide_hwif_t *hwif) { ; } |
1500 | static inline void ide_acpi_port_init_devices(ide_hwif_t *hwif) { ; } | 1486 | static inline void ide_acpi_port_init_devices(ide_hwif_t *hwif) { ; } |
1501 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} | 1487 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} |
1502 | #endif | 1488 | #endif |
@@ -1530,9 +1516,7 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data) | |||
1530 | hwif->hwif_data = data; | 1516 | hwif->hwif_data = data; |
1531 | } | 1517 | } |
1532 | 1518 | ||
1533 | const char *ide_xfer_verbose(u8 mode); | ||
1534 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); | 1519 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); |
1535 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); | ||
1536 | 1520 | ||
1537 | u64 ide_get_lba_addr(struct ide_taskfile *, int); | 1521 | u64 ide_get_lba_addr(struct ide_taskfile *, int); |
1538 | u8 ide_dump_status(ide_drive_t *, const char *, u8); | 1522 | u8 ide_dump_status(ide_drive_t *, const char *, u8); |
@@ -1571,14 +1555,18 @@ void ide_timing_merge(struct ide_timing *, struct ide_timing *, | |||
1571 | struct ide_timing *, unsigned int); | 1555 | struct ide_timing *, unsigned int); |
1572 | int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); | 1556 | int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); |
1573 | 1557 | ||
1558 | #ifdef CONFIG_IDE_XFER_MODE | ||
1574 | int ide_scan_pio_blacklist(char *); | 1559 | int ide_scan_pio_blacklist(char *); |
1575 | 1560 | const char *ide_xfer_verbose(u8); | |
1576 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); | 1561 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); |
1577 | |||
1578 | int ide_set_pio_mode(ide_drive_t *, u8); | 1562 | int ide_set_pio_mode(ide_drive_t *, u8); |
1579 | int ide_set_dma_mode(ide_drive_t *, u8); | 1563 | int ide_set_dma_mode(ide_drive_t *, u8); |
1580 | |||
1581 | void ide_set_pio(ide_drive_t *, u8); | 1564 | void ide_set_pio(ide_drive_t *, u8); |
1565 | int ide_set_xfer_rate(ide_drive_t *, u8); | ||
1566 | #else | ||
1567 | static inline void ide_set_pio(ide_drive_t *drive, u8 pio) { ; } | ||
1568 | static inline int ide_set_xfer_rate(ide_drive_t *drive, u8 rate) { return -1; } | ||
1569 | #endif | ||
1582 | 1570 | ||
1583 | static inline void ide_set_max_pio(ide_drive_t *drive) | 1571 | static inline void ide_set_max_pio(ide_drive_t *drive) |
1584 | { | 1572 | { |
@@ -1611,6 +1599,10 @@ static inline ide_drive_t *ide_get_pair_dev(ide_drive_t *drive) | |||
1611 | #define ide_port_for_each_dev(i, dev, port) \ | 1599 | #define ide_port_for_each_dev(i, dev, port) \ |
1612 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) | 1600 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) |
1613 | 1601 | ||
1602 | #define ide_port_for_each_present_dev(i, dev, port) \ | ||
1603 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) \ | ||
1604 | if ((dev)->dev_flags & IDE_DFLAG_PRESENT) | ||
1605 | |||
1614 | #define ide_host_for_each_port(i, port, host) \ | 1606 | #define ide_host_for_each_port(i, port, host) \ |
1615 | for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) | 1607 | for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) |
1616 | 1608 | ||
diff --git a/include/linux/ima.h b/include/linux/ima.h new file mode 100644 index 000000000000..0e2aa45cb0ce --- /dev/null +++ b/include/linux/ima.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 IBM Corporation | ||
3 | * Author: Mimi Zohar <zohar@us.ibm.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation, version 2 of the License. | ||
8 | */ | ||
9 | |||
10 | #ifndef _LINUX_IMA_H | ||
11 | #define _LINUX_IMA_H | ||
12 | |||
13 | #include <linux/fs.h> | ||
14 | struct linux_binprm; | ||
15 | |||
16 | #ifdef CONFIG_IMA | ||
17 | extern int ima_bprm_check(struct linux_binprm *bprm); | ||
18 | extern int ima_inode_alloc(struct inode *inode); | ||
19 | extern void ima_inode_free(struct inode *inode); | ||
20 | extern int ima_path_check(struct path *path, int mask); | ||
21 | extern void ima_file_free(struct file *file); | ||
22 | extern int ima_file_mmap(struct file *file, unsigned long prot); | ||
23 | extern void ima_shm_check(struct file *file); | ||
24 | |||
25 | #else | ||
26 | static inline int ima_bprm_check(struct linux_binprm *bprm) | ||
27 | { | ||
28 | return 0; | ||
29 | } | ||
30 | |||
31 | static inline int ima_inode_alloc(struct inode *inode) | ||
32 | { | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | static inline void ima_inode_free(struct inode *inode) | ||
37 | { | ||
38 | return; | ||
39 | } | ||
40 | |||
41 | static inline int ima_path_check(struct path *path, int mask) | ||
42 | { | ||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | static inline void ima_file_free(struct file *file) | ||
47 | { | ||
48 | return; | ||
49 | } | ||
50 | |||
51 | static inline int ima_file_mmap(struct file *file, unsigned long prot) | ||
52 | { | ||
53 | return 0; | ||
54 | } | ||
55 | |||
56 | static inline void ima_shm_check(struct file *file) | ||
57 | { | ||
58 | return; | ||
59 | } | ||
60 | #endif /* CONFIG_IMA_H */ | ||
61 | #endif /* _LINUX_IMA_H */ | ||
diff --git a/include/linux/input.h b/include/linux/input.h index 1249a0c20a38..6b28048fc568 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -661,6 +661,7 @@ struct input_absinfo { | |||
661 | #define SW_DOCK 0x05 /* set = plugged into dock */ | 661 | #define SW_DOCK 0x05 /* set = plugged into dock */ |
662 | #define SW_LINEOUT_INSERT 0x06 /* set = inserted */ | 662 | #define SW_LINEOUT_INSERT 0x06 /* set = inserted */ |
663 | #define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ | 663 | #define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ |
664 | #define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ | ||
664 | #define SW_MAX 0x0f | 665 | #define SW_MAX 0x0f |
665 | #define SW_CNT (SW_MAX+1) | 666 | #define SW_CNT (SW_MAX+1) |
666 | 667 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7fa371898e3e..914918abfdd1 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/log2.h> | 16 | #include <linux/log2.h> |
17 | #include <linux/typecheck.h> | 17 | #include <linux/typecheck.h> |
18 | #include <linux/ratelimit.h> | 18 | #include <linux/ratelimit.h> |
19 | #include <linux/dynamic_printk.h> | 19 | #include <linux/dynamic_debug.h> |
20 | #include <asm/byteorder.h> | 20 | #include <asm/byteorder.h> |
21 | #include <asm/bug.h> | 21 | #include <asm/bug.h> |
22 | 22 | ||
@@ -358,9 +358,10 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
358 | #if defined(DEBUG) | 358 | #if defined(DEBUG) |
359 | #define pr_debug(fmt, ...) \ | 359 | #define pr_debug(fmt, ...) \ |
360 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | 360 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) |
361 | #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 361 | #elif defined(CONFIG_DYNAMIC_DEBUG) |
362 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | ||
362 | #define pr_debug(fmt, ...) do { \ | 363 | #define pr_debug(fmt, ...) do { \ |
363 | dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ | 364 | dynamic_pr_debug(fmt, ##__VA_ARGS__); \ |
364 | } while (0) | 365 | } while (0) |
365 | #else | 366 | #else |
366 | #define pr_debug(fmt, ...) \ | 367 | #define pr_debug(fmt, ...) \ |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 5437ac0276e2..58ae8e00fcdd 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -68,10 +68,13 @@ struct kobject { | |||
68 | unsigned int state_in_sysfs:1; | 68 | unsigned int state_in_sysfs:1; |
69 | unsigned int state_add_uevent_sent:1; | 69 | unsigned int state_add_uevent_sent:1; |
70 | unsigned int state_remove_uevent_sent:1; | 70 | unsigned int state_remove_uevent_sent:1; |
71 | unsigned int uevent_suppress:1; | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | extern int kobject_set_name(struct kobject *kobj, const char *name, ...) | 74 | extern int kobject_set_name(struct kobject *kobj, const char *name, ...) |
74 | __attribute__((format(printf, 2, 3))); | 75 | __attribute__((format(printf, 2, 3))); |
76 | extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, | ||
77 | va_list vargs); | ||
75 | 78 | ||
76 | static inline const char *kobject_name(const struct kobject *kobj) | 79 | static inline const char *kobject_name(const struct kobject *kobj) |
77 | { | 80 | { |
diff --git a/include/linux/lm_interface.h b/include/linux/lm_interface.h deleted file mode 100644 index 2ed8fa1b762b..000000000000 --- a/include/linux/lm_interface.h +++ /dev/null | |||
@@ -1,277 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | ||
3 | * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. | ||
4 | * | ||
5 | * This copyrighted material is made available to anyone wishing to use, | ||
6 | * modify, copy, or redistribute it subject to the terms and conditions | ||
7 | * of the GNU General Public License version 2. | ||
8 | */ | ||
9 | |||
10 | #ifndef __LM_INTERFACE_DOT_H__ | ||
11 | #define __LM_INTERFACE_DOT_H__ | ||
12 | |||
13 | |||
14 | typedef void (*lm_callback_t) (void *ptr, unsigned int type, void *data); | ||
15 | |||
16 | /* | ||
17 | * lm_mount() flags | ||
18 | * | ||
19 | * LM_MFLAG_SPECTATOR | ||
20 | * GFS is asking to join the filesystem's lockspace, but it doesn't want to | ||
21 | * modify the filesystem. The lock module shouldn't assign a journal to the FS | ||
22 | * mount. It shouldn't send recovery callbacks to the FS mount. If the node | ||
23 | * dies or withdraws, all locks can be wiped immediately. | ||
24 | * | ||
25 | * LM_MFLAG_CONV_NODROP | ||
26 | * Do not allow the dlm to internally resolve conversion deadlocks by demoting | ||
27 | * the lock to unlocked and then reacquiring it in the requested mode. Instead, | ||
28 | * it should cancel the request and return LM_OUT_CONV_DEADLK. | ||
29 | */ | ||
30 | |||
31 | #define LM_MFLAG_SPECTATOR 0x00000001 | ||
32 | #define LM_MFLAG_CONV_NODROP 0x00000002 | ||
33 | |||
34 | /* | ||
35 | * lm_lockstruct flags | ||
36 | * | ||
37 | * LM_LSFLAG_LOCAL | ||
38 | * The lock_nolock module returns LM_LSFLAG_LOCAL to GFS, indicating that GFS | ||
39 | * can make single-node optimizations. | ||
40 | */ | ||
41 | |||
42 | #define LM_LSFLAG_LOCAL 0x00000001 | ||
43 | |||
44 | /* | ||
45 | * lm_lockname types | ||
46 | */ | ||
47 | |||
48 | #define LM_TYPE_RESERVED 0x00 | ||
49 | #define LM_TYPE_NONDISK 0x01 | ||
50 | #define LM_TYPE_INODE 0x02 | ||
51 | #define LM_TYPE_RGRP 0x03 | ||
52 | #define LM_TYPE_META 0x04 | ||
53 | #define LM_TYPE_IOPEN 0x05 | ||
54 | #define LM_TYPE_FLOCK 0x06 | ||
55 | #define LM_TYPE_PLOCK 0x07 | ||
56 | #define LM_TYPE_QUOTA 0x08 | ||
57 | #define LM_TYPE_JOURNAL 0x09 | ||
58 | |||
59 | /* | ||
60 | * lm_lock() states | ||
61 | * | ||
62 | * SHARED is compatible with SHARED, not with DEFERRED or EX. | ||
63 | * DEFERRED is compatible with DEFERRED, not with SHARED or EX. | ||
64 | */ | ||
65 | |||
66 | #define LM_ST_UNLOCKED 0 | ||
67 | #define LM_ST_EXCLUSIVE 1 | ||
68 | #define LM_ST_DEFERRED 2 | ||
69 | #define LM_ST_SHARED 3 | ||
70 | |||
71 | /* | ||
72 | * lm_lock() flags | ||
73 | * | ||
74 | * LM_FLAG_TRY | ||
75 | * Don't wait to acquire the lock if it can't be granted immediately. | ||
76 | * | ||
77 | * LM_FLAG_TRY_1CB | ||
78 | * Send one blocking callback if TRY is set and the lock is not granted. | ||
79 | * | ||
80 | * LM_FLAG_NOEXP | ||
81 | * GFS sets this flag on lock requests it makes while doing journal recovery. | ||
82 | * These special requests should not be blocked due to the recovery like | ||
83 | * ordinary locks would be. | ||
84 | * | ||
85 | * LM_FLAG_ANY | ||
86 | * A SHARED request may also be granted in DEFERRED, or a DEFERRED request may | ||
87 | * also be granted in SHARED. The preferred state is whichever is compatible | ||
88 | * with other granted locks, or the specified state if no other locks exist. | ||
89 | * | ||
90 | * LM_FLAG_PRIORITY | ||
91 | * Override fairness considerations. Suppose a lock is held in a shared state | ||
92 | * and there is a pending request for the deferred state. A shared lock | ||
93 | * request with the priority flag would be allowed to bypass the deferred | ||
94 | * request and directly join the other shared lock. A shared lock request | ||
95 | * without the priority flag might be forced to wait until the deferred | ||
96 | * requested had acquired and released the lock. | ||
97 | */ | ||
98 | |||
99 | #define LM_FLAG_TRY 0x00000001 | ||
100 | #define LM_FLAG_TRY_1CB 0x00000002 | ||
101 | #define LM_FLAG_NOEXP 0x00000004 | ||
102 | #define LM_FLAG_ANY 0x00000008 | ||
103 | #define LM_FLAG_PRIORITY 0x00000010 | ||
104 | |||
105 | /* | ||
106 | * lm_lock() and lm_async_cb return flags | ||
107 | * | ||
108 | * LM_OUT_ST_MASK | ||
109 | * Masks the lower two bits of lock state in the returned value. | ||
110 | * | ||
111 | * LM_OUT_CACHEABLE | ||
112 | * The lock hasn't been released so GFS can continue to cache data for it. | ||
113 | * | ||
114 | * LM_OUT_CANCELED | ||
115 | * The lock request was canceled. | ||
116 | * | ||
117 | * LM_OUT_ASYNC | ||
118 | * The result of the request will be returned in an LM_CB_ASYNC callback. | ||
119 | * | ||
120 | * LM_OUT_CONV_DEADLK | ||
121 | * The lock request was canceled do to a conversion deadlock. | ||
122 | */ | ||
123 | |||
124 | #define LM_OUT_ST_MASK 0x00000003 | ||
125 | #define LM_OUT_CANCELED 0x00000008 | ||
126 | #define LM_OUT_ASYNC 0x00000080 | ||
127 | #define LM_OUT_ERROR 0x00000100 | ||
128 | |||
129 | /* | ||
130 | * lm_callback_t types | ||
131 | * | ||
132 | * LM_CB_NEED_E LM_CB_NEED_D LM_CB_NEED_S | ||
133 | * Blocking callback, a remote node is requesting the given lock in | ||
134 | * EXCLUSIVE, DEFERRED, or SHARED. | ||
135 | * | ||
136 | * LM_CB_NEED_RECOVERY | ||
137 | * The given journal needs to be recovered. | ||
138 | * | ||
139 | * LM_CB_ASYNC | ||
140 | * The given lock has been granted. | ||
141 | */ | ||
142 | |||
143 | #define LM_CB_NEED_E 257 | ||
144 | #define LM_CB_NEED_D 258 | ||
145 | #define LM_CB_NEED_S 259 | ||
146 | #define LM_CB_NEED_RECOVERY 260 | ||
147 | #define LM_CB_ASYNC 262 | ||
148 | |||
149 | /* | ||
150 | * lm_recovery_done() messages | ||
151 | */ | ||
152 | |||
153 | #define LM_RD_GAVEUP 308 | ||
154 | #define LM_RD_SUCCESS 309 | ||
155 | |||
156 | |||
157 | struct lm_lockname { | ||
158 | u64 ln_number; | ||
159 | unsigned int ln_type; | ||
160 | }; | ||
161 | |||
162 | #define lm_name_equal(name1, name2) \ | ||
163 | (((name1)->ln_number == (name2)->ln_number) && \ | ||
164 | ((name1)->ln_type == (name2)->ln_type)) \ | ||
165 | |||
166 | struct lm_async_cb { | ||
167 | struct lm_lockname lc_name; | ||
168 | int lc_ret; | ||
169 | }; | ||
170 | |||
171 | struct lm_lockstruct; | ||
172 | |||
173 | struct lm_lockops { | ||
174 | const char *lm_proto_name; | ||
175 | |||
176 | /* | ||
177 | * Mount/Unmount | ||
178 | */ | ||
179 | |||
180 | int (*lm_mount) (char *table_name, char *host_data, | ||
181 | lm_callback_t cb, void *cb_data, | ||
182 | unsigned int min_lvb_size, int flags, | ||
183 | struct lm_lockstruct *lockstruct, | ||
184 | struct kobject *fskobj); | ||
185 | |||
186 | void (*lm_others_may_mount) (void *lockspace); | ||
187 | |||
188 | void (*lm_unmount) (void *lockspace); | ||
189 | |||
190 | void (*lm_withdraw) (void *lockspace); | ||
191 | |||
192 | /* | ||
193 | * Lock oriented operations | ||
194 | */ | ||
195 | |||
196 | int (*lm_get_lock) (void *lockspace, struct lm_lockname *name, void **lockp); | ||
197 | |||
198 | void (*lm_put_lock) (void *lock); | ||
199 | |||
200 | unsigned int (*lm_lock) (void *lock, unsigned int cur_state, | ||
201 | unsigned int req_state, unsigned int flags); | ||
202 | |||
203 | unsigned int (*lm_unlock) (void *lock, unsigned int cur_state); | ||
204 | |||
205 | void (*lm_cancel) (void *lock); | ||
206 | |||
207 | int (*lm_hold_lvb) (void *lock, char **lvbp); | ||
208 | void (*lm_unhold_lvb) (void *lock, char *lvb); | ||
209 | |||
210 | /* | ||
211 | * Posix Lock oriented operations | ||
212 | */ | ||
213 | |||
214 | int (*lm_plock_get) (void *lockspace, struct lm_lockname *name, | ||
215 | struct file *file, struct file_lock *fl); | ||
216 | |||
217 | int (*lm_plock) (void *lockspace, struct lm_lockname *name, | ||
218 | struct file *file, int cmd, struct file_lock *fl); | ||
219 | |||
220 | int (*lm_punlock) (void *lockspace, struct lm_lockname *name, | ||
221 | struct file *file, struct file_lock *fl); | ||
222 | |||
223 | /* | ||
224 | * Client oriented operations | ||
225 | */ | ||
226 | |||
227 | void (*lm_recovery_done) (void *lockspace, unsigned int jid, | ||
228 | unsigned int message); | ||
229 | |||
230 | struct module *lm_owner; | ||
231 | }; | ||
232 | |||
233 | /* | ||
234 | * lm_mount() return values | ||
235 | * | ||
236 | * ls_jid - the journal ID this node should use | ||
237 | * ls_first - this node is the first to mount the file system | ||
238 | * ls_lvb_size - size in bytes of lock value blocks | ||
239 | * ls_lockspace - lock module's context for this file system | ||
240 | * ls_ops - lock module's functions | ||
241 | * ls_flags - lock module features | ||
242 | */ | ||
243 | |||
244 | struct lm_lockstruct { | ||
245 | unsigned int ls_jid; | ||
246 | unsigned int ls_first; | ||
247 | unsigned int ls_lvb_size; | ||
248 | void *ls_lockspace; | ||
249 | const struct lm_lockops *ls_ops; | ||
250 | int ls_flags; | ||
251 | }; | ||
252 | |||
253 | /* | ||
254 | * Lock module bottom interface. A lock module makes itself available to GFS | ||
255 | * with these functions. | ||
256 | */ | ||
257 | |||
258 | int gfs2_register_lockproto(const struct lm_lockops *proto); | ||
259 | void gfs2_unregister_lockproto(const struct lm_lockops *proto); | ||
260 | |||
261 | /* | ||
262 | * Lock module top interface. GFS calls these functions when mounting or | ||
263 | * unmounting a file system. | ||
264 | */ | ||
265 | |||
266 | int gfs2_mount_lockproto(char *proto_name, char *table_name, char *host_data, | ||
267 | lm_callback_t cb, void *cb_data, | ||
268 | unsigned int min_lvb_size, int flags, | ||
269 | struct lm_lockstruct *lockstruct, | ||
270 | struct kobject *fskobj); | ||
271 | |||
272 | void gfs2_unmount_lockproto(struct lm_lockstruct *lockstruct); | ||
273 | |||
274 | void gfs2_withdraw_lockproto(struct lm_lockstruct *lockstruct); | ||
275 | |||
276 | #endif /* __LM_INTERFACE_DOT_H__ */ | ||
277 | |||
diff --git a/include/linux/maple.h b/include/linux/maple.h index c23d3f51ba40..d9a51b9b3300 100644 --- a/include/linux/maple.h +++ b/include/linux/maple.h | |||
@@ -8,33 +8,49 @@ extern struct bus_type maple_bus_type; | |||
8 | 8 | ||
9 | /* Maple Bus command and response codes */ | 9 | /* Maple Bus command and response codes */ |
10 | enum maple_code { | 10 | enum maple_code { |
11 | MAPLE_RESPONSE_FILEERR = -5, | 11 | MAPLE_RESPONSE_FILEERR = -5, |
12 | MAPLE_RESPONSE_AGAIN = -4, /* request should be retransmitted */ | 12 | MAPLE_RESPONSE_AGAIN, /* retransmit */ |
13 | MAPLE_RESPONSE_BADCMD = -3, | 13 | MAPLE_RESPONSE_BADCMD, |
14 | MAPLE_RESPONSE_BADFUNC = -2, | 14 | MAPLE_RESPONSE_BADFUNC, |
15 | MAPLE_RESPONSE_NONE = -1, /* unit didn't respond at all */ | 15 | MAPLE_RESPONSE_NONE, /* unit didn't respond*/ |
16 | MAPLE_COMMAND_DEVINFO = 1, | 16 | MAPLE_COMMAND_DEVINFO = 1, |
17 | MAPLE_COMMAND_ALLINFO = 2, | 17 | MAPLE_COMMAND_ALLINFO, |
18 | MAPLE_COMMAND_RESET = 3, | 18 | MAPLE_COMMAND_RESET, |
19 | MAPLE_COMMAND_KILL = 4, | 19 | MAPLE_COMMAND_KILL, |
20 | MAPLE_RESPONSE_DEVINFO = 5, | 20 | MAPLE_RESPONSE_DEVINFO, |
21 | MAPLE_RESPONSE_ALLINFO = 6, | 21 | MAPLE_RESPONSE_ALLINFO, |
22 | MAPLE_RESPONSE_OK = 7, | 22 | MAPLE_RESPONSE_OK, |
23 | MAPLE_RESPONSE_DATATRF = 8, | 23 | MAPLE_RESPONSE_DATATRF, |
24 | MAPLE_COMMAND_GETCOND = 9, | 24 | MAPLE_COMMAND_GETCOND, |
25 | MAPLE_COMMAND_GETMINFO = 10, | 25 | MAPLE_COMMAND_GETMINFO, |
26 | MAPLE_COMMAND_BREAD = 11, | 26 | MAPLE_COMMAND_BREAD, |
27 | MAPLE_COMMAND_BWRITE = 12, | 27 | MAPLE_COMMAND_BWRITE, |
28 | MAPLE_COMMAND_SETCOND = 14 | 28 | MAPLE_COMMAND_BSYNC, |
29 | MAPLE_COMMAND_SETCOND, | ||
30 | MAPLE_COMMAND_MICCONTROL | ||
31 | }; | ||
32 | |||
33 | enum maple_file_errors { | ||
34 | MAPLE_FILEERR_INVALID_PARTITION = 0x01000000, | ||
35 | MAPLE_FILEERR_PHASE_ERROR = 0x02000000, | ||
36 | MAPLE_FILEERR_INVALID_BLOCK = 0x04000000, | ||
37 | MAPLE_FILEERR_WRITE_ERROR = 0x08000000, | ||
38 | MAPLE_FILEERR_INVALID_WRITE_LENGTH = 0x10000000, | ||
39 | MAPLE_FILEERR_BAD_CRC = 0x20000000 | ||
40 | }; | ||
41 | |||
42 | struct maple_buffer { | ||
43 | char bufx[0x400]; | ||
44 | void *buf; | ||
29 | }; | 45 | }; |
30 | 46 | ||
31 | struct mapleq { | 47 | struct mapleq { |
32 | struct list_head list; | 48 | struct list_head list; |
33 | struct maple_device *dev; | 49 | struct maple_device *dev; |
34 | void *sendbuf, *recvbuf, *recvbufdcsp; | 50 | struct maple_buffer *recvbuf; |
51 | void *sendbuf, *recvbuf_p2; | ||
35 | unsigned char length; | 52 | unsigned char length; |
36 | enum maple_code command; | 53 | enum maple_code command; |
37 | struct mutex mutex; | ||
38 | }; | 54 | }; |
39 | 55 | ||
40 | struct maple_devinfo { | 56 | struct maple_devinfo { |
@@ -52,11 +68,15 @@ struct maple_device { | |||
52 | struct maple_driver *driver; | 68 | struct maple_driver *driver; |
53 | struct mapleq *mq; | 69 | struct mapleq *mq; |
54 | void (*callback) (struct mapleq * mq); | 70 | void (*callback) (struct mapleq * mq); |
71 | void (*fileerr_handler)(struct maple_device *mdev, void *recvbuf); | ||
72 | int (*can_unload)(struct maple_device *mdev); | ||
55 | unsigned long when, interval, function; | 73 | unsigned long when, interval, function; |
56 | struct maple_devinfo devinfo; | 74 | struct maple_devinfo devinfo; |
57 | unsigned char port, unit; | 75 | unsigned char port, unit; |
58 | char product_name[32]; | 76 | char product_name[32]; |
59 | char product_licence[64]; | 77 | char product_licence[64]; |
78 | atomic_t busy; | ||
79 | wait_queue_head_t maple_wait; | ||
60 | struct device dev; | 80 | struct device dev; |
61 | }; | 81 | }; |
62 | 82 | ||
@@ -72,7 +92,7 @@ void maple_getcond_callback(struct maple_device *dev, | |||
72 | int maple_driver_register(struct maple_driver *); | 92 | int maple_driver_register(struct maple_driver *); |
73 | void maple_driver_unregister(struct maple_driver *); | 93 | void maple_driver_unregister(struct maple_driver *); |
74 | 94 | ||
75 | int maple_add_packet_sleeps(struct maple_device *mdev, u32 function, | 95 | int maple_add_packet(struct maple_device *mdev, u32 function, |
76 | u32 command, u32 length, void *data); | 96 | u32 command, u32 length, void *data); |
77 | void maple_clear_dev(struct maple_device *mdev); | 97 | void maple_clear_dev(struct maple_device *mdev); |
78 | 98 | ||
diff --git a/include/linux/mfd/wm8350/audio.h b/include/linux/mfd/wm8350/audio.h index af95a1d2f3a1..d899dc0223ba 100644 --- a/include/linux/mfd/wm8350/audio.h +++ b/include/linux/mfd/wm8350/audio.h | |||
@@ -490,6 +490,7 @@ | |||
490 | /* | 490 | /* |
491 | * R231 (0xE7) - Jack Status | 491 | * R231 (0xE7) - Jack Status |
492 | */ | 492 | */ |
493 | #define WM8350_JACK_L_LVL 0x0800 | ||
493 | #define WM8350_JACK_R_LVL 0x0400 | 494 | #define WM8350_JACK_R_LVL 0x0400 |
494 | 495 | ||
495 | /* | 496 | /* |
diff --git a/include/linux/mfd/wm8400-audio.h b/include/linux/mfd/wm8400-audio.h index b6640e018046..e06ed3eb1d0a 100644 --- a/include/linux/mfd/wm8400-audio.h +++ b/include/linux/mfd/wm8400-audio.h | |||
@@ -1181,6 +1181,7 @@ | |||
1181 | #define WM8400_FLL_OUTDIV_SHIFT 0 /* FLL_OUTDIV - [2:0] */ | 1181 | #define WM8400_FLL_OUTDIV_SHIFT 0 /* FLL_OUTDIV - [2:0] */ |
1182 | #define WM8400_FLL_OUTDIV_WIDTH 3 /* FLL_OUTDIV - [2:0] */ | 1182 | #define WM8400_FLL_OUTDIV_WIDTH 3 /* FLL_OUTDIV - [2:0] */ |
1183 | 1183 | ||
1184 | struct wm8400; | ||
1184 | void wm8400_reset_codec_reg_cache(struct wm8400 *wm8400); | 1185 | void wm8400_reset_codec_reg_cache(struct wm8400 *wm8400); |
1185 | 1186 | ||
1186 | #endif | 1187 | #endif |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index fde86671f48f..1bf5900ffe43 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -454,4 +454,13 @@ struct dmi_system_id { | |||
454 | 454 | ||
455 | #define DMI_MATCH(a, b) { a, b } | 455 | #define DMI_MATCH(a, b) { a, b } |
456 | 456 | ||
457 | #define PLATFORM_NAME_SIZE 20 | ||
458 | #define PLATFORM_MODULE_PREFIX "platform:" | ||
459 | |||
460 | struct platform_device_id { | ||
461 | char name[PLATFORM_NAME_SIZE]; | ||
462 | kernel_ulong_t driver_data | ||
463 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | ||
464 | }; | ||
465 | |||
457 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 466 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/mount.h b/include/linux/mount.h index cab2a85e2ee8..51f55f903aff 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -27,6 +27,7 @@ struct mnt_namespace; | |||
27 | #define MNT_NODIRATIME 0x10 | 27 | #define MNT_NODIRATIME 0x10 |
28 | #define MNT_RELATIME 0x20 | 28 | #define MNT_RELATIME 0x20 |
29 | #define MNT_READONLY 0x40 /* does the user want this to be r/o? */ | 29 | #define MNT_READONLY 0x40 /* does the user want this to be r/o? */ |
30 | #define MNT_STRICTATIME 0x80 | ||
30 | 31 | ||
31 | #define MNT_SHRINKABLE 0x100 | 32 | #define MNT_SHRINKABLE 0x100 |
32 | #define MNT_IMBALANCED_WRITE_COUNT 0x200 /* just for debugging */ | 33 | #define MNT_IMBALANCED_WRITE_COUNT 0x200 /* just for debugging */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index aca8c458aa8a..02c18b903986 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2112,6 +2112,8 @@ | |||
2112 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c | 2112 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c |
2113 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 | 2113 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 |
2114 | 2114 | ||
2115 | #define PCI_VENDOR_ID_DFI 0x15bd | ||
2116 | |||
2115 | #define PCI_VENDOR_ID_QUICKNET 0x15e2 | 2117 | #define PCI_VENDOR_ID_QUICKNET 0x15e2 |
2116 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 | 2118 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 |
2117 | 2119 | ||
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 9a342699c607..76e470a299bf 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #define _PLATFORM_DEVICE_H_ | 12 | #define _PLATFORM_DEVICE_H_ |
13 | 13 | ||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/mod_devicetable.h> | ||
15 | 16 | ||
16 | struct platform_device { | 17 | struct platform_device { |
17 | const char * name; | 18 | const char * name; |
@@ -19,8 +20,13 @@ struct platform_device { | |||
19 | struct device dev; | 20 | struct device dev; |
20 | u32 num_resources; | 21 | u32 num_resources; |
21 | struct resource * resource; | 22 | struct resource * resource; |
23 | void *platform_data; | ||
24 | |||
25 | struct platform_device_id *id_entry; | ||
22 | }; | 26 | }; |
23 | 27 | ||
28 | #define platform_get_device_id(pdev) ((pdev)->id_entry) | ||
29 | |||
24 | #define to_platform_device(x) container_of((x), struct platform_device, dev) | 30 | #define to_platform_device(x) container_of((x), struct platform_device, dev) |
25 | 31 | ||
26 | extern int platform_device_register(struct platform_device *); | 32 | extern int platform_device_register(struct platform_device *); |
@@ -56,6 +62,7 @@ struct platform_driver { | |||
56 | int (*resume_early)(struct platform_device *); | 62 | int (*resume_early)(struct platform_device *); |
57 | int (*resume)(struct platform_device *); | 63 | int (*resume)(struct platform_device *); |
58 | struct device_driver driver; | 64 | struct device_driver driver; |
65 | struct platform_device_id *id_table; | ||
59 | }; | 66 | }; |
60 | 67 | ||
61 | extern int platform_driver_register(struct platform_driver *); | 68 | extern int platform_driver_register(struct platform_driver *); |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 24ba5f67b3a3..1d4e2d289821 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -400,6 +400,9 @@ extern void __suspend_report_result(const char *function, void *fn, int ret); | |||
400 | 400 | ||
401 | #else /* !CONFIG_PM_SLEEP */ | 401 | #else /* !CONFIG_PM_SLEEP */ |
402 | 402 | ||
403 | #define device_pm_lock() do {} while (0) | ||
404 | #define device_pm_unlock() do {} while (0) | ||
405 | |||
403 | static inline int device_suspend(pm_message_t state) | 406 | static inline int device_suspend(pm_message_t state) |
404 | { | 407 | { |
405 | return 0; | 408 | return 0; |
@@ -409,6 +412,14 @@ static inline int device_suspend(pm_message_t state) | |||
409 | 412 | ||
410 | #endif /* !CONFIG_PM_SLEEP */ | 413 | #endif /* !CONFIG_PM_SLEEP */ |
411 | 414 | ||
415 | /* How to reorder dpm_list after device_move() */ | ||
416 | enum dpm_order { | ||
417 | DPM_ORDER_NONE, | ||
418 | DPM_ORDER_DEV_AFTER_PARENT, | ||
419 | DPM_ORDER_PARENT_BEFORE_DEV, | ||
420 | DPM_ORDER_DEV_LAST, | ||
421 | }; | ||
422 | |||
412 | /* | 423 | /* |
413 | * Global Power Management flags | 424 | * Global Power Management flags |
414 | * Used to keep APM and ACPI from both being active | 425 | * Used to keep APM and ACPI from both being active |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 011db2f4c94c..2c36f62e7544 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1175,6 +1175,8 @@ struct task_struct { | |||
1175 | /* ??? */ | 1175 | /* ??? */ |
1176 | unsigned int personality; | 1176 | unsigned int personality; |
1177 | unsigned did_exec:1; | 1177 | unsigned did_exec:1; |
1178 | unsigned in_execve:1; /* Tell the LSMs that the process is doing an | ||
1179 | * execve */ | ||
1178 | pid_t pid; | 1180 | pid_t pid; |
1179 | pid_t tgid; | 1181 | pid_t tgid; |
1180 | 1182 | ||
diff --git a/include/linux/sh_cmt.h b/include/linux/sh_cmt.h new file mode 100644 index 000000000000..68cacde5954f --- /dev/null +++ b/include/linux/sh_cmt.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef __SH_CMT_H__ | ||
2 | #define __SH_CMT_H__ | ||
3 | |||
4 | struct sh_cmt_config { | ||
5 | char *name; | ||
6 | unsigned long channel_offset; | ||
7 | int timer_bit; | ||
8 | char *clk; | ||
9 | unsigned long clockevent_rating; | ||
10 | unsigned long clocksource_rating; | ||
11 | }; | ||
12 | |||
13 | #endif /* __SH_CMT_H__ */ | ||
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index 68e212ff9dde..eb1423a0078d 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
@@ -85,6 +85,7 @@ struct intc_desc symbol __initdata = { \ | |||
85 | } | 85 | } |
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | unsigned int intc_evt2irq(unsigned int vector); | ||
88 | void __init register_intc_controller(struct intc_desc *desc); | 89 | void __init register_intc_controller(struct intc_desc *desc); |
89 | int intc_set_priority(unsigned int irq, unsigned int prio); | 90 | int intc_set_priority(unsigned int irq, unsigned int prio); |
90 | 91 | ||
diff --git a/include/linux/timeriomem-rng.h b/include/linux/timeriomem-rng.h new file mode 100644 index 000000000000..dd253177f65f --- /dev/null +++ b/include/linux/timeriomem-rng.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * linux/include/linux/timeriomem-rng.h | ||
3 | * | ||
4 | * Copyright (c) 2009 Alexander Clouter <alex@digriz.org.uk> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/completion.h> | ||
12 | |||
13 | struct timeriomem_rng_data { | ||
14 | struct completion completion; | ||
15 | unsigned int present:1; | ||
16 | |||
17 | u32 __iomem *address; | ||
18 | |||
19 | /* measures in usecs */ | ||
20 | unsigned int period; | ||
21 | }; | ||
diff --git a/include/linux/tpm.h b/include/linux/tpm.h new file mode 100644 index 000000000000..3338b3f5c21a --- /dev/null +++ b/include/linux/tpm.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004,2007,2008 IBM Corporation | ||
3 | * | ||
4 | * Authors: | ||
5 | * Leendert van Doorn <leendert@watson.ibm.com> | ||
6 | * Dave Safford <safford@watson.ibm.com> | ||
7 | * Reiner Sailer <sailer@watson.ibm.com> | ||
8 | * Kylene Hall <kjhall@us.ibm.com> | ||
9 | * Debora Velarde <dvelarde@us.ibm.com> | ||
10 | * | ||
11 | * Maintained by: <tpmdd_devel@lists.sourceforge.net> | ||
12 | * | ||
13 | * Device driver for TCG/TCPA TPM (trusted platform module). | ||
14 | * Specifications at www.trustedcomputinggroup.org | ||
15 | * | ||
16 | * This program is free software; you can redistribute it and/or | ||
17 | * modify it under the terms of the GNU General Public License as | ||
18 | * published by the Free Software Foundation, version 2 of the | ||
19 | * License. | ||
20 | * | ||
21 | */ | ||
22 | #ifndef __LINUX_TPM_H__ | ||
23 | #define __LINUX_TPM_H__ | ||
24 | |||
25 | /* | ||
26 | * Chip num is this value or a valid tpm idx | ||
27 | */ | ||
28 | #define TPM_ANY_NUM 0xFFFF | ||
29 | |||
30 | #if defined(CONFIG_TCG_TPM) | ||
31 | |||
32 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); | ||
33 | extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash); | ||
34 | #endif | ||
35 | #endif | ||
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h index a0bb6bd2e5c1..5dcc9ff72f69 100644 --- a/include/linux/uio_driver.h +++ b/include/linux/uio_driver.h | |||
@@ -22,6 +22,7 @@ struct uio_map; | |||
22 | 22 | ||
23 | /** | 23 | /** |
24 | * struct uio_mem - description of a UIO memory region | 24 | * struct uio_mem - description of a UIO memory region |
25 | * @name: name of the memory region for identification | ||
25 | * @addr: address of the device's memory | 26 | * @addr: address of the device's memory |
26 | * @size: size of IO | 27 | * @size: size of IO |
27 | * @memtype: type of memory addr points to | 28 | * @memtype: type of memory addr points to |
@@ -29,6 +30,7 @@ struct uio_map; | |||
29 | * @map: for use by the UIO core only. | 30 | * @map: for use by the UIO core only. |
30 | */ | 31 | */ |
31 | struct uio_mem { | 32 | struct uio_mem { |
33 | const char *name; | ||
32 | unsigned long addr; | 34 | unsigned long addr; |
33 | unsigned long size; | 35 | unsigned long size; |
34 | int memtype; | 36 | int memtype; |
@@ -42,12 +44,14 @@ struct uio_portio; | |||
42 | 44 | ||
43 | /** | 45 | /** |
44 | * struct uio_port - description of a UIO port region | 46 | * struct uio_port - description of a UIO port region |
47 | * @name: name of the port region for identification | ||
45 | * @start: start of port region | 48 | * @start: start of port region |
46 | * @size: size of port region | 49 | * @size: size of port region |
47 | * @porttype: type of port (see UIO_PORT_* below) | 50 | * @porttype: type of port (see UIO_PORT_* below) |
48 | * @portio: for use by the UIO core only. | 51 | * @portio: for use by the UIO core only. |
49 | */ | 52 | */ |
50 | struct uio_port { | 53 | struct uio_port { |
54 | const char *name; | ||
51 | unsigned long start; | 55 | unsigned long start; |
52 | unsigned long size; | 56 | unsigned long size; |
53 | int porttype; | 57 | int porttype; |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 88079fd60235..c6b2ab41b908 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -643,186 +643,6 @@ static inline int usb_make_path(struct usb_device *dev, char *buf, size_t size) | |||
643 | 643 | ||
644 | /*-------------------------------------------------------------------------*/ | 644 | /*-------------------------------------------------------------------------*/ |
645 | 645 | ||
646 | /** | ||
647 | * usb_endpoint_num - get the endpoint's number | ||
648 | * @epd: endpoint to be checked | ||
649 | * | ||
650 | * Returns @epd's number: 0 to 15. | ||
651 | */ | ||
652 | static inline int usb_endpoint_num(const struct usb_endpoint_descriptor *epd) | ||
653 | { | ||
654 | return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; | ||
655 | } | ||
656 | |||
657 | /** | ||
658 | * usb_endpoint_type - get the endpoint's transfer type | ||
659 | * @epd: endpoint to be checked | ||
660 | * | ||
661 | * Returns one of USB_ENDPOINT_XFER_{CONTROL, ISOC, BULK, INT} according | ||
662 | * to @epd's transfer type. | ||
663 | */ | ||
664 | static inline int usb_endpoint_type(const struct usb_endpoint_descriptor *epd) | ||
665 | { | ||
666 | return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; | ||
667 | } | ||
668 | |||
669 | /** | ||
670 | * usb_endpoint_dir_in - check if the endpoint has IN direction | ||
671 | * @epd: endpoint to be checked | ||
672 | * | ||
673 | * Returns true if the endpoint is of type IN, otherwise it returns false. | ||
674 | */ | ||
675 | static inline int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) | ||
676 | { | ||
677 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN); | ||
678 | } | ||
679 | |||
680 | /** | ||
681 | * usb_endpoint_dir_out - check if the endpoint has OUT direction | ||
682 | * @epd: endpoint to be checked | ||
683 | * | ||
684 | * Returns true if the endpoint is of type OUT, otherwise it returns false. | ||
685 | */ | ||
686 | static inline int usb_endpoint_dir_out( | ||
687 | const struct usb_endpoint_descriptor *epd) | ||
688 | { | ||
689 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT); | ||
690 | } | ||
691 | |||
692 | /** | ||
693 | * usb_endpoint_xfer_bulk - check if the endpoint has bulk transfer type | ||
694 | * @epd: endpoint to be checked | ||
695 | * | ||
696 | * Returns true if the endpoint is of type bulk, otherwise it returns false. | ||
697 | */ | ||
698 | static inline int usb_endpoint_xfer_bulk( | ||
699 | const struct usb_endpoint_descriptor *epd) | ||
700 | { | ||
701 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
702 | USB_ENDPOINT_XFER_BULK); | ||
703 | } | ||
704 | |||
705 | /** | ||
706 | * usb_endpoint_xfer_control - check if the endpoint has control transfer type | ||
707 | * @epd: endpoint to be checked | ||
708 | * | ||
709 | * Returns true if the endpoint is of type control, otherwise it returns false. | ||
710 | */ | ||
711 | static inline int usb_endpoint_xfer_control( | ||
712 | const struct usb_endpoint_descriptor *epd) | ||
713 | { | ||
714 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
715 | USB_ENDPOINT_XFER_CONTROL); | ||
716 | } | ||
717 | |||
718 | /** | ||
719 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type | ||
720 | * @epd: endpoint to be checked | ||
721 | * | ||
722 | * Returns true if the endpoint is of type interrupt, otherwise it returns | ||
723 | * false. | ||
724 | */ | ||
725 | static inline int usb_endpoint_xfer_int( | ||
726 | const struct usb_endpoint_descriptor *epd) | ||
727 | { | ||
728 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
729 | USB_ENDPOINT_XFER_INT); | ||
730 | } | ||
731 | |||
732 | /** | ||
733 | * usb_endpoint_xfer_isoc - check if the endpoint has isochronous transfer type | ||
734 | * @epd: endpoint to be checked | ||
735 | * | ||
736 | * Returns true if the endpoint is of type isochronous, otherwise it returns | ||
737 | * false. | ||
738 | */ | ||
739 | static inline int usb_endpoint_xfer_isoc( | ||
740 | const struct usb_endpoint_descriptor *epd) | ||
741 | { | ||
742 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
743 | USB_ENDPOINT_XFER_ISOC); | ||
744 | } | ||
745 | |||
746 | /** | ||
747 | * usb_endpoint_is_bulk_in - check if the endpoint is bulk IN | ||
748 | * @epd: endpoint to be checked | ||
749 | * | ||
750 | * Returns true if the endpoint has bulk transfer type and IN direction, | ||
751 | * otherwise it returns false. | ||
752 | */ | ||
753 | static inline int usb_endpoint_is_bulk_in( | ||
754 | const struct usb_endpoint_descriptor *epd) | ||
755 | { | ||
756 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd)); | ||
757 | } | ||
758 | |||
759 | /** | ||
760 | * usb_endpoint_is_bulk_out - check if the endpoint is bulk OUT | ||
761 | * @epd: endpoint to be checked | ||
762 | * | ||
763 | * Returns true if the endpoint has bulk transfer type and OUT direction, | ||
764 | * otherwise it returns false. | ||
765 | */ | ||
766 | static inline int usb_endpoint_is_bulk_out( | ||
767 | const struct usb_endpoint_descriptor *epd) | ||
768 | { | ||
769 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd)); | ||
770 | } | ||
771 | |||
772 | /** | ||
773 | * usb_endpoint_is_int_in - check if the endpoint is interrupt IN | ||
774 | * @epd: endpoint to be checked | ||
775 | * | ||
776 | * Returns true if the endpoint has interrupt transfer type and IN direction, | ||
777 | * otherwise it returns false. | ||
778 | */ | ||
779 | static inline int usb_endpoint_is_int_in( | ||
780 | const struct usb_endpoint_descriptor *epd) | ||
781 | { | ||
782 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd)); | ||
783 | } | ||
784 | |||
785 | /** | ||
786 | * usb_endpoint_is_int_out - check if the endpoint is interrupt OUT | ||
787 | * @epd: endpoint to be checked | ||
788 | * | ||
789 | * Returns true if the endpoint has interrupt transfer type and OUT direction, | ||
790 | * otherwise it returns false. | ||
791 | */ | ||
792 | static inline int usb_endpoint_is_int_out( | ||
793 | const struct usb_endpoint_descriptor *epd) | ||
794 | { | ||
795 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd)); | ||
796 | } | ||
797 | |||
798 | /** | ||
799 | * usb_endpoint_is_isoc_in - check if the endpoint is isochronous IN | ||
800 | * @epd: endpoint to be checked | ||
801 | * | ||
802 | * Returns true if the endpoint has isochronous transfer type and IN direction, | ||
803 | * otherwise it returns false. | ||
804 | */ | ||
805 | static inline int usb_endpoint_is_isoc_in( | ||
806 | const struct usb_endpoint_descriptor *epd) | ||
807 | { | ||
808 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd)); | ||
809 | } | ||
810 | |||
811 | /** | ||
812 | * usb_endpoint_is_isoc_out - check if the endpoint is isochronous OUT | ||
813 | * @epd: endpoint to be checked | ||
814 | * | ||
815 | * Returns true if the endpoint has isochronous transfer type and OUT direction, | ||
816 | * otherwise it returns false. | ||
817 | */ | ||
818 | static inline int usb_endpoint_is_isoc_out( | ||
819 | const struct usb_endpoint_descriptor *epd) | ||
820 | { | ||
821 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd)); | ||
822 | } | ||
823 | |||
824 | /*-------------------------------------------------------------------------*/ | ||
825 | |||
826 | #define USB_DEVICE_ID_MATCH_DEVICE \ | 646 | #define USB_DEVICE_ID_MATCH_DEVICE \ |
827 | (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT) | 647 | (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT) |
828 | #define USB_DEVICE_ID_MATCH_DEV_RANGE \ | 648 | #define USB_DEVICE_ID_MATCH_DEV_RANGE \ |
@@ -1357,8 +1177,8 @@ struct urb { | |||
1357 | unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/ | 1177 | unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/ |
1358 | void *transfer_buffer; /* (in) associated data buffer */ | 1178 | void *transfer_buffer; /* (in) associated data buffer */ |
1359 | dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */ | 1179 | dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */ |
1360 | int transfer_buffer_length; /* (in) data buffer length */ | 1180 | u32 transfer_buffer_length; /* (in) data buffer length */ |
1361 | int actual_length; /* (return) actual transfer length */ | 1181 | u32 actual_length; /* (return) actual transfer length */ |
1362 | unsigned char *setup_packet; /* (in) setup packet (control only) */ | 1182 | unsigned char *setup_packet; /* (in) setup packet (control only) */ |
1363 | dma_addr_t setup_dma; /* (in) dma addr for setup_packet */ | 1183 | dma_addr_t setup_dma; /* (in) dma addr for setup_packet */ |
1364 | int start_frame; /* (modify) start frame (ISO) */ | 1184 | int start_frame; /* (modify) start frame (ISO) */ |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 9b42baed3900..b145119a90da 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -102,7 +102,7 @@ | |||
102 | #define USB_REQ_LOOPBACK_DATA_READ 0x16 | 102 | #define USB_REQ_LOOPBACK_DATA_READ 0x16 |
103 | #define USB_REQ_SET_INTERFACE_DS 0x17 | 103 | #define USB_REQ_SET_INTERFACE_DS 0x17 |
104 | 104 | ||
105 | /* The Link Power Mangement (LPM) ECN defines USB_REQ_TEST_AND_SET command, | 105 | /* The Link Power Management (LPM) ECN defines USB_REQ_TEST_AND_SET command, |
106 | * used by hubs to put ports into a new L1 suspend state, except that it | 106 | * used by hubs to put ports into a new L1 suspend state, except that it |
107 | * forgot to define its number ... | 107 | * forgot to define its number ... |
108 | */ | 108 | */ |
@@ -353,6 +353,185 @@ struct usb_endpoint_descriptor { | |||
353 | #define USB_ENDPOINT_XFER_INT 3 | 353 | #define USB_ENDPOINT_XFER_INT 3 |
354 | #define USB_ENDPOINT_MAX_ADJUSTABLE 0x80 | 354 | #define USB_ENDPOINT_MAX_ADJUSTABLE 0x80 |
355 | 355 | ||
356 | /*-------------------------------------------------------------------------*/ | ||
357 | |||
358 | /** | ||
359 | * usb_endpoint_num - get the endpoint's number | ||
360 | * @epd: endpoint to be checked | ||
361 | * | ||
362 | * Returns @epd's number: 0 to 15. | ||
363 | */ | ||
364 | static inline int usb_endpoint_num(const struct usb_endpoint_descriptor *epd) | ||
365 | { | ||
366 | return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; | ||
367 | } | ||
368 | |||
369 | /** | ||
370 | * usb_endpoint_type - get the endpoint's transfer type | ||
371 | * @epd: endpoint to be checked | ||
372 | * | ||
373 | * Returns one of USB_ENDPOINT_XFER_{CONTROL, ISOC, BULK, INT} according | ||
374 | * to @epd's transfer type. | ||
375 | */ | ||
376 | static inline int usb_endpoint_type(const struct usb_endpoint_descriptor *epd) | ||
377 | { | ||
378 | return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; | ||
379 | } | ||
380 | |||
381 | /** | ||
382 | * usb_endpoint_dir_in - check if the endpoint has IN direction | ||
383 | * @epd: endpoint to be checked | ||
384 | * | ||
385 | * Returns true if the endpoint is of type IN, otherwise it returns false. | ||
386 | */ | ||
387 | static inline int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) | ||
388 | { | ||
389 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN); | ||
390 | } | ||
391 | |||
392 | /** | ||
393 | * usb_endpoint_dir_out - check if the endpoint has OUT direction | ||
394 | * @epd: endpoint to be checked | ||
395 | * | ||
396 | * Returns true if the endpoint is of type OUT, otherwise it returns false. | ||
397 | */ | ||
398 | static inline int usb_endpoint_dir_out( | ||
399 | const struct usb_endpoint_descriptor *epd) | ||
400 | { | ||
401 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT); | ||
402 | } | ||
403 | |||
404 | /** | ||
405 | * usb_endpoint_xfer_bulk - check if the endpoint has bulk transfer type | ||
406 | * @epd: endpoint to be checked | ||
407 | * | ||
408 | * Returns true if the endpoint is of type bulk, otherwise it returns false. | ||
409 | */ | ||
410 | static inline int usb_endpoint_xfer_bulk( | ||
411 | const struct usb_endpoint_descriptor *epd) | ||
412 | { | ||
413 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
414 | USB_ENDPOINT_XFER_BULK); | ||
415 | } | ||
416 | |||
417 | /** | ||
418 | * usb_endpoint_xfer_control - check if the endpoint has control transfer type | ||
419 | * @epd: endpoint to be checked | ||
420 | * | ||
421 | * Returns true if the endpoint is of type control, otherwise it returns false. | ||
422 | */ | ||
423 | static inline int usb_endpoint_xfer_control( | ||
424 | const struct usb_endpoint_descriptor *epd) | ||
425 | { | ||
426 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
427 | USB_ENDPOINT_XFER_CONTROL); | ||
428 | } | ||
429 | |||
430 | /** | ||
431 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type | ||
432 | * @epd: endpoint to be checked | ||
433 | * | ||
434 | * Returns true if the endpoint is of type interrupt, otherwise it returns | ||
435 | * false. | ||
436 | */ | ||
437 | static inline int usb_endpoint_xfer_int( | ||
438 | const struct usb_endpoint_descriptor *epd) | ||
439 | { | ||
440 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
441 | USB_ENDPOINT_XFER_INT); | ||
442 | } | ||
443 | |||
444 | /** | ||
445 | * usb_endpoint_xfer_isoc - check if the endpoint has isochronous transfer type | ||
446 | * @epd: endpoint to be checked | ||
447 | * | ||
448 | * Returns true if the endpoint is of type isochronous, otherwise it returns | ||
449 | * false. | ||
450 | */ | ||
451 | static inline int usb_endpoint_xfer_isoc( | ||
452 | const struct usb_endpoint_descriptor *epd) | ||
453 | { | ||
454 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
455 | USB_ENDPOINT_XFER_ISOC); | ||
456 | } | ||
457 | |||
458 | /** | ||
459 | * usb_endpoint_is_bulk_in - check if the endpoint is bulk IN | ||
460 | * @epd: endpoint to be checked | ||
461 | * | ||
462 | * Returns true if the endpoint has bulk transfer type and IN direction, | ||
463 | * otherwise it returns false. | ||
464 | */ | ||
465 | static inline int usb_endpoint_is_bulk_in( | ||
466 | const struct usb_endpoint_descriptor *epd) | ||
467 | { | ||
468 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd)); | ||
469 | } | ||
470 | |||
471 | /** | ||
472 | * usb_endpoint_is_bulk_out - check if the endpoint is bulk OUT | ||
473 | * @epd: endpoint to be checked | ||
474 | * | ||
475 | * Returns true if the endpoint has bulk transfer type and OUT direction, | ||
476 | * otherwise it returns false. | ||
477 | */ | ||
478 | static inline int usb_endpoint_is_bulk_out( | ||
479 | const struct usb_endpoint_descriptor *epd) | ||
480 | { | ||
481 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd)); | ||
482 | } | ||
483 | |||
484 | /** | ||
485 | * usb_endpoint_is_int_in - check if the endpoint is interrupt IN | ||
486 | * @epd: endpoint to be checked | ||
487 | * | ||
488 | * Returns true if the endpoint has interrupt transfer type and IN direction, | ||
489 | * otherwise it returns false. | ||
490 | */ | ||
491 | static inline int usb_endpoint_is_int_in( | ||
492 | const struct usb_endpoint_descriptor *epd) | ||
493 | { | ||
494 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd)); | ||
495 | } | ||
496 | |||
497 | /** | ||
498 | * usb_endpoint_is_int_out - check if the endpoint is interrupt OUT | ||
499 | * @epd: endpoint to be checked | ||
500 | * | ||
501 | * Returns true if the endpoint has interrupt transfer type and OUT direction, | ||
502 | * otherwise it returns false. | ||
503 | */ | ||
504 | static inline int usb_endpoint_is_int_out( | ||
505 | const struct usb_endpoint_descriptor *epd) | ||
506 | { | ||
507 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd)); | ||
508 | } | ||
509 | |||
510 | /** | ||
511 | * usb_endpoint_is_isoc_in - check if the endpoint is isochronous IN | ||
512 | * @epd: endpoint to be checked | ||
513 | * | ||
514 | * Returns true if the endpoint has isochronous transfer type and IN direction, | ||
515 | * otherwise it returns false. | ||
516 | */ | ||
517 | static inline int usb_endpoint_is_isoc_in( | ||
518 | const struct usb_endpoint_descriptor *epd) | ||
519 | { | ||
520 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd)); | ||
521 | } | ||
522 | |||
523 | /** | ||
524 | * usb_endpoint_is_isoc_out - check if the endpoint is isochronous OUT | ||
525 | * @epd: endpoint to be checked | ||
526 | * | ||
527 | * Returns true if the endpoint has isochronous transfer type and OUT direction, | ||
528 | * otherwise it returns false. | ||
529 | */ | ||
530 | static inline int usb_endpoint_is_isoc_out( | ||
531 | const struct usb_endpoint_descriptor *epd) | ||
532 | { | ||
533 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd)); | ||
534 | } | ||
356 | 535 | ||
357 | /*-------------------------------------------------------------------------*/ | 536 | /*-------------------------------------------------------------------------*/ |
358 | 537 | ||
@@ -584,8 +763,8 @@ enum usb_device_state { | |||
584 | /* chapter 9 and authentication (wireless) device states */ | 763 | /* chapter 9 and authentication (wireless) device states */ |
585 | USB_STATE_ATTACHED, | 764 | USB_STATE_ATTACHED, |
586 | USB_STATE_POWERED, /* wired */ | 765 | USB_STATE_POWERED, /* wired */ |
587 | USB_STATE_UNAUTHENTICATED, /* auth */ | ||
588 | USB_STATE_RECONNECTING, /* auth */ | 766 | USB_STATE_RECONNECTING, /* auth */ |
767 | USB_STATE_UNAUTHENTICATED, /* auth */ | ||
589 | USB_STATE_DEFAULT, /* limited function */ | 768 | USB_STATE_DEFAULT, /* limited function */ |
590 | USB_STATE_ADDRESS, | 769 | USB_STATE_ADDRESS, |
591 | USB_STATE_CONFIGURED, /* most functions */ | 770 | USB_STATE_CONFIGURED, /* most functions */ |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 935c380ffe47..acd7b0f06c8a 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
@@ -244,6 +244,10 @@ int usb_add_config(struct usb_composite_dev *, | |||
244 | * value; it should return zero on successful initialization. | 244 | * value; it should return zero on successful initialization. |
245 | * @unbind: Reverses @bind(); called as a side effect of unregistering | 245 | * @unbind: Reverses @bind(); called as a side effect of unregistering |
246 | * this driver. | 246 | * this driver. |
247 | * @suspend: Notifies when the host stops sending USB traffic, | ||
248 | * after function notifications | ||
249 | * @resume: Notifies configuration when the host restarts USB traffic, | ||
250 | * before function notifications | ||
247 | * | 251 | * |
248 | * Devices default to reporting self powered operation. Devices which rely | 252 | * Devices default to reporting self powered operation. Devices which rely |
249 | * on bus powered operation should report this in their @bind() method. | 253 | * on bus powered operation should report this in their @bind() method. |
@@ -268,6 +272,10 @@ struct usb_composite_driver { | |||
268 | 272 | ||
269 | int (*bind)(struct usb_composite_dev *); | 273 | int (*bind)(struct usb_composite_dev *); |
270 | int (*unbind)(struct usb_composite_dev *); | 274 | int (*unbind)(struct usb_composite_dev *); |
275 | |||
276 | /* global suspend hooks */ | ||
277 | void (*suspend)(struct usb_composite_dev *); | ||
278 | void (*resume)(struct usb_composite_dev *); | ||
271 | }; | 279 | }; |
272 | 280 | ||
273 | extern int usb_composite_register(struct usb_composite_driver *); | 281 | extern int usb_composite_register(struct usb_composite_driver *); |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 0460a746480c..bbf45d500b6d 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -598,6 +598,7 @@ static inline int usb_gadget_clear_selfpowered(struct usb_gadget *gadget) | |||
598 | /** | 598 | /** |
599 | * usb_gadget_vbus_connect - Notify controller that VBUS is powered | 599 | * usb_gadget_vbus_connect - Notify controller that VBUS is powered |
600 | * @gadget:The device which now has VBUS power. | 600 | * @gadget:The device which now has VBUS power. |
601 | * Context: can sleep | ||
601 | * | 602 | * |
602 | * This call is used by a driver for an external transceiver (or GPIO) | 603 | * This call is used by a driver for an external transceiver (or GPIO) |
603 | * that detects a VBUS power session starting. Common responses include | 604 | * that detects a VBUS power session starting. Common responses include |
@@ -636,6 +637,7 @@ static inline int usb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA) | |||
636 | /** | 637 | /** |
637 | * usb_gadget_vbus_disconnect - notify controller about VBUS session end | 638 | * usb_gadget_vbus_disconnect - notify controller about VBUS session end |
638 | * @gadget:the device whose VBUS supply is being described | 639 | * @gadget:the device whose VBUS supply is being described |
640 | * Context: can sleep | ||
639 | * | 641 | * |
640 | * This call is used by a driver for an external transceiver (or GPIO) | 642 | * This call is used by a driver for an external transceiver (or GPIO) |
641 | * that detects a VBUS power session ending. Common responses include | 643 | * that detects a VBUS power session ending. Common responses include |
@@ -792,19 +794,20 @@ struct usb_gadget_driver { | |||
792 | /** | 794 | /** |
793 | * usb_gadget_register_driver - register a gadget driver | 795 | * usb_gadget_register_driver - register a gadget driver |
794 | * @driver:the driver being registered | 796 | * @driver:the driver being registered |
797 | * Context: can sleep | ||
795 | * | 798 | * |
796 | * Call this in your gadget driver's module initialization function, | 799 | * Call this in your gadget driver's module initialization function, |
797 | * to tell the underlying usb controller driver about your driver. | 800 | * to tell the underlying usb controller driver about your driver. |
798 | * The driver's bind() function will be called to bind it to a | 801 | * The driver's bind() function will be called to bind it to a |
799 | * gadget before this registration call returns. It's expected that | 802 | * gadget before this registration call returns. It's expected that |
800 | * the bind() functions will be in init sections. | 803 | * the bind() functions will be in init sections. |
801 | * This function must be called in a context that can sleep. | ||
802 | */ | 804 | */ |
803 | int usb_gadget_register_driver(struct usb_gadget_driver *driver); | 805 | int usb_gadget_register_driver(struct usb_gadget_driver *driver); |
804 | 806 | ||
805 | /** | 807 | /** |
806 | * usb_gadget_unregister_driver - unregister a gadget driver | 808 | * usb_gadget_unregister_driver - unregister a gadget driver |
807 | * @driver:the driver being unregistered | 809 | * @driver:the driver being unregistered |
810 | * Context: can sleep | ||
808 | * | 811 | * |
809 | * Call this in your gadget driver's module cleanup function, | 812 | * Call this in your gadget driver's module cleanup function, |
810 | * to tell the underlying usb controller that your driver is | 813 | * to tell the underlying usb controller that your driver is |
@@ -813,7 +816,6 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver); | |||
813 | * to unbind() and clean up any device state, before this procedure | 816 | * to unbind() and clean up any device state, before this procedure |
814 | * finally returns. It's expected that the unbind() functions | 817 | * finally returns. It's expected that the unbind() functions |
815 | * will in in exit sections, so may not be linked in some kernels. | 818 | * will in in exit sections, so may not be linked in some kernels. |
816 | * This function must be called in a context that can sleep. | ||
817 | */ | 819 | */ |
818 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); | 820 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); |
819 | 821 | ||
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 94df4fe6c6c0..1aaa826396a1 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -80,12 +80,17 @@ struct otg_transceiver { | |||
80 | 80 | ||
81 | /* for board-specific init logic */ | 81 | /* for board-specific init logic */ |
82 | extern int otg_set_transceiver(struct otg_transceiver *); | 82 | extern int otg_set_transceiver(struct otg_transceiver *); |
83 | #ifdef CONFIG_NOP_USB_XCEIV | ||
84 | extern void usb_nop_xceiv_register(void); | ||
85 | extern void usb_nop_xceiv_unregister(void); | ||
86 | #endif | ||
83 | 87 | ||
84 | 88 | ||
85 | /* for usb host and peripheral controller drivers */ | 89 | /* for usb host and peripheral controller drivers */ |
86 | extern struct otg_transceiver *otg_get_transceiver(void); | 90 | extern struct otg_transceiver *otg_get_transceiver(void); |
87 | extern void otg_put_transceiver(struct otg_transceiver *); | 91 | extern void otg_put_transceiver(struct otg_transceiver *); |
88 | 92 | ||
93 | /* Context: can sleep */ | ||
89 | static inline int | 94 | static inline int |
90 | otg_start_hnp(struct otg_transceiver *otg) | 95 | otg_start_hnp(struct otg_transceiver *otg) |
91 | { | 96 | { |
@@ -102,6 +107,8 @@ otg_set_host(struct otg_transceiver *otg, struct usb_bus *host) | |||
102 | 107 | ||
103 | 108 | ||
104 | /* for usb peripheral controller drivers */ | 109 | /* for usb peripheral controller drivers */ |
110 | |||
111 | /* Context: can sleep */ | ||
105 | static inline int | 112 | static inline int |
106 | otg_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *periph) | 113 | otg_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *periph) |
107 | { | 114 | { |
@@ -114,6 +121,7 @@ otg_set_power(struct otg_transceiver *otg, unsigned mA) | |||
114 | return otg->set_power(otg, mA); | 121 | return otg->set_power(otg, mA); |
115 | } | 122 | } |
116 | 123 | ||
124 | /* Context: can sleep */ | ||
117 | static inline int | 125 | static inline int |
118 | otg_set_suspend(struct otg_transceiver *otg, int suspend) | 126 | otg_set_suspend(struct otg_transceiver *otg, int suspend) |
119 | { | 127 | { |
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index 7f6c603db654..2526f3bbd273 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h | |||
@@ -16,4 +16,7 @@ | |||
16 | /* device can't handle Set-Interface requests */ | 16 | /* device can't handle Set-Interface requests */ |
17 | #define USB_QUIRK_NO_SET_INTF 0x00000004 | 17 | #define USB_QUIRK_NO_SET_INTF 0x00000004 |
18 | 18 | ||
19 | /* device can't handle its Configuration or Interface strings */ | ||
20 | #define USB_QUIRK_CONFIG_INTF_STRINGS 0x00000008 | ||
21 | |||
19 | #endif /* __LINUX_USB_QUIRKS_H */ | 22 | #endif /* __LINUX_USB_QUIRKS_H */ |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 0b8617a9176d..b95842542590 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -130,7 +130,8 @@ struct usb_serial { | |||
130 | struct usb_device *dev; | 130 | struct usb_device *dev; |
131 | struct usb_serial_driver *type; | 131 | struct usb_serial_driver *type; |
132 | struct usb_interface *interface; | 132 | struct usb_interface *interface; |
133 | unsigned char disconnected; | 133 | unsigned char disconnected:1; |
134 | unsigned char suspending:1; | ||
134 | unsigned char minor; | 135 | unsigned char minor; |
135 | unsigned char num_ports; | 136 | unsigned char num_ports; |
136 | unsigned char num_port_pointers; | 137 | unsigned char num_port_pointers; |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 1eea1ab68dc4..3d15fb9bc116 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -96,39 +96,26 @@ enum { US_DO_ALL_FLAGS }; | |||
96 | #define US_PR_CBI 0x00 /* Control/Bulk/Interrupt */ | 96 | #define US_PR_CBI 0x00 /* Control/Bulk/Interrupt */ |
97 | #define US_PR_CB 0x01 /* Control/Bulk w/o interrupt */ | 97 | #define US_PR_CB 0x01 /* Control/Bulk w/o interrupt */ |
98 | #define US_PR_BULK 0x50 /* bulk only */ | 98 | #define US_PR_BULK 0x50 /* bulk only */ |
99 | #ifdef CONFIG_USB_STORAGE_USBAT | 99 | |
100 | #define US_PR_USBAT 0x80 /* SCM-ATAPI bridge */ | 100 | #define US_PR_USBAT 0x80 /* SCM-ATAPI bridge */ |
101 | #endif | ||
102 | #ifdef CONFIG_USB_STORAGE_SDDR09 | ||
103 | #define US_PR_EUSB_SDDR09 0x81 /* SCM-SCSI bridge for SDDR-09 */ | 101 | #define US_PR_EUSB_SDDR09 0x81 /* SCM-SCSI bridge for SDDR-09 */ |
104 | #endif | ||
105 | #ifdef CONFIG_USB_STORAGE_SDDR55 | ||
106 | #define US_PR_SDDR55 0x82 /* SDDR-55 (made up) */ | 102 | #define US_PR_SDDR55 0x82 /* SDDR-55 (made up) */ |
107 | #endif | ||
108 | #define US_PR_DPCM_USB 0xf0 /* Combination CB/SDDR09 */ | 103 | #define US_PR_DPCM_USB 0xf0 /* Combination CB/SDDR09 */ |
109 | #ifdef CONFIG_USB_STORAGE_FREECOM | ||
110 | #define US_PR_FREECOM 0xf1 /* Freecom */ | 104 | #define US_PR_FREECOM 0xf1 /* Freecom */ |
111 | #endif | ||
112 | #ifdef CONFIG_USB_STORAGE_DATAFAB | ||
113 | #define US_PR_DATAFAB 0xf2 /* Datafab chipsets */ | 105 | #define US_PR_DATAFAB 0xf2 /* Datafab chipsets */ |
114 | #endif | ||
115 | #ifdef CONFIG_USB_STORAGE_JUMPSHOT | ||
116 | #define US_PR_JUMPSHOT 0xf3 /* Lexar Jumpshot */ | 106 | #define US_PR_JUMPSHOT 0xf3 /* Lexar Jumpshot */ |
117 | #endif | ||
118 | #ifdef CONFIG_USB_STORAGE_ALAUDA | ||
119 | #define US_PR_ALAUDA 0xf4 /* Alauda chipsets */ | 107 | #define US_PR_ALAUDA 0xf4 /* Alauda chipsets */ |
120 | #endif | ||
121 | #ifdef CONFIG_USB_STORAGE_KARMA | ||
122 | #define US_PR_KARMA 0xf5 /* Rio Karma */ | 108 | #define US_PR_KARMA 0xf5 /* Rio Karma */ |
123 | #endif | ||
124 | 109 | ||
125 | #define US_PR_DEVICE 0xff /* Use device's value */ | 110 | #define US_PR_DEVICE 0xff /* Use device's value */ |
126 | 111 | ||
127 | /* | 112 | /* |
128 | */ | 113 | */ |
114 | extern int usb_usual_ignore_device(struct usb_interface *intf); | ||
115 | extern struct usb_device_id usb_storage_usb_ids[]; | ||
116 | |||
129 | #ifdef CONFIG_USB_LIBUSUAL | 117 | #ifdef CONFIG_USB_LIBUSUAL |
130 | 118 | ||
131 | extern struct usb_device_id storage_usb_ids[]; | ||
132 | extern void usb_usual_set_present(int type); | 119 | extern void usb_usual_set_present(int type); |
133 | extern void usb_usual_clear_present(int type); | 120 | extern void usb_usual_clear_present(int type); |
134 | extern int usb_usual_check_type(const struct usb_device_id *, int type); | 121 | extern int usb_usual_check_type(const struct usb_device_id *, int type); |
diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h index ba0c49399a83..c703e0340423 100644 --- a/include/linux/wimax/debug.h +++ b/include/linux/wimax/debug.h | |||
@@ -178,7 +178,7 @@ void __d_head(char *head, size_t head_size, | |||
178 | WARN_ON(1); | 178 | WARN_ON(1); |
179 | } else | 179 | } else |
180 | snprintf(head, head_size, "%s %s: ", | 180 | snprintf(head, head_size, "%s %s: ", |
181 | dev_driver_string(dev), dev->bus_id); | 181 | dev_driver_string(dev), dev_name(dev)); |
182 | } | 182 | } |
183 | 183 | ||
184 | 184 | ||