diff options
| author | Dave Jones <davej@redhat.com> | 2007-02-10 20:36:29 -0500 |
|---|---|---|
| committer | Dave Jones <davej@redhat.com> | 2007-02-10 20:36:29 -0500 |
| commit | bd0561c9d8dcbf21cd9aa46c416bbf6a3a12e4b1 (patch) | |
| tree | 64fe15d4db42e0840acea00e4cf7e1855bba9e96 /include/linux | |
| parent | 348f31ed2bd18391fe5903aa0ad7bfcda6d8ca0b (diff) | |
| parent | 66efc5a7e3061c3597ac43a8bb1026488d57e66b (diff) | |
[CPUFREQ] Fix up merge conflicts with recent ACPI changes.
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'include/linux')
64 files changed, 818 insertions, 1422 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 157db77a7170..683513e310de 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -11,6 +11,7 @@ header-y += netfilter_arp/ | |||
| 11 | header-y += netfilter_bridge/ | 11 | header-y += netfilter_bridge/ |
| 12 | header-y += netfilter_ipv4/ | 12 | header-y += netfilter_ipv4/ |
| 13 | header-y += netfilter_ipv6/ | 13 | header-y += netfilter_ipv6/ |
| 14 | header-y += usb/ | ||
| 14 | 15 | ||
| 15 | header-y += affs_hardblocks.h | 16 | header-y += affs_hardblocks.h |
| 16 | header-y += aio_abi.h | 17 | header-y += aio_abi.h |
| @@ -326,7 +327,6 @@ unifdef-y += udp.h | |||
| 326 | unifdef-y += uinput.h | 327 | unifdef-y += uinput.h |
| 327 | unifdef-y += uio.h | 328 | unifdef-y += uio.h |
| 328 | unifdef-y += unistd.h | 329 | unifdef-y += unistd.h |
| 329 | unifdef-y += usb_ch9.h | ||
| 330 | unifdef-y += usbdevice_fs.h | 330 | unifdef-y += usbdevice_fs.h |
| 331 | unifdef-y += user.h | 331 | unifdef-y += user.h |
| 332 | unifdef-y += utsname.h | 332 | unifdef-y += utsname.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 91f1f2363870..815f1fb4ce21 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -53,166 +53,6 @@ enum acpi_irq_model_id { | |||
| 53 | 53 | ||
| 54 | extern enum acpi_irq_model_id acpi_irq_model; | 54 | extern enum acpi_irq_model_id acpi_irq_model; |
| 55 | 55 | ||
| 56 | |||
| 57 | /* Root System Description Pointer (RSDP) */ | ||
| 58 | |||
| 59 | struct acpi_table_rsdp { | ||
| 60 | char signature[8]; | ||
| 61 | u8 checksum; | ||
| 62 | char oem_id[6]; | ||
| 63 | u8 revision; | ||
| 64 | u32 rsdt_address; | ||
| 65 | } __attribute__ ((packed)); | ||
| 66 | |||
| 67 | struct acpi20_table_rsdp { | ||
| 68 | char signature[8]; | ||
| 69 | u8 checksum; | ||
| 70 | char oem_id[6]; | ||
| 71 | u8 revision; | ||
| 72 | u32 rsdt_address; | ||
| 73 | u32 length; | ||
| 74 | u64 xsdt_address; | ||
| 75 | u8 ext_checksum; | ||
| 76 | u8 reserved[3]; | ||
| 77 | } __attribute__ ((packed)); | ||
| 78 | |||
| 79 | typedef struct { | ||
| 80 | u8 type; | ||
| 81 | u8 length; | ||
| 82 | } __attribute__ ((packed)) acpi_table_entry_header; | ||
| 83 | |||
| 84 | /* Root System Description Table (RSDT) */ | ||
| 85 | |||
| 86 | struct acpi_table_rsdt { | ||
| 87 | struct acpi_table_header header; | ||
| 88 | u32 entry[8]; | ||
| 89 | } __attribute__ ((packed)); | ||
| 90 | |||
| 91 | /* Extended System Description Table (XSDT) */ | ||
| 92 | |||
| 93 | struct acpi_table_xsdt { | ||
| 94 | struct acpi_table_header header; | ||
| 95 | u64 entry[1]; | ||
| 96 | } __attribute__ ((packed)); | ||
| 97 | |||
| 98 | /* Fixed ACPI Description Table (FADT) */ | ||
| 99 | |||
| 100 | struct acpi_table_fadt { | ||
| 101 | struct acpi_table_header header; | ||
| 102 | u32 facs_addr; | ||
| 103 | u32 dsdt_addr; | ||
| 104 | /* ... */ | ||
| 105 | } __attribute__ ((packed)); | ||
| 106 | |||
| 107 | /* Multiple APIC Description Table (MADT) */ | ||
| 108 | |||
| 109 | struct acpi_table_madt { | ||
| 110 | struct acpi_table_header header; | ||
| 111 | u32 lapic_address; | ||
| 112 | struct { | ||
| 113 | u32 pcat_compat:1; | ||
| 114 | u32 reserved:31; | ||
| 115 | } flags; | ||
| 116 | } __attribute__ ((packed)); | ||
| 117 | |||
| 118 | enum acpi_madt_entry_id { | ||
| 119 | ACPI_MADT_LAPIC = 0, | ||
| 120 | ACPI_MADT_IOAPIC, | ||
| 121 | ACPI_MADT_INT_SRC_OVR, | ||
| 122 | ACPI_MADT_NMI_SRC, | ||
| 123 | ACPI_MADT_LAPIC_NMI, | ||
| 124 | ACPI_MADT_LAPIC_ADDR_OVR, | ||
| 125 | ACPI_MADT_IOSAPIC, | ||
| 126 | ACPI_MADT_LSAPIC, | ||
| 127 | ACPI_MADT_PLAT_INT_SRC, | ||
| 128 | ACPI_MADT_ENTRY_COUNT | ||
| 129 | }; | ||
| 130 | |||
| 131 | typedef struct { | ||
| 132 | u16 polarity:2; | ||
| 133 | u16 trigger:2; | ||
| 134 | u16 reserved:12; | ||
| 135 | } __attribute__ ((packed)) acpi_interrupt_flags; | ||
| 136 | |||
| 137 | struct acpi_table_lapic { | ||
| 138 | acpi_table_entry_header header; | ||
| 139 | u8 acpi_id; | ||
| 140 | u8 id; | ||
| 141 | struct { | ||
| 142 | u32 enabled:1; | ||
| 143 | u32 reserved:31; | ||
| 144 | } flags; | ||
| 145 | } __attribute__ ((packed)); | ||
| 146 | |||
| 147 | struct acpi_table_ioapic { | ||
| 148 | acpi_table_entry_header header; | ||
| 149 | u8 id; | ||
| 150 | u8 reserved; | ||
| 151 | u32 address; | ||
| 152 | u32 global_irq_base; | ||
| 153 | } __attribute__ ((packed)); | ||
| 154 | |||
| 155 | struct acpi_table_int_src_ovr { | ||
| 156 | acpi_table_entry_header header; | ||
| 157 | u8 bus; | ||
| 158 | u8 bus_irq; | ||
| 159 | u32 global_irq; | ||
| 160 | acpi_interrupt_flags flags; | ||
| 161 | } __attribute__ ((packed)); | ||
| 162 | |||
| 163 | struct acpi_table_nmi_src { | ||
| 164 | acpi_table_entry_header header; | ||
| 165 | acpi_interrupt_flags flags; | ||
| 166 | u32 global_irq; | ||
| 167 | } __attribute__ ((packed)); | ||
| 168 | |||
| 169 | struct acpi_table_lapic_nmi { | ||
| 170 | acpi_table_entry_header header; | ||
| 171 | u8 acpi_id; | ||
| 172 | acpi_interrupt_flags flags; | ||
| 173 | u8 lint; | ||
| 174 | } __attribute__ ((packed)); | ||
| 175 | |||
| 176 | struct acpi_table_lapic_addr_ovr { | ||
| 177 | acpi_table_entry_header header; | ||
| 178 | u8 reserved[2]; | ||
| 179 | u64 address; | ||
| 180 | } __attribute__ ((packed)); | ||
| 181 | |||
| 182 | struct acpi_table_iosapic { | ||
| 183 | acpi_table_entry_header header; | ||
| 184 | u8 id; | ||
| 185 | u8 reserved; | ||
| 186 | u32 global_irq_base; | ||
| 187 | u64 address; | ||
| 188 | } __attribute__ ((packed)); | ||
| 189 | |||
| 190 | struct acpi_table_lsapic { | ||
| 191 | acpi_table_entry_header header; | ||
| 192 | u8 acpi_id; | ||
| 193 | u8 id; | ||
| 194 | u8 eid; | ||
| 195 | u8 reserved[3]; | ||
| 196 | struct { | ||
| 197 | u32 enabled:1; | ||
| 198 | u32 reserved:31; | ||
| 199 | } flags; | ||
| 200 | } __attribute__ ((packed)); | ||
| 201 | |||
| 202 | struct acpi_table_plat_int_src { | ||
| 203 | acpi_table_entry_header header; | ||
| 204 | acpi_interrupt_flags flags; | ||
| 205 | u8 type; /* See acpi_interrupt_type */ | ||
| 206 | u8 id; | ||
| 207 | u8 eid; | ||
| 208 | u8 iosapic_vector; | ||
| 209 | u32 global_irq; | ||
| 210 | struct { | ||
| 211 | u32 cpei_override_flag:1; | ||
| 212 | u32 reserved:31; | ||
| 213 | } plint_flags; | ||
| 214 | } __attribute__ ((packed)); | ||
| 215 | |||
| 216 | enum acpi_interrupt_id { | 56 | enum acpi_interrupt_id { |
| 217 | ACPI_INTERRUPT_PMI = 1, | 57 | ACPI_INTERRUPT_PMI = 1, |
| 218 | ACPI_INTERRUPT_INIT, | 58 | ACPI_INTERRUPT_INIT, |
| @@ -222,89 +62,6 @@ enum acpi_interrupt_id { | |||
| 222 | 62 | ||
| 223 | #define ACPI_SPACE_MEM 0 | 63 | #define ACPI_SPACE_MEM 0 |
| 224 | 64 | ||
| 225 | struct acpi_gen_regaddr { | ||
| 226 | u8 space_id; | ||
| 227 | u8 bit_width; | ||
| 228 | u8 bit_offset; | ||
| 229 | u8 resv; | ||
| 230 | u32 addrl; | ||
| 231 | u32 addrh; | ||
| 232 | } __attribute__ ((packed)); | ||
| 233 | |||
| 234 | struct acpi_table_hpet { | ||
| 235 | struct acpi_table_header header; | ||
| 236 | u32 id; | ||
| 237 | struct acpi_gen_regaddr addr; | ||
| 238 | u8 number; | ||
| 239 | u16 min_tick; | ||
| 240 | u8 page_protect; | ||
| 241 | } __attribute__ ((packed)); | ||
| 242 | |||
| 243 | /* | ||
| 244 | * Simple Boot Flags | ||
| 245 | * http://www.microsoft.com/whdc/hwdev/resources/specs/simp_bios.mspx | ||
| 246 | */ | ||
| 247 | struct acpi_table_sbf | ||
| 248 | { | ||
| 249 | u8 sbf_signature[4]; | ||
| 250 | u32 sbf_len; | ||
| 251 | u8 sbf_revision; | ||
| 252 | u8 sbf_csum; | ||
| 253 | u8 sbf_oemid[6]; | ||
| 254 | u8 sbf_oemtable[8]; | ||
| 255 | u8 sbf_revdata[4]; | ||
| 256 | u8 sbf_creator[4]; | ||
| 257 | u8 sbf_crearev[4]; | ||
| 258 | u8 sbf_cmos; | ||
| 259 | u8 sbf_spare[3]; | ||
| 260 | } __attribute__ ((packed)); | ||
| 261 | |||
| 262 | /* | ||
| 263 | * System Resource Affinity Table (SRAT) | ||
| 264 | * http://www.microsoft.com/whdc/hwdev/platform/proc/SRAT.mspx | ||
| 265 | */ | ||
| 266 | |||
| 267 | struct acpi_table_srat { | ||
| 268 | struct acpi_table_header header; | ||
| 269 | u32 table_revision; | ||
| 270 | u64 reserved; | ||
| 271 | } __attribute__ ((packed)); | ||
| 272 | |||
| 273 | enum acpi_srat_entry_id { | ||
| 274 | ACPI_SRAT_PROCESSOR_AFFINITY = 0, | ||
| 275 | ACPI_SRAT_MEMORY_AFFINITY, | ||
| 276 | ACPI_SRAT_ENTRY_COUNT | ||
| 277 | }; | ||
| 278 | |||
| 279 | struct acpi_table_processor_affinity { | ||
| 280 | acpi_table_entry_header header; | ||
| 281 | u8 proximity_domain; | ||
| 282 | u8 apic_id; | ||
| 283 | struct { | ||
| 284 | u32 enabled:1; | ||
| 285 | u32 reserved:31; | ||
| 286 | } flags; | ||
| 287 | u8 lsapic_eid; | ||
| 288 | u8 reserved[7]; | ||
| 289 | } __attribute__ ((packed)); | ||
| 290 | |||
| 291 | struct acpi_table_memory_affinity { | ||
| 292 | acpi_table_entry_header header; | ||
| 293 | u8 proximity_domain; | ||
| 294 | u8 reserved1[5]; | ||
| 295 | u32 base_addr_lo; | ||
| 296 | u32 base_addr_hi; | ||
| 297 | u32 length_lo; | ||
| 298 | u32 length_hi; | ||
| 299 | u32 memory_type; /* See acpi_address_range_id */ | ||
| 300 | struct { | ||
| 301 | u32 enabled:1; | ||
| 302 | u32 hot_pluggable:1; | ||
| 303 | u32 reserved:30; | ||
| 304 | } flags; | ||
| 305 | u64 reserved2; | ||
| 306 | } __attribute__ ((packed)); | ||
| 307 | |||
| 308 | enum acpi_address_range_id { | 65 | enum acpi_address_range_id { |
| 309 | ACPI_ADDRESS_RANGE_MEMORY = 1, | 66 | ACPI_ADDRESS_RANGE_MEMORY = 1, |
| 310 | ACPI_ADDRESS_RANGE_RESERVED = 2, | 67 | ACPI_ADDRESS_RANGE_RESERVED = 2, |
| @@ -313,84 +70,12 @@ enum acpi_address_range_id { | |||
| 313 | ACPI_ADDRESS_RANGE_COUNT | 70 | ACPI_ADDRESS_RANGE_COUNT |
| 314 | }; | 71 | }; |
| 315 | 72 | ||
| 316 | /* | ||
| 317 | * System Locality Information Table (SLIT) | ||
| 318 | * see http://devresource.hp.com/devresource/docs/techpapers/ia64/slit.pdf | ||
| 319 | */ | ||
| 320 | |||
| 321 | struct acpi_table_slit { | ||
| 322 | struct acpi_table_header header; | ||
| 323 | u64 localities; | ||
| 324 | u8 entry[1]; /* real size = localities^2 */ | ||
| 325 | } __attribute__ ((packed)); | ||
| 326 | |||
| 327 | /* Smart Battery Description Table (SBST) */ | ||
| 328 | |||
| 329 | struct acpi_table_sbst { | ||
| 330 | struct acpi_table_header header; | ||
| 331 | u32 warning; /* Warn user */ | ||
| 332 | u32 low; /* Critical sleep */ | ||
| 333 | u32 critical; /* Critical shutdown */ | ||
| 334 | } __attribute__ ((packed)); | ||
| 335 | |||
| 336 | /* Embedded Controller Boot Resources Table (ECDT) */ | ||
| 337 | |||
| 338 | struct acpi_table_ecdt { | ||
| 339 | struct acpi_table_header header; | ||
| 340 | struct acpi_generic_address ec_control; | ||
| 341 | struct acpi_generic_address ec_data; | ||
| 342 | u32 uid; | ||
| 343 | u8 gpe_bit; | ||
| 344 | char ec_id[0]; | ||
| 345 | } __attribute__ ((packed)); | ||
| 346 | |||
| 347 | /* PCI MMCONFIG */ | ||
| 348 | |||
| 349 | /* Defined in PCI Firmware Specification 3.0 */ | ||
| 350 | struct acpi_table_mcfg_config { | ||
| 351 | u32 base_address; | ||
| 352 | u32 base_reserved; | ||
| 353 | u16 pci_segment_group_number; | ||
| 354 | u8 start_bus_number; | ||
| 355 | u8 end_bus_number; | ||
| 356 | u8 reserved[4]; | ||
| 357 | } __attribute__ ((packed)); | ||
| 358 | struct acpi_table_mcfg { | ||
| 359 | struct acpi_table_header header; | ||
| 360 | u8 reserved[8]; | ||
| 361 | struct acpi_table_mcfg_config config[0]; | ||
| 362 | } __attribute__ ((packed)); | ||
| 363 | 73 | ||
| 364 | /* Table Handlers */ | 74 | /* Table Handlers */ |
| 365 | 75 | ||
| 366 | enum acpi_table_id { | 76 | typedef int (*acpi_table_handler) (struct acpi_table_header *table); |
| 367 | ACPI_TABLE_UNKNOWN = 0, | ||
| 368 | ACPI_APIC, | ||
| 369 | ACPI_BOOT, | ||
| 370 | ACPI_DBGP, | ||
| 371 | ACPI_DSDT, | ||
| 372 | ACPI_ECDT, | ||
| 373 | ACPI_ETDT, | ||
| 374 | ACPI_FADT, | ||
| 375 | ACPI_FACS, | ||
| 376 | ACPI_OEMX, | ||
| 377 | ACPI_PSDT, | ||
| 378 | ACPI_SBST, | ||
| 379 | ACPI_SLIT, | ||
| 380 | ACPI_SPCR, | ||
| 381 | ACPI_SRAT, | ||
| 382 | ACPI_SSDT, | ||
| 383 | ACPI_SPMI, | ||
| 384 | ACPI_HPET, | ||
| 385 | ACPI_MCFG, | ||
| 386 | ACPI_TABLE_COUNT | ||
| 387 | }; | ||
| 388 | |||
| 389 | typedef int (*acpi_table_handler) (unsigned long phys_addr, unsigned long size); | ||
| 390 | |||
| 391 | extern acpi_table_handler acpi_table_ops[ACPI_TABLE_COUNT]; | ||
| 392 | 77 | ||
| 393 | typedef int (*acpi_madt_entry_handler) (acpi_table_entry_header *header, const unsigned long end); | 78 | typedef int (*acpi_madt_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); |
| 394 | 79 | ||
| 395 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); | 80 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); |
| 396 | unsigned long acpi_find_rsdp (void); | 81 | unsigned long acpi_find_rsdp (void); |
| @@ -399,14 +84,12 @@ int acpi_boot_table_init (void); | |||
| 399 | int acpi_numa_init (void); | 84 | int acpi_numa_init (void); |
| 400 | 85 | ||
| 401 | int acpi_table_init (void); | 86 | int acpi_table_init (void); |
| 402 | int acpi_table_parse (enum acpi_table_id id, acpi_table_handler handler); | 87 | int acpi_table_parse (char *id, acpi_table_handler handler); |
| 403 | int acpi_get_table_header_early (enum acpi_table_id id, struct acpi_table_header **header); | 88 | int acpi_table_parse_madt (enum acpi_madt_type id, acpi_madt_entry_handler handler, unsigned int max_entries); |
| 404 | int acpi_table_parse_madt (enum acpi_madt_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); | 89 | int acpi_table_parse_srat (enum acpi_srat_type id, acpi_madt_entry_handler handler, unsigned int max_entries); |
| 405 | int acpi_table_parse_srat (enum acpi_srat_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); | 90 | int acpi_parse_mcfg (struct acpi_table_header *header); |
| 406 | int acpi_parse_mcfg (unsigned long phys_addr, unsigned long size); | 91 | void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); |
| 407 | void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr); | 92 | void acpi_table_print_srat_entry (struct acpi_subtable_header *srat); |
| 408 | void acpi_table_print_madt_entry (acpi_table_entry_header *madt); | ||
| 409 | void acpi_table_print_srat_entry (acpi_table_entry_header *srat); | ||
| 410 | 93 | ||
| 411 | /* the following four functions are architecture-dependent */ | 94 | /* the following four functions are architecture-dependent */ |
| 412 | #ifdef CONFIG_HAVE_ARCH_PARSE_SRAT | 95 | #ifdef CONFIG_HAVE_ARCH_PARSE_SRAT |
| @@ -417,8 +100,8 @@ void acpi_table_print_srat_entry (acpi_table_entry_header *srat); | |||
| 417 | #define acpi_numa_arch_fixup() do {} while (0) | 100 | #define acpi_numa_arch_fixup() do {} while (0) |
| 418 | #else | 101 | #else |
| 419 | void acpi_numa_slit_init (struct acpi_table_slit *slit); | 102 | void acpi_numa_slit_init (struct acpi_table_slit *slit); |
| 420 | void acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa); | 103 | void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); |
| 421 | void acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma); | 104 | void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); |
| 422 | void acpi_numa_arch_fixup(void); | 105 | void acpi_numa_arch_fixup(void); |
| 423 | #endif | 106 | #endif |
| 424 | 107 | ||
| @@ -433,7 +116,7 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); | |||
| 433 | 116 | ||
| 434 | extern int acpi_mp_config; | 117 | extern int acpi_mp_config; |
| 435 | 118 | ||
| 436 | extern struct acpi_table_mcfg_config *pci_mmcfg_config; | 119 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; |
| 437 | extern int pci_mmcfg_config_num; | 120 | extern int pci_mmcfg_config_num; |
| 438 | 121 | ||
| 439 | extern int sbf_port; | 122 | extern int sbf_port; |
diff --git a/include/linux/apm-emulation.h b/include/linux/apm-emulation.h new file mode 100644 index 000000000000..e6d800358dd6 --- /dev/null +++ b/include/linux/apm-emulation.h | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | /* -*- linux-c -*- | ||
| 2 | * | ||
| 3 | * (C) 2003 zecke@handhelds.org | ||
| 4 | * | ||
| 5 | * GPL version 2 | ||
| 6 | * | ||
| 7 | * based on arch/arm/kernel/apm.c | ||
| 8 | * factor out the information needed by architectures to provide | ||
| 9 | * apm status | ||
| 10 | */ | ||
| 11 | #ifndef __LINUX_APM_EMULATION_H | ||
| 12 | #define __LINUX_APM_EMULATION_H | ||
| 13 | |||
| 14 | #include <linux/apm_bios.h> | ||
| 15 | |||
| 16 | /* | ||
| 17 | * This structure gets filled in by the machine specific 'get_power_status' | ||
| 18 | * implementation. Any fields which are not set default to a safe value. | ||
| 19 | */ | ||
| 20 | struct apm_power_info { | ||
| 21 | unsigned char ac_line_status; | ||
| 22 | #define APM_AC_OFFLINE 0 | ||
| 23 | #define APM_AC_ONLINE 1 | ||
| 24 | #define APM_AC_BACKUP 2 | ||
| 25 | #define APM_AC_UNKNOWN 0xff | ||
| 26 | |||
| 27 | unsigned char battery_status; | ||
| 28 | #define APM_BATTERY_STATUS_HIGH 0 | ||
| 29 | #define APM_BATTERY_STATUS_LOW 1 | ||
| 30 | #define APM_BATTERY_STATUS_CRITICAL 2 | ||
| 31 | #define APM_BATTERY_STATUS_CHARGING 3 | ||
| 32 | #define APM_BATTERY_STATUS_NOT_PRESENT 4 | ||
| 33 | #define APM_BATTERY_STATUS_UNKNOWN 0xff | ||
| 34 | |||
| 35 | unsigned char battery_flag; | ||
| 36 | #define APM_BATTERY_FLAG_HIGH (1 << 0) | ||
| 37 | #define APM_BATTERY_FLAG_LOW (1 << 1) | ||
| 38 | #define APM_BATTERY_FLAG_CRITICAL (1 << 2) | ||
| 39 | #define APM_BATTERY_FLAG_CHARGING (1 << 3) | ||
| 40 | #define APM_BATTERY_FLAG_NOT_PRESENT (1 << 7) | ||
| 41 | #define APM_BATTERY_FLAG_UNKNOWN 0xff | ||
| 42 | |||
| 43 | int battery_life; | ||
| 44 | int time; | ||
| 45 | int units; | ||
| 46 | #define APM_UNITS_MINS 0 | ||
| 47 | #define APM_UNITS_SECS 1 | ||
| 48 | #define APM_UNITS_UNKNOWN -1 | ||
| 49 | |||
| 50 | }; | ||
| 51 | |||
| 52 | /* | ||
| 53 | * This allows machines to provide their own "apm get power status" function. | ||
| 54 | */ | ||
| 55 | extern void (*apm_get_power_status)(struct apm_power_info *); | ||
| 56 | |||
| 57 | /* | ||
| 58 | * Queue an event (APM_SYS_SUSPEND or APM_CRITICAL_SUSPEND) | ||
| 59 | */ | ||
| 60 | void apm_queue_event(apm_event_t event); | ||
| 61 | |||
| 62 | #endif /* __LINUX_APM_EMULATION_H */ | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 1df941648a57..18e401ff7eaf 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
| @@ -44,9 +44,9 @@ enum { | |||
| 44 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ | 44 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ |
| 45 | 45 | ||
| 46 | ATA_ID_WORDS = 256, | 46 | ATA_ID_WORDS = 256, |
| 47 | ATA_ID_SERNO_OFS = 10, | 47 | ATA_ID_SERNO = 10, |
| 48 | ATA_ID_FW_REV_OFS = 23, | 48 | ATA_ID_FW_REV = 23, |
| 49 | ATA_ID_PROD_OFS = 27, | 49 | ATA_ID_PROD = 27, |
| 50 | ATA_ID_OLD_PIO_MODES = 51, | 50 | ATA_ID_OLD_PIO_MODES = 51, |
| 51 | ATA_ID_FIELD_VALID = 53, | 51 | ATA_ID_FIELD_VALID = 53, |
| 52 | ATA_ID_MWDMA_MODES = 63, | 52 | ATA_ID_MWDMA_MODES = 63, |
| @@ -58,8 +58,11 @@ enum { | |||
| 58 | ATA_ID_MAJOR_VER = 80, | 58 | ATA_ID_MAJOR_VER = 80, |
| 59 | ATA_ID_PIO4 = (1 << 1), | 59 | ATA_ID_PIO4 = (1 << 1), |
| 60 | 60 | ||
| 61 | ATA_ID_SERNO_LEN = 20, | ||
| 62 | ATA_ID_FW_REV_LEN = 8, | ||
| 63 | ATA_ID_PROD_LEN = 40, | ||
| 64 | |||
| 61 | ATA_PCI_CTL_OFS = 2, | 65 | ATA_PCI_CTL_OFS = 2, |
| 62 | ATA_SERNO_LEN = 20, | ||
| 63 | ATA_UDMA0 = (1 << 0), | 66 | ATA_UDMA0 = (1 << 0), |
| 64 | ATA_UDMA1 = ATA_UDMA0 | (1 << 1), | 67 | ATA_UDMA1 = ATA_UDMA0 | (1 << 1), |
| 65 | ATA_UDMA2 = ATA_UDMA1 | (1 << 2), | 68 | ATA_UDMA2 = ATA_UDMA1 | (1 << 2), |
| @@ -296,6 +299,8 @@ struct ata_taskfile { | |||
| 296 | #define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1) | 299 | #define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1) |
| 297 | #define ata_id_removeable(id) ((id)[0] & (1 << 7)) | 300 | #define ata_id_removeable(id) ((id)[0] & (1 << 7)) |
| 298 | #define ata_id_has_dword_io(id) ((id)[50] & (1 << 0)) | 301 | #define ata_id_has_dword_io(id) ((id)[50] & (1 << 0)) |
| 302 | #define ata_id_iordy_disable(id) ((id)[49] & (1 << 10)) | ||
| 303 | #define ata_id_has_iordy(id) ((id)[49] & (1 << 9)) | ||
| 299 | #define ata_id_u32(id,n) \ | 304 | #define ata_id_u32(id,n) \ |
| 300 | (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) | 305 | (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) |
| 301 | #define ata_id_u64(id,n) \ | 306 | #define ata_id_u64(id,n) \ |
diff --git a/include/linux/atmarp.h b/include/linux/atmarp.h index ee108f9e9cb7..231f4bdec730 100644 --- a/include/linux/atmarp.h +++ b/include/linux/atmarp.h | |||
| @@ -6,9 +6,7 @@ | |||
| 6 | #ifndef _LINUX_ATMARP_H | 6 | #ifndef _LINUX_ATMARP_H |
| 7 | #define _LINUX_ATMARP_H | 7 | #define _LINUX_ATMARP_H |
| 8 | 8 | ||
| 9 | #ifdef __KERNEL__ | ||
| 10 | #include <linux/types.h> | 9 | #include <linux/types.h> |
| 11 | #endif | ||
| 12 | #include <linux/atmapi.h> | 10 | #include <linux/atmapi.h> |
| 13 | #include <linux/atmioc.h> | 11 | #include <linux/atmioc.h> |
| 14 | 12 | ||
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 4aa9046601da..779aa78ee643 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
| @@ -51,15 +51,9 @@ | |||
| 51 | /* | 51 | /* |
| 52 | * Transform masks and values (for crt_flags). | 52 | * Transform masks and values (for crt_flags). |
| 53 | */ | 53 | */ |
| 54 | #define CRYPTO_TFM_MODE_MASK 0x000000ff | ||
| 55 | #define CRYPTO_TFM_REQ_MASK 0x000fff00 | 54 | #define CRYPTO_TFM_REQ_MASK 0x000fff00 |
| 56 | #define CRYPTO_TFM_RES_MASK 0xfff00000 | 55 | #define CRYPTO_TFM_RES_MASK 0xfff00000 |
| 57 | 56 | ||
| 58 | #define CRYPTO_TFM_MODE_ECB 0x00000001 | ||
| 59 | #define CRYPTO_TFM_MODE_CBC 0x00000002 | ||
| 60 | #define CRYPTO_TFM_MODE_CFB 0x00000004 | ||
| 61 | #define CRYPTO_TFM_MODE_CTR 0x00000008 | ||
| 62 | |||
| 63 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 | 57 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 |
| 64 | #define CRYPTO_TFM_REQ_MAY_SLEEP 0x00000200 | 58 | #define CRYPTO_TFM_REQ_MAY_SLEEP 0x00000200 |
| 65 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 | 59 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 |
| @@ -71,12 +65,8 @@ | |||
| 71 | /* | 65 | /* |
| 72 | * Miscellaneous stuff. | 66 | * Miscellaneous stuff. |
| 73 | */ | 67 | */ |
| 74 | #define CRYPTO_UNSPEC 0 | ||
| 75 | #define CRYPTO_MAX_ALG_NAME 64 | 68 | #define CRYPTO_MAX_ALG_NAME 64 |
| 76 | 69 | ||
| 77 | #define CRYPTO_DIR_ENCRYPT 1 | ||
| 78 | #define CRYPTO_DIR_DECRYPT 0 | ||
| 79 | |||
| 80 | /* | 70 | /* |
| 81 | * The macro CRYPTO_MINALIGN_ATTR (along with the void * type in the actual | 71 | * The macro CRYPTO_MINALIGN_ATTR (along with the void * type in the actual |
| 82 | * declaration) is used to ensure that the crypto_tfm context structure is | 72 | * declaration) is used to ensure that the crypto_tfm context structure is |
| @@ -148,19 +138,6 @@ struct cipher_alg { | |||
| 148 | unsigned int keylen); | 138 | unsigned int keylen); |
| 149 | void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); | 139 | void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
| 150 | void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); | 140 | void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
| 151 | |||
| 152 | unsigned int (*cia_encrypt_ecb)(const struct cipher_desc *desc, | ||
| 153 | u8 *dst, const u8 *src, | ||
| 154 | unsigned int nbytes) __deprecated; | ||
| 155 | unsigned int (*cia_decrypt_ecb)(const struct cipher_desc *desc, | ||
| 156 | u8 *dst, const u8 *src, | ||
| 157 | unsigned int nbytes) __deprecated; | ||
| 158 | unsigned int (*cia_encrypt_cbc)(const struct cipher_desc *desc, | ||
| 159 | u8 *dst, const u8 *src, | ||
| 160 | unsigned int nbytes) __deprecated; | ||
| 161 | unsigned int (*cia_decrypt_cbc)(const struct cipher_desc *desc, | ||
| 162 | u8 *dst, const u8 *src, | ||
| 163 | unsigned int nbytes) __deprecated; | ||
| 164 | }; | 141 | }; |
| 165 | 142 | ||
| 166 | struct digest_alg { | 143 | struct digest_alg { |
| @@ -243,11 +220,6 @@ int crypto_unregister_alg(struct crypto_alg *alg); | |||
| 243 | #ifdef CONFIG_CRYPTO | 220 | #ifdef CONFIG_CRYPTO |
| 244 | int crypto_has_alg(const char *name, u32 type, u32 mask); | 221 | int crypto_has_alg(const char *name, u32 type, u32 mask); |
| 245 | #else | 222 | #else |
| 246 | static inline int crypto_alg_available(const char *name, u32 flags) | ||
| 247 | { | ||
| 248 | return 0; | ||
| 249 | } | ||
| 250 | |||
| 251 | static inline int crypto_has_alg(const char *name, u32 type, u32 mask) | 223 | static inline int crypto_has_alg(const char *name, u32 type, u32 mask) |
| 252 | { | 224 | { |
| 253 | return 0; | 225 | return 0; |
| @@ -339,13 +311,18 @@ struct crypto_tfm { | |||
| 339 | void *__crt_ctx[] CRYPTO_MINALIGN_ATTR; | 311 | void *__crt_ctx[] CRYPTO_MINALIGN_ATTR; |
| 340 | }; | 312 | }; |
| 341 | 313 | ||
| 342 | #define crypto_cipher crypto_tfm | ||
| 343 | #define crypto_comp crypto_tfm | ||
| 344 | |||
| 345 | struct crypto_blkcipher { | 314 | struct crypto_blkcipher { |
| 346 | struct crypto_tfm base; | 315 | struct crypto_tfm base; |
| 347 | }; | 316 | }; |
| 348 | 317 | ||
| 318 | struct crypto_cipher { | ||
| 319 | struct crypto_tfm base; | ||
| 320 | }; | ||
| 321 | |||
| 322 | struct crypto_comp { | ||
| 323 | struct crypto_tfm base; | ||
| 324 | }; | ||
| 325 | |||
| 349 | struct crypto_hash { | 326 | struct crypto_hash { |
| 350 | struct crypto_tfm base; | 327 | struct crypto_tfm base; |
| 351 | }; | 328 | }; |
| @@ -395,40 +372,11 @@ static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) | |||
| 395 | return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK; | 372 | return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK; |
| 396 | } | 373 | } |
| 397 | 374 | ||
| 398 | static unsigned int crypto_tfm_alg_min_keysize(struct crypto_tfm *tfm) | ||
| 399 | __deprecated; | ||
| 400 | static inline unsigned int crypto_tfm_alg_min_keysize(struct crypto_tfm *tfm) | ||
| 401 | { | ||
| 402 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
| 403 | return tfm->__crt_alg->cra_cipher.cia_min_keysize; | ||
| 404 | } | ||
| 405 | |||
| 406 | static unsigned int crypto_tfm_alg_max_keysize(struct crypto_tfm *tfm) | ||
| 407 | __deprecated; | ||
| 408 | static inline unsigned int crypto_tfm_alg_max_keysize(struct crypto_tfm *tfm) | ||
| 409 | { | ||
| 410 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
| 411 | return tfm->__crt_alg->cra_cipher.cia_max_keysize; | ||
| 412 | } | ||
| 413 | |||
| 414 | static unsigned int crypto_tfm_alg_ivsize(struct crypto_tfm *tfm) __deprecated; | ||
| 415 | static inline unsigned int crypto_tfm_alg_ivsize(struct crypto_tfm *tfm) | ||
| 416 | { | ||
| 417 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
| 418 | return tfm->crt_cipher.cit_ivsize; | ||
| 419 | } | ||
| 420 | |||
| 421 | static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm) | 375 | static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm) |
| 422 | { | 376 | { |
| 423 | return tfm->__crt_alg->cra_blocksize; | 377 | return tfm->__crt_alg->cra_blocksize; |
| 424 | } | 378 | } |
| 425 | 379 | ||
| 426 | static inline unsigned int crypto_tfm_alg_digestsize(struct crypto_tfm *tfm) | ||
| 427 | { | ||
| 428 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST); | ||
| 429 | return tfm->__crt_alg->cra_digest.dia_digestsize; | ||
| 430 | } | ||
| 431 | |||
| 432 | static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm) | 380 | static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm) |
| 433 | { | 381 | { |
| 434 | return tfm->__crt_alg->cra_alignmask; | 382 | return tfm->__crt_alg->cra_alignmask; |
| @@ -633,7 +581,7 @@ static inline struct crypto_cipher *crypto_alloc_cipher(const char *alg_name, | |||
| 633 | 581 | ||
| 634 | static inline struct crypto_tfm *crypto_cipher_tfm(struct crypto_cipher *tfm) | 582 | static inline struct crypto_tfm *crypto_cipher_tfm(struct crypto_cipher *tfm) |
| 635 | { | 583 | { |
| 636 | return tfm; | 584 | return &tfm->base; |
| 637 | } | 585 | } |
| 638 | 586 | ||
| 639 | static inline void crypto_free_cipher(struct crypto_cipher *tfm) | 587 | static inline void crypto_free_cipher(struct crypto_cipher *tfm) |
| @@ -809,76 +757,6 @@ static inline int crypto_hash_setkey(struct crypto_hash *hash, | |||
| 809 | return crypto_hash_crt(hash)->setkey(hash, key, keylen); | 757 | return crypto_hash_crt(hash)->setkey(hash, key, keylen); |
| 810 | } | 758 | } |
| 811 | 759 | ||
| 812 | static int crypto_cipher_encrypt(struct crypto_tfm *tfm, | ||
| 813 | struct scatterlist *dst, | ||
| 814 | struct scatterlist *src, | ||
| 815 | unsigned int nbytes) __deprecated; | ||
| 816 | static inline int crypto_cipher_encrypt(struct crypto_tfm *tfm, | ||
| 817 | struct scatterlist *dst, | ||
| 818 | struct scatterlist *src, | ||
| 819 | unsigned int nbytes) | ||
| 820 | { | ||
| 821 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
| 822 | return tfm->crt_cipher.cit_encrypt(tfm, dst, src, nbytes); | ||
| 823 | } | ||
| 824 | |||
| 825 | static int crypto_cipher_encrypt_iv(struct crypto_tfm *tfm, | ||
| 826 | struct scatterlist *dst, | ||
| 827 | struct scatterlist *src, | ||
| 828 | unsigned int nbytes, u8 *iv) __deprecated; | ||
| 829 | static inline int crypto_cipher_encrypt_iv(struct crypto_tfm *tfm, | ||
| 830 | struct scatterlist *dst, | ||
| 831 | struct scatterlist *src, | ||
| 832 | unsigned int nbytes, u8 *iv) | ||
| 833 | { | ||
| 834 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
| 835 | return tfm->crt_cipher.cit_encrypt_iv(tfm, dst, src, nbytes, iv); | ||
| 836 | } | ||
| 837 | |||
| 838 | static int crypto_cipher_decrypt(struct crypto_tfm *tfm, | ||
| 839 | struct scatterlist *dst, | ||
| 840 | struct scatterlist *src, | ||
| 841 | unsigned int nbytes) __deprecated; | ||
| 842 | static inline int crypto_cipher_decrypt(struct crypto_tfm *tfm, | ||
| 843 | struct scatterlist *dst, | ||
| 844 | struct scatterlist *src, | ||
| 845 | unsigned int nbytes) | ||
| 846 | { | ||
| 847 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
| 848 | return tfm->crt_cipher.cit_decrypt(tfm, dst, src, nbytes); | ||
| 849 | } | ||
| 850 | |||
| 851 | static int crypto_cipher_decrypt_iv(struct crypto_tfm *tfm, | ||
| 852 | struct scatterlist *dst, | ||
| 853 | struct scatterlist *src, | ||
| 854 | unsigned int nbytes, u8 *iv) __deprecated; | ||
| 855 | static inline int crypto_cipher_decrypt_iv(struct crypto_tfm *tfm, | ||
| 856 | struct scatterlist *dst, | ||
| 857 | struct scatterlist *src, | ||
| 858 | unsigned int nbytes, u8 *iv) | ||
| 859 | { | ||
| 860 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
| 861 | return tfm->crt_cipher.cit_decrypt_iv(tfm, dst, src, nbytes, iv); | ||
| 862 | } | ||
| 863 | |||
| 864 | static void crypto_cipher_set_iv(struct crypto_tfm *tfm, | ||
| 865 | const u8 *src, unsigned int len) __deprecated; | ||
| 866 | static inline void crypto_cipher_set_iv(struct crypto_tfm *tfm, | ||
| 867 | const u8 *src, unsigned int len) | ||
| 868 | { | ||
| 869 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
| 870 | memcpy(tfm->crt_cipher.cit_iv, src, len); | ||
| 871 | } | ||
| 872 | |||
| 873 | static void crypto_cipher_get_iv(struct crypto_tfm *tfm, | ||
| 874 | u8 *dst, unsigned int len) __deprecated; | ||
| 875 | static inline void crypto_cipher_get_iv(struct crypto_tfm *tfm, | ||
| 876 | u8 *dst, unsigned int len) | ||
| 877 | { | ||
| 878 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
| 879 | memcpy(dst, tfm->crt_cipher.cit_iv, len); | ||
| 880 | } | ||
| 881 | |||
| 882 | static inline struct crypto_comp *__crypto_comp_cast(struct crypto_tfm *tfm) | 760 | static inline struct crypto_comp *__crypto_comp_cast(struct crypto_tfm *tfm) |
| 883 | { | 761 | { |
| 884 | return (struct crypto_comp *)tfm; | 762 | return (struct crypto_comp *)tfm; |
| @@ -903,7 +781,7 @@ static inline struct crypto_comp *crypto_alloc_comp(const char *alg_name, | |||
| 903 | 781 | ||
| 904 | static inline struct crypto_tfm *crypto_comp_tfm(struct crypto_comp *tfm) | 782 | static inline struct crypto_tfm *crypto_comp_tfm(struct crypto_comp *tfm) |
| 905 | { | 783 | { |
| 906 | return tfm; | 784 | return &tfm->base; |
| 907 | } | 785 | } |
| 908 | 786 | ||
| 909 | static inline void crypto_free_comp(struct crypto_comp *tfm) | 787 | static inline void crypto_free_comp(struct crypto_comp *tfm) |
| @@ -934,14 +812,16 @@ static inline int crypto_comp_compress(struct crypto_comp *tfm, | |||
| 934 | const u8 *src, unsigned int slen, | 812 | const u8 *src, unsigned int slen, |
| 935 | u8 *dst, unsigned int *dlen) | 813 | u8 *dst, unsigned int *dlen) |
| 936 | { | 814 | { |
| 937 | return crypto_comp_crt(tfm)->cot_compress(tfm, src, slen, dst, dlen); | 815 | return crypto_comp_crt(tfm)->cot_compress(crypto_comp_tfm(tfm), |
| 816 | src, slen, dst, dlen); | ||
| 938 | } | 817 | } |
| 939 | 818 | ||
| 940 | static inline int crypto_comp_decompress(struct crypto_comp *tfm, | 819 | static inline int crypto_comp_decompress(struct crypto_comp *tfm, |
| 941 | const u8 *src, unsigned int slen, | 820 | const u8 *src, unsigned int slen, |
| 942 | u8 *dst, unsigned int *dlen) | 821 | u8 *dst, unsigned int *dlen) |
| 943 | { | 822 | { |
| 944 | return crypto_comp_crt(tfm)->cot_decompress(tfm, src, slen, dst, dlen); | 823 | return crypto_comp_crt(tfm)->cot_decompress(crypto_comp_tfm(tfm), |
| 824 | src, slen, dst, dlen); | ||
| 945 | } | 825 | } |
| 946 | 826 | ||
| 947 | #endif /* _LINUX_CRYPTO_H */ | 827 | #endif /* _LINUX_CRYPTO_H */ |
diff --git a/include/linux/device.h b/include/linux/device.h index f44247fe8135..26e4692f2d1a 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -126,6 +126,7 @@ struct device_driver { | |||
| 126 | struct klist_node knode_bus; | 126 | struct klist_node knode_bus; |
| 127 | 127 | ||
| 128 | struct module * owner; | 128 | struct module * owner; |
| 129 | const char * mod_name; /* used for built-in modules */ | ||
| 129 | 130 | ||
| 130 | int (*probe) (struct device * dev); | 131 | int (*probe) (struct device * dev); |
| 131 | int (*remove) (struct device * dev); | 132 | int (*remove) (struct device * dev); |
| @@ -327,6 +328,13 @@ extern struct class_device *class_device_create(struct class *cls, | |||
| 327 | __attribute__((format(printf,5,6))); | 328 | __attribute__((format(printf,5,6))); |
| 328 | extern void class_device_destroy(struct class *cls, dev_t devt); | 329 | extern void class_device_destroy(struct class *cls, dev_t devt); |
| 329 | 330 | ||
| 331 | struct device_type { | ||
| 332 | struct device_attribute *attrs; | ||
| 333 | int (*uevent)(struct device *dev, char **envp, int num_envp, | ||
| 334 | char *buffer, int buffer_size); | ||
| 335 | void (*release)(struct device *dev); | ||
| 336 | }; | ||
| 337 | |||
| 330 | /* interface for exporting device attributes */ | 338 | /* interface for exporting device attributes */ |
| 331 | struct device_attribute { | 339 | struct device_attribute { |
| 332 | struct attribute attr; | 340 | struct attribute attr; |
| @@ -346,6 +354,41 @@ extern int __must_check device_create_bin_file(struct device *dev, | |||
| 346 | struct bin_attribute *attr); | 354 | struct bin_attribute *attr); |
| 347 | extern void device_remove_bin_file(struct device *dev, | 355 | extern void device_remove_bin_file(struct device *dev, |
| 348 | struct bin_attribute *attr); | 356 | struct bin_attribute *attr); |
| 357 | |||
| 358 | /* device resource management */ | ||
| 359 | typedef void (*dr_release_t)(struct device *dev, void *res); | ||
| 360 | typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data); | ||
| 361 | |||
| 362 | #ifdef CONFIG_DEBUG_DEVRES | ||
| 363 | extern void * __devres_alloc(dr_release_t release, size_t size, gfp_t gfp, | ||
| 364 | const char *name); | ||
| 365 | #define devres_alloc(release, size, gfp) \ | ||
| 366 | __devres_alloc(release, size, gfp, #release) | ||
| 367 | #else | ||
| 368 | extern void * devres_alloc(dr_release_t release, size_t size, gfp_t gfp); | ||
| 369 | #endif | ||
| 370 | extern void devres_free(void *res); | ||
| 371 | extern void devres_add(struct device *dev, void *res); | ||
| 372 | extern void * devres_find(struct device *dev, dr_release_t release, | ||
| 373 | dr_match_t match, void *match_data); | ||
| 374 | extern void * devres_get(struct device *dev, void *new_res, | ||
| 375 | dr_match_t match, void *match_data); | ||
| 376 | extern void * devres_remove(struct device *dev, dr_release_t release, | ||
| 377 | dr_match_t match, void *match_data); | ||
| 378 | extern int devres_destroy(struct device *dev, dr_release_t release, | ||
| 379 | dr_match_t match, void *match_data); | ||
| 380 | |||
| 381 | /* devres group */ | ||
| 382 | extern void * __must_check devres_open_group(struct device *dev, void *id, | ||
| 383 | gfp_t gfp); | ||
| 384 | extern void devres_close_group(struct device *dev, void *id); | ||
| 385 | extern void devres_remove_group(struct device *dev, void *id); | ||
| 386 | extern int devres_release_group(struct device *dev, void *id); | ||
| 387 | |||
| 388 | /* managed kzalloc/kfree for device drivers, no kmalloc, always use kzalloc */ | ||
| 389 | extern void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp); | ||
| 390 | extern void devm_kfree(struct device *dev, void *p); | ||
| 391 | |||
| 349 | struct device { | 392 | struct device { |
| 350 | struct klist klist_children; | 393 | struct klist klist_children; |
| 351 | struct klist_node knode_parent; /* node in sibling list */ | 394 | struct klist_node knode_parent; /* node in sibling list */ |
| @@ -355,6 +398,7 @@ struct device { | |||
| 355 | 398 | ||
| 356 | struct kobject kobj; | 399 | struct kobject kobj; |
| 357 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ | 400 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ |
| 401 | struct device_type *type; | ||
| 358 | unsigned is_registered:1; | 402 | unsigned is_registered:1; |
| 359 | struct device_attribute uevent_attr; | 403 | struct device_attribute uevent_attr; |
| 360 | struct device_attribute *devt_attr; | 404 | struct device_attribute *devt_attr; |
| @@ -388,11 +432,15 @@ struct device { | |||
| 388 | /* arch specific additions */ | 432 | /* arch specific additions */ |
| 389 | struct dev_archdata archdata; | 433 | struct dev_archdata archdata; |
| 390 | 434 | ||
| 435 | spinlock_t devres_lock; | ||
| 436 | struct list_head devres_head; | ||
| 437 | |||
| 391 | /* class_device migration path */ | 438 | /* class_device migration path */ |
| 392 | struct list_head node; | 439 | struct list_head node; |
| 393 | struct class *class; /* optional*/ | 440 | struct class *class; |
| 394 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 441 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
| 395 | struct attribute_group **groups; /* optional groups */ | 442 | struct attribute_group **groups; /* optional groups */ |
| 443 | int uevent_suppress; | ||
| 396 | 444 | ||
| 397 | void (*release)(struct device * dev); | 445 | void (*release)(struct device * dev); |
| 398 | }; | 446 | }; |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index ff203c465fed..9a663c6db16a 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
| @@ -66,6 +66,33 @@ dma_mark_declared_memory_occupied(struct device *dev, | |||
| 66 | } | 66 | } |
| 67 | #endif | 67 | #endif |
| 68 | 68 | ||
| 69 | #endif | 69 | /* |
| 70 | * Managed DMA API | ||
| 71 | */ | ||
| 72 | extern void *dmam_alloc_coherent(struct device *dev, size_t size, | ||
| 73 | dma_addr_t *dma_handle, gfp_t gfp); | ||
| 74 | extern void dmam_free_coherent(struct device *dev, size_t size, void *vaddr, | ||
| 75 | dma_addr_t dma_handle); | ||
| 76 | extern void *dmam_alloc_noncoherent(struct device *dev, size_t size, | ||
| 77 | dma_addr_t *dma_handle, gfp_t gfp); | ||
| 78 | extern void dmam_free_noncoherent(struct device *dev, size_t size, void *vaddr, | ||
| 79 | dma_addr_t dma_handle); | ||
| 80 | #ifdef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | ||
| 81 | extern int dmam_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | ||
| 82 | dma_addr_t device_addr, size_t size, | ||
| 83 | int flags); | ||
| 84 | extern void dmam_release_declared_memory(struct device *dev); | ||
| 85 | #else /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */ | ||
| 86 | static inline int dmam_declare_coherent_memory(struct device *dev, | ||
| 87 | dma_addr_t bus_addr, dma_addr_t device_addr, | ||
| 88 | size_t size, gfp_t gfp) | ||
| 89 | { | ||
| 90 | return 0; | ||
| 91 | } | ||
| 70 | 92 | ||
| 93 | static inline void dmam_release_declared_memory(struct device *dev) | ||
| 94 | { | ||
| 95 | } | ||
| 96 | #endif /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */ | ||
| 71 | 97 | ||
| 98 | #endif | ||
diff --git a/include/linux/dmapool.h b/include/linux/dmapool.h index 76f12f46db7f..022e34fcbd1b 100644 --- a/include/linux/dmapool.h +++ b/include/linux/dmapool.h | |||
| @@ -24,5 +24,12 @@ void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags, | |||
| 24 | 24 | ||
| 25 | void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr); | 25 | void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr); |
| 26 | 26 | ||
| 27 | /* | ||
| 28 | * Managed DMA pool | ||
| 29 | */ | ||
| 30 | struct dma_pool *dmam_pool_create(const char *name, struct device *dev, | ||
| 31 | size_t size, size_t align, size_t allocation); | ||
| 32 | void dmam_pool_destroy(struct dma_pool *pool); | ||
| 33 | |||
| 27 | #endif | 34 | #endif |
| 28 | 35 | ||
diff --git a/include/linux/eisa.h b/include/linux/eisa.h index 1ff7c1392525..fe806b6f030d 100644 --- a/include/linux/eisa.h +++ b/include/linux/eisa.h | |||
| @@ -61,10 +61,20 @@ struct eisa_driver { | |||
| 61 | 61 | ||
| 62 | #define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver) | 62 | #define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver) |
| 63 | 63 | ||
| 64 | /* These external functions are only available when EISA support is enabled. */ | ||
| 65 | #ifdef CONFIG_EISA | ||
| 66 | |||
| 64 | extern struct bus_type eisa_bus_type; | 67 | extern struct bus_type eisa_bus_type; |
| 65 | int eisa_driver_register (struct eisa_driver *edrv); | 68 | int eisa_driver_register (struct eisa_driver *edrv); |
| 66 | void eisa_driver_unregister (struct eisa_driver *edrv); | 69 | void eisa_driver_unregister (struct eisa_driver *edrv); |
| 67 | 70 | ||
| 71 | #else /* !CONFIG_EISA */ | ||
| 72 | |||
| 73 | static inline int eisa_driver_register (struct eisa_driver *edrv) { return 0; } | ||
| 74 | static inline void eisa_driver_unregister (struct eisa_driver *edrv) { } | ||
| 75 | |||
| 76 | #endif /* !CONFIG_EISA */ | ||
| 77 | |||
| 68 | /* Mimics pci.h... */ | 78 | /* Mimics pci.h... */ |
| 69 | static inline void *eisa_get_drvdata (struct eisa_device *edev) | 79 | static inline void *eisa_get_drvdata (struct eisa_device *edev) |
| 70 | { | 80 | { |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 00c314aedab7..063799ea6be0 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -70,7 +70,7 @@ struct vm_area_struct; | |||
| 70 | #ifdef CONFIG_NUMA | 70 | #ifdef CONFIG_NUMA |
| 71 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) | 71 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) |
| 72 | #else | 72 | #else |
| 73 | #define GFP_THISNODE 0 | 73 | #define GFP_THISNODE ((__force gfp_t)0) |
| 74 | #endif | 74 | #endif |
| 75 | 75 | ||
| 76 | 76 | ||
diff --git a/include/linux/hid-debug.h b/include/linux/hid-debug.h index 8e4dbb51fc70..50d568ec178a 100644 --- a/include/linux/hid-debug.h +++ b/include/linux/hid-debug.h | |||
| @@ -1,10 +1,8 @@ | |||
| 1 | #ifndef __HID_DEBUG_H | ||
| 2 | #define __HID_DEBUG_H | ||
| 3 | |||
| 1 | /* | 4 | /* |
| 2 | * $Id: hid-debug.h,v 1.8 2001/09/25 09:37:57 vojtech Exp $ | 5 | * Copyright (c) 2007 Jiri Kosina |
| 3 | * | ||
| 4 | * (c) 1999 Andreas Gal <gal@cs.uni-magdeburg.de> | ||
| 5 | * (c) 2000-2001 Vojtech Pavlik <vojtech@ucw.cz> | ||
| 6 | * | ||
| 7 | * Some debug stuff for the HID parser. | ||
| 8 | */ | 6 | */ |
| 9 | 7 | ||
| 10 | /* | 8 | /* |
| @@ -22,737 +20,26 @@ | |||
| 22 | * along with this program; if not, write to the Free Software | 20 | * along with this program; if not, write to the Free Software |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 24 | * | 22 | * |
| 25 | * Should you need to contact me, the author, you can do so either by | ||
| 26 | * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail: | ||
| 27 | * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic | ||
| 28 | */ | 23 | */ |
| 29 | 24 | ||
| 30 | #include <linux/input.h> | 25 | #ifdef CONFIG_HID_DEBUG |
| 31 | |||
| 32 | struct hid_usage_entry { | ||
| 33 | unsigned page; | ||
| 34 | unsigned usage; | ||
| 35 | char *description; | ||
| 36 | }; | ||
| 37 | |||
| 38 | static const struct hid_usage_entry hid_usage_table[] = { | ||
| 39 | { 0, 0, "Undefined" }, | ||
| 40 | { 1, 0, "GenericDesktop" }, | ||
| 41 | {0, 0x01, "Pointer"}, | ||
| 42 | {0, 0x02, "Mouse"}, | ||
| 43 | {0, 0x04, "Joystick"}, | ||
| 44 | {0, 0x05, "GamePad"}, | ||
| 45 | {0, 0x06, "Keyboard"}, | ||
| 46 | {0, 0x07, "Keypad"}, | ||
| 47 | {0, 0x08, "MultiAxis"}, | ||
| 48 | {0, 0x30, "X"}, | ||
| 49 | {0, 0x31, "Y"}, | ||
| 50 | {0, 0x32, "Z"}, | ||
| 51 | {0, 0x33, "Rx"}, | ||
| 52 | {0, 0x34, "Ry"}, | ||
| 53 | {0, 0x35, "Rz"}, | ||
| 54 | {0, 0x36, "Slider"}, | ||
| 55 | {0, 0x37, "Dial"}, | ||
| 56 | {0, 0x38, "Wheel"}, | ||
| 57 | {0, 0x39, "HatSwitch"}, | ||
| 58 | {0, 0x3a, "CountedBuffer"}, | ||
| 59 | {0, 0x3b, "ByteCount"}, | ||
| 60 | {0, 0x3c, "MotionWakeup"}, | ||
| 61 | {0, 0x3d, "Start"}, | ||
| 62 | {0, 0x3e, "Select"}, | ||
| 63 | {0, 0x40, "Vx"}, | ||
| 64 | {0, 0x41, "Vy"}, | ||
| 65 | {0, 0x42, "Vz"}, | ||
| 66 | {0, 0x43, "Vbrx"}, | ||
| 67 | {0, 0x44, "Vbry"}, | ||
| 68 | {0, 0x45, "Vbrz"}, | ||
| 69 | {0, 0x46, "Vno"}, | ||
| 70 | {0, 0x80, "SystemControl"}, | ||
| 71 | {0, 0x81, "SystemPowerDown"}, | ||
| 72 | {0, 0x82, "SystemSleep"}, | ||
| 73 | {0, 0x83, "SystemWakeUp"}, | ||
| 74 | {0, 0x84, "SystemContextMenu"}, | ||
| 75 | {0, 0x85, "SystemMainMenu"}, | ||
| 76 | {0, 0x86, "SystemAppMenu"}, | ||
| 77 | {0, 0x87, "SystemMenuHelp"}, | ||
| 78 | {0, 0x88, "SystemMenuExit"}, | ||
| 79 | {0, 0x89, "SystemMenuSelect"}, | ||
| 80 | {0, 0x8a, "SystemMenuRight"}, | ||
| 81 | {0, 0x8b, "SystemMenuLeft"}, | ||
| 82 | {0, 0x8c, "SystemMenuUp"}, | ||
| 83 | {0, 0x8d, "SystemMenuDown"}, | ||
| 84 | {0, 0x90, "D-PadUp"}, | ||
| 85 | {0, 0x91, "D-PadDown"}, | ||
| 86 | {0, 0x92, "D-PadRight"}, | ||
| 87 | {0, 0x93, "D-PadLeft"}, | ||
| 88 | { 2, 0, "Simulation" }, | ||
| 89 | {0, 0xb0, "Aileron"}, | ||
| 90 | {0, 0xb1, "AileronTrim"}, | ||
| 91 | {0, 0xb2, "Anti-Torque"}, | ||
| 92 | {0, 0xb3, "Autopilot"}, | ||
| 93 | {0, 0xb4, "Chaff"}, | ||
| 94 | {0, 0xb5, "Collective"}, | ||
| 95 | {0, 0xb6, "DiveBrake"}, | ||
| 96 | {0, 0xb7, "ElectronicCountermeasures"}, | ||
| 97 | {0, 0xb8, "Elevator"}, | ||
| 98 | {0, 0xb9, "ElevatorTrim"}, | ||
| 99 | {0, 0xba, "Rudder"}, | ||
| 100 | {0, 0xbb, "Throttle"}, | ||
| 101 | {0, 0xbc, "FlightCommunications"}, | ||
| 102 | {0, 0xbd, "FlareRelease"}, | ||
| 103 | {0, 0xbe, "LandingGear"}, | ||
| 104 | {0, 0xbf, "ToeBrake"}, | ||
| 105 | { 7, 0, "Keyboard" }, | ||
| 106 | { 8, 0, "LED" }, | ||
| 107 | {0, 0x01, "NumLock"}, | ||
| 108 | {0, 0x02, "CapsLock"}, | ||
| 109 | {0, 0x03, "ScrollLock"}, | ||
| 110 | {0, 0x04, "Compose"}, | ||
| 111 | {0, 0x05, "Kana"}, | ||
| 112 | {0, 0x4b, "GenericIndicator"}, | ||
| 113 | { 9, 0, "Button" }, | ||
| 114 | { 10, 0, "Ordinal" }, | ||
| 115 | { 12, 0, "Consumer" }, | ||
| 116 | {0, 0x238, "HorizontalWheel"}, | ||
| 117 | { 13, 0, "Digitizers" }, | ||
| 118 | {0, 0x01, "Digitizer"}, | ||
| 119 | {0, 0x02, "Pen"}, | ||
| 120 | {0, 0x03, "LightPen"}, | ||
| 121 | {0, 0x04, "TouchScreen"}, | ||
| 122 | {0, 0x05, "TouchPad"}, | ||
| 123 | {0, 0x20, "Stylus"}, | ||
| 124 | {0, 0x21, "Puck"}, | ||
| 125 | {0, 0x22, "Finger"}, | ||
| 126 | {0, 0x30, "TipPressure"}, | ||
| 127 | {0, 0x31, "BarrelPressure"}, | ||
| 128 | {0, 0x32, "InRange"}, | ||
| 129 | {0, 0x33, "Touch"}, | ||
| 130 | {0, 0x34, "UnTouch"}, | ||
| 131 | {0, 0x35, "Tap"}, | ||
| 132 | {0, 0x39, "TabletFunctionKey"}, | ||
| 133 | {0, 0x3a, "ProgramChangeKey"}, | ||
| 134 | {0, 0x3c, "Invert"}, | ||
| 135 | {0, 0x42, "TipSwitch"}, | ||
| 136 | {0, 0x43, "SecondaryTipSwitch"}, | ||
| 137 | {0, 0x44, "BarrelSwitch"}, | ||
| 138 | {0, 0x45, "Eraser"}, | ||
| 139 | {0, 0x46, "TabletPick"}, | ||
| 140 | { 15, 0, "PhysicalInterfaceDevice" }, | ||
| 141 | {0, 0x00, "Undefined"}, | ||
| 142 | {0, 0x01, "Physical_Interface_Device"}, | ||
| 143 | {0, 0x20, "Normal"}, | ||
| 144 | {0, 0x21, "Set_Effect_Report"}, | ||
| 145 | {0, 0x22, "Effect_Block_Index"}, | ||
| 146 | {0, 0x23, "Parameter_Block_Offset"}, | ||
| 147 | {0, 0x24, "ROM_Flag"}, | ||
| 148 | {0, 0x25, "Effect_Type"}, | ||
| 149 | {0, 0x26, "ET_Constant_Force"}, | ||
| 150 | {0, 0x27, "ET_Ramp"}, | ||
| 151 | {0, 0x28, "ET_Custom_Force_Data"}, | ||
| 152 | {0, 0x30, "ET_Square"}, | ||
| 153 | {0, 0x31, "ET_Sine"}, | ||
| 154 | {0, 0x32, "ET_Triangle"}, | ||
| 155 | {0, 0x33, "ET_Sawtooth_Up"}, | ||
| 156 | {0, 0x34, "ET_Sawtooth_Down"}, | ||
| 157 | {0, 0x40, "ET_Spring"}, | ||
| 158 | {0, 0x41, "ET_Damper"}, | ||
| 159 | {0, 0x42, "ET_Inertia"}, | ||
| 160 | {0, 0x43, "ET_Friction"}, | ||
| 161 | {0, 0x50, "Duration"}, | ||
| 162 | {0, 0x51, "Sample_Period"}, | ||
| 163 | {0, 0x52, "Gain"}, | ||
| 164 | {0, 0x53, "Trigger_Button"}, | ||
| 165 | {0, 0x54, "Trigger_Repeat_Interval"}, | ||
| 166 | {0, 0x55, "Axes_Enable"}, | ||
| 167 | {0, 0x56, "Direction_Enable"}, | ||
| 168 | {0, 0x57, "Direction"}, | ||
| 169 | {0, 0x58, "Type_Specific_Block_Offset"}, | ||
| 170 | {0, 0x59, "Block_Type"}, | ||
| 171 | {0, 0x5A, "Set_Envelope_Report"}, | ||
| 172 | {0, 0x5B, "Attack_Level"}, | ||
| 173 | {0, 0x5C, "Attack_Time"}, | ||
| 174 | {0, 0x5D, "Fade_Level"}, | ||
| 175 | {0, 0x5E, "Fade_Time"}, | ||
| 176 | {0, 0x5F, "Set_Condition_Report"}, | ||
| 177 | {0, 0x60, "CP_Offset"}, | ||
| 178 | {0, 0x61, "Positive_Coefficient"}, | ||
| 179 | {0, 0x62, "Negative_Coefficient"}, | ||
| 180 | {0, 0x63, "Positive_Saturation"}, | ||
| 181 | {0, 0x64, "Negative_Saturation"}, | ||
| 182 | {0, 0x65, "Dead_Band"}, | ||
| 183 | {0, 0x66, "Download_Force_Sample"}, | ||
| 184 | {0, 0x67, "Isoch_Custom_Force_Enable"}, | ||
| 185 | {0, 0x68, "Custom_Force_Data_Report"}, | ||
| 186 | {0, 0x69, "Custom_Force_Data"}, | ||
| 187 | {0, 0x6A, "Custom_Force_Vendor_Defined_Data"}, | ||
| 188 | {0, 0x6B, "Set_Custom_Force_Report"}, | ||
| 189 | {0, 0x6C, "Custom_Force_Data_Offset"}, | ||
| 190 | {0, 0x6D, "Sample_Count"}, | ||
| 191 | {0, 0x6E, "Set_Periodic_Report"}, | ||
| 192 | {0, 0x6F, "Offset"}, | ||
| 193 | {0, 0x70, "Magnitude"}, | ||
| 194 | {0, 0x71, "Phase"}, | ||
| 195 | {0, 0x72, "Period"}, | ||
| 196 | {0, 0x73, "Set_Constant_Force_Report"}, | ||
| 197 | {0, 0x74, "Set_Ramp_Force_Report"}, | ||
| 198 | {0, 0x75, "Ramp_Start"}, | ||
| 199 | {0, 0x76, "Ramp_End"}, | ||
| 200 | {0, 0x77, "Effect_Operation_Report"}, | ||
| 201 | {0, 0x78, "Effect_Operation"}, | ||
| 202 | {0, 0x79, "Op_Effect_Start"}, | ||
| 203 | {0, 0x7A, "Op_Effect_Start_Solo"}, | ||
| 204 | {0, 0x7B, "Op_Effect_Stop"}, | ||
| 205 | {0, 0x7C, "Loop_Count"}, | ||
| 206 | {0, 0x7D, "Device_Gain_Report"}, | ||
| 207 | {0, 0x7E, "Device_Gain"}, | ||
| 208 | {0, 0x7F, "PID_Pool_Report"}, | ||
| 209 | {0, 0x80, "RAM_Pool_Size"}, | ||
| 210 | {0, 0x81, "ROM_Pool_Size"}, | ||
| 211 | {0, 0x82, "ROM_Effect_Block_Count"}, | ||
| 212 | {0, 0x83, "Simultaneous_Effects_Max"}, | ||
| 213 | {0, 0x84, "Pool_Alignment"}, | ||
| 214 | {0, 0x85, "PID_Pool_Move_Report"}, | ||
| 215 | {0, 0x86, "Move_Source"}, | ||
| 216 | {0, 0x87, "Move_Destination"}, | ||
| 217 | {0, 0x88, "Move_Length"}, | ||
| 218 | {0, 0x89, "PID_Block_Load_Report"}, | ||
| 219 | {0, 0x8B, "Block_Load_Status"}, | ||
| 220 | {0, 0x8C, "Block_Load_Success"}, | ||
| 221 | {0, 0x8D, "Block_Load_Full"}, | ||
| 222 | {0, 0x8E, "Block_Load_Error"}, | ||
| 223 | {0, 0x8F, "Block_Handle"}, | ||
| 224 | {0, 0x90, "PID_Block_Free_Report"}, | ||
| 225 | {0, 0x91, "Type_Specific_Block_Handle"}, | ||
| 226 | {0, 0x92, "PID_State_Report"}, | ||
| 227 | {0, 0x94, "Effect_Playing"}, | ||
| 228 | {0, 0x95, "PID_Device_Control_Report"}, | ||
| 229 | {0, 0x96, "PID_Device_Control"}, | ||
| 230 | {0, 0x97, "DC_Enable_Actuators"}, | ||
| 231 | {0, 0x98, "DC_Disable_Actuators"}, | ||
| 232 | {0, 0x99, "DC_Stop_All_Effects"}, | ||
| 233 | {0, 0x9A, "DC_Device_Reset"}, | ||
| 234 | {0, 0x9B, "DC_Device_Pause"}, | ||
| 235 | {0, 0x9C, "DC_Device_Continue"}, | ||
| 236 | {0, 0x9F, "Device_Paused"}, | ||
| 237 | {0, 0xA0, "Actuators_Enabled"}, | ||
| 238 | {0, 0xA4, "Safety_Switch"}, | ||
| 239 | {0, 0xA5, "Actuator_Override_Switch"}, | ||
| 240 | {0, 0xA6, "Actuator_Power"}, | ||
| 241 | {0, 0xA7, "Start_Delay"}, | ||
| 242 | {0, 0xA8, "Parameter_Block_Size"}, | ||
| 243 | {0, 0xA9, "Device_Managed_Pool"}, | ||
| 244 | {0, 0xAA, "Shared_Parameter_Blocks"}, | ||
| 245 | {0, 0xAB, "Create_New_Effect_Report"}, | ||
| 246 | {0, 0xAC, "RAM_Pool_Available"}, | ||
| 247 | { 0x84, 0, "Power Device" }, | ||
| 248 | { 0x84, 0x02, "PresentStatus" }, | ||
| 249 | { 0x84, 0x03, "ChangeStatus" }, | ||
| 250 | { 0x84, 0x04, "UPS" }, | ||
| 251 | { 0x84, 0x05, "PowerSupply" }, | ||
| 252 | { 0x84, 0x10, "BatterySystem" }, | ||
| 253 | { 0x84, 0x11, "BatterySystemID" }, | ||
| 254 | { 0x84, 0x12, "Battery" }, | ||
| 255 | { 0x84, 0x13, "BatteryID" }, | ||
| 256 | { 0x84, 0x14, "Charger" }, | ||
| 257 | { 0x84, 0x15, "ChargerID" }, | ||
| 258 | { 0x84, 0x16, "PowerConverter" }, | ||
| 259 | { 0x84, 0x17, "PowerConverterID" }, | ||
| 260 | { 0x84, 0x18, "OutletSystem" }, | ||
| 261 | { 0x84, 0x19, "OutletSystemID" }, | ||
| 262 | { 0x84, 0x1a, "Input" }, | ||
| 263 | { 0x84, 0x1b, "InputID" }, | ||
| 264 | { 0x84, 0x1c, "Output" }, | ||
| 265 | { 0x84, 0x1d, "OutputID" }, | ||
| 266 | { 0x84, 0x1e, "Flow" }, | ||
| 267 | { 0x84, 0x1f, "FlowID" }, | ||
| 268 | { 0x84, 0x20, "Outlet" }, | ||
| 269 | { 0x84, 0x21, "OutletID" }, | ||
| 270 | { 0x84, 0x22, "Gang" }, | ||
| 271 | { 0x84, 0x24, "PowerSummary" }, | ||
| 272 | { 0x84, 0x25, "PowerSummaryID" }, | ||
| 273 | { 0x84, 0x30, "Voltage" }, | ||
| 274 | { 0x84, 0x31, "Current" }, | ||
| 275 | { 0x84, 0x32, "Frequency" }, | ||
| 276 | { 0x84, 0x33, "ApparentPower" }, | ||
| 277 | { 0x84, 0x35, "PercentLoad" }, | ||
| 278 | { 0x84, 0x40, "ConfigVoltage" }, | ||
| 279 | { 0x84, 0x41, "ConfigCurrent" }, | ||
| 280 | { 0x84, 0x43, "ConfigApparentPower" }, | ||
| 281 | { 0x84, 0x53, "LowVoltageTransfer" }, | ||
| 282 | { 0x84, 0x54, "HighVoltageTransfer" }, | ||
| 283 | { 0x84, 0x56, "DelayBeforeStartup" }, | ||
| 284 | { 0x84, 0x57, "DelayBeforeShutdown" }, | ||
| 285 | { 0x84, 0x58, "Test" }, | ||
| 286 | { 0x84, 0x5a, "AudibleAlarmControl" }, | ||
| 287 | { 0x84, 0x60, "Present" }, | ||
| 288 | { 0x84, 0x61, "Good" }, | ||
| 289 | { 0x84, 0x62, "InternalFailure" }, | ||
| 290 | { 0x84, 0x65, "Overload" }, | ||
| 291 | { 0x84, 0x66, "OverCharged" }, | ||
| 292 | { 0x84, 0x67, "OverTemperature" }, | ||
| 293 | { 0x84, 0x68, "ShutdownRequested" }, | ||
| 294 | { 0x84, 0x69, "ShutdownImminent" }, | ||
| 295 | { 0x84, 0x6b, "SwitchOn/Off" }, | ||
| 296 | { 0x84, 0x6c, "Switchable" }, | ||
| 297 | { 0x84, 0x6d, "Used" }, | ||
| 298 | { 0x84, 0x6e, "Boost" }, | ||
| 299 | { 0x84, 0x73, "CommunicationLost" }, | ||
| 300 | { 0x84, 0xfd, "iManufacturer" }, | ||
| 301 | { 0x84, 0xfe, "iProduct" }, | ||
| 302 | { 0x84, 0xff, "iSerialNumber" }, | ||
| 303 | { 0x85, 0, "Battery System" }, | ||
| 304 | { 0x85, 0x01, "SMBBatteryMode" }, | ||
| 305 | { 0x85, 0x02, "SMBBatteryStatus" }, | ||
| 306 | { 0x85, 0x03, "SMBAlarmWarning" }, | ||
| 307 | { 0x85, 0x04, "SMBChargerMode" }, | ||
| 308 | { 0x85, 0x05, "SMBChargerStatus" }, | ||
| 309 | { 0x85, 0x06, "SMBChargerSpecInfo" }, | ||
| 310 | { 0x85, 0x07, "SMBSelectorState" }, | ||
| 311 | { 0x85, 0x08, "SMBSelectorPresets" }, | ||
| 312 | { 0x85, 0x09, "SMBSelectorInfo" }, | ||
| 313 | { 0x85, 0x29, "RemainingCapacityLimit" }, | ||
| 314 | { 0x85, 0x2c, "CapacityMode" }, | ||
| 315 | { 0x85, 0x42, "BelowRemainingCapacityLimit" }, | ||
| 316 | { 0x85, 0x44, "Charging" }, | ||
| 317 | { 0x85, 0x45, "Discharging" }, | ||
| 318 | { 0x85, 0x4b, "NeedReplacement" }, | ||
| 319 | { 0x85, 0x66, "RemainingCapacity" }, | ||
| 320 | { 0x85, 0x68, "RunTimeToEmpty" }, | ||
| 321 | { 0x85, 0x6a, "AverageTimeToFull" }, | ||
| 322 | { 0x85, 0x83, "DesignCapacity" }, | ||
| 323 | { 0x85, 0x85, "ManufacturerDate" }, | ||
| 324 | { 0x85, 0x89, "iDeviceChemistry" }, | ||
| 325 | { 0x85, 0x8b, "Rechargable" }, | ||
| 326 | { 0x85, 0x8f, "iOEMInformation" }, | ||
| 327 | { 0x85, 0x8d, "CapacityGranularity1" }, | ||
| 328 | { 0x85, 0xd0, "ACPresent" }, | ||
| 329 | /* pages 0xff00 to 0xffff are vendor-specific */ | ||
| 330 | { 0xffff, 0, "Vendor-specific-FF" }, | ||
| 331 | { 0, 0, NULL } | ||
| 332 | }; | ||
| 333 | |||
| 334 | static void resolv_usage_page(unsigned page) { | ||
| 335 | const struct hid_usage_entry *p; | ||
| 336 | |||
| 337 | for (p = hid_usage_table; p->description; p++) | ||
| 338 | if (p->page == page) { | ||
| 339 | printk("%s", p->description); | ||
| 340 | return; | ||
| 341 | } | ||
| 342 | printk("%04x", page); | ||
| 343 | } | ||
| 344 | |||
| 345 | static void resolv_usage(unsigned usage) { | ||
| 346 | const struct hid_usage_entry *p; | ||
| 347 | |||
| 348 | resolv_usage_page(usage >> 16); | ||
| 349 | printk("."); | ||
| 350 | for (p = hid_usage_table; p->description; p++) | ||
| 351 | if (p->page == (usage >> 16)) { | ||
| 352 | for(++p; p->description && p->usage != 0; p++) | ||
| 353 | if (p->usage == (usage & 0xffff)) { | ||
| 354 | printk("%s", p->description); | ||
| 355 | return; | ||
| 356 | } | ||
| 357 | break; | ||
| 358 | } | ||
| 359 | printk("%04x", usage & 0xffff); | ||
| 360 | } | ||
| 361 | |||
| 362 | __inline__ static void tab(int n) { | ||
| 363 | while (n--) printk(" "); | ||
| 364 | } | ||
| 365 | |||
| 366 | static void hid_dump_field(struct hid_field *field, int n) { | ||
| 367 | int j; | ||
| 368 | |||
| 369 | if (field->physical) { | ||
| 370 | tab(n); | ||
| 371 | printk("Physical("); | ||
| 372 | resolv_usage(field->physical); printk(")\n"); | ||
| 373 | } | ||
| 374 | if (field->logical) { | ||
| 375 | tab(n); | ||
| 376 | printk("Logical("); | ||
| 377 | resolv_usage(field->logical); printk(")\n"); | ||
| 378 | } | ||
| 379 | tab(n); printk("Usage(%d)\n", field->maxusage); | ||
| 380 | for (j = 0; j < field->maxusage; j++) { | ||
| 381 | tab(n+2);resolv_usage(field->usage[j].hid); printk("\n"); | ||
| 382 | } | ||
| 383 | if (field->logical_minimum != field->logical_maximum) { | ||
| 384 | tab(n); printk("Logical Minimum(%d)\n", field->logical_minimum); | ||
| 385 | tab(n); printk("Logical Maximum(%d)\n", field->logical_maximum); | ||
| 386 | } | ||
| 387 | if (field->physical_minimum != field->physical_maximum) { | ||
| 388 | tab(n); printk("Physical Minimum(%d)\n", field->physical_minimum); | ||
| 389 | tab(n); printk("Physical Maximum(%d)\n", field->physical_maximum); | ||
| 390 | } | ||
| 391 | if (field->unit_exponent) { | ||
| 392 | tab(n); printk("Unit Exponent(%d)\n", field->unit_exponent); | ||
| 393 | } | ||
| 394 | if (field->unit) { | ||
| 395 | char *systems[5] = { "None", "SI Linear", "SI Rotation", "English Linear", "English Rotation" }; | ||
| 396 | char *units[5][8] = { | ||
| 397 | { "None", "None", "None", "None", "None", "None", "None", "None" }, | ||
| 398 | { "None", "Centimeter", "Gram", "Seconds", "Kelvin", "Ampere", "Candela", "None" }, | ||
| 399 | { "None", "Radians", "Gram", "Seconds", "Kelvin", "Ampere", "Candela", "None" }, | ||
| 400 | { "None", "Inch", "Slug", "Seconds", "Fahrenheit", "Ampere", "Candela", "None" }, | ||
| 401 | { "None", "Degrees", "Slug", "Seconds", "Fahrenheit", "Ampere", "Candela", "None" } | ||
| 402 | }; | ||
| 403 | |||
| 404 | int i; | ||
| 405 | int sys; | ||
| 406 | __u32 data = field->unit; | ||
| 407 | |||
| 408 | /* First nibble tells us which system we're in. */ | ||
| 409 | sys = data & 0xf; | ||
| 410 | data >>= 4; | ||
| 411 | |||
| 412 | if(sys > 4) { | ||
| 413 | tab(n); printk("Unit(Invalid)\n"); | ||
| 414 | } | ||
| 415 | else { | ||
| 416 | int earlier_unit = 0; | ||
| 417 | |||
| 418 | tab(n); printk("Unit(%s : ", systems[sys]); | ||
| 419 | |||
| 420 | for (i=1 ; i<sizeof(__u32)*2 ; i++) { | ||
| 421 | char nibble = data & 0xf; | ||
| 422 | data >>= 4; | ||
| 423 | if (nibble != 0) { | ||
| 424 | if(earlier_unit++ > 0) | ||
| 425 | printk("*"); | ||
| 426 | printk("%s", units[sys][i]); | ||
| 427 | if(nibble != 1) { | ||
| 428 | /* This is a _signed_ nibble(!) */ | ||
| 429 | |||
| 430 | int val = nibble & 0x7; | ||
| 431 | if(nibble & 0x08) | ||
| 432 | val = -((0x7 & ~val) +1); | ||
| 433 | printk("^%d", val); | ||
| 434 | } | ||
| 435 | } | ||
| 436 | } | ||
| 437 | printk(")\n"); | ||
| 438 | } | ||
| 439 | } | ||
| 440 | tab(n); printk("Report Size(%u)\n", field->report_size); | ||
| 441 | tab(n); printk("Report Count(%u)\n", field->report_count); | ||
| 442 | tab(n); printk("Report Offset(%u)\n", field->report_offset); | ||
| 443 | |||
| 444 | tab(n); printk("Flags( "); | ||
| 445 | j = field->flags; | ||
| 446 | printk("%s", HID_MAIN_ITEM_CONSTANT & j ? "Constant " : ""); | ||
| 447 | printk("%s", HID_MAIN_ITEM_VARIABLE & j ? "Variable " : "Array "); | ||
| 448 | printk("%s", HID_MAIN_ITEM_RELATIVE & j ? "Relative " : "Absolute "); | ||
| 449 | printk("%s", HID_MAIN_ITEM_WRAP & j ? "Wrap " : ""); | ||
| 450 | printk("%s", HID_MAIN_ITEM_NONLINEAR & j ? "NonLinear " : ""); | ||
| 451 | printk("%s", HID_MAIN_ITEM_NO_PREFERRED & j ? "NoPrefferedState " : ""); | ||
| 452 | printk("%s", HID_MAIN_ITEM_NULL_STATE & j ? "NullState " : ""); | ||
| 453 | printk("%s", HID_MAIN_ITEM_VOLATILE & j ? "Volatile " : ""); | ||
| 454 | printk("%s", HID_MAIN_ITEM_BUFFERED_BYTE & j ? "BufferedByte " : ""); | ||
| 455 | printk(")\n"); | ||
| 456 | } | ||
| 457 | |||
| 458 | static void __attribute__((unused)) hid_dump_device(struct hid_device *device) { | ||
| 459 | struct hid_report_enum *report_enum; | ||
| 460 | struct hid_report *report; | ||
| 461 | struct list_head *list; | ||
| 462 | unsigned i,k; | ||
| 463 | static char *table[] = {"INPUT", "OUTPUT", "FEATURE"}; | ||
| 464 | |||
| 465 | for (i = 0; i < HID_REPORT_TYPES; i++) { | ||
| 466 | report_enum = device->report_enum + i; | ||
| 467 | list = report_enum->report_list.next; | ||
| 468 | while (list != &report_enum->report_list) { | ||
| 469 | report = (struct hid_report *) list; | ||
| 470 | tab(2); | ||
| 471 | printk("%s", table[i]); | ||
| 472 | if (report->id) | ||
| 473 | printk("(%d)", report->id); | ||
| 474 | printk("[%s]", table[report->type]); | ||
| 475 | printk("\n"); | ||
| 476 | for (k = 0; k < report->maxfield; k++) { | ||
| 477 | tab(4); | ||
| 478 | printk("Field(%d)\n", k); | ||
| 479 | hid_dump_field(report->field[k], 6); | ||
| 480 | } | ||
| 481 | list = list->next; | ||
| 482 | } | ||
| 483 | } | ||
| 484 | } | ||
| 485 | |||
| 486 | static void __attribute__((unused)) hid_dump_input(struct hid_usage *usage, __s32 value) { | ||
| 487 | printk("hid-debug: input "); | ||
| 488 | resolv_usage(usage->hid); | ||
| 489 | printk(" = %d\n", value); | ||
| 490 | } | ||
| 491 | |||
| 492 | |||
| 493 | static char *events[EV_MAX + 1] = { | ||
| 494 | [EV_SYN] = "Sync", [EV_KEY] = "Key", | ||
| 495 | [EV_REL] = "Relative", [EV_ABS] = "Absolute", | ||
| 496 | [EV_MSC] = "Misc", [EV_LED] = "LED", | ||
| 497 | [EV_SND] = "Sound", [EV_REP] = "Repeat", | ||
| 498 | [EV_FF] = "ForceFeedback", [EV_PWR] = "Power", | ||
| 499 | [EV_FF_STATUS] = "ForceFeedbackStatus", | ||
| 500 | }; | ||
| 501 | |||
| 502 | static char *syncs[2] = { | ||
| 503 | [SYN_REPORT] = "Report", [SYN_CONFIG] = "Config", | ||
| 504 | }; | ||
| 505 | static char *keys[KEY_MAX + 1] = { | ||
| 506 | [KEY_RESERVED] = "Reserved", [KEY_ESC] = "Esc", | ||
| 507 | [KEY_1] = "1", [KEY_2] = "2", | ||
| 508 | [KEY_3] = "3", [KEY_4] = "4", | ||
| 509 | [KEY_5] = "5", [KEY_6] = "6", | ||
| 510 | [KEY_7] = "7", [KEY_8] = "8", | ||
| 511 | [KEY_9] = "9", [KEY_0] = "0", | ||
| 512 | [KEY_MINUS] = "Minus", [KEY_EQUAL] = "Equal", | ||
| 513 | [KEY_BACKSPACE] = "Backspace", [KEY_TAB] = "Tab", | ||
| 514 | [KEY_Q] = "Q", [KEY_W] = "W", | ||
| 515 | [KEY_E] = "E", [KEY_R] = "R", | ||
| 516 | [KEY_T] = "T", [KEY_Y] = "Y", | ||
| 517 | [KEY_U] = "U", [KEY_I] = "I", | ||
| 518 | [KEY_O] = "O", [KEY_P] = "P", | ||
| 519 | [KEY_LEFTBRACE] = "LeftBrace", [KEY_RIGHTBRACE] = "RightBrace", | ||
| 520 | [KEY_ENTER] = "Enter", [KEY_LEFTCTRL] = "LeftControl", | ||
| 521 | [KEY_A] = "A", [KEY_S] = "S", | ||
| 522 | [KEY_D] = "D", [KEY_F] = "F", | ||
| 523 | [KEY_G] = "G", [KEY_H] = "H", | ||
| 524 | [KEY_J] = "J", [KEY_K] = "K", | ||
| 525 | [KEY_L] = "L", [KEY_SEMICOLON] = "Semicolon", | ||
| 526 | [KEY_APOSTROPHE] = "Apostrophe", [KEY_GRAVE] = "Grave", | ||
| 527 | [KEY_LEFTSHIFT] = "LeftShift", [KEY_BACKSLASH] = "BackSlash", | ||
| 528 | [KEY_Z] = "Z", [KEY_X] = "X", | ||
| 529 | [KEY_C] = "C", [KEY_V] = "V", | ||
| 530 | [KEY_B] = "B", [KEY_N] = "N", | ||
| 531 | [KEY_M] = "M", [KEY_COMMA] = "Comma", | ||
| 532 | [KEY_DOT] = "Dot", [KEY_SLASH] = "Slash", | ||
| 533 | [KEY_RIGHTSHIFT] = "RightShift", [KEY_KPASTERISK] = "KPAsterisk", | ||
| 534 | [KEY_LEFTALT] = "LeftAlt", [KEY_SPACE] = "Space", | ||
| 535 | [KEY_CAPSLOCK] = "CapsLock", [KEY_F1] = "F1", | ||
| 536 | [KEY_F2] = "F2", [KEY_F3] = "F3", | ||
| 537 | [KEY_F4] = "F4", [KEY_F5] = "F5", | ||
| 538 | [KEY_F6] = "F6", [KEY_F7] = "F7", | ||
| 539 | [KEY_F8] = "F8", [KEY_F9] = "F9", | ||
| 540 | [KEY_F10] = "F10", [KEY_NUMLOCK] = "NumLock", | ||
| 541 | [KEY_SCROLLLOCK] = "ScrollLock", [KEY_KP7] = "KP7", | ||
| 542 | [KEY_KP8] = "KP8", [KEY_KP9] = "KP9", | ||
| 543 | [KEY_KPMINUS] = "KPMinus", [KEY_KP4] = "KP4", | ||
| 544 | [KEY_KP5] = "KP5", [KEY_KP6] = "KP6", | ||
| 545 | [KEY_KPPLUS] = "KPPlus", [KEY_KP1] = "KP1", | ||
| 546 | [KEY_KP2] = "KP2", [KEY_KP3] = "KP3", | ||
| 547 | [KEY_KP0] = "KP0", [KEY_KPDOT] = "KPDot", | ||
| 548 | [KEY_ZENKAKUHANKAKU] = "Zenkaku/Hankaku", [KEY_102ND] = "102nd", | ||
| 549 | [KEY_F11] = "F11", [KEY_F12] = "F12", | ||
| 550 | [KEY_RO] = "RO", [KEY_KATAKANA] = "Katakana", | ||
| 551 | [KEY_HIRAGANA] = "HIRAGANA", [KEY_HENKAN] = "Henkan", | ||
| 552 | [KEY_KATAKANAHIRAGANA] = "Katakana/Hiragana", [KEY_MUHENKAN] = "Muhenkan", | ||
| 553 | [KEY_KPJPCOMMA] = "KPJpComma", [KEY_KPENTER] = "KPEnter", | ||
| 554 | [KEY_RIGHTCTRL] = "RightCtrl", [KEY_KPSLASH] = "KPSlash", | ||
| 555 | [KEY_SYSRQ] = "SysRq", [KEY_RIGHTALT] = "RightAlt", | ||
| 556 | [KEY_LINEFEED] = "LineFeed", [KEY_HOME] = "Home", | ||
| 557 | [KEY_UP] = "Up", [KEY_PAGEUP] = "PageUp", | ||
| 558 | [KEY_LEFT] = "Left", [KEY_RIGHT] = "Right", | ||
| 559 | [KEY_END] = "End", [KEY_DOWN] = "Down", | ||
| 560 | [KEY_PAGEDOWN] = "PageDown", [KEY_INSERT] = "Insert", | ||
| 561 | [KEY_DELETE] = "Delete", [KEY_MACRO] = "Macro", | ||
| 562 | [KEY_MUTE] = "Mute", [KEY_VOLUMEDOWN] = "VolumeDown", | ||
| 563 | [KEY_VOLUMEUP] = "VolumeUp", [KEY_POWER] = "Power", | ||
| 564 | [KEY_KPEQUAL] = "KPEqual", [KEY_KPPLUSMINUS] = "KPPlusMinus", | ||
| 565 | [KEY_PAUSE] = "Pause", [KEY_KPCOMMA] = "KPComma", | ||
| 566 | [KEY_HANGUEL] = "Hangeul", [KEY_HANJA] = "Hanja", | ||
| 567 | [KEY_YEN] = "Yen", [KEY_LEFTMETA] = "LeftMeta", | ||
| 568 | [KEY_RIGHTMETA] = "RightMeta", [KEY_COMPOSE] = "Compose", | ||
| 569 | [KEY_STOP] = "Stop", [KEY_AGAIN] = "Again", | ||
| 570 | [KEY_PROPS] = "Props", [KEY_UNDO] = "Undo", | ||
| 571 | [KEY_FRONT] = "Front", [KEY_COPY] = "Copy", | ||
| 572 | [KEY_OPEN] = "Open", [KEY_PASTE] = "Paste", | ||
| 573 | [KEY_FIND] = "Find", [KEY_CUT] = "Cut", | ||
| 574 | [KEY_HELP] = "Help", [KEY_MENU] = "Menu", | ||
| 575 | [KEY_CALC] = "Calc", [KEY_SETUP] = "Setup", | ||
| 576 | [KEY_SLEEP] = "Sleep", [KEY_WAKEUP] = "WakeUp", | ||
| 577 | [KEY_FILE] = "File", [KEY_SENDFILE] = "SendFile", | ||
| 578 | [KEY_DELETEFILE] = "DeleteFile", [KEY_XFER] = "X-fer", | ||
| 579 | [KEY_PROG1] = "Prog1", [KEY_PROG2] = "Prog2", | ||
| 580 | [KEY_WWW] = "WWW", [KEY_MSDOS] = "MSDOS", | ||
| 581 | [KEY_COFFEE] = "Coffee", [KEY_DIRECTION] = "Direction", | ||
| 582 | [KEY_CYCLEWINDOWS] = "CycleWindows", [KEY_MAIL] = "Mail", | ||
| 583 | [KEY_BOOKMARKS] = "Bookmarks", [KEY_COMPUTER] = "Computer", | ||
| 584 | [KEY_BACK] = "Back", [KEY_FORWARD] = "Forward", | ||
| 585 | [KEY_CLOSECD] = "CloseCD", [KEY_EJECTCD] = "EjectCD", | ||
| 586 | [KEY_EJECTCLOSECD] = "EjectCloseCD", [KEY_NEXTSONG] = "NextSong", | ||
| 587 | [KEY_PLAYPAUSE] = "PlayPause", [KEY_PREVIOUSSONG] = "PreviousSong", | ||
| 588 | [KEY_STOPCD] = "StopCD", [KEY_RECORD] = "Record", | ||
| 589 | [KEY_REWIND] = "Rewind", [KEY_PHONE] = "Phone", | ||
| 590 | [KEY_ISO] = "ISOKey", [KEY_CONFIG] = "Config", | ||
| 591 | [KEY_HOMEPAGE] = "HomePage", [KEY_REFRESH] = "Refresh", | ||
| 592 | [KEY_EXIT] = "Exit", [KEY_MOVE] = "Move", | ||
| 593 | [KEY_EDIT] = "Edit", [KEY_SCROLLUP] = "ScrollUp", | ||
| 594 | [KEY_SCROLLDOWN] = "ScrollDown", [KEY_KPLEFTPAREN] = "KPLeftParenthesis", | ||
| 595 | [KEY_KPRIGHTPAREN] = "KPRightParenthesis", [KEY_NEW] = "New", | ||
| 596 | [KEY_REDO] = "Redo", [KEY_F13] = "F13", | ||
| 597 | [KEY_F14] = "F14", [KEY_F15] = "F15", | ||
| 598 | [KEY_F16] = "F16", [KEY_F17] = "F17", | ||
| 599 | [KEY_F18] = "F18", [KEY_F19] = "F19", | ||
| 600 | [KEY_F20] = "F20", [KEY_F21] = "F21", | ||
| 601 | [KEY_F22] = "F22", [KEY_F23] = "F23", | ||
| 602 | [KEY_F24] = "F24", [KEY_PLAYCD] = "PlayCD", | ||
| 603 | [KEY_PAUSECD] = "PauseCD", [KEY_PROG3] = "Prog3", | ||
| 604 | [KEY_PROG4] = "Prog4", [KEY_SUSPEND] = "Suspend", | ||
| 605 | [KEY_CLOSE] = "Close", [KEY_PLAY] = "Play", | ||
| 606 | [KEY_FASTFORWARD] = "FastForward", [KEY_BASSBOOST] = "BassBoost", | ||
| 607 | [KEY_PRINT] = "Print", [KEY_HP] = "HP", | ||
| 608 | [KEY_CAMERA] = "Camera", [KEY_SOUND] = "Sound", | ||
| 609 | [KEY_QUESTION] = "Question", [KEY_EMAIL] = "Email", | ||
| 610 | [KEY_CHAT] = "Chat", [KEY_SEARCH] = "Search", | ||
| 611 | [KEY_CONNECT] = "Connect", [KEY_FINANCE] = "Finance", | ||
| 612 | [KEY_SPORT] = "Sport", [KEY_SHOP] = "Shop", | ||
| 613 | [KEY_ALTERASE] = "AlternateErase", [KEY_CANCEL] = "Cancel", | ||
| 614 | [KEY_BRIGHTNESSDOWN] = "BrightnessDown", [KEY_BRIGHTNESSUP] = "BrightnessUp", | ||
| 615 | [KEY_MEDIA] = "Media", [KEY_UNKNOWN] = "Unknown", | ||
| 616 | [BTN_0] = "Btn0", [BTN_1] = "Btn1", | ||
| 617 | [BTN_2] = "Btn2", [BTN_3] = "Btn3", | ||
| 618 | [BTN_4] = "Btn4", [BTN_5] = "Btn5", | ||
| 619 | [BTN_6] = "Btn6", [BTN_7] = "Btn7", | ||
| 620 | [BTN_8] = "Btn8", [BTN_9] = "Btn9", | ||
| 621 | [BTN_LEFT] = "LeftBtn", [BTN_RIGHT] = "RightBtn", | ||
| 622 | [BTN_MIDDLE] = "MiddleBtn", [BTN_SIDE] = "SideBtn", | ||
| 623 | [BTN_EXTRA] = "ExtraBtn", [BTN_FORWARD] = "ForwardBtn", | ||
| 624 | [BTN_BACK] = "BackBtn", [BTN_TASK] = "TaskBtn", | ||
| 625 | [BTN_TRIGGER] = "Trigger", [BTN_THUMB] = "ThumbBtn", | ||
| 626 | [BTN_THUMB2] = "ThumbBtn2", [BTN_TOP] = "TopBtn", | ||
| 627 | [BTN_TOP2] = "TopBtn2", [BTN_PINKIE] = "PinkieBtn", | ||
| 628 | [BTN_BASE] = "BaseBtn", [BTN_BASE2] = "BaseBtn2", | ||
| 629 | [BTN_BASE3] = "BaseBtn3", [BTN_BASE4] = "BaseBtn4", | ||
| 630 | [BTN_BASE5] = "BaseBtn5", [BTN_BASE6] = "BaseBtn6", | ||
| 631 | [BTN_DEAD] = "BtnDead", [BTN_A] = "BtnA", | ||
| 632 | [BTN_B] = "BtnB", [BTN_C] = "BtnC", | ||
| 633 | [BTN_X] = "BtnX", [BTN_Y] = "BtnY", | ||
| 634 | [BTN_Z] = "BtnZ", [BTN_TL] = "BtnTL", | ||
| 635 | [BTN_TR] = "BtnTR", [BTN_TL2] = "BtnTL2", | ||
| 636 | [BTN_TR2] = "BtnTR2", [BTN_SELECT] = "BtnSelect", | ||
| 637 | [BTN_START] = "BtnStart", [BTN_MODE] = "BtnMode", | ||
| 638 | [BTN_THUMBL] = "BtnThumbL", [BTN_THUMBR] = "BtnThumbR", | ||
| 639 | [BTN_TOOL_PEN] = "ToolPen", [BTN_TOOL_RUBBER] = "ToolRubber", | ||
| 640 | [BTN_TOOL_BRUSH] = "ToolBrush", [BTN_TOOL_PENCIL] = "ToolPencil", | ||
| 641 | [BTN_TOOL_AIRBRUSH] = "ToolAirbrush", [BTN_TOOL_FINGER] = "ToolFinger", | ||
| 642 | [BTN_TOOL_MOUSE] = "ToolMouse", [BTN_TOOL_LENS] = "ToolLens", | ||
| 643 | [BTN_TOUCH] = "Touch", [BTN_STYLUS] = "Stylus", | ||
| 644 | [BTN_STYLUS2] = "Stylus2", [BTN_TOOL_DOUBLETAP] = "ToolDoubleTap", | ||
| 645 | [BTN_TOOL_TRIPLETAP] = "ToolTripleTap", [BTN_GEAR_DOWN] = "WheelBtn", | ||
| 646 | [BTN_GEAR_UP] = "Gear up", [KEY_OK] = "Ok", | ||
| 647 | [KEY_SELECT] = "Select", [KEY_GOTO] = "Goto", | ||
| 648 | [KEY_CLEAR] = "Clear", [KEY_POWER2] = "Power2", | ||
| 649 | [KEY_OPTION] = "Option", [KEY_INFO] = "Info", | ||
| 650 | [KEY_TIME] = "Time", [KEY_VENDOR] = "Vendor", | ||
| 651 | [KEY_ARCHIVE] = "Archive", [KEY_PROGRAM] = "Program", | ||
| 652 | [KEY_CHANNEL] = "Channel", [KEY_FAVORITES] = "Favorites", | ||
| 653 | [KEY_EPG] = "EPG", [KEY_PVR] = "PVR", | ||
| 654 | [KEY_MHP] = "MHP", [KEY_LANGUAGE] = "Language", | ||
| 655 | [KEY_TITLE] = "Title", [KEY_SUBTITLE] = "Subtitle", | ||
| 656 | [KEY_ANGLE] = "Angle", [KEY_ZOOM] = "Zoom", | ||
| 657 | [KEY_MODE] = "Mode", [KEY_KEYBOARD] = "Keyboard", | ||
| 658 | [KEY_SCREEN] = "Screen", [KEY_PC] = "PC", | ||
| 659 | [KEY_TV] = "TV", [KEY_TV2] = "TV2", | ||
| 660 | [KEY_VCR] = "VCR", [KEY_VCR2] = "VCR2", | ||
| 661 | [KEY_SAT] = "Sat", [KEY_SAT2] = "Sat2", | ||
| 662 | [KEY_CD] = "CD", [KEY_TAPE] = "Tape", | ||
| 663 | [KEY_RADIO] = "Radio", [KEY_TUNER] = "Tuner", | ||
| 664 | [KEY_PLAYER] = "Player", [KEY_TEXT] = "Text", | ||
| 665 | [KEY_DVD] = "DVD", [KEY_AUX] = "Aux", | ||
| 666 | [KEY_MP3] = "MP3", [KEY_AUDIO] = "Audio", | ||
| 667 | [KEY_VIDEO] = "Video", [KEY_DIRECTORY] = "Directory", | ||
| 668 | [KEY_LIST] = "List", [KEY_MEMO] = "Memo", | ||
| 669 | [KEY_CALENDAR] = "Calendar", [KEY_RED] = "Red", | ||
| 670 | [KEY_GREEN] = "Green", [KEY_YELLOW] = "Yellow", | ||
| 671 | [KEY_BLUE] = "Blue", [KEY_CHANNELUP] = "ChannelUp", | ||
| 672 | [KEY_CHANNELDOWN] = "ChannelDown", [KEY_FIRST] = "First", | ||
| 673 | [KEY_LAST] = "Last", [KEY_AB] = "AB", | ||
| 674 | [KEY_NEXT] = "Next", [KEY_RESTART] = "Restart", | ||
| 675 | [KEY_SLOW] = "Slow", [KEY_SHUFFLE] = "Shuffle", | ||
| 676 | [KEY_BREAK] = "Break", [KEY_PREVIOUS] = "Previous", | ||
| 677 | [KEY_DIGITS] = "Digits", [KEY_TEEN] = "TEEN", | ||
| 678 | [KEY_TWEN] = "TWEN", [KEY_DEL_EOL] = "DeleteEOL", | ||
| 679 | [KEY_DEL_EOS] = "DeleteEOS", [KEY_INS_LINE] = "InsertLine", | ||
| 680 | [KEY_DEL_LINE] = "DeleteLine", | ||
| 681 | [KEY_SEND] = "Send", [KEY_REPLY] = "Reply", | ||
| 682 | [KEY_FORWARDMAIL] = "ForwardMail", [KEY_SAVE] = "Save", | ||
| 683 | [KEY_DOCUMENTS] = "Documents", | ||
| 684 | [KEY_FN] = "Fn", [KEY_FN_ESC] = "Fn+ESC", | ||
| 685 | [KEY_FN_1] = "Fn+1", [KEY_FN_2] = "Fn+2", | ||
| 686 | [KEY_FN_B] = "Fn+B", [KEY_FN_D] = "Fn+D", | ||
| 687 | [KEY_FN_E] = "Fn+E", [KEY_FN_F] = "Fn+F", | ||
| 688 | [KEY_FN_S] = "Fn+S", | ||
| 689 | [KEY_FN_F1] = "Fn+F1", [KEY_FN_F2] = "Fn+F2", | ||
| 690 | [KEY_FN_F3] = "Fn+F3", [KEY_FN_F4] = "Fn+F4", | ||
| 691 | [KEY_FN_F5] = "Fn+F5", [KEY_FN_F6] = "Fn+F6", | ||
| 692 | [KEY_FN_F7] = "Fn+F7", [KEY_FN_F8] = "Fn+F8", | ||
| 693 | [KEY_FN_F9] = "Fn+F9", [KEY_FN_F10] = "Fn+F10", | ||
| 694 | [KEY_FN_F11] = "Fn+F11", [KEY_FN_F12] = "Fn+F12", | ||
| 695 | [KEY_KBDILLUMTOGGLE] = "KbdIlluminationToggle", | ||
| 696 | [KEY_KBDILLUMDOWN] = "KbdIlluminationDown", | ||
| 697 | [KEY_KBDILLUMUP] = "KbdIlluminationUp", | ||
| 698 | [KEY_SWITCHVIDEOMODE] = "SwitchVideoMode", | ||
| 699 | }; | ||
| 700 | |||
| 701 | static char *relatives[REL_MAX + 1] = { | ||
| 702 | [REL_X] = "X", [REL_Y] = "Y", | ||
| 703 | [REL_Z] = "Z", [REL_RX] = "Rx", | ||
| 704 | [REL_RY] = "Ry", [REL_RZ] = "Rz", | ||
| 705 | [REL_HWHEEL] = "HWheel", [REL_DIAL] = "Dial", | ||
| 706 | [REL_WHEEL] = "Wheel", [REL_MISC] = "Misc", | ||
| 707 | }; | ||
| 708 | |||
| 709 | static char *absolutes[ABS_MAX + 1] = { | ||
| 710 | [ABS_X] = "X", [ABS_Y] = "Y", | ||
| 711 | [ABS_Z] = "Z", [ABS_RX] = "Rx", | ||
| 712 | [ABS_RY] = "Ry", [ABS_RZ] = "Rz", | ||
| 713 | [ABS_THROTTLE] = "Throttle", [ABS_RUDDER] = "Rudder", | ||
| 714 | [ABS_WHEEL] = "Wheel", [ABS_GAS] = "Gas", | ||
| 715 | [ABS_BRAKE] = "Brake", [ABS_HAT0X] = "Hat0X", | ||
| 716 | [ABS_HAT0Y] = "Hat0Y", [ABS_HAT1X] = "Hat1X", | ||
| 717 | [ABS_HAT1Y] = "Hat1Y", [ABS_HAT2X] = "Hat2X", | ||
| 718 | [ABS_HAT2Y] = "Hat2Y", [ABS_HAT3X] = "Hat3X", | ||
| 719 | [ABS_HAT3Y] = "Hat 3Y", [ABS_PRESSURE] = "Pressure", | ||
| 720 | [ABS_DISTANCE] = "Distance", [ABS_TILT_X] = "XTilt", | ||
| 721 | [ABS_TILT_Y] = "YTilt", [ABS_TOOL_WIDTH] = "Tool Width", | ||
| 722 | [ABS_VOLUME] = "Volume", [ABS_MISC] = "Misc", | ||
| 723 | }; | ||
| 724 | 26 | ||
| 725 | static char *misc[MSC_MAX + 1] = { | 27 | void hid_dump_input(struct hid_usage *, __s32); |
| 726 | [MSC_SERIAL] = "Serial", [MSC_PULSELED] = "Pulseled", | 28 | void hid_dump_device(struct hid_device *); |
| 727 | [MSC_GESTURE] = "Gesture", [MSC_RAW] = "RawData" | 29 | void hid_dump_field(struct hid_field *, int); |
| 728 | }; | 30 | void hid_resolv_usage(unsigned); |
| 31 | void hid_resolv_event(__u8, __u16); | ||
| 729 | 32 | ||
| 730 | static char *leds[LED_MAX + 1] = { | 33 | #else |
| 731 | [LED_NUML] = "NumLock", [LED_CAPSL] = "CapsLock", | ||
| 732 | [LED_SCROLLL] = "ScrollLock", [LED_COMPOSE] = "Compose", | ||
| 733 | [LED_KANA] = "Kana", [LED_SLEEP] = "Sleep", | ||
| 734 | [LED_SUSPEND] = "Suspend", [LED_MUTE] = "Mute", | ||
| 735 | [LED_MISC] = "Misc", | ||
| 736 | }; | ||
| 737 | 34 | ||
| 738 | static char *repeats[REP_MAX + 1] = { | 35 | #define hid_dump_input(a,b) do { } while (0) |
| 739 | [REP_DELAY] = "Delay", [REP_PERIOD] = "Period" | 36 | #define hid_dump_device(c) do { } while (0) |
| 740 | }; | 37 | #define hid_dump_field(a,b) do { } while (0) |
| 38 | #define hid_resolv_usage(a) do { } while (0) | ||
| 39 | #define hid_resolv_event(a,b) do { } while (0) | ||
| 741 | 40 | ||
| 742 | static char *sounds[SND_MAX + 1] = { | 41 | #endif /* CONFIG_HID_DEBUG */ |
| 743 | [SND_CLICK] = "Click", [SND_BELL] = "Bell", | ||
| 744 | [SND_TONE] = "Tone" | ||
| 745 | }; | ||
| 746 | 42 | ||
| 747 | static char **names[EV_MAX + 1] = { | ||
| 748 | [EV_SYN] = syncs, [EV_KEY] = keys, | ||
| 749 | [EV_REL] = relatives, [EV_ABS] = absolutes, | ||
| 750 | [EV_MSC] = misc, [EV_LED] = leds, | ||
| 751 | [EV_SND] = sounds, [EV_REP] = repeats, | ||
| 752 | }; | ||
| 753 | 43 | ||
| 754 | static void __attribute__((unused)) resolv_event(__u8 type, __u16 code) { | 44 | #endif |
| 755 | 45 | ||
| 756 | printk("%s.%s", events[type] ? events[type] : "?", | ||
| 757 | names[type] ? (names[type][code] ? names[type][code] : "?") : "?"); | ||
| 758 | } | ||
diff --git a/include/linux/hid.h b/include/linux/hid.h index 342b4e639acb..d26b08f461f2 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
| @@ -264,6 +264,9 @@ struct hid_item { | |||
| 264 | #define HID_QUIRK_INVERT_HWHEEL 0x00004000 | 264 | #define HID_QUIRK_INVERT_HWHEEL 0x00004000 |
| 265 | #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00008000 | 265 | #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00008000 |
| 266 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 | 266 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 |
| 267 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 | ||
| 268 | #define HID_QUIRK_IGNORE_MOUSE 0x00040000 | ||
| 269 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 | ||
| 267 | 270 | ||
| 268 | /* | 271 | /* |
| 269 | * This is the global environment of the parser. This information is | 272 | * This is the global environment of the parser. This information is |
| @@ -430,8 +433,8 @@ struct hid_device { /* device report descriptor */ | |||
| 430 | 433 | ||
| 431 | /* device-specific function pointers */ | 434 | /* device-specific function pointers */ |
| 432 | int (*hidinput_input_event) (struct input_dev *, unsigned int, unsigned int, int); | 435 | int (*hidinput_input_event) (struct input_dev *, unsigned int, unsigned int, int); |
| 433 | int (*hidinput_open) (struct input_dev *); | 436 | int (*hid_open) (struct hid_device *); |
| 434 | void (*hidinput_close) (struct input_dev *); | 437 | void (*hid_close) (struct hid_device *); |
| 435 | 438 | ||
| 436 | /* hiddev event handler */ | 439 | /* hiddev event handler */ |
| 437 | void (*hiddev_hid_event) (struct hid_device *, struct hid_field *field, | 440 | void (*hiddev_hid_event) (struct hid_device *, struct hid_field *field, |
| @@ -471,16 +474,6 @@ struct hid_descriptor { | |||
| 471 | struct hid_class_descriptor desc[1]; | 474 | struct hid_class_descriptor desc[1]; |
| 472 | } __attribute__ ((packed)); | 475 | } __attribute__ ((packed)); |
| 473 | 476 | ||
| 474 | #ifdef DEBUG | ||
| 475 | #include "hid-debug.h" | ||
| 476 | #else | ||
| 477 | #define hid_dump_input(a,b) do { } while (0) | ||
| 478 | #define hid_dump_device(c) do { } while (0) | ||
| 479 | #define hid_dump_field(a,b) do { } while (0) | ||
| 480 | #define resolv_usage(a) do { } while (0) | ||
| 481 | #define resolv_event(a,b) do { } while (0) | ||
| 482 | #endif | ||
| 483 | |||
| 484 | /* Applications from HID Usage Tables 4/8/99 Version 1.1 */ | 477 | /* Applications from HID Usage Tables 4/8/99 Version 1.1 */ |
| 485 | /* We ignore a few input applications that are not widely used */ | 478 | /* We ignore a few input applications that are not widely used */ |
| 486 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) | 479 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) |
| @@ -503,6 +496,7 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size); | |||
| 503 | int hid_ff_init(struct hid_device *hid); | 496 | int hid_ff_init(struct hid_device *hid); |
| 504 | 497 | ||
| 505 | int hid_lgff_init(struct hid_device *hid); | 498 | int hid_lgff_init(struct hid_device *hid); |
| 499 | int hid_plff_init(struct hid_device *hid); | ||
| 506 | int hid_tmff_init(struct hid_device *hid); | 500 | int hid_tmff_init(struct hid_device *hid); |
| 507 | int hid_zpff_init(struct hid_device *hid); | 501 | int hid_zpff_init(struct hid_device *hid); |
| 508 | #ifdef CONFIG_HID_PID | 502 | #ifdef CONFIG_HID_PID |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index d38778f2fbec..6e7ec4c76178 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
| @@ -115,6 +115,8 @@ | |||
| 115 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ | 115 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ |
| 116 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ | 116 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ |
| 117 | #define I2C_DRIVERID_ISL1208 88 /* Intersil ISL1208 RTC */ | 117 | #define I2C_DRIVERID_ISL1208 88 /* Intersil ISL1208 RTC */ |
| 118 | #define I2C_DRIVERID_WM8731 89 /* Wolfson WM8731 audio codec */ | ||
| 119 | #define I2C_DRIVERID_WM8750 90 /* Wolfson WM8750 audio codec */ | ||
| 118 | 120 | ||
| 119 | #define I2C_DRIVERID_I2CDEV 900 | 121 | #define I2C_DRIVERID_I2CDEV 900 |
| 120 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | 122 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index e26a03981a94..04e0fa97ac99 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
| @@ -18,6 +18,9 @@ | |||
| 18 | #include <linux/device.h> | 18 | #include <linux/device.h> |
| 19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
| 20 | #include <linux/completion.h> | 20 | #include <linux/completion.h> |
| 21 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
| 22 | #include <acpi/acpi.h> | ||
| 23 | #endif | ||
| 21 | #include <asm/byteorder.h> | 24 | #include <asm/byteorder.h> |
| 22 | #include <asm/system.h> | 25 | #include <asm/system.h> |
| 23 | #include <asm/io.h> | 26 | #include <asm/io.h> |
| @@ -541,6 +544,11 @@ typedef enum { | |||
| 541 | struct ide_driver_s; | 544 | struct ide_driver_s; |
| 542 | struct ide_settings_s; | 545 | struct ide_settings_s; |
| 543 | 546 | ||
| 547 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
| 548 | struct ide_acpi_drive_link; | ||
| 549 | struct ide_acpi_hwif_link; | ||
| 550 | #endif | ||
| 551 | |||
| 544 | typedef struct ide_drive_s { | 552 | typedef struct ide_drive_s { |
| 545 | char name[4]; /* drive name, such as "hda" */ | 553 | char name[4]; /* drive name, such as "hda" */ |
| 546 | char driver_req[10]; /* requests specific driver */ | 554 | char driver_req[10]; /* requests specific driver */ |
| @@ -637,6 +645,9 @@ typedef struct ide_drive_s { | |||
| 637 | 645 | ||
| 638 | int lun; /* logical unit */ | 646 | int lun; /* logical unit */ |
| 639 | int crc_count; /* crc counter to reduce drive speed */ | 647 | int crc_count; /* crc counter to reduce drive speed */ |
| 648 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
| 649 | struct ide_acpi_drive_link *acpidata; | ||
| 650 | #endif | ||
| 640 | struct list_head list; | 651 | struct list_head list; |
| 641 | struct device gendev; | 652 | struct device gendev; |
| 642 | struct completion gendev_rel_comp; /* to deal with device release() */ | 653 | struct completion gendev_rel_comp; /* to deal with device release() */ |
| @@ -804,6 +815,10 @@ typedef struct hwif_s { | |||
| 804 | void *hwif_data; /* extra hwif data */ | 815 | void *hwif_data; /* extra hwif data */ |
| 805 | 816 | ||
| 806 | unsigned dma; | 817 | unsigned dma; |
| 818 | |||
| 819 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
| 820 | struct ide_acpi_hwif_link *acpidata; | ||
| 821 | #endif | ||
| 807 | } ____cacheline_internodealigned_in_smp ide_hwif_t; | 822 | } ____cacheline_internodealigned_in_smp ide_hwif_t; |
| 808 | 823 | ||
| 809 | /* | 824 | /* |
| @@ -1192,8 +1207,8 @@ void ide_init_disk(struct gendisk *, ide_drive_t *); | |||
| 1192 | extern int ideprobe_init(void); | 1207 | extern int ideprobe_init(void); |
| 1193 | 1208 | ||
| 1194 | extern void ide_scan_pcibus(int scan_direction) __init; | 1209 | extern void ide_scan_pcibus(int scan_direction) __init; |
| 1195 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner); | 1210 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name); |
| 1196 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE) | 1211 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME) |
| 1197 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); | 1212 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); |
| 1198 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); | 1213 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); |
| 1199 | 1214 | ||
| @@ -1298,6 +1313,18 @@ static inline void ide_dma_verbose(ide_drive_t *drive) { ; } | |||
| 1298 | static inline void ide_release_dma(ide_hwif_t *drive) {;} | 1313 | static inline void ide_release_dma(ide_hwif_t *drive) {;} |
| 1299 | #endif | 1314 | #endif |
| 1300 | 1315 | ||
| 1316 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
| 1317 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); | ||
| 1318 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); | ||
| 1319 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); | ||
| 1320 | extern void ide_acpi_init(ide_hwif_t *hwif); | ||
| 1321 | #else | ||
| 1322 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } | ||
| 1323 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } | ||
| 1324 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } | ||
| 1325 | static inline void ide_acpi_init(ide_hwif_t *hwif) { ; } | ||
| 1326 | #endif | ||
| 1327 | |||
| 1301 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); | 1328 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); |
| 1302 | extern void ide_hwif_release_regions(ide_hwif_t* hwif); | 1329 | extern void ide_hwif_release_regions(ide_hwif_t* hwif); |
| 1303 | extern void ide_unregister (unsigned int index); | 1330 | extern void ide_unregister (unsigned int index); |
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h index 99393ef3af39..f3de05c30678 100644 --- a/include/linux/if_packet.h +++ b/include/linux/if_packet.h | |||
| @@ -41,6 +41,7 @@ struct sockaddr_ll | |||
| 41 | #define PACKET_RX_RING 5 | 41 | #define PACKET_RX_RING 5 |
| 42 | #define PACKET_STATISTICS 6 | 42 | #define PACKET_STATISTICS 6 |
| 43 | #define PACKET_COPY_THRESH 7 | 43 | #define PACKET_COPY_THRESH 7 |
| 44 | #define PACKET_AUXDATA 8 | ||
| 44 | 45 | ||
| 45 | struct tpacket_stats | 46 | struct tpacket_stats |
| 46 | { | 47 | { |
| @@ -48,6 +49,15 @@ struct tpacket_stats | |||
| 48 | unsigned int tp_drops; | 49 | unsigned int tp_drops; |
| 49 | }; | 50 | }; |
| 50 | 51 | ||
| 52 | struct tpacket_auxdata | ||
| 53 | { | ||
| 54 | __u32 tp_status; | ||
| 55 | __u32 tp_len; | ||
| 56 | __u32 tp_snaplen; | ||
| 57 | __u16 tp_mac; | ||
| 58 | __u16 tp_net; | ||
| 59 | }; | ||
| 60 | |||
| 51 | struct tpacket_hdr | 61 | struct tpacket_hdr |
| 52 | { | 62 | { |
| 53 | unsigned long tp_status; | 63 | unsigned long tp_status; |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index e36e86c869fb..5a8ba0b8ccba 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
| 13 | #include <linux/irqflags.h> | 13 | #include <linux/irqflags.h> |
| 14 | #include <linux/bottom_half.h> | 14 | #include <linux/bottom_half.h> |
| 15 | #include <linux/device.h> | ||
| 15 | #include <asm/atomic.h> | 16 | #include <asm/atomic.h> |
| 16 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
| 17 | #include <asm/system.h> | 18 | #include <asm/system.h> |
| @@ -83,6 +84,11 @@ extern int request_irq(unsigned int, irq_handler_t handler, | |||
| 83 | unsigned long, const char *, void *); | 84 | unsigned long, const char *, void *); |
| 84 | extern void free_irq(unsigned int, void *); | 85 | extern void free_irq(unsigned int, void *); |
| 85 | 86 | ||
| 87 | extern int devm_request_irq(struct device *dev, unsigned int irq, | ||
| 88 | irq_handler_t handler, unsigned long irqflags, | ||
| 89 | const char *devname, void *dev_id); | ||
| 90 | extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id); | ||
| 91 | |||
| 86 | /* | 92 | /* |
| 87 | * On lockdep we dont want to enable hardirqs in hardirq | 93 | * On lockdep we dont want to enable hardirqs in hardirq |
| 88 | * context. Use local_irq_enable_in_hardirq() to annotate | 94 | * context. Use local_irq_enable_in_hardirq() to annotate |
diff --git a/include/linux/io.h b/include/linux/io.h index 81877ea39309..9e419ebfc98b 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
| @@ -22,12 +22,33 @@ | |||
| 22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
| 23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
| 24 | 24 | ||
| 25 | struct device; | ||
| 26 | |||
| 25 | void __iowrite32_copy(void __iomem *to, const void *from, size_t count); | 27 | void __iowrite32_copy(void __iomem *to, const void *from, size_t count); |
| 26 | void __iowrite64_copy(void __iomem *to, const void *from, size_t count); | 28 | void __iowrite64_copy(void __iomem *to, const void *from, size_t count); |
| 27 | 29 | ||
| 28 | int ioremap_page_range(unsigned long addr, unsigned long end, | 30 | int ioremap_page_range(unsigned long addr, unsigned long end, |
| 29 | unsigned long phys_addr, pgprot_t prot); | 31 | unsigned long phys_addr, pgprot_t prot); |
| 30 | 32 | ||
| 33 | /* | ||
| 34 | * Managed iomap interface | ||
| 35 | */ | ||
| 36 | void __iomem * devm_ioport_map(struct device *dev, unsigned long port, | ||
| 37 | unsigned int nr); | ||
| 38 | void devm_ioport_unmap(struct device *dev, void __iomem *addr); | ||
| 39 | |||
| 40 | void __iomem * devm_ioremap(struct device *dev, unsigned long offset, | ||
| 41 | unsigned long size); | ||
| 42 | void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, | ||
| 43 | unsigned long size); | ||
| 44 | void devm_iounmap(struct device *dev, void __iomem *addr); | ||
| 45 | |||
| 46 | void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); | ||
| 47 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); | ||
| 48 | void __iomem * const * pcim_iomap_table(struct pci_dev *pdev); | ||
| 49 | |||
| 50 | int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); | ||
| 51 | |||
| 31 | /** | 52 | /** |
| 32 | * check_signature - find BIOS signatures | 53 | * check_signature - find BIOS signatures |
| 33 | * @io_addr: mmio address to check | 54 | * @io_addr: mmio address to check |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 15228d79c5bc..6859a3b14088 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
| @@ -137,4 +137,24 @@ static inline int __deprecated check_region(resource_size_t s, | |||
| 137 | { | 137 | { |
| 138 | return __check_region(&ioport_resource, s, n); | 138 | return __check_region(&ioport_resource, s, n); |
| 139 | } | 139 | } |
| 140 | |||
| 141 | /* Wrappers for managed devices */ | ||
| 142 | struct device; | ||
| 143 | #define devm_request_region(dev,start,n,name) \ | ||
| 144 | __devm_request_region(dev, &ioport_resource, (start), (n), (name)) | ||
| 145 | #define devm_request_mem_region(dev,start,n,name) \ | ||
| 146 | __devm_request_region(dev, &iomem_resource, (start), (n), (name)) | ||
| 147 | |||
| 148 | extern struct resource * __devm_request_region(struct device *dev, | ||
| 149 | struct resource *parent, resource_size_t start, | ||
| 150 | resource_size_t n, const char *name); | ||
| 151 | |||
| 152 | #define devm_release_region(start,n) \ | ||
| 153 | __devm_release_region(dev, &ioport_resource, (start), (n)) | ||
| 154 | #define devm_release_mem_region(start,n) \ | ||
| 155 | __devm_release_region(dev, &iomem_resource, (start), (n)) | ||
| 156 | |||
| 157 | extern void __devm_release_region(struct device *dev, struct resource *parent, | ||
| 158 | resource_size_t start, resource_size_t n); | ||
| 159 | |||
| 140 | #endif /* _LINUX_IOPORT_H */ | 160 | #endif /* _LINUX_IOPORT_H */ |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 52fc4052a0ae..5504b671357f 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -68,6 +68,7 @@ typedef void fastcall (*irq_flow_handler_t)(unsigned int irq, | |||
| 68 | #define IRQ_MOVE_PENDING 0x40000000 /* need to re-target IRQ destination */ | 68 | #define IRQ_MOVE_PENDING 0x40000000 /* need to re-target IRQ destination */ |
| 69 | 69 | ||
| 70 | struct proc_dir_entry; | 70 | struct proc_dir_entry; |
| 71 | struct msi_desc; | ||
| 71 | 72 | ||
| 72 | /** | 73 | /** |
| 73 | * struct irq_chip - hardware interrupt chip descriptor | 74 | * struct irq_chip - hardware interrupt chip descriptor |
| @@ -148,6 +149,7 @@ struct irq_chip { | |||
| 148 | struct irq_desc { | 149 | struct irq_desc { |
| 149 | irq_flow_handler_t handle_irq; | 150 | irq_flow_handler_t handle_irq; |
| 150 | struct irq_chip *chip; | 151 | struct irq_chip *chip; |
| 152 | struct msi_desc *msi_desc; | ||
| 151 | void *handler_data; | 153 | void *handler_data; |
| 152 | void *chip_data; | 154 | void *chip_data; |
| 153 | struct irqaction *action; /* IRQ action list */ | 155 | struct irqaction *action; /* IRQ action list */ |
| @@ -373,10 +375,12 @@ extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); | |||
| 373 | extern int set_irq_data(unsigned int irq, void *data); | 375 | extern int set_irq_data(unsigned int irq, void *data); |
| 374 | extern int set_irq_chip_data(unsigned int irq, void *data); | 376 | extern int set_irq_chip_data(unsigned int irq, void *data); |
| 375 | extern int set_irq_type(unsigned int irq, unsigned int type); | 377 | extern int set_irq_type(unsigned int irq, unsigned int type); |
| 378 | extern int set_irq_msi(unsigned int irq, struct msi_desc *entry); | ||
| 376 | 379 | ||
| 377 | #define get_irq_chip(irq) (irq_desc[irq].chip) | 380 | #define get_irq_chip(irq) (irq_desc[irq].chip) |
| 378 | #define get_irq_chip_data(irq) (irq_desc[irq].chip_data) | 381 | #define get_irq_chip_data(irq) (irq_desc[irq].chip_data) |
| 379 | #define get_irq_data(irq) (irq_desc[irq].handler_data) | 382 | #define get_irq_data(irq) (irq_desc[irq].handler_data) |
| 383 | #define get_irq_msi(irq) (irq_desc[irq].msi_desc) | ||
| 380 | 384 | ||
| 381 | #endif /* CONFIG_GENERIC_HARDIRQS */ | 385 | #endif /* CONFIG_GENERIC_HARDIRQS */ |
| 382 | 386 | ||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 76538fcf2c4e..b850e0310538 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -74,9 +74,13 @@ extern void kobject_init(struct kobject *); | |||
| 74 | extern void kobject_cleanup(struct kobject *); | 74 | extern void kobject_cleanup(struct kobject *); |
| 75 | 75 | ||
| 76 | extern int __must_check kobject_add(struct kobject *); | 76 | extern int __must_check kobject_add(struct kobject *); |
| 77 | extern int __must_check kobject_shadow_add(struct kobject *, struct dentry *); | ||
| 77 | extern void kobject_del(struct kobject *); | 78 | extern void kobject_del(struct kobject *); |
| 78 | 79 | ||
| 79 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); | 80 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); |
| 81 | extern int __must_check kobject_shadow_rename(struct kobject *kobj, | ||
| 82 | struct dentry *new_parent, | ||
| 83 | const char *new_name); | ||
| 80 | extern int __must_check kobject_move(struct kobject *, struct kobject *); | 84 | extern int __must_check kobject_move(struct kobject *, struct kobject *); |
| 81 | 85 | ||
| 82 | extern int __must_check kobject_register(struct kobject *); | 86 | extern int __must_check kobject_register(struct kobject *); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 91bb8ceef0b5..596e0c18887d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
| 32 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
| 33 | #include <asm/scatterlist.h> | 33 | #include <asm/scatterlist.h> |
| 34 | #include <asm/io.h> | 34 | #include <linux/io.h> |
| 35 | #include <linux/ata.h> | 35 | #include <linux/ata.h> |
| 36 | #include <linux/workqueue.h> | 36 | #include <linux/workqueue.h> |
| 37 | #include <scsi/scsi_host.h> | 37 | #include <scsi/scsi_host.h> |
| @@ -54,8 +54,6 @@ | |||
| 54 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ | 54 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ |
| 55 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ | 55 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ |
| 56 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ | 56 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ |
| 57 | #define ATA_ENABLE_PATA /* define to enable PATA support in some | ||
| 58 | * low-level drivers */ | ||
| 59 | 57 | ||
| 60 | 58 | ||
| 61 | /* note: prints function name for you */ | 59 | /* note: prints function name for you */ |
| @@ -109,10 +107,6 @@ static inline u32 ata_msg_init(int dval, int default_msg_enable_bits) | |||
| 109 | #define ATA_TAG_POISON 0xfafbfcfdU | 107 | #define ATA_TAG_POISON 0xfafbfcfdU |
| 110 | 108 | ||
| 111 | /* move to PCI layer? */ | 109 | /* move to PCI layer? */ |
| 112 | #define PCI_VDEVICE(vendor, device) \ | ||
| 113 | PCI_VENDOR_ID_##vendor, (device), \ | ||
| 114 | PCI_ANY_ID, PCI_ANY_ID, 0, 0 | ||
| 115 | |||
| 116 | static inline struct device *pci_dev_to_dev(struct pci_dev *pdev) | 110 | static inline struct device *pci_dev_to_dev(struct pci_dev *pdev) |
| 117 | { | 111 | { |
| 118 | return &pdev->dev; | 112 | return &pdev->dev; |
| @@ -308,7 +302,7 @@ enum { | |||
| 308 | * most devices. | 302 | * most devices. |
| 309 | */ | 303 | */ |
| 310 | ATA_SPINUP_WAIT = 8000, | 304 | ATA_SPINUP_WAIT = 8000, |
| 311 | 305 | ||
| 312 | /* Horkage types. May be set by libata or controller on drives | 306 | /* Horkage types. May be set by libata or controller on drives |
| 313 | (some horkage may be drive/controller pair dependant */ | 307 | (some horkage may be drive/controller pair dependant */ |
| 314 | 308 | ||
| @@ -352,21 +346,21 @@ typedef int (*ata_reset_fn_t)(struct ata_port *ap, unsigned int *classes); | |||
| 352 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes); | 346 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes); |
| 353 | 347 | ||
| 354 | struct ata_ioports { | 348 | struct ata_ioports { |
| 355 | unsigned long cmd_addr; | 349 | void __iomem *cmd_addr; |
| 356 | unsigned long data_addr; | 350 | void __iomem *data_addr; |
| 357 | unsigned long error_addr; | 351 | void __iomem *error_addr; |
| 358 | unsigned long feature_addr; | 352 | void __iomem *feature_addr; |
| 359 | unsigned long nsect_addr; | 353 | void __iomem *nsect_addr; |
| 360 | unsigned long lbal_addr; | 354 | void __iomem *lbal_addr; |
| 361 | unsigned long lbam_addr; | 355 | void __iomem *lbam_addr; |
| 362 | unsigned long lbah_addr; | 356 | void __iomem *lbah_addr; |
| 363 | unsigned long device_addr; | 357 | void __iomem *device_addr; |
| 364 | unsigned long status_addr; | 358 | void __iomem *status_addr; |
| 365 | unsigned long command_addr; | 359 | void __iomem *command_addr; |
| 366 | unsigned long altstatus_addr; | 360 | void __iomem *altstatus_addr; |
| 367 | unsigned long ctl_addr; | 361 | void __iomem *ctl_addr; |
| 368 | unsigned long bmdma_addr; | 362 | void __iomem *bmdma_addr; |
| 369 | unsigned long scr_addr; | 363 | void __iomem *scr_addr; |
| 370 | }; | 364 | }; |
| 371 | 365 | ||
| 372 | struct ata_probe_ent { | 366 | struct ata_probe_ent { |
| @@ -385,7 +379,7 @@ struct ata_probe_ent { | |||
| 385 | unsigned int irq_flags; | 379 | unsigned int irq_flags; |
| 386 | unsigned long port_flags; | 380 | unsigned long port_flags; |
| 387 | unsigned long _host_flags; | 381 | unsigned long _host_flags; |
| 388 | void __iomem *mmio_base; | 382 | void __iomem * const *iomap; |
| 389 | void *private_data; | 383 | void *private_data; |
| 390 | 384 | ||
| 391 | /* port_info for the secondary port. Together with irq2, it's | 385 | /* port_info for the secondary port. Together with irq2, it's |
| @@ -402,7 +396,7 @@ struct ata_host { | |||
| 402 | struct device *dev; | 396 | struct device *dev; |
| 403 | unsigned long irq; | 397 | unsigned long irq; |
| 404 | unsigned long irq2; | 398 | unsigned long irq2; |
| 405 | void __iomem *mmio_base; | 399 | void __iomem * const *iomap; |
| 406 | unsigned int n_ports; | 400 | unsigned int n_ports; |
| 407 | void *private_data; | 401 | void *private_data; |
| 408 | const struct ata_port_operations *ops; | 402 | const struct ata_port_operations *ops; |
| @@ -431,9 +425,6 @@ struct ata_queued_cmd { | |||
| 431 | 425 | ||
| 432 | unsigned int pad_len; | 426 | unsigned int pad_len; |
| 433 | 427 | ||
| 434 | unsigned int nsect; | ||
| 435 | unsigned int cursect; | ||
| 436 | |||
| 437 | unsigned int nbytes; | 428 | unsigned int nbytes; |
| 438 | unsigned int curbytes; | 429 | unsigned int curbytes; |
| 439 | 430 | ||
| @@ -639,6 +630,8 @@ struct ata_port_operations { | |||
| 639 | 630 | ||
| 640 | irq_handler_t irq_handler; | 631 | irq_handler_t irq_handler; |
| 641 | void (*irq_clear) (struct ata_port *); | 632 | void (*irq_clear) (struct ata_port *); |
| 633 | u8 (*irq_on) (struct ata_port *); | ||
| 634 | u8 (*irq_ack) (struct ata_port *ap, unsigned int chk_drq); | ||
| 642 | 635 | ||
| 643 | u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); | 636 | u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); |
| 644 | void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, | 637 | void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, |
| @@ -720,20 +713,18 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i | |||
| 720 | unsigned int n_ports); | 713 | unsigned int n_ports); |
| 721 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 714 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
| 722 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); | 715 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); |
| 723 | extern void ata_pci_device_do_resume(struct pci_dev *pdev); | 716 | extern int __must_check ata_pci_device_do_resume(struct pci_dev *pdev); |
| 724 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); | 717 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); |
| 725 | extern int ata_pci_device_resume(struct pci_dev *pdev); | 718 | extern int ata_pci_device_resume(struct pci_dev *pdev); |
| 726 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); | 719 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); |
| 727 | #endif /* CONFIG_PCI */ | 720 | #endif /* CONFIG_PCI */ |
| 728 | extern int ata_device_add(const struct ata_probe_ent *ent); | 721 | extern int ata_device_add(const struct ata_probe_ent *ent); |
| 729 | extern void ata_port_detach(struct ata_port *ap); | 722 | extern void ata_host_detach(struct ata_host *host); |
| 730 | extern void ata_host_init(struct ata_host *, struct device *, | 723 | extern void ata_host_init(struct ata_host *, struct device *, |
| 731 | unsigned long, const struct ata_port_operations *); | 724 | unsigned long, const struct ata_port_operations *); |
| 732 | extern void ata_host_remove(struct ata_host *host); | ||
| 733 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 725 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
| 734 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 726 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
| 735 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 727 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
| 736 | extern int ata_scsi_release(struct Scsi_Host *host); | ||
| 737 | extern void ata_sas_port_destroy(struct ata_port *); | 728 | extern void ata_sas_port_destroy(struct ata_port *); |
| 738 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, | 729 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, |
| 739 | struct ata_port_info *, struct Scsi_Host *); | 730 | struct ata_port_info *, struct Scsi_Host *); |
| @@ -776,15 +767,11 @@ extern u8 ata_check_status(struct ata_port *ap); | |||
| 776 | extern u8 ata_altstatus(struct ata_port *ap); | 767 | extern u8 ata_altstatus(struct ata_port *ap); |
| 777 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); | 768 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); |
| 778 | extern int ata_port_start (struct ata_port *ap); | 769 | extern int ata_port_start (struct ata_port *ap); |
| 779 | extern void ata_port_stop (struct ata_port *ap); | ||
| 780 | extern void ata_host_stop (struct ata_host *host); | ||
| 781 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance); | 770 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance); |
| 782 | extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, | 771 | extern void ata_data_xfer(struct ata_device *adev, unsigned char *buf, |
| 783 | unsigned int buflen, int write_data); | 772 | unsigned int buflen, int write_data); |
| 784 | extern void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf, | 773 | extern void ata_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, |
| 785 | unsigned int buflen, int write_data); | 774 | unsigned int buflen, int write_data); |
| 786 | extern void ata_pio_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, | ||
| 787 | unsigned int buflen, int write_data); | ||
| 788 | extern void ata_qc_prep(struct ata_queued_cmd *qc); | 775 | extern void ata_qc_prep(struct ata_queued_cmd *qc); |
| 789 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); | 776 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); |
| 790 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); | 777 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); |
| @@ -826,6 +813,10 @@ extern void ata_scsi_slave_destroy(struct scsi_device *sdev); | |||
| 826 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, | 813 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, |
| 827 | int queue_depth); | 814 | int queue_depth); |
| 828 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); | 815 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); |
| 816 | extern u8 ata_irq_on(struct ata_port *ap); | ||
| 817 | extern u8 ata_dummy_irq_on(struct ata_port *ap); | ||
| 818 | extern u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq); | ||
| 819 | extern u8 ata_dummy_irq_ack(struct ata_port *ap, unsigned int chk_drq); | ||
| 829 | 820 | ||
| 830 | /* | 821 | /* |
| 831 | * Timing helpers | 822 | * Timing helpers |
| @@ -864,7 +855,6 @@ struct pci_bits { | |||
| 864 | unsigned long val; | 855 | unsigned long val; |
| 865 | }; | 856 | }; |
| 866 | 857 | ||
| 867 | extern void ata_pci_host_stop (struct ata_host *host); | ||
| 868 | extern struct ata_probe_ent * | 858 | extern struct ata_probe_ent * |
| 869 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); | 859 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); |
| 870 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 860 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |
| @@ -1096,10 +1086,9 @@ static inline u8 ata_wait_idle(struct ata_port *ap) | |||
| 1096 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); | 1086 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); |
| 1097 | 1087 | ||
| 1098 | if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) { | 1088 | if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) { |
| 1099 | unsigned long l = ap->ioaddr.status_addr; | ||
| 1100 | if (ata_msg_warn(ap)) | 1089 | if (ata_msg_warn(ap)) |
| 1101 | printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%lX\n", | 1090 | printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%p\n", |
| 1102 | status, l); | 1091 | status, ap->ioaddr.status_addr); |
| 1103 | } | 1092 | } |
| 1104 | 1093 | ||
| 1105 | return status; | 1094 | return status; |
| @@ -1149,8 +1138,7 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc) | |||
| 1149 | qc->dma_dir = DMA_NONE; | 1138 | qc->dma_dir = DMA_NONE; |
| 1150 | qc->__sg = NULL; | 1139 | qc->__sg = NULL; |
| 1151 | qc->flags = 0; | 1140 | qc->flags = 0; |
| 1152 | qc->cursect = qc->cursg = qc->cursg_ofs = 0; | 1141 | qc->cursg = qc->cursg_ofs = 0; |
| 1153 | qc->nsect = 0; | ||
| 1154 | qc->nbytes = qc->curbytes = 0; | 1142 | qc->nbytes = qc->curbytes = 0; |
| 1155 | qc->n_elem = 0; | 1143 | qc->n_elem = 0; |
| 1156 | qc->err_mask = 0; | 1144 | qc->err_mask = 0; |
| @@ -1163,51 +1151,6 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc) | |||
| 1163 | qc->result_tf.feature = 0; | 1151 | qc->result_tf.feature = 0; |
| 1164 | } | 1152 | } |
| 1165 | 1153 | ||
| 1166 | /** | ||
| 1167 | * ata_irq_ack - Acknowledge a device interrupt. | ||
| 1168 | * @ap: Port on which interrupts are enabled. | ||
| 1169 | * | ||
| 1170 | * Wait up to 10 ms for legacy IDE device to become idle (BUSY | ||
| 1171 | * or BUSY+DRQ clear). Obtain dma status and port status from | ||
| 1172 | * device. Clear the interrupt. Return port status. | ||
| 1173 | * | ||
| 1174 | * LOCKING: | ||
| 1175 | */ | ||
| 1176 | |||
| 1177 | static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq) | ||
| 1178 | { | ||
| 1179 | unsigned int bits = chk_drq ? ATA_BUSY | ATA_DRQ : ATA_BUSY; | ||
| 1180 | u8 host_stat, post_stat, status; | ||
| 1181 | |||
| 1182 | status = ata_busy_wait(ap, bits, 1000); | ||
| 1183 | if (status & bits) | ||
| 1184 | if (ata_msg_err(ap)) | ||
| 1185 | printk(KERN_ERR "abnormal status 0x%X\n", status); | ||
| 1186 | |||
| 1187 | /* get controller status; clear intr, err bits */ | ||
| 1188 | if (ap->flags & ATA_FLAG_MMIO) { | ||
| 1189 | void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr; | ||
| 1190 | host_stat = readb(mmio + ATA_DMA_STATUS); | ||
| 1191 | writeb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR, | ||
| 1192 | mmio + ATA_DMA_STATUS); | ||
| 1193 | |||
| 1194 | post_stat = readb(mmio + ATA_DMA_STATUS); | ||
| 1195 | } else { | ||
| 1196 | host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); | ||
| 1197 | outb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR, | ||
| 1198 | ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); | ||
| 1199 | |||
| 1200 | post_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); | ||
| 1201 | } | ||
| 1202 | |||
| 1203 | if (ata_msg_intr(ap)) | ||
| 1204 | printk(KERN_INFO "%s: irq ack: host_stat 0x%X, new host_stat 0x%X, drv_stat 0x%X\n", | ||
| 1205 | __FUNCTION__, | ||
| 1206 | host_stat, post_stat, status); | ||
| 1207 | |||
| 1208 | return status; | ||
| 1209 | } | ||
| 1210 | |||
| 1211 | static inline int ata_try_flush_cache(const struct ata_device *dev) | 1154 | static inline int ata_try_flush_cache(const struct ata_device *dev) |
| 1212 | { | 1155 | { |
| 1213 | return ata_id_wcache_enabled(dev->id) || | 1156 | return ata_id_wcache_enabled(dev->id) || |
| @@ -1235,14 +1178,14 @@ static inline unsigned int __ac_err_mask(u8 status) | |||
| 1235 | static inline int ata_pad_alloc(struct ata_port *ap, struct device *dev) | 1178 | static inline int ata_pad_alloc(struct ata_port *ap, struct device *dev) |
| 1236 | { | 1179 | { |
| 1237 | ap->pad_dma = 0; | 1180 | ap->pad_dma = 0; |
| 1238 | ap->pad = dma_alloc_coherent(dev, ATA_DMA_PAD_BUF_SZ, | 1181 | ap->pad = dmam_alloc_coherent(dev, ATA_DMA_PAD_BUF_SZ, |
| 1239 | &ap->pad_dma, GFP_KERNEL); | 1182 | &ap->pad_dma, GFP_KERNEL); |
| 1240 | return (ap->pad == NULL) ? -ENOMEM : 0; | 1183 | return (ap->pad == NULL) ? -ENOMEM : 0; |
| 1241 | } | 1184 | } |
| 1242 | 1185 | ||
| 1243 | static inline void ata_pad_free(struct ata_port *ap, struct device *dev) | 1186 | static inline void ata_pad_free(struct ata_port *ap, struct device *dev) |
| 1244 | { | 1187 | { |
| 1245 | dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); | 1188 | dmam_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); |
| 1246 | } | 1189 | } |
| 1247 | 1190 | ||
| 1248 | static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) | 1191 | static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) |
diff --git a/include/linux/log2.h b/include/linux/log2.h index d02e1a547a7e..99922bedfcc9 100644 --- a/include/linux/log2.h +++ b/include/linux/log2.h | |||
| @@ -44,6 +44,17 @@ int __ilog2_u64(u64 n) | |||
| 44 | #endif | 44 | #endif |
| 45 | 45 | ||
| 46 | /* | 46 | /* |
| 47 | * Determine whether some value is a power of two, where zero is | ||
| 48 | * *not* considered a power of two. | ||
| 49 | */ | ||
| 50 | |||
| 51 | static inline __attribute__((const)) | ||
| 52 | bool is_power_of_2(unsigned long n) | ||
| 53 | { | ||
| 54 | return (n != 0 && ((n & (n - 1)) == 0)); | ||
| 55 | } | ||
| 56 | |||
| 57 | /* | ||
| 47 | * round up to nearest power of two | 58 | * round up to nearest power of two |
| 48 | */ | 59 | */ |
| 49 | static inline __attribute__((const)) | 60 | static inline __attribute__((const)) |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 2d2c08d5f473..bb793a4c8e9e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -1030,6 +1030,9 @@ extern struct vm_area_struct *copy_vma(struct vm_area_struct **, | |||
| 1030 | unsigned long addr, unsigned long len, pgoff_t pgoff); | 1030 | unsigned long addr, unsigned long len, pgoff_t pgoff); |
| 1031 | extern void exit_mmap(struct mm_struct *); | 1031 | extern void exit_mmap(struct mm_struct *); |
| 1032 | extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); | 1032 | extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); |
| 1033 | extern int install_special_mapping(struct mm_struct *mm, | ||
| 1034 | unsigned long addr, unsigned long len, | ||
| 1035 | unsigned long flags, struct page **pages); | ||
| 1033 | 1036 | ||
| 1034 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); | 1037 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); |
| 1035 | 1038 | ||
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index d0e6a5497614..e45712acfac5 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
| @@ -71,6 +71,7 @@ struct mmc_card { | |||
| 71 | #define MMC_STATE_SDCARD (1<<3) /* is an SD card */ | 71 | #define MMC_STATE_SDCARD (1<<3) /* is an SD card */ |
| 72 | #define MMC_STATE_READONLY (1<<4) /* card is read-only */ | 72 | #define MMC_STATE_READONLY (1<<4) /* card is read-only */ |
| 73 | #define MMC_STATE_HIGHSPEED (1<<5) /* card is in high speed mode */ | 73 | #define MMC_STATE_HIGHSPEED (1<<5) /* card is in high speed mode */ |
| 74 | #define MMC_STATE_BLOCKADDR (1<<6) /* card uses block-addressing */ | ||
| 74 | u32 raw_cid[4]; /* raw card CID */ | 75 | u32 raw_cid[4]; /* raw card CID */ |
| 75 | u32 raw_csd[4]; /* raw card CSD */ | 76 | u32 raw_csd[4]; /* raw card CSD */ |
| 76 | u32 raw_scr[2]; /* raw card SCR */ | 77 | u32 raw_scr[2]; /* raw card SCR */ |
| @@ -87,6 +88,7 @@ struct mmc_card { | |||
| 87 | #define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD) | 88 | #define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD) |
| 88 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) | 89 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) |
| 89 | #define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED) | 90 | #define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED) |
| 91 | #define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR) | ||
| 90 | 92 | ||
| 91 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) | 93 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) |
| 92 | #define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD) | 94 | #define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD) |
| @@ -94,6 +96,7 @@ struct mmc_card { | |||
| 94 | #define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD) | 96 | #define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD) |
| 95 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) | 97 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) |
| 96 | #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) | 98 | #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) |
| 99 | #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) | ||
| 97 | 100 | ||
| 98 | #define mmc_card_name(c) ((c)->cid.prod_name) | 101 | #define mmc_card_name(c) ((c)->cid.prod_name) |
| 99 | #define mmc_card_id(c) ((c)->dev.bus_id) | 102 | #define mmc_card_id(c) ((c)->dev.bus_id) |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index c15ae1986b98..913e5752569f 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -92,8 +92,10 @@ struct mmc_host { | |||
| 92 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | 92 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ |
| 93 | unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */ | 93 | unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */ |
| 94 | unsigned short max_phys_segs; /* see blk_queue_max_phys_segments */ | 94 | unsigned short max_phys_segs; /* see blk_queue_max_phys_segments */ |
| 95 | unsigned short max_sectors; /* see blk_queue_max_sectors */ | ||
| 96 | unsigned short unused; | 95 | unsigned short unused; |
| 96 | unsigned int max_req_size; /* maximum number of bytes in one req */ | ||
| 97 | unsigned int max_blk_size; /* maximum size of one mmc block */ | ||
| 98 | unsigned int max_blk_count; /* maximum number of blocks in one req */ | ||
| 97 | 99 | ||
| 98 | /* private data */ | 100 | /* private data */ |
| 99 | struct mmc_ios ios; /* current io bus settings */ | 101 | struct mmc_ios ios; /* current io bus settings */ |
| @@ -106,8 +108,9 @@ struct mmc_host { | |||
| 106 | struct list_head cards; /* devices attached to this host */ | 108 | struct list_head cards; /* devices attached to this host */ |
| 107 | 109 | ||
| 108 | wait_queue_head_t wq; | 110 | wait_queue_head_t wq; |
| 109 | spinlock_t lock; /* card_busy lock */ | 111 | spinlock_t lock; /* claimed lock */ |
| 110 | struct mmc_card *card_busy; /* the MMC card claiming host */ | 112 | unsigned int claimed:1; /* host exclusively claimed */ |
| 113 | |||
| 111 | struct mmc_card *card_selected; /* the selected MMC card */ | 114 | struct mmc_card *card_selected; /* the selected MMC card */ |
| 112 | 115 | ||
| 113 | struct delayed_work detect; | 116 | struct delayed_work detect; |
| @@ -126,6 +129,7 @@ static inline void *mmc_priv(struct mmc_host *host) | |||
| 126 | } | 129 | } |
| 127 | 130 | ||
| 128 | #define mmc_dev(x) ((x)->parent) | 131 | #define mmc_dev(x) ((x)->parent) |
| 132 | #define mmc_classdev(x) (&(x)->class_dev) | ||
| 129 | #define mmc_hostname(x) ((x)->class_dev.bus_id) | 133 | #define mmc_hostname(x) ((x)->class_dev.bus_id) |
| 130 | 134 | ||
| 131 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); | 135 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index bcf24909d677..cdc54be804f1 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
| @@ -43,6 +43,7 @@ struct mmc_command { | |||
| 43 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) | 43 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) |
| 44 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) | 44 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) |
| 45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) | 45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
| 46 | #define MMC_RSP_R7 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) | ||
| 46 | 47 | ||
| 47 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) | 48 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) |
| 48 | 49 | ||
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h index 2dce60c43f4b..c90b6768329d 100644 --- a/include/linux/mmc/protocol.h +++ b/include/linux/mmc/protocol.h | |||
| @@ -79,9 +79,12 @@ | |||
| 79 | #define MMC_GEN_CMD 56 /* adtc [0] RD/WR R1 */ | 79 | #define MMC_GEN_CMD 56 /* adtc [0] RD/WR R1 */ |
| 80 | 80 | ||
| 81 | /* SD commands type argument response */ | 81 | /* SD commands type argument response */ |
| 82 | /* class 8 */ | 82 | /* class 0 */ |
| 83 | /* This is basically the same command as for MMC with some quirks. */ | 83 | /* This is basically the same command as for MMC with some quirks. */ |
| 84 | #define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */ | 84 | #define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */ |
| 85 | #define SD_SEND_IF_COND 8 /* bcr [11:0] See below R7 */ | ||
| 86 | |||
| 87 | /* class 10 */ | ||
| 85 | #define SD_SWITCH 6 /* adtc [31:0] See below R1 */ | 88 | #define SD_SWITCH 6 /* adtc [31:0] See below R1 */ |
| 86 | 89 | ||
| 87 | /* Application commands */ | 90 | /* Application commands */ |
| @@ -115,6 +118,14 @@ | |||
| 115 | */ | 118 | */ |
| 116 | 119 | ||
| 117 | /* | 120 | /* |
| 121 | * SD_SEND_IF_COND argument format: | ||
| 122 | * | ||
| 123 | * [31:12] Reserved (0) | ||
| 124 | * [11:8] Host Voltage Supply Flags | ||
| 125 | * [7:0] Check Pattern (0xAA) | ||
| 126 | */ | ||
| 127 | |||
| 128 | /* | ||
| 118 | MMC status in R1 | 129 | MMC status in R1 |
| 119 | Type | 130 | Type |
| 120 | e : error bit | 131 | e : error bit |
diff --git a/include/linux/module.h b/include/linux/module.h index 10f771a49997..419d3ef293dd 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -58,6 +58,7 @@ struct module_kobject | |||
| 58 | { | 58 | { |
| 59 | struct kobject kobj; | 59 | struct kobject kobj; |
| 60 | struct module *mod; | 60 | struct module *mod; |
| 61 | struct kobject *drivers_dir; | ||
| 61 | }; | 62 | }; |
| 62 | 63 | ||
| 63 | /* These are either module local, or the kernel's dummy ones. */ | 64 | /* These are either module local, or the kernel's dummy ones. */ |
| @@ -263,7 +264,7 @@ struct module | |||
| 263 | struct module_attribute *modinfo_attrs; | 264 | struct module_attribute *modinfo_attrs; |
| 264 | const char *version; | 265 | const char *version; |
| 265 | const char *srcversion; | 266 | const char *srcversion; |
| 266 | struct kobject *drivers_dir; | 267 | struct kobject *holders_dir; |
| 267 | 268 | ||
| 268 | /* Exported symbols */ | 269 | /* Exported symbols */ |
| 269 | const struct kernel_symbol *syms; | 270 | const struct kernel_symbol *syms; |
diff --git a/include/linux/msi.h b/include/linux/msi.h index c7ef94343673..74c8a2ecc9dd 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
| @@ -7,11 +7,10 @@ struct msi_msg { | |||
| 7 | u32 data; /* 16 bits of msi message data */ | 7 | u32 data; /* 16 bits of msi message data */ |
| 8 | }; | 8 | }; |
| 9 | 9 | ||
| 10 | /* Heper functions */ | 10 | /* Helper functions */ |
| 11 | extern void mask_msi_irq(unsigned int irq); | 11 | extern void mask_msi_irq(unsigned int irq); |
| 12 | extern void unmask_msi_irq(unsigned int irq); | 12 | extern void unmask_msi_irq(unsigned int irq); |
| 13 | extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); | 13 | extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); |
| 14 | |||
| 15 | extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); | 14 | extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); |
| 16 | 15 | ||
| 17 | struct msi_desc { | 16 | struct msi_desc { |
| @@ -42,7 +41,7 @@ struct msi_desc { | |||
| 42 | /* | 41 | /* |
| 43 | * The arch hook for setup up msi irqs | 42 | * The arch hook for setup up msi irqs |
| 44 | */ | 43 | */ |
| 45 | int arch_setup_msi_irq(unsigned int irq, struct pci_dev *dev); | 44 | int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc); |
| 46 | void arch_teardown_msi_irq(unsigned int irq); | 45 | void arch_teardown_msi_irq(unsigned int irq); |
| 47 | 46 | ||
| 48 | 47 | ||
diff --git a/include/linux/net.h b/include/linux/net.h index f28d8a2e2c91..4db21e63d8d2 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | struct poll_table_struct; | 24 | struct poll_table_struct; |
| 25 | struct inode; | 25 | struct inode; |
| 26 | 26 | ||
| 27 | #define NPROTO 32 /* should be enough for now.. */ | 27 | #define NPROTO 33 /* should be enough for now.. */ |
| 28 | 28 | ||
| 29 | #define SYS_SOCKET 1 /* sys_socket(2) */ | 29 | #define SYS_SOCKET 1 /* sys_socket(2) */ |
| 30 | #define SYS_BIND 2 /* sys_bind(2) */ | 30 | #define SYS_BIND 2 /* sys_bind(2) */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index fea0d9db6846..1a528548cd1d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -529,10 +529,11 @@ struct net_device | |||
| 529 | struct net_bridge_port *br_port; | 529 | struct net_bridge_port *br_port; |
| 530 | 530 | ||
| 531 | /* class/net/name entry */ | 531 | /* class/net/name entry */ |
| 532 | struct class_device class_dev; | 532 | struct device dev; |
| 533 | /* space for optional statistics and wireless sysfs groups */ | 533 | /* space for optional statistics and wireless sysfs groups */ |
| 534 | struct attribute_group *sysfs_groups[3]; | 534 | struct attribute_group *sysfs_groups[3]; |
| 535 | }; | 535 | }; |
| 536 | #define to_net_dev(d) container_of(d, struct net_device, dev) | ||
| 536 | 537 | ||
| 537 | #define NETDEV_ALIGN 32 | 538 | #define NETDEV_ALIGN 32 |
| 538 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) | 539 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) |
| @@ -548,7 +549,7 @@ static inline void *netdev_priv(struct net_device *dev) | |||
| 548 | /* Set the sysfs physical device reference for the network logical device | 549 | /* Set the sysfs physical device reference for the network logical device |
| 549 | * if set prior to registration will cause a symlink during initialization. | 550 | * if set prior to registration will cause a symlink during initialization. |
| 550 | */ | 551 | */ |
| 551 | #define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev)) | 552 | #define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev)) |
| 552 | 553 | ||
| 553 | struct packet_type { | 554 | struct packet_type { |
| 554 | __be16 type; /* This is really htons(ether_type). */ | 555 | __be16 type; /* This is really htons(ether_type). */ |
| @@ -588,7 +589,7 @@ extern int dev_open(struct net_device *dev); | |||
| 588 | extern int dev_close(struct net_device *dev); | 589 | extern int dev_close(struct net_device *dev); |
| 589 | extern int dev_queue_xmit(struct sk_buff *skb); | 590 | extern int dev_queue_xmit(struct sk_buff *skb); |
| 590 | extern int register_netdevice(struct net_device *dev); | 591 | extern int register_netdevice(struct net_device *dev); |
| 591 | extern int unregister_netdevice(struct net_device *dev); | 592 | extern void unregister_netdevice(struct net_device *dev); |
| 592 | extern void free_netdev(struct net_device *dev); | 593 | extern void free_netdev(struct net_device *dev); |
| 593 | extern void synchronize_net(void); | 594 | extern void synchronize_net(void); |
| 594 | extern int register_netdevice_notifier(struct notifier_block *nb); | 595 | extern int register_netdevice_notifier(struct notifier_block *nb); |
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index 6328175a1c3a..43397a414cd6 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
| @@ -33,6 +33,7 @@ header-y += xt_tcpmss.h | |||
| 33 | header-y += xt_tcpudp.h | 33 | header-y += xt_tcpudp.h |
| 34 | header-y += xt_SECMARK.h | 34 | header-y += xt_SECMARK.h |
| 35 | header-y += xt_CONNSECMARK.h | 35 | header-y += xt_CONNSECMARK.h |
| 36 | header-y += xt_TCPMSS.h | ||
| 36 | 37 | ||
| 37 | unifdef-y += nf_conntrack_common.h | 38 | unifdef-y += nf_conntrack_common.h |
| 38 | unifdef-y += nf_conntrack_ftp.h | 39 | unifdef-y += nf_conntrack_ftp.h |
diff --git a/include/linux/netfilter/nf_conntrack_sane.h b/include/linux/netfilter/nf_conntrack_sane.h new file mode 100644 index 000000000000..4767d6e23e97 --- /dev/null +++ b/include/linux/netfilter/nf_conntrack_sane.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #ifndef _NF_CONNTRACK_SANE_H | ||
| 2 | #define _NF_CONNTRACK_SANE_H | ||
| 3 | /* SANE tracking. */ | ||
| 4 | |||
| 5 | #ifdef __KERNEL__ | ||
| 6 | |||
| 7 | #define SANE_PORT 6566 | ||
| 8 | |||
| 9 | enum sane_state { | ||
| 10 | SANE_STATE_NORMAL, | ||
| 11 | SANE_STATE_START_REQUESTED, | ||
| 12 | }; | ||
| 13 | |||
| 14 | /* This structure exists only once per master */ | ||
| 15 | struct nf_ct_sane_master { | ||
| 16 | enum sane_state state; | ||
| 17 | }; | ||
| 18 | |||
| 19 | #endif /* __KERNEL__ */ | ||
| 20 | |||
| 21 | #endif /* _NF_CONNTRACK_SANE_H */ | ||
diff --git a/include/linux/netfilter/nf_conntrack_tcp.h b/include/linux/netfilter/nf_conntrack_tcp.h index 2f4e98b90cc0..007af4c2770b 100644 --- a/include/linux/netfilter/nf_conntrack_tcp.h +++ b/include/linux/netfilter/nf_conntrack_tcp.h | |||
| @@ -27,6 +27,9 @@ enum tcp_conntrack { | |||
| 27 | /* This sender sent FIN first */ | 27 | /* This sender sent FIN first */ |
| 28 | #define IP_CT_TCP_FLAG_CLOSE_INIT 0x04 | 28 | #define IP_CT_TCP_FLAG_CLOSE_INIT 0x04 |
| 29 | 29 | ||
| 30 | /* Be liberal in window checking */ | ||
| 31 | #define IP_CT_TCP_FLAG_BE_LIBERAL 0x08 | ||
| 32 | |||
| 30 | #ifdef __KERNEL__ | 33 | #ifdef __KERNEL__ |
| 31 | 34 | ||
| 32 | struct ip_ct_tcp_state { | 35 | struct ip_ct_tcp_state { |
| @@ -34,7 +37,6 @@ struct ip_ct_tcp_state { | |||
| 34 | u_int32_t td_maxend; /* max of ack + max(win, 1) */ | 37 | u_int32_t td_maxend; /* max of ack + max(win, 1) */ |
| 35 | u_int32_t td_maxwin; /* max(win) */ | 38 | u_int32_t td_maxwin; /* max(win) */ |
| 36 | u_int8_t td_scale; /* window scale factor */ | 39 | u_int8_t td_scale; /* window scale factor */ |
| 37 | u_int8_t loose; /* used when connection picked up from the middle */ | ||
| 38 | u_int8_t flags; /* per direction options */ | 40 | u_int8_t flags; /* per direction options */ |
| 39 | }; | 41 | }; |
| 40 | 42 | ||
diff --git a/include/linux/netfilter/xt_TCPMSS.h b/include/linux/netfilter/xt_TCPMSS.h new file mode 100644 index 000000000000..53a292cd47f3 --- /dev/null +++ b/include/linux/netfilter/xt_TCPMSS.h | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | #ifndef _XT_TCPMSS_H | ||
| 2 | #define _XT_TCPMSS_H | ||
| 3 | |||
| 4 | struct xt_tcpmss_info { | ||
| 5 | u_int16_t mss; | ||
| 6 | }; | ||
| 7 | |||
| 8 | #define XT_TCPMSS_CLAMP_PMTU 0xffff | ||
| 9 | |||
| 10 | #endif /* _XT_TCPMSS_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ip_nat.h b/include/linux/netfilter_ipv4/ip_nat.h index bdf553620ca1..bbca89aab813 100644 --- a/include/linux/netfilter_ipv4/ip_nat.h +++ b/include/linux/netfilter_ipv4/ip_nat.h | |||
| @@ -16,6 +16,7 @@ enum ip_nat_manip_type | |||
| 16 | 16 | ||
| 17 | #define IP_NAT_RANGE_MAP_IPS 1 | 17 | #define IP_NAT_RANGE_MAP_IPS 1 |
| 18 | #define IP_NAT_RANGE_PROTO_SPECIFIED 2 | 18 | #define IP_NAT_RANGE_PROTO_SPECIFIED 2 |
| 19 | #define IP_NAT_RANGE_PROTO_RANDOM 4 /* add randomness to "port" selection */ | ||
| 19 | 20 | ||
| 20 | /* NAT sequence number modifications */ | 21 | /* NAT sequence number modifications */ |
| 21 | struct ip_nat_seq { | 22 | struct ip_nat_seq { |
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index 98d566c5e32a..9527296595cd 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
| @@ -272,25 +272,9 @@ ipt_get_target(struct ipt_entry *e) | |||
| 272 | #include <linux/init.h> | 272 | #include <linux/init.h> |
| 273 | extern void ipt_init(void) __init; | 273 | extern void ipt_init(void) __init; |
| 274 | 274 | ||
| 275 | #define ipt_register_target(tgt) \ | 275 | extern int ipt_register_table(struct xt_table *table, |
| 276 | ({ (tgt)->family = AF_INET; \ | ||
| 277 | xt_register_target(tgt); }) | ||
| 278 | #define ipt_unregister_target(tgt) xt_unregister_target(tgt) | ||
| 279 | |||
| 280 | #define ipt_register_match(mtch) \ | ||
| 281 | ({ (mtch)->family = AF_INET; \ | ||
| 282 | xt_register_match(mtch); }) | ||
| 283 | #define ipt_unregister_match(mtch) xt_unregister_match(mtch) | ||
| 284 | |||
| 285 | //#define ipt_register_table(tbl, repl) xt_register_table(AF_INET, tbl, repl) | ||
| 286 | //#define ipt_unregister_table(tbl) xt_unregister_table(AF_INET, tbl) | ||
| 287 | |||
| 288 | extern int ipt_register_table(struct ipt_table *table, | ||
| 289 | const struct ipt_replace *repl); | 276 | const struct ipt_replace *repl); |
| 290 | extern void ipt_unregister_table(struct ipt_table *table); | 277 | extern void ipt_unregister_table(struct xt_table *table); |
| 291 | |||
| 292 | /* net/sched/ipt.c: Gimme access to your targets! Gets target->me. */ | ||
| 293 | extern struct ipt_target *ipt_find_target(const char *name, u8 revision); | ||
| 294 | 278 | ||
| 295 | /* Standard entry. */ | 279 | /* Standard entry. */ |
| 296 | struct ipt_standard | 280 | struct ipt_standard |
| @@ -315,7 +299,7 @@ extern unsigned int ipt_do_table(struct sk_buff **pskb, | |||
| 315 | unsigned int hook, | 299 | unsigned int hook, |
| 316 | const struct net_device *in, | 300 | const struct net_device *in, |
| 317 | const struct net_device *out, | 301 | const struct net_device *out, |
| 318 | struct ipt_table *table); | 302 | struct xt_table *table); |
| 319 | 303 | ||
| 320 | #define IPT_ALIGN(s) XT_ALIGN(s) | 304 | #define IPT_ALIGN(s) XT_ALIGN(s) |
| 321 | 305 | ||
diff --git a/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/include/linux/netfilter_ipv4/ipt_TCPMSS.h index aadb39580cd3..7a850f945824 100644 --- a/include/linux/netfilter_ipv4/ipt_TCPMSS.h +++ b/include/linux/netfilter_ipv4/ipt_TCPMSS.h | |||
| @@ -1,10 +1,9 @@ | |||
| 1 | #ifndef _IPT_TCPMSS_H | 1 | #ifndef _IPT_TCPMSS_H |
| 2 | #define _IPT_TCPMSS_H | 2 | #define _IPT_TCPMSS_H |
| 3 | 3 | ||
| 4 | struct ipt_tcpmss_info { | 4 | #include <linux/netfilter/xt_TCPMSS.h> |
| 5 | u_int16_t mss; | ||
| 6 | }; | ||
| 7 | 5 | ||
| 8 | #define IPT_TCPMSS_CLAMP_PMTU 0xffff | 6 | #define ipt_tcpmss_info xt_tcpmss_info |
| 7 | #define IPT_TCPMSS_CLAMP_PMTU XT_TCPMSS_CLAMP_PMTU | ||
| 9 | 8 | ||
| 10 | #endif /*_IPT_TCPMSS_H*/ | 9 | #endif /*_IPT_TCPMSS_H*/ |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 4aed340401db..61aa10412fc8 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
| @@ -104,6 +104,25 @@ struct ip6t_entry | |||
| 104 | unsigned char elems[0]; | 104 | unsigned char elems[0]; |
| 105 | }; | 105 | }; |
| 106 | 106 | ||
| 107 | /* Standard entry */ | ||
| 108 | struct ip6t_standard | ||
| 109 | { | ||
| 110 | struct ip6t_entry entry; | ||
| 111 | struct ip6t_standard_target target; | ||
| 112 | }; | ||
| 113 | |||
| 114 | struct ip6t_error_target | ||
| 115 | { | ||
| 116 | struct ip6t_entry_target target; | ||
| 117 | char errorname[IP6T_FUNCTION_MAXNAMELEN]; | ||
| 118 | }; | ||
| 119 | |||
| 120 | struct ip6t_error | ||
| 121 | { | ||
| 122 | struct ip6t_entry entry; | ||
| 123 | struct ip6t_error_target target; | ||
| 124 | }; | ||
| 125 | |||
| 107 | /* | 126 | /* |
| 108 | * New IP firewall options for [gs]etsockopt at the RAW IP level. | 127 | * New IP firewall options for [gs]etsockopt at the RAW IP level. |
| 109 | * Unlike BSD Linux inherits IP options so you don't have to use | 128 | * Unlike BSD Linux inherits IP options so you don't have to use |
| @@ -286,24 +305,14 @@ ip6t_get_target(struct ip6t_entry *e) | |||
| 286 | #include <linux/init.h> | 305 | #include <linux/init.h> |
| 287 | extern void ip6t_init(void) __init; | 306 | extern void ip6t_init(void) __init; |
| 288 | 307 | ||
| 289 | #define ip6t_register_target(tgt) \ | 308 | extern int ip6t_register_table(struct xt_table *table, |
| 290 | ({ (tgt)->family = AF_INET6; \ | ||
| 291 | xt_register_target(tgt); }) | ||
| 292 | #define ip6t_unregister_target(tgt) xt_unregister_target(tgt) | ||
| 293 | |||
| 294 | #define ip6t_register_match(match) \ | ||
| 295 | ({ (match)->family = AF_INET6; \ | ||
| 296 | xt_register_match(match); }) | ||
| 297 | #define ip6t_unregister_match(match) xt_unregister_match(match) | ||
| 298 | |||
| 299 | extern int ip6t_register_table(struct ip6t_table *table, | ||
| 300 | const struct ip6t_replace *repl); | 309 | const struct ip6t_replace *repl); |
| 301 | extern void ip6t_unregister_table(struct ip6t_table *table); | 310 | extern void ip6t_unregister_table(struct xt_table *table); |
| 302 | extern unsigned int ip6t_do_table(struct sk_buff **pskb, | 311 | extern unsigned int ip6t_do_table(struct sk_buff **pskb, |
| 303 | unsigned int hook, | 312 | unsigned int hook, |
| 304 | const struct net_device *in, | 313 | const struct net_device *in, |
| 305 | const struct net_device *out, | 314 | const struct net_device *out, |
| 306 | struct ip6t_table *table); | 315 | struct xt_table *table); |
| 307 | 316 | ||
| 308 | /* Check for an extension */ | 317 | /* Check for an extension */ |
| 309 | extern int ip6t_ext_hdr(u8 nexthdr); | 318 | extern int ip6t_ext_hdr(u8 nexthdr); |
diff --git a/include/linux/netfilter_ipv6/ip6t_mh.h b/include/linux/netfilter_ipv6/ip6t_mh.h new file mode 100644 index 000000000000..b9ca9a5f74d0 --- /dev/null +++ b/include/linux/netfilter_ipv6/ip6t_mh.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #ifndef _IP6T_MH_H | ||
| 2 | #define _IP6T_MH_H | ||
| 3 | |||
| 4 | /* MH matching stuff */ | ||
| 5 | struct ip6t_mh | ||
| 6 | { | ||
| 7 | u_int8_t types[2]; /* MH type range */ | ||
| 8 | u_int8_t invflags; /* Inverse flags */ | ||
| 9 | }; | ||
| 10 | |||
| 11 | /* Values for "invflags" field in struct ip6t_mh. */ | ||
| 12 | #define IP6T_MH_INV_TYPE 0x01 /* Invert the sense of type. */ | ||
| 13 | #define IP6T_MH_INV_MASK 0x01 /* All possible flags. */ | ||
| 14 | |||
| 15 | #endif /*_IP6T_MH_H*/ | ||
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index c3e255bf8594..7a8dcb82a699 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
| @@ -76,8 +76,6 @@ extern struct page * find_get_page(struct address_space *mapping, | |||
| 76 | unsigned long index); | 76 | unsigned long index); |
| 77 | extern struct page * find_lock_page(struct address_space *mapping, | 77 | extern struct page * find_lock_page(struct address_space *mapping, |
| 78 | unsigned long index); | 78 | unsigned long index); |
| 79 | extern __deprecated_for_modules struct page * find_trylock_page( | ||
| 80 | struct address_space *mapping, unsigned long index); | ||
| 81 | extern struct page * find_or_create_page(struct address_space *mapping, | 79 | extern struct page * find_or_create_page(struct address_space *mapping, |
| 82 | unsigned long index, gfp_t gfp_mask); | 80 | unsigned long index, gfp_t gfp_mask); |
| 83 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, | 81 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, |
diff --git a/include/linux/pci.h b/include/linux/pci.h index f3c617eabd8d..9e3042e7e1cc 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -167,6 +167,7 @@ struct pci_dev { | |||
| 167 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ | 167 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ |
| 168 | unsigned int msi_enabled:1; | 168 | unsigned int msi_enabled:1; |
| 169 | unsigned int msix_enabled:1; | 169 | unsigned int msix_enabled:1; |
| 170 | unsigned int is_managed:1; | ||
| 170 | atomic_t enable_cnt; /* pci_enable_device has been called */ | 171 | atomic_t enable_cnt; /* pci_enable_device has been called */ |
| 171 | 172 | ||
| 172 | u32 saved_config_space[16]; /* config space saved at suspend time */ | 173 | u32 saved_config_space[16]; /* config space saved at suspend time */ |
| @@ -174,6 +175,9 @@ struct pci_dev { | |||
| 174 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ | 175 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ |
| 175 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ | 176 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ |
| 176 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 177 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
| 178 | #ifdef CONFIG_PCI_MSI | ||
| 179 | unsigned int first_msi_irq; | ||
| 180 | #endif | ||
| 177 | }; | 181 | }; |
| 178 | 182 | ||
| 179 | #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) | 183 | #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) |
| @@ -181,6 +185,11 @@ struct pci_dev { | |||
| 181 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 185 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
| 182 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) | 186 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) |
| 183 | 187 | ||
| 188 | static inline int pci_channel_offline(struct pci_dev *pdev) | ||
| 189 | { | ||
| 190 | return (pdev->error_state != pci_channel_io_normal); | ||
| 191 | } | ||
| 192 | |||
| 184 | static inline struct pci_cap_saved_state *pci_find_saved_cap( | 193 | static inline struct pci_cap_saved_state *pci_find_saved_cap( |
| 185 | struct pci_dev *pci_dev,char cap) | 194 | struct pci_dev *pci_dev,char cap) |
| 186 | { | 195 | { |
| @@ -463,8 +472,7 @@ extern void pci_sort_breadthfirst(void); | |||
| 463 | 472 | ||
| 464 | /* Generic PCI functions exported to card drivers */ | 473 | /* Generic PCI functions exported to card drivers */ |
| 465 | 474 | ||
| 466 | struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); | 475 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); |
| 467 | struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from); | ||
| 468 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | 476 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); |
| 469 | int pci_find_capability (struct pci_dev *dev, int cap); | 477 | int pci_find_capability (struct pci_dev *dev, int cap); |
| 470 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 478 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |
| @@ -521,6 +529,14 @@ static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val | |||
| 521 | 529 | ||
| 522 | int __must_check pci_enable_device(struct pci_dev *dev); | 530 | int __must_check pci_enable_device(struct pci_dev *dev); |
| 523 | int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask); | 531 | int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask); |
| 532 | int __must_check pcim_enable_device(struct pci_dev *pdev); | ||
| 533 | void pcim_pin_device(struct pci_dev *pdev); | ||
| 534 | |||
| 535 | static inline int pci_is_managed(struct pci_dev *pdev) | ||
| 536 | { | ||
| 537 | return pdev->is_managed; | ||
| 538 | } | ||
| 539 | |||
| 524 | void pci_disable_device(struct pci_dev *dev); | 540 | void pci_disable_device(struct pci_dev *dev); |
| 525 | void pci_set_master(struct pci_dev *dev); | 541 | void pci_set_master(struct pci_dev *dev); |
| 526 | #define HAVE_PCI_SET_MWI | 542 | #define HAVE_PCI_SET_MWI |
| @@ -533,6 +549,7 @@ void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | |||
| 533 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 549 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
| 534 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); | 550 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); |
| 535 | void pci_restore_bars(struct pci_dev *dev); | 551 | void pci_restore_bars(struct pci_dev *dev); |
| 552 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); | ||
| 536 | 553 | ||
| 537 | /* ROM control related routines */ | 554 | /* ROM control related routines */ |
| 538 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); | 555 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); |
| @@ -561,6 +578,8 @@ int __must_check pci_request_regions(struct pci_dev *, const char *); | |||
| 561 | void pci_release_regions(struct pci_dev *); | 578 | void pci_release_regions(struct pci_dev *); |
| 562 | int __must_check pci_request_region(struct pci_dev *, int, const char *); | 579 | int __must_check pci_request_region(struct pci_dev *, int, const char *); |
| 563 | void pci_release_region(struct pci_dev *, int); | 580 | void pci_release_region(struct pci_dev *, int); |
| 581 | int pci_request_selected_regions(struct pci_dev *, int, const char *); | ||
| 582 | void pci_release_selected_regions(struct pci_dev *, int); | ||
| 564 | 583 | ||
| 565 | /* drivers/pci/bus.c */ | 584 | /* drivers/pci/bus.c */ |
| 566 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, | 585 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, |
| @@ -573,10 +592,11 @@ int __must_check pci_bus_alloc_resource(struct pci_bus *bus, | |||
| 573 | void pci_enable_bridges(struct pci_bus *bus); | 592 | void pci_enable_bridges(struct pci_bus *bus); |
| 574 | 593 | ||
| 575 | /* Proper probing supporting hot-pluggable devices */ | 594 | /* Proper probing supporting hot-pluggable devices */ |
| 576 | int __must_check __pci_register_driver(struct pci_driver *, struct module *); | 595 | int __must_check __pci_register_driver(struct pci_driver *, struct module *, |
| 596 | const char *mod_name); | ||
| 577 | static inline int __must_check pci_register_driver(struct pci_driver *driver) | 597 | static inline int __must_check pci_register_driver(struct pci_driver *driver) |
| 578 | { | 598 | { |
| 579 | return __pci_register_driver(driver, THIS_MODULE); | 599 | return __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); |
| 580 | } | 600 | } |
| 581 | 601 | ||
| 582 | void pci_unregister_driver(struct pci_driver *); | 602 | void pci_unregister_driver(struct pci_driver *); |
| @@ -611,10 +631,6 @@ enum pci_dma_burst_strategy { | |||
| 611 | strategy_parameter byte boundaries */ | 631 | strategy_parameter byte boundaries */ |
| 612 | }; | 632 | }; |
| 613 | 633 | ||
| 614 | #if defined(CONFIG_ISA) || defined(CONFIG_EISA) | ||
| 615 | extern struct pci_dev *isa_bridge; | ||
| 616 | #endif | ||
| 617 | |||
| 618 | struct msix_entry { | 634 | struct msix_entry { |
| 619 | u16 vector; /* kernel uses to write allocated vector */ | 635 | u16 vector; /* kernel uses to write allocated vector */ |
| 620 | u16 entry; /* driver uses to specify entry, OS writes */ | 636 | u16 entry; /* driver uses to specify entry, OS writes */ |
| @@ -622,7 +638,6 @@ struct msix_entry { | |||
| 622 | 638 | ||
| 623 | 639 | ||
| 624 | #ifndef CONFIG_PCI_MSI | 640 | #ifndef CONFIG_PCI_MSI |
| 625 | static inline void pci_scan_msi_device(struct pci_dev *dev) {} | ||
| 626 | static inline int pci_enable_msi(struct pci_dev *dev) {return -1;} | 641 | static inline int pci_enable_msi(struct pci_dev *dev) {return -1;} |
| 627 | static inline void pci_disable_msi(struct pci_dev *dev) {} | 642 | static inline void pci_disable_msi(struct pci_dev *dev) {} |
| 628 | static inline int pci_enable_msix(struct pci_dev* dev, | 643 | static inline int pci_enable_msix(struct pci_dev* dev, |
| @@ -630,7 +645,6 @@ static inline int pci_enable_msix(struct pci_dev* dev, | |||
| 630 | static inline void pci_disable_msix(struct pci_dev *dev) {} | 645 | static inline void pci_disable_msix(struct pci_dev *dev) {} |
| 631 | static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {} | 646 | static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {} |
| 632 | #else | 647 | #else |
| 633 | extern void pci_scan_msi_device(struct pci_dev *dev); | ||
| 634 | extern int pci_enable_msi(struct pci_dev *dev); | 648 | extern int pci_enable_msi(struct pci_dev *dev); |
| 635 | extern void pci_disable_msi(struct pci_dev *dev); | 649 | extern void pci_disable_msi(struct pci_dev *dev); |
| 636 | extern int pci_enable_msix(struct pci_dev* dev, | 650 | extern int pci_enable_msix(struct pci_dev* dev, |
| @@ -722,8 +736,6 @@ static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { | |||
| 722 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } | 736 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } |
| 723 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } | 737 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } |
| 724 | 738 | ||
| 725 | #define isa_bridge ((struct pci_dev *)NULL) | ||
| 726 | |||
| 727 | #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) | 739 | #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) |
| 728 | 740 | ||
| 729 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } | 741 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 3d1d21035dec..e67b68ca235a 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #define PCI_CLASS_STORAGE_FLOPPY 0x0102 | 15 | #define PCI_CLASS_STORAGE_FLOPPY 0x0102 |
| 16 | #define PCI_CLASS_STORAGE_IPI 0x0103 | 16 | #define PCI_CLASS_STORAGE_IPI 0x0103 |
| 17 | #define PCI_CLASS_STORAGE_RAID 0x0104 | 17 | #define PCI_CLASS_STORAGE_RAID 0x0104 |
| 18 | #define PCI_CLASS_STORAGE_SATA 0x0106 | ||
| 19 | #define PCI_CLASS_STORAGE_SATA_AHCI 0x010601 | ||
| 18 | #define PCI_CLASS_STORAGE_SAS 0x0107 | 20 | #define PCI_CLASS_STORAGE_SAS 0x0107 |
| 19 | #define PCI_CLASS_STORAGE_OTHER 0x0180 | 21 | #define PCI_CLASS_STORAGE_OTHER 0x0180 |
| 20 | 22 | ||
| @@ -95,6 +97,7 @@ | |||
| 95 | 97 | ||
| 96 | #define PCI_BASE_CLASS_SERIAL 0x0c | 98 | #define PCI_BASE_CLASS_SERIAL 0x0c |
| 97 | #define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 | 99 | #define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 |
| 100 | #define PCI_CLASS_SERIAL_FIREWIRE_OHCI 0x0c0010 | ||
| 98 | #define PCI_CLASS_SERIAL_ACCESS 0x0c01 | 101 | #define PCI_CLASS_SERIAL_ACCESS 0x0c01 |
| 99 | #define PCI_CLASS_SERIAL_SSA 0x0c02 | 102 | #define PCI_CLASS_SERIAL_SSA 0x0c02 |
| 100 | #define PCI_CLASS_SERIAL_USB 0x0c03 | 103 | #define PCI_CLASS_SERIAL_USB 0x0c03 |
| @@ -735,9 +738,11 @@ | |||
| 735 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 | 738 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 |
| 736 | #define PCI_DEVICE_ID_TI_4450 0x8011 | 739 | #define PCI_DEVICE_ID_TI_4450 0x8011 |
| 737 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 | 740 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 |
| 741 | #define PCI_DEVICE_ID_TI_XX21_XX11_FM 0x8033 | ||
| 738 | #define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034 | 742 | #define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034 |
| 739 | #define PCI_DEVICE_ID_TI_X515 0x8036 | 743 | #define PCI_DEVICE_ID_TI_X515 0x8036 |
| 740 | #define PCI_DEVICE_ID_TI_XX12 0x8039 | 744 | #define PCI_DEVICE_ID_TI_XX12 0x8039 |
| 745 | #define PCI_DEVICE_ID_TI_XX12_FM 0x803b | ||
| 741 | #define PCI_DEVICE_ID_TI_1130 0xac12 | 746 | #define PCI_DEVICE_ID_TI_1130 0xac12 |
| 742 | #define PCI_DEVICE_ID_TI_1031 0xac13 | 747 | #define PCI_DEVICE_ID_TI_1031 0xac13 |
| 743 | #define PCI_DEVICE_ID_TI_1131 0xac15 | 748 | #define PCI_DEVICE_ID_TI_1131 0xac15 |
| @@ -765,6 +770,7 @@ | |||
| 765 | #define PCI_DEVICE_ID_TI_1510 0xac56 | 770 | #define PCI_DEVICE_ID_TI_1510 0xac56 |
| 766 | #define PCI_DEVICE_ID_TI_X620 0xac8d | 771 | #define PCI_DEVICE_ID_TI_X620 0xac8d |
| 767 | #define PCI_DEVICE_ID_TI_X420 0xac8e | 772 | #define PCI_DEVICE_ID_TI_X420 0xac8e |
| 773 | #define PCI_DEVICE_ID_TI_XX20_FM 0xac8f | ||
| 768 | 774 | ||
| 769 | #define PCI_VENDOR_ID_SONY 0x104d | 775 | #define PCI_VENDOR_ID_SONY 0x104d |
| 770 | 776 | ||
| @@ -1451,6 +1457,7 @@ | |||
| 1451 | 1457 | ||
| 1452 | #define PCI_VENDOR_ID_TOSHIBA_2 0x102f | 1458 | #define PCI_VENDOR_ID_TOSHIBA_2 0x102f |
| 1453 | #define PCI_DEVICE_ID_TOSHIBA_TC35815CF 0x0030 | 1459 | #define PCI_DEVICE_ID_TOSHIBA_TC35815CF 0x0030 |
| 1460 | #define PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE 0x0105 | ||
| 1454 | #define PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC 0x0108 | 1461 | #define PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC 0x0108 |
| 1455 | #define PCI_DEVICE_ID_TOSHIBA_SPIDER_NET 0x01b3 | 1462 | #define PCI_DEVICE_ID_TOSHIBA_SPIDER_NET 0x01b3 |
| 1456 | 1463 | ||
| @@ -1628,6 +1635,7 @@ | |||
| 1628 | #define PCI_VENDOR_ID_ITE 0x1283 | 1635 | #define PCI_VENDOR_ID_ITE 0x1283 |
| 1629 | #define PCI_DEVICE_ID_ITE_8211 0x8211 | 1636 | #define PCI_DEVICE_ID_ITE_8211 0x8211 |
| 1630 | #define PCI_DEVICE_ID_ITE_8212 0x8212 | 1637 | #define PCI_DEVICE_ID_ITE_8212 0x8212 |
| 1638 | #define PCI_DEVICE_ID_ITE_8213 0x8213 | ||
| 1631 | #define PCI_DEVICE_ID_ITE_8872 0x8872 | 1639 | #define PCI_DEVICE_ID_ITE_8872 0x8872 |
| 1632 | #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 | 1640 | #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 |
| 1633 | 1641 | ||
| @@ -1971,6 +1979,7 @@ | |||
| 1971 | #define PCI_DEVICE_ID_TOPIC_TP560 0x0000 | 1979 | #define PCI_DEVICE_ID_TOPIC_TP560 0x0000 |
| 1972 | 1980 | ||
| 1973 | #define PCI_VENDOR_ID_ENE 0x1524 | 1981 | #define PCI_VENDOR_ID_ENE 0x1524 |
| 1982 | #define PCI_DEVICE_ID_ENE_CB712_SD 0x0550 | ||
| 1974 | #define PCI_DEVICE_ID_ENE_1211 0x1211 | 1983 | #define PCI_DEVICE_ID_ENE_1211 0x1211 |
| 1975 | #define PCI_DEVICE_ID_ENE_1225 0x1225 | 1984 | #define PCI_DEVICE_ID_ENE_1225 0x1225 |
| 1976 | #define PCI_DEVICE_ID_ENE_1410 0x1410 | 1985 | #define PCI_DEVICE_ID_ENE_1410 0x1410 |
| @@ -2066,6 +2075,10 @@ | |||
| 2066 | #define PCI_VENDOR_ID_TDI 0x192E | 2075 | #define PCI_VENDOR_ID_TDI 0x192E |
| 2067 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 | 2076 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 |
| 2068 | 2077 | ||
| 2078 | #define PCI_VENDOR_ID_PASEMI 0x1959 | ||
| 2079 | |||
| 2080 | #define PCI_VENDOR_ID_ATTANSIC 0x1969 | ||
| 2081 | |||
| 2069 | #define PCI_VENDOR_ID_JMICRON 0x197B | 2082 | #define PCI_VENDOR_ID_JMICRON 0x197B |
| 2070 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 | 2083 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 |
| 2071 | #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 | 2084 | #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 |
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h index 265bafab6494..d9db5f62ee48 100644 --- a/include/linux/pfkeyv2.h +++ b/include/linux/pfkeyv2.h | |||
| @@ -251,7 +251,8 @@ struct sadb_x_sec_ctx { | |||
| 251 | #define SADB_X_SPDEXPIRE 21 | 251 | #define SADB_X_SPDEXPIRE 21 |
| 252 | #define SADB_X_SPDDELETE2 22 | 252 | #define SADB_X_SPDDELETE2 22 |
| 253 | #define SADB_X_NAT_T_NEW_MAPPING 23 | 253 | #define SADB_X_NAT_T_NEW_MAPPING 23 |
| 254 | #define SADB_MAX 23 | 254 | #define SADB_X_MIGRATE 24 |
| 255 | #define SADB_MAX 24 | ||
| 255 | 256 | ||
| 256 | /* Security Association flags */ | 257 | /* Security Association flags */ |
| 257 | #define SADB_SAFLAGS_PFS 1 | 258 | #define SADB_SAFLAGS_PFS 1 |
| @@ -297,6 +298,7 @@ struct sadb_x_sec_ctx { | |||
| 297 | #define SADB_X_EALG_BLOWFISHCBC 7 | 298 | #define SADB_X_EALG_BLOWFISHCBC 7 |
| 298 | #define SADB_EALG_NULL 11 | 299 | #define SADB_EALG_NULL 11 |
| 299 | #define SADB_X_EALG_AESCBC 12 | 300 | #define SADB_X_EALG_AESCBC 12 |
| 301 | #define SADB_X_EALG_CAMELLIACBC 22 | ||
| 300 | #define SADB_EALG_MAX 253 /* last EALG */ | 302 | #define SADB_EALG_MAX 253 /* last EALG */ |
| 301 | /* private allocations should use 249-255 (RFC2407) */ | 303 | /* private allocations should use 249-255 (RFC2407) */ |
| 302 | #define SADB_X_EALG_SERPENTCBC 252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */ | 304 | #define SADB_X_EALG_SERPENTCBC 252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */ |
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index ebd42a3710b4..6db9a4c15355 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
| @@ -247,6 +247,7 @@ struct bitmap { | |||
| 247 | 247 | ||
| 248 | atomic_t pending_writes; /* pending writes to the bitmap file */ | 248 | atomic_t pending_writes; /* pending writes to the bitmap file */ |
| 249 | wait_queue_head_t write_wait; | 249 | wait_queue_head_t write_wait; |
| 250 | wait_queue_head_t overflow_wait; | ||
| 250 | 251 | ||
| 251 | }; | 252 | }; |
| 252 | 253 | ||
diff --git a/include/linux/serio.h b/include/linux/serio.h index 0f478a8791a2..ac2c70e7f760 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
| @@ -86,6 +86,11 @@ static inline void serio_register_port(struct serio *serio) | |||
| 86 | void serio_unregister_port(struct serio *serio); | 86 | void serio_unregister_port(struct serio *serio); |
| 87 | void serio_unregister_child_port(struct serio *serio); | 87 | void serio_unregister_child_port(struct serio *serio); |
| 88 | 88 | ||
| 89 | int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name); | ||
| 90 | static inline int serio_register_driver(struct serio_driver *drv) | ||
| 91 | { | ||
| 92 | return __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME); | ||
| 93 | } | ||
| 89 | int serio_register_driver(struct serio_driver *drv); | 94 | int serio_register_driver(struct serio_driver *drv); |
| 90 | void serio_unregister_driver(struct serio_driver *drv); | 95 | void serio_unregister_driver(struct serio_driver *drv); |
| 91 | 96 | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index 92cd38efad7f..fcd35a210e7f 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -187,7 +187,8 @@ struct ucred { | |||
| 187 | #define AF_LLC 26 /* Linux LLC */ | 187 | #define AF_LLC 26 /* Linux LLC */ |
| 188 | #define AF_TIPC 30 /* TIPC sockets */ | 188 | #define AF_TIPC 30 /* TIPC sockets */ |
| 189 | #define AF_BLUETOOTH 31 /* Bluetooth sockets */ | 189 | #define AF_BLUETOOTH 31 /* Bluetooth sockets */ |
| 190 | #define AF_MAX 32 /* For now.. */ | 190 | #define AF_IUCV 32 /* IUCV sockets */ |
| 191 | #define AF_MAX 33 /* For now.. */ | ||
| 191 | 192 | ||
| 192 | /* Protocol families, same as address families. */ | 193 | /* Protocol families, same as address families. */ |
| 193 | #define PF_UNSPEC AF_UNSPEC | 194 | #define PF_UNSPEC AF_UNSPEC |
| @@ -220,6 +221,7 @@ struct ucred { | |||
| 220 | #define PF_LLC AF_LLC | 221 | #define PF_LLC AF_LLC |
| 221 | #define PF_TIPC AF_TIPC | 222 | #define PF_TIPC AF_TIPC |
| 222 | #define PF_BLUETOOTH AF_BLUETOOTH | 223 | #define PF_BLUETOOTH AF_BLUETOOTH |
| 224 | #define PF_IUCV AF_IUCV | ||
| 223 | #define PF_MAX AF_MAX | 225 | #define PF_MAX AF_MAX |
| 224 | 226 | ||
| 225 | /* Maximum queue length specifiable by listen. */ | 227 | /* Maximum queue length specifiable by listen. */ |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 98b21ad370fd..db312a1e2eeb 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
| @@ -63,7 +63,7 @@ struct svc_sock { | |||
| 63 | * Function prototypes. | 63 | * Function prototypes. |
| 64 | */ | 64 | */ |
| 65 | int svc_makesock(struct svc_serv *, int, unsigned short); | 65 | int svc_makesock(struct svc_serv *, int, unsigned short); |
| 66 | void svc_delete_socket(struct svc_sock *); | 66 | void svc_close_socket(struct svc_sock *); |
| 67 | int svc_recv(struct svc_rqst *, long); | 67 | int svc_recv(struct svc_rqst *, long); |
| 68 | int svc_send(struct svc_rqst *); | 68 | int svc_send(struct svc_rqst *); |
| 69 | void svc_drop(struct svc_rqst *); | 69 | void svc_drop(struct svc_rqst *); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 81480e613467..665412c4f4b9 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
| @@ -699,7 +699,8 @@ enum { | |||
| 699 | NET_X25_CALL_REQUEST_TIMEOUT=2, | 699 | NET_X25_CALL_REQUEST_TIMEOUT=2, |
| 700 | NET_X25_RESET_REQUEST_TIMEOUT=3, | 700 | NET_X25_RESET_REQUEST_TIMEOUT=3, |
| 701 | NET_X25_CLEAR_REQUEST_TIMEOUT=4, | 701 | NET_X25_CLEAR_REQUEST_TIMEOUT=4, |
| 702 | NET_X25_ACK_HOLD_BACK_TIMEOUT=5 | 702 | NET_X25_ACK_HOLD_BACK_TIMEOUT=5, |
| 703 | NET_X25_FORWARD=6 | ||
| 703 | }; | 704 | }; |
| 704 | 705 | ||
| 705 | /* /proc/sys/net/token-ring */ | 706 | /* /proc/sys/net/token-ring */ |
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index 166a2e58c287..389ccf858d37 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
| @@ -98,12 +98,16 @@ struct sysdev_attribute { | |||
| 98 | }; | 98 | }; |
| 99 | 99 | ||
| 100 | 100 | ||
| 101 | #define SYSDEV_ATTR(_name,_mode,_show,_store) \ | 101 | #define _SYSDEV_ATTR(_name,_mode,_show,_store) \ |
| 102 | struct sysdev_attribute attr_##_name = { \ | 102 | { \ |
| 103 | .attr = {.name = __stringify(_name), .mode = _mode }, \ | 103 | .attr = { .name = __stringify(_name), .mode = _mode, \ |
| 104 | .owner = THIS_MODULE }, \ | ||
| 104 | .show = _show, \ | 105 | .show = _show, \ |
| 105 | .store = _store, \ | 106 | .store = _store, \ |
| 106 | }; | 107 | } |
| 108 | |||
| 109 | #define SYSDEV_ATTR(_name,_mode,_show,_store) \ | ||
| 110 | struct sysdev_attribute attr_##_name = _SYSDEV_ATTR(_name,_mode,_show,_store); | ||
| 107 | 111 | ||
| 108 | extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); | 112 | extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); |
| 109 | extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); | 113 | extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 2129d1b6c874..192de3afa96b 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
| @@ -11,10 +11,12 @@ | |||
| 11 | #define _SYSFS_H_ | 11 | #define _SYSFS_H_ |
| 12 | 12 | ||
| 13 | #include <linux/compiler.h> | 13 | #include <linux/compiler.h> |
| 14 | #include <linux/list.h> | ||
| 14 | #include <asm/atomic.h> | 15 | #include <asm/atomic.h> |
| 15 | 16 | ||
| 16 | struct kobject; | 17 | struct kobject; |
| 17 | struct module; | 18 | struct module; |
| 19 | struct nameidata; | ||
| 18 | 20 | ||
| 19 | struct attribute { | 21 | struct attribute { |
| 20 | const char * name; | 22 | const char * name; |
| @@ -88,13 +90,13 @@ struct sysfs_dirent { | |||
| 88 | #ifdef CONFIG_SYSFS | 90 | #ifdef CONFIG_SYSFS |
| 89 | 91 | ||
| 90 | extern int __must_check | 92 | extern int __must_check |
| 91 | sysfs_create_dir(struct kobject *); | 93 | sysfs_create_dir(struct kobject *, struct dentry *); |
| 92 | 94 | ||
| 93 | extern void | 95 | extern void |
| 94 | sysfs_remove_dir(struct kobject *); | 96 | sysfs_remove_dir(struct kobject *); |
| 95 | 97 | ||
| 96 | extern int __must_check | 98 | extern int __must_check |
| 97 | sysfs_rename_dir(struct kobject *, const char *new_name); | 99 | sysfs_rename_dir(struct kobject *, struct dentry *, const char *new_name); |
| 98 | 100 | ||
| 99 | extern int __must_check | 101 | extern int __must_check |
| 100 | sysfs_move_dir(struct kobject *, struct kobject *); | 102 | sysfs_move_dir(struct kobject *, struct kobject *); |
| @@ -126,11 +128,17 @@ int __must_check sysfs_create_group(struct kobject *, | |||
| 126 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); | 128 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); |
| 127 | void sysfs_notify(struct kobject * k, char *dir, char *attr); | 129 | void sysfs_notify(struct kobject * k, char *dir, char *attr); |
| 128 | 130 | ||
| 131 | |||
| 132 | extern int sysfs_make_shadowed_dir(struct kobject *kobj, | ||
| 133 | void * (*follow_link)(struct dentry *, struct nameidata *)); | ||
| 134 | extern struct dentry *sysfs_create_shadow_dir(struct kobject *kobj); | ||
| 135 | extern void sysfs_remove_shadow_dir(struct dentry *dir); | ||
| 136 | |||
| 129 | extern int __must_check sysfs_init(void); | 137 | extern int __must_check sysfs_init(void); |
| 130 | 138 | ||
| 131 | #else /* CONFIG_SYSFS */ | 139 | #else /* CONFIG_SYSFS */ |
| 132 | 140 | ||
| 133 | static inline int sysfs_create_dir(struct kobject * k) | 141 | static inline int sysfs_create_dir(struct kobject * k, struct dentry *shadow) |
| 134 | { | 142 | { |
| 135 | return 0; | 143 | return 0; |
| 136 | } | 144 | } |
| @@ -140,7 +148,9 @@ static inline void sysfs_remove_dir(struct kobject * k) | |||
| 140 | ; | 148 | ; |
| 141 | } | 149 | } |
| 142 | 150 | ||
| 143 | static inline int sysfs_rename_dir(struct kobject * k, const char *new_name) | 151 | static inline int sysfs_rename_dir(struct kobject * k, |
| 152 | struct dentry *new_parent, | ||
| 153 | const char *new_name) | ||
| 144 | { | 154 | { |
| 145 | return 0; | 155 | return 0; |
| 146 | } | 156 | } |
| @@ -204,6 +214,12 @@ static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) | |||
| 204 | { | 214 | { |
| 205 | } | 215 | } |
| 206 | 216 | ||
| 217 | static inline int sysfs_make_shadowed_dir(struct kobject *kobj, | ||
| 218 | void * (*follow_link)(struct dentry *, struct nameidata *)) | ||
| 219 | { | ||
| 220 | return 0; | ||
| 221 | } | ||
| 222 | |||
| 207 | static inline int __must_check sysfs_init(void) | 223 | static inline int __must_check sysfs_init(void) |
| 208 | { | 224 | { |
| 209 | return 0; | 225 | return 0; |
diff --git a/include/linux/tc.h b/include/linux/tc.h new file mode 100644 index 000000000000..f92511e57cdb --- /dev/null +++ b/include/linux/tc.h | |||
| @@ -0,0 +1,141 @@ | |||
| 1 | /* | ||
| 2 | * Interface to the TURBOchannel related routines. | ||
| 3 | * | ||
| 4 | * Copyright (c) 1998 Harald Koerfgen | ||
| 5 | * Copyright (c) 2005 James Simmons | ||
| 6 | * Copyright (c) 2006 Maciej W. Rozycki | ||
| 7 | * | ||
| 8 | * Based on: | ||
| 9 | * | ||
| 10 | * "TURBOchannel Firmware Specification", EK-TCAAD-FS-004 | ||
| 11 | * | ||
| 12 | * from Digital Equipment Corporation. | ||
| 13 | * | ||
| 14 | * This file is subject to the terms and conditions of the GNU | ||
| 15 | * General Public License. See the file "COPYING" in the main | ||
| 16 | * directory of this archive for more details. | ||
| 17 | */ | ||
| 18 | #ifndef _LINUX_TC_H | ||
| 19 | #define _LINUX_TC_H | ||
| 20 | |||
| 21 | #include <linux/compiler.h> | ||
| 22 | #include <linux/device.h> | ||
| 23 | #include <linux/ioport.h> | ||
| 24 | #include <linux/types.h> | ||
| 25 | |||
| 26 | /* | ||
| 27 | * Offsets for the ROM header locations for TURBOchannel cards. | ||
| 28 | */ | ||
| 29 | #define TC_OLDCARD 0x3c0000 | ||
| 30 | #define TC_NEWCARD 0x000000 | ||
| 31 | |||
| 32 | #define TC_ROM_WIDTH 0x3e0 | ||
| 33 | #define TC_ROM_STRIDE 0x3e4 | ||
| 34 | #define TC_ROM_SIZE 0x3e8 | ||
| 35 | #define TC_SLOT_SIZE 0x3ec | ||
| 36 | #define TC_PATTERN0 0x3f0 | ||
| 37 | #define TC_PATTERN1 0x3f4 | ||
| 38 | #define TC_PATTERN2 0x3f8 | ||
| 39 | #define TC_PATTERN3 0x3fc | ||
| 40 | #define TC_FIRM_VER 0x400 | ||
| 41 | #define TC_VENDOR 0x420 | ||
| 42 | #define TC_MODULE 0x440 | ||
| 43 | #define TC_FIRM_TYPE 0x460 | ||
| 44 | #define TC_FLAGS 0x470 | ||
| 45 | #define TC_ROM_OBJECTS 0x480 | ||
| 46 | |||
| 47 | /* | ||
| 48 | * Information obtained through the get_tcinfo() PROM call. | ||
| 49 | */ | ||
| 50 | struct tcinfo { | ||
| 51 | s32 revision; /* Hardware revision level. */ | ||
| 52 | s32 clk_period; /* Clock period in nanoseconds. */ | ||
| 53 | s32 slot_size; /* Slot size in megabytes. */ | ||
| 54 | s32 io_timeout; /* I/O timeout in cycles. */ | ||
| 55 | s32 dma_range; /* DMA address range in megabytes. */ | ||
| 56 | s32 max_dma_burst; /* Maximum DMA burst length. */ | ||
| 57 | s32 parity; /* System module supports TC parity. */ | ||
| 58 | s32 reserved[4]; | ||
| 59 | }; | ||
| 60 | |||
| 61 | /* | ||
| 62 | * TURBOchannel bus. | ||
| 63 | */ | ||
| 64 | struct tc_bus { | ||
| 65 | struct list_head devices; /* List of devices on this bus. */ | ||
| 66 | struct resource resource[2]; /* Address space routed to this bus. */ | ||
| 67 | |||
| 68 | struct device dev; | ||
| 69 | char name[13]; | ||
| 70 | resource_size_t slot_base; | ||
| 71 | resource_size_t ext_slot_base; | ||
| 72 | resource_size_t ext_slot_size; | ||
| 73 | int num_tcslots; | ||
| 74 | struct tcinfo info; | ||
| 75 | }; | ||
| 76 | |||
| 77 | /* | ||
| 78 | * TURBOchannel device. | ||
| 79 | */ | ||
| 80 | struct tc_dev { | ||
| 81 | struct list_head node; /* Node in list of all TC devices. */ | ||
| 82 | struct tc_bus *bus; /* Bus this device is on. */ | ||
| 83 | struct tc_driver *driver; /* Which driver has allocated this | ||
| 84 | device. */ | ||
| 85 | struct device dev; /* Generic device interface. */ | ||
| 86 | struct resource resource; /* Address space of this device. */ | ||
| 87 | char vendor[9]; | ||
| 88 | char name[9]; | ||
| 89 | char firmware[9]; | ||
| 90 | int interrupt; | ||
| 91 | int slot; | ||
| 92 | }; | ||
| 93 | |||
| 94 | #define to_tc_dev(n) container_of(n, struct tc_dev, dev) | ||
| 95 | |||
| 96 | struct tc_device_id { | ||
| 97 | char vendor[9]; | ||
| 98 | char name[9]; | ||
| 99 | }; | ||
| 100 | |||
| 101 | /* | ||
| 102 | * TURBOchannel driver. | ||
| 103 | */ | ||
| 104 | struct tc_driver { | ||
| 105 | struct list_head node; | ||
| 106 | const struct tc_device_id *id_table; | ||
| 107 | struct device_driver driver; | ||
| 108 | }; | ||
| 109 | |||
| 110 | #define to_tc_driver(drv) container_of(drv, struct tc_driver, driver) | ||
| 111 | |||
| 112 | /* | ||
| 113 | * Return TURBOchannel clock frequency in Hz. | ||
| 114 | */ | ||
| 115 | static inline unsigned long tc_get_speed(struct tc_bus *tbus) | ||
| 116 | { | ||
| 117 | return 100000 * (10000 / (unsigned long)tbus->info.clk_period); | ||
| 118 | } | ||
| 119 | |||
| 120 | #ifdef CONFIG_TC | ||
| 121 | |||
| 122 | extern struct bus_type tc_bus_type; | ||
| 123 | |||
| 124 | extern int tc_register_driver(struct tc_driver *tdrv); | ||
| 125 | extern void tc_unregister_driver(struct tc_driver *tdrv); | ||
| 126 | |||
| 127 | #else /* !CONFIG_TC */ | ||
| 128 | |||
| 129 | static inline int tc_register_driver(struct tc_driver *tdrv) { return 0; } | ||
| 130 | static inline void tc_unregister_driver(struct tc_driver *tdrv) { } | ||
| 131 | |||
| 132 | #endif /* CONFIG_TC */ | ||
| 133 | |||
| 134 | /* | ||
| 135 | * These have to be provided by the architecture. | ||
| 136 | */ | ||
| 137 | extern int tc_preadb(u8 *valp, void __iomem *addr); | ||
| 138 | extern int tc_bus_get_info(struct tc_bus *tbus); | ||
| 139 | extern void tc_device_get_irq(struct tc_dev *tdev); | ||
| 140 | |||
| 141 | #endif /* _LINUX_TC_H */ | ||
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 3cc70d1a3504..29d3089038ab 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
| @@ -316,7 +316,7 @@ struct tcp_sock { | |||
| 316 | struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ | 316 | struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ |
| 317 | struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ | 317 | struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ |
| 318 | 318 | ||
| 319 | struct tcp_sack_block recv_sack_cache[4]; | 319 | struct tcp_sack_block_wire recv_sack_cache[4]; |
| 320 | 320 | ||
| 321 | /* from STCP, retrans queue hinting */ | 321 | /* from STCP, retrans queue hinting */ |
| 322 | struct sk_buff* lost_skb_hint; | 322 | struct sk_buff* lost_skb_hint; |
diff --git a/include/linux/tifm.h b/include/linux/tifm.h index dfb8052eee5e..3deb0a6c1370 100644 --- a/include/linux/tifm.h +++ b/include/linux/tifm.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #include <linux/wait.h> | 17 | #include <linux/wait.h> |
| 18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
| 19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
| 20 | #include <linux/scatterlist.h> | 20 | #include <linux/kthread.h> |
| 21 | 21 | ||
| 22 | /* Host registers (relative to pci base address): */ | 22 | /* Host registers (relative to pci base address): */ |
| 23 | enum { | 23 | enum { |
| @@ -62,11 +62,10 @@ enum { | |||
| 62 | 62 | ||
| 63 | 63 | ||
| 64 | #define TIFM_IRQ_ENABLE 0x80000000 | 64 | #define TIFM_IRQ_ENABLE 0x80000000 |
| 65 | #define TIFM_IRQ_SOCKMASK 0x00000001 | 65 | #define TIFM_IRQ_SOCKMASK(x) (x) |
| 66 | #define TIFM_IRQ_CARDMASK 0x00000100 | 66 | #define TIFM_IRQ_CARDMASK(x) ((x) << 8) |
| 67 | #define TIFM_IRQ_FIFOMASK 0x00010000 | 67 | #define TIFM_IRQ_FIFOMASK(x) ((x) << 16) |
| 68 | #define TIFM_IRQ_SETALL 0xffffffff | 68 | #define TIFM_IRQ_SETALL 0xffffffff |
| 69 | #define TIFM_IRQ_SETALLSOCK 0x0000000f | ||
| 70 | 69 | ||
| 71 | #define TIFM_CTRL_LED 0x00000040 | 70 | #define TIFM_CTRL_LED 0x00000040 |
| 72 | #define TIFM_CTRL_FAST_CLK 0x00000100 | 71 | #define TIFM_CTRL_FAST_CLK 0x00000100 |
| @@ -89,10 +88,9 @@ struct tifm_dev { | |||
| 89 | char __iomem *addr; | 88 | char __iomem *addr; |
| 90 | spinlock_t lock; | 89 | spinlock_t lock; |
| 91 | tifm_media_id media_id; | 90 | tifm_media_id media_id; |
| 92 | char wq_name[KOBJ_NAME_LEN]; | 91 | unsigned int socket_id; |
| 93 | struct workqueue_struct *wq; | ||
| 94 | 92 | ||
| 95 | unsigned int (*signal_irq)(struct tifm_dev *sock, | 93 | void (*signal_irq)(struct tifm_dev *sock, |
| 96 | unsigned int sock_irq_status); | 94 | unsigned int sock_irq_status); |
| 97 | 95 | ||
| 98 | struct tifm_driver *drv; | 96 | struct tifm_driver *drv; |
| @@ -103,24 +101,23 @@ struct tifm_driver { | |||
| 103 | tifm_media_id *id_table; | 101 | tifm_media_id *id_table; |
| 104 | int (*probe)(struct tifm_dev *dev); | 102 | int (*probe)(struct tifm_dev *dev); |
| 105 | void (*remove)(struct tifm_dev *dev); | 103 | void (*remove)(struct tifm_dev *dev); |
| 104 | int (*suspend)(struct tifm_dev *dev, | ||
| 105 | pm_message_t state); | ||
| 106 | int (*resume)(struct tifm_dev *dev); | ||
| 106 | 107 | ||
| 107 | struct device_driver driver; | 108 | struct device_driver driver; |
| 108 | }; | 109 | }; |
| 109 | 110 | ||
| 110 | struct tifm_adapter { | 111 | struct tifm_adapter { |
| 111 | char __iomem *addr; | 112 | char __iomem *addr; |
| 112 | unsigned int irq_status; | ||
| 113 | unsigned int insert_mask; | ||
| 114 | unsigned int remove_mask; | ||
| 115 | spinlock_t lock; | 113 | spinlock_t lock; |
| 114 | unsigned int irq_status; | ||
| 115 | unsigned int socket_change_set; | ||
| 116 | wait_queue_head_t change_set_notify; | ||
| 116 | unsigned int id; | 117 | unsigned int id; |
| 117 | unsigned int max_sockets; | 118 | unsigned int num_sockets; |
| 118 | char wq_name[KOBJ_NAME_LEN]; | ||
| 119 | unsigned int inhibit_new_cards; | ||
| 120 | struct workqueue_struct *wq; | ||
| 121 | struct work_struct media_inserter; | ||
| 122 | struct work_struct media_remover; | ||
| 123 | struct tifm_dev **sockets; | 119 | struct tifm_dev **sockets; |
| 120 | struct task_struct *media_switcher; | ||
| 124 | struct class_device cdev; | 121 | struct class_device cdev; |
| 125 | struct device *dev; | 122 | struct device *dev; |
| 126 | 123 | ||
| @@ -130,9 +127,9 @@ struct tifm_adapter { | |||
| 130 | struct tifm_adapter *tifm_alloc_adapter(void); | 127 | struct tifm_adapter *tifm_alloc_adapter(void); |
| 131 | void tifm_free_device(struct device *dev); | 128 | void tifm_free_device(struct device *dev); |
| 132 | void tifm_free_adapter(struct tifm_adapter *fm); | 129 | void tifm_free_adapter(struct tifm_adapter *fm); |
| 133 | int tifm_add_adapter(struct tifm_adapter *fm); | 130 | int tifm_add_adapter(struct tifm_adapter *fm, int (*mediathreadfn)(void *data)); |
| 134 | void tifm_remove_adapter(struct tifm_adapter *fm); | 131 | void tifm_remove_adapter(struct tifm_adapter *fm); |
| 135 | struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id); | 132 | struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm); |
| 136 | int tifm_register_driver(struct tifm_driver *drv); | 133 | int tifm_register_driver(struct tifm_driver *drv); |
| 137 | void tifm_unregister_driver(struct tifm_driver *drv); | 134 | void tifm_unregister_driver(struct tifm_driver *drv); |
| 138 | void tifm_eject(struct tifm_dev *sock); | 135 | void tifm_eject(struct tifm_dev *sock); |
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 28967eda9d7b..d3a4f994a5dc 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h | |||
| @@ -789,6 +789,7 @@ struct ufs_sb_private_info { | |||
| 789 | 789 | ||
| 790 | __u32 s_maxsymlinklen;/* upper limit on fast symlinks' size */ | 790 | __u32 s_maxsymlinklen;/* upper limit on fast symlinks' size */ |
| 791 | __s32 fs_magic; /* filesystem magic */ | 791 | __s32 fs_magic; /* filesystem magic */ |
| 792 | unsigned int s_dirblksize; | ||
| 792 | }; | 793 | }; |
| 793 | 794 | ||
| 794 | /* | 795 | /* |
diff --git a/include/linux/usb.h b/include/linux/usb.h index aab5b1b72021..b5c226a87ed8 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #define __LINUX_USB_H | 2 | #define __LINUX_USB_H |
| 3 | 3 | ||
| 4 | #include <linux/mod_devicetable.h> | 4 | #include <linux/mod_devicetable.h> |
| 5 | #include <linux/usb_ch9.h> | 5 | #include <linux/usb/ch9.h> |
| 6 | 6 | ||
| 7 | #define USB_MAJOR 180 | 7 | #define USB_MAJOR 180 |
| 8 | #define USB_DEVICE_MAJOR 189 | 8 | #define USB_DEVICE_MAJOR 189 |
| @@ -107,7 +107,8 @@ enum usb_interface_condition { | |||
| 107 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup | 107 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup |
| 108 | * capability during autosuspend. | 108 | * capability during autosuspend. |
| 109 | * @dev: driver model's view of this device | 109 | * @dev: driver model's view of this device |
| 110 | * @class_dev: driver model's class view of this device. | 110 | * @usb_dev: if an interface is bound to the USB major, this will point |
| 111 | * to the sysfs representation for that device. | ||
| 111 | * @pm_usage_cnt: PM usage counter for this interface; autosuspend is not | 112 | * @pm_usage_cnt: PM usage counter for this interface; autosuspend is not |
| 112 | * allowed unless the counter is 0. | 113 | * allowed unless the counter is 0. |
| 113 | * | 114 | * |
| @@ -152,7 +153,7 @@ struct usb_interface { | |||
| 152 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ | 153 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ |
| 153 | 154 | ||
| 154 | struct device dev; /* interface specific device info */ | 155 | struct device dev; /* interface specific device info */ |
| 155 | struct class_device *class_dev; | 156 | struct device *usb_dev; /* pointer to the usb class's device, if any */ |
| 156 | int pm_usage_cnt; /* usage counter for autosuspend */ | 157 | int pm_usage_cnt; /* usage counter for autosuspend */ |
| 157 | }; | 158 | }; |
| 158 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) | 159 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) |
| @@ -372,7 +373,7 @@ struct usb_device { | |||
| 372 | char *serial; /* iSerialNumber string, if present */ | 373 | char *serial; /* iSerialNumber string, if present */ |
| 373 | 374 | ||
| 374 | struct list_head filelist; | 375 | struct list_head filelist; |
| 375 | struct class_device *class_dev; | 376 | struct device *usbfs_dev; |
| 376 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ | 377 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ |
| 377 | 378 | ||
| 378 | /* | 379 | /* |
| @@ -475,6 +476,8 @@ extern void usb_driver_release_interface(struct usb_driver *driver, | |||
| 475 | struct usb_interface *iface); | 476 | struct usb_interface *iface); |
| 476 | const struct usb_device_id *usb_match_id(struct usb_interface *interface, | 477 | const struct usb_device_id *usb_match_id(struct usb_interface *interface, |
| 477 | const struct usb_device_id *id); | 478 | const struct usb_device_id *id); |
| 479 | extern int usb_match_one_id(struct usb_interface *interface, | ||
| 480 | const struct usb_device_id *id); | ||
| 478 | 481 | ||
| 479 | extern struct usb_interface *usb_find_interface(struct usb_driver *drv, | 482 | extern struct usb_interface *usb_find_interface(struct usb_driver *drv, |
| 480 | int minor); | 483 | int minor); |
| @@ -554,6 +557,18 @@ static inline int usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *e | |||
| 554 | } | 557 | } |
| 555 | 558 | ||
| 556 | /** | 559 | /** |
| 560 | * usb_endpoint_xfer_control - check if the endpoint has control transfer type | ||
| 561 | * @epd: endpoint to be checked | ||
| 562 | * | ||
| 563 | * Returns true if the endpoint is of type control, otherwise it returns false. | ||
| 564 | */ | ||
| 565 | static inline int usb_endpoint_xfer_control(const struct usb_endpoint_descriptor *epd) | ||
| 566 | { | ||
| 567 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
| 568 | USB_ENDPOINT_XFER_CONTROL); | ||
| 569 | } | ||
| 570 | |||
| 571 | /** | ||
| 557 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type | 572 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type |
| 558 | * @epd: endpoint to be checked | 573 | * @epd: endpoint to be checked |
| 559 | * | 574 | * |
| @@ -723,11 +738,21 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor | |||
| 723 | 738 | ||
| 724 | /* ----------------------------------------------------------------------- */ | 739 | /* ----------------------------------------------------------------------- */ |
| 725 | 740 | ||
| 741 | /* Stuff for dynamic usb ids */ | ||
| 726 | struct usb_dynids { | 742 | struct usb_dynids { |
| 727 | spinlock_t lock; | 743 | spinlock_t lock; |
| 728 | struct list_head list; | 744 | struct list_head list; |
| 729 | }; | 745 | }; |
| 730 | 746 | ||
| 747 | struct usb_dynid { | ||
| 748 | struct list_head node; | ||
| 749 | struct usb_device_id id; | ||
| 750 | }; | ||
| 751 | |||
| 752 | extern ssize_t usb_store_new_id(struct usb_dynids *dynids, | ||
| 753 | struct device_driver *driver, | ||
| 754 | const char *buf, size_t count); | ||
| 755 | |||
| 731 | /** | 756 | /** |
| 732 | * struct usbdrv_wrap - wrapper for driver-model structure | 757 | * struct usbdrv_wrap - wrapper for driver-model structure |
| 733 | * @driver: The driver-model core driver structure. | 758 | * @driver: The driver-model core driver structure. |
| @@ -868,10 +893,11 @@ struct usb_class_driver { | |||
| 868 | * use these in module_init()/module_exit() | 893 | * use these in module_init()/module_exit() |
| 869 | * and don't forget MODULE_DEVICE_TABLE(usb, ...) | 894 | * and don't forget MODULE_DEVICE_TABLE(usb, ...) |
| 870 | */ | 895 | */ |
| 871 | extern int usb_register_driver(struct usb_driver *, struct module *); | 896 | extern int usb_register_driver(struct usb_driver *, struct module *, |
| 897 | const char *); | ||
| 872 | static inline int usb_register(struct usb_driver *driver) | 898 | static inline int usb_register(struct usb_driver *driver) |
| 873 | { | 899 | { |
| 874 | return usb_register_driver(driver, THIS_MODULE); | 900 | return usb_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); |
| 875 | } | 901 | } |
| 876 | extern void usb_deregister(struct usb_driver *); | 902 | extern void usb_deregister(struct usb_driver *); |
| 877 | 903 | ||
| @@ -1085,7 +1111,6 @@ struct urb | |||
| 1085 | struct kref kref; /* reference count of the URB */ | 1111 | struct kref kref; /* reference count of the URB */ |
| 1086 | spinlock_t lock; /* lock for the URB */ | 1112 | spinlock_t lock; /* lock for the URB */ |
| 1087 | void *hcpriv; /* private data for host controller */ | 1113 | void *hcpriv; /* private data for host controller */ |
| 1088 | int bandwidth; /* bandwidth for INT/ISO request */ | ||
| 1089 | atomic_t use_count; /* concurrent submissions counter */ | 1114 | atomic_t use_count; /* concurrent submissions counter */ |
| 1090 | u8 reject; /* submissions will fail */ | 1115 | u8 reject; /* submissions will fail */ |
| 1091 | 1116 | ||
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild new file mode 100644 index 000000000000..43f160cfe003 --- /dev/null +++ b/include/linux/usb/Kbuild | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | unifdef-y += audio.h | ||
| 2 | unifdef-y += cdc.h | ||
| 3 | unifdef-y += ch9.h | ||
| 4 | unifdef-y += midi.h | ||
| 5 | |||
diff --git a/include/linux/usb_ch9.h b/include/linux/usb/ch9.h index c720d107ff29..ae7833749fa2 100644 --- a/include/linux/usb_ch9.h +++ b/include/linux/usb/ch9.h | |||
| @@ -224,6 +224,7 @@ struct usb_device_descriptor { | |||
| 224 | #define USB_CLASS_CONTENT_SEC 0x0d /* content security */ | 224 | #define USB_CLASS_CONTENT_SEC 0x0d /* content security */ |
| 225 | #define USB_CLASS_VIDEO 0x0e | 225 | #define USB_CLASS_VIDEO 0x0e |
| 226 | #define USB_CLASS_WIRELESS_CONTROLLER 0xe0 | 226 | #define USB_CLASS_WIRELESS_CONTROLLER 0xe0 |
| 227 | #define USB_CLASS_MISC 0xef | ||
| 227 | #define USB_CLASS_APP_SPEC 0xfe | 228 | #define USB_CLASS_APP_SPEC 0xfe |
| 228 | #define USB_CLASS_VENDOR_SPEC 0xff | 229 | #define USB_CLASS_VENDOR_SPEC 0xff |
| 229 | 230 | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 10f99e5f1a97..33dcd8576696 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
| @@ -179,6 +179,9 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data) | |||
| 179 | * memory structure allocation at this point in time. | 179 | * memory structure allocation at this point in time. |
| 180 | * @shutdown: pointer to the driver's shutdown function. This will be | 180 | * @shutdown: pointer to the driver's shutdown function. This will be |
| 181 | * called when the device is removed from the system. | 181 | * called when the device is removed from the system. |
| 182 | * @usb_driver: pointer to the struct usb_driver that controls this | ||
| 183 | * device. This is necessary to allow dynamic ids to be added to | ||
| 184 | * the driver from sysfs. | ||
| 182 | * | 185 | * |
| 183 | * This structure is defines a USB Serial driver. It provides all of | 186 | * This structure is defines a USB Serial driver. It provides all of |
| 184 | * the information that the USB serial core code needs. If the function | 187 | * the information that the USB serial core code needs. If the function |
| @@ -202,6 +205,8 @@ struct usb_serial_driver { | |||
| 202 | 205 | ||
| 203 | struct list_head driver_list; | 206 | struct list_head driver_list; |
| 204 | struct device_driver driver; | 207 | struct device_driver driver; |
| 208 | struct usb_driver *usb_driver; | ||
| 209 | struct usb_dynids dynids; | ||
| 205 | 210 | ||
| 206 | int (*probe) (struct usb_serial *serial, const struct usb_device_id *id); | 211 | int (*probe) (struct usb_serial *serial, const struct usb_device_id *id); |
| 207 | int (*attach) (struct usb_serial *serial); | 212 | int (*attach) (struct usb_serial *serial); |
diff --git a/include/linux/usb_gadgetfs.h b/include/linux/usb_gadgetfs.h index b53d6ae8e55e..8086d5a9b94e 100644 --- a/include/linux/usb_gadgetfs.h +++ b/include/linux/usb_gadgetfs.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #include <asm/types.h> | 2 | #include <asm/types.h> |
| 3 | #include <asm/ioctl.h> | 3 | #include <asm/ioctl.h> |
| 4 | 4 | ||
| 5 | #include <linux/usb_ch9.h> | 5 | #include <linux/usb/ch9.h> |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Filesystem based user-mode API to USB Gadget controller hardware | 8 | * Filesystem based user-mode API to USB Gadget controller hardware |
diff --git a/include/linux/video_output.h b/include/linux/video_output.h new file mode 100644 index 000000000000..e63e0c03ee0d --- /dev/null +++ b/include/linux/video_output.h | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | /* | ||
| 2 | * | ||
| 3 | * Copyright (C) 2006 Luming Yu <luming.yu@intel.com> | ||
| 4 | * | ||
| 5 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
| 10 | * your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, but | ||
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License along | ||
| 18 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 19 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | ||
| 20 | * | ||
| 21 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 22 | */ | ||
| 23 | #ifndef _LINUX_VIDEO_OUTPUT_H | ||
| 24 | #define _LINUX_VIDEO_OUTPUT_H | ||
| 25 | #include <linux/device.h> | ||
| 26 | struct output_device; | ||
| 27 | struct output_properties { | ||
| 28 | int (*set_state)(struct output_device *); | ||
| 29 | int (*get_status)(struct output_device *); | ||
| 30 | }; | ||
| 31 | struct output_device { | ||
| 32 | int request_state; | ||
| 33 | struct output_properties *props; | ||
| 34 | struct class_device class_dev; | ||
| 35 | }; | ||
| 36 | #define to_output_device(obj) container_of(obj, struct output_device, class_dev) | ||
| 37 | struct output_device *video_output_register(const char *name, | ||
| 38 | struct device *dev, | ||
| 39 | void *devdata, | ||
| 40 | struct output_properties *op); | ||
| 41 | void video_output_unregister(struct output_device *dev); | ||
| 42 | #endif | ||
diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h index 2cd05013edfc..3add87465b1f 100644 --- a/include/linux/wanrouter.h +++ b/include/linux/wanrouter.h | |||
| @@ -516,9 +516,6 @@ struct wan_device { | |||
| 516 | /* Public functions available for device drivers */ | 516 | /* Public functions available for device drivers */ |
| 517 | extern int register_wan_device(struct wan_device *wandev); | 517 | extern int register_wan_device(struct wan_device *wandev); |
| 518 | extern int unregister_wan_device(char *name); | 518 | extern int unregister_wan_device(char *name); |
| 519 | __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev); | ||
| 520 | int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev, | ||
| 521 | unsigned short type); | ||
| 522 | 519 | ||
| 523 | /* Proc interface functions. These must not be called by the drivers! */ | 520 | /* Proc interface functions. These must not be called by the drivers! */ |
| 524 | extern int wanrouter_proc_init(void); | 521 | extern int wanrouter_proc_init(void); |
| @@ -527,11 +524,6 @@ extern int wanrouter_proc_add(struct wan_device *wandev); | |||
| 527 | extern int wanrouter_proc_delete(struct wan_device *wandev); | 524 | extern int wanrouter_proc_delete(struct wan_device *wandev); |
| 528 | extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); | 525 | extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); |
| 529 | 526 | ||
| 530 | extern void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); | ||
| 531 | extern void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); | ||
| 532 | |||
| 533 | |||
| 534 | |||
| 535 | /* Public Data */ | 527 | /* Public Data */ |
| 536 | /* list of registered devices */ | 528 | /* list of registered devices */ |
| 537 | extern struct wan_device *wanrouter_router_devlist; | 529 | extern struct wan_device *wanrouter_router_devlist; |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 9529ea1ae392..15ca89e9961b 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
| @@ -178,6 +178,9 @@ enum { | |||
| 178 | XFRM_MSG_REPORT, | 178 | XFRM_MSG_REPORT, |
| 179 | #define XFRM_MSG_REPORT XFRM_MSG_REPORT | 179 | #define XFRM_MSG_REPORT XFRM_MSG_REPORT |
| 180 | 180 | ||
| 181 | XFRM_MSG_MIGRATE, | ||
| 182 | #define XFRM_MSG_MIGRATE XFRM_MSG_MIGRATE | ||
| 183 | |||
| 181 | __XFRM_MSG_MAX | 184 | __XFRM_MSG_MAX |
| 182 | }; | 185 | }; |
| 183 | #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) | 186 | #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) |
| @@ -256,6 +259,7 @@ enum xfrm_attr_type_t { | |||
| 256 | XFRMA_COADDR, /* xfrm_address_t */ | 259 | XFRMA_COADDR, /* xfrm_address_t */ |
| 257 | XFRMA_LASTUSED, | 260 | XFRMA_LASTUSED, |
| 258 | XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */ | 261 | XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */ |
| 262 | XFRMA_MIGRATE, | ||
| 259 | __XFRMA_MAX | 263 | __XFRMA_MAX |
| 260 | 264 | ||
| 261 | #define XFRMA_MAX (__XFRMA_MAX - 1) | 265 | #define XFRMA_MAX (__XFRMA_MAX - 1) |
| @@ -351,6 +355,19 @@ struct xfrm_user_report { | |||
| 351 | struct xfrm_selector sel; | 355 | struct xfrm_selector sel; |
| 352 | }; | 356 | }; |
| 353 | 357 | ||
| 358 | struct xfrm_user_migrate { | ||
| 359 | xfrm_address_t old_daddr; | ||
| 360 | xfrm_address_t old_saddr; | ||
| 361 | xfrm_address_t new_daddr; | ||
| 362 | xfrm_address_t new_saddr; | ||
| 363 | __u8 proto; | ||
| 364 | __u8 mode; | ||
| 365 | __u16 reserved; | ||
| 366 | __u32 reqid; | ||
| 367 | __u16 old_family; | ||
| 368 | __u16 new_family; | ||
| 369 | }; | ||
| 370 | |||
| 354 | #ifndef __KERNEL__ | 371 | #ifndef __KERNEL__ |
| 355 | /* backwards compatibility for userspace */ | 372 | /* backwards compatibility for userspace */ |
| 356 | #define XFRMGRP_ACQUIRE 1 | 373 | #define XFRMGRP_ACQUIRE 1 |
| @@ -375,6 +392,8 @@ enum xfrm_nlgroups { | |||
| 375 | #define XFRMNLGRP_AEVENTS XFRMNLGRP_AEVENTS | 392 | #define XFRMNLGRP_AEVENTS XFRMNLGRP_AEVENTS |
| 376 | XFRMNLGRP_REPORT, | 393 | XFRMNLGRP_REPORT, |
| 377 | #define XFRMNLGRP_REPORT XFRMNLGRP_REPORT | 394 | #define XFRMNLGRP_REPORT XFRMNLGRP_REPORT |
| 395 | XFRMNLGRP_MIGRATE, | ||
| 396 | #define XFRMNLGRP_MIGRATE XFRMNLGRP_MIGRATE | ||
| 378 | __XFRMNLGRP_MAX | 397 | __XFRMNLGRP_MAX |
| 379 | }; | 398 | }; |
| 380 | #define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1) | 399 | #define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1) |
