diff options
| author | Linus Torvalds <torvalds@home.osdl.org> | 2004-01-06 15:44:53 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-01-06 15:44:53 -0800 |
| commit | 0e00c9efc00ceda5eb83c7799a49d9a22e6c3ed4 (patch) | |
| tree | 86e52b10d8fe5a8689f32643c030c42a6caa91e8 /include/linux | |
| parent | 3115b7080c9f03e28c82af7eae0bd8f9a278fc77 (diff) | |
| parent | 0c8ad9d059408e60916b8c974e1f20655c2b1810 (diff) | |
Merge bk://linux-dj.bkbits.net/agpgart
into home.osdl.org:/home/torvalds/v2.5/linux
Diffstat (limited to 'include/linux')
46 files changed, 495 insertions, 187 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 0ac6a27ea0db..4f090059372e 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -162,7 +162,7 @@ struct bio { */ #define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1) -#define __BVEC_START(bio) bio_iovec_idx((bio), 0) +#define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx) #define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) #define BIOVEC_VIRT_MERGEABLE(vec1, vec2) \ diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 35e0f0004e87..f90e9ac25738 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -195,11 +195,6 @@ enum rq_flag_bits { __REQ_PM_SUSPEND, /* suspend request */ __REQ_PM_RESUME, /* resume request */ __REQ_PM_SHUTDOWN, /* shutdown request */ - __REQ_IDETAPE_PC1, /* packet command (first stage) */ - __REQ_IDETAPE_PC2, /* packet command (second stage) */ - __REQ_IDETAPE_READ, - __REQ_IDETAPE_WRITE, - __REQ_IDETAPE_READ_BUFFER, __REQ_NR_BITS, /* stops here */ }; @@ -225,11 +220,6 @@ enum rq_flag_bits { #define REQ_PM_SUSPEND (1 << __REQ_PM_SUSPEND) #define REQ_PM_RESUME (1 << __REQ_PM_RESUME) #define REQ_PM_SHUTDOWN (1 << __REQ_PM_SHUTDOWN) -#define REQ_IDETAPE_PC1 (1 << __REQ_IDETAPE_PC1) -#define REQ_IDETAPE_PC2 (1 << __REQ_IDETAPE_PC2) -#define REQ_IDETAPE_READ (1 << __REQ_IDETAPE_READ) -#define REQ_IDETAPE_WRITE (1 << __REQ_IDETAPE_WRITE) -#define REQ_IDETAPE_READ_BUFFER (1 << __REQ_IDETAPE_READ_BUFFER) /* * State information carried for REQ_PM_SUSPEND and REQ_PM_RESUME diff --git a/include/linux/compat.h b/include/linux/compat.h index 3e8e53bdd42e..6bcfa56141b2 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -44,8 +44,8 @@ typedef struct { } compat_sigset_t; extern int cp_compat_stat(struct kstat *, struct compat_stat *); -extern int get_compat_timespec(struct timespec *, struct compat_timespec *); -extern int put_compat_timespec(struct timespec *, struct compat_timespec *); +extern int get_compat_timespec(struct timespec *, const struct compat_timespec *); +extern int put_compat_timespec(struct timespec *, const struct compat_timespec *); struct compat_iovec { compat_uptr_t iov_base; @@ -76,20 +76,6 @@ struct compat_rusage { compat_long_t ru_nivcsw; }; -struct compat_statfs64 { - __u32 f_type; - __u32 f_bsize; - __u64 f_blocks; - __u64 f_bfree; - __u64 f_bavail; - __u64 f_files; - __u64 f_ffree; - __kernel_fsid_t f_fsid; - __u32 f_namelen; - __u32 f_frsize; - __u32 f_spare[5]; -}; - struct compat_dirent { u32 d_ino; compat_off_t d_off; diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 976a56a78119..d87c417544bc 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h @@ -678,3 +678,10 @@ COMPATIBLE_IOCTL(NBD_CLEAR_QUE) COMPATIBLE_IOCTL(NBD_PRINT_DEBUG) COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS) COMPATIBLE_IOCTL(NBD_DISCONNECT) +/* i2c */ +COMPATIBLE_IOCTL(I2C_SLAVE) +COMPATIBLE_IOCTL(I2C_SLAVE_FORCE) +COMPATIBLE_IOCTL(I2C_TENBIT) +COMPATIBLE_IOCTL(I2C_PEC) +COMPATIBLE_IOCTL(I2C_RETRIES) +COMPATIBLE_IOCTL(I2C_TIMEOUT) diff --git a/include/linux/console.h b/include/linux/console.h index cdff9de7ee71..6db0056fb4c9 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -71,18 +71,6 @@ void give_up_console(const struct consw *sw); #define CM_MOVE (3) /* - * Array of consoles built from command line options (console=) - */ -struct console_cmdline -{ - char name[8]; /* Name of the driver */ - int index; /* Minor dev. to use */ - char *options; /* Options for the driver */ -}; -#define MAX_CMDLINECONSOLES 8 -extern struct console_cmdline console_list[MAX_CMDLINECONSOLES]; - -/* * The interface for a console, or any other device that * wants to capture console messages (printer driver?) */ @@ -106,6 +94,7 @@ struct console struct console *next; }; +extern int add_preferred_console(char *name, int idx, char *options); extern void register_console(struct console *); extern int unregister_console(struct console *); extern struct console *console_drivers; diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 51790ee0ed6c..bbc983dc8913 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -57,7 +57,7 @@ struct cpufreq_governor; struct cpufreq_cpuinfo { unsigned int max_freq; unsigned int min_freq; - unsigned int transition_latency; /* in 10^(-9) s */ + unsigned int transition_latency; /* in 10^(-9) s = nanoseconds */ }; struct cpufreq_real_policy { @@ -231,17 +231,18 @@ int cpufreq_update_policy(unsigned int cpu); /* the proc_intf.c needs this */ int cpufreq_parse_governor (char *str_governor, unsigned int *policy, struct cpufreq_governor **governor); -#if defined(CONFIG_CPU_FREQ_GOV_USERSPACE) || defined(CONFIG_CPU_FREQ_GOV_USERSPACE_MODULE) + /********************************************************************* * CPUFREQ USERSPACE GOVERNOR * *********************************************************************/ int cpufreq_gov_userspace_init(void); +#ifdef CONFIG_CPU_FREQ_24_API + int cpufreq_setmax(unsigned int cpu); int cpufreq_set(unsigned int kHz, unsigned int cpu); unsigned int cpufreq_get(unsigned int cpu); -#ifdef CONFIG_CPU_FREQ_24_API /* /proc/sys/cpu */ enum { @@ -289,8 +290,6 @@ enum { #endif /* CONFIG_CPU_FREQ_24_API */ -#endif /* CONFIG_CPU_FREQ_GOV_USERSPACE */ - /********************************************************************* * CPUFREQ DEFAULT GOVERNOR * @@ -305,6 +304,7 @@ extern struct cpufreq_governor cpufreq_gov_userspace; #define CPUFREQ_DEFAULT_GOVERNOR &cpufreq_gov_userspace #endif + /********************************************************************* * FREQUENCY TABLE HELPERS * *********************************************************************/ @@ -318,7 +318,6 @@ struct cpufreq_frequency_table { * order */ }; -#if defined(CONFIG_CPU_FREQ_TABLE) || defined(CONFIG_CPU_FREQ_TABLE_MODULE) int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy, struct cpufreq_frequency_table *table); @@ -340,5 +339,4 @@ void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table, void cpufreq_frequency_table_put_attr(unsigned int cpu); -#endif /* CONFIG_CPU_FREQ_TABLE */ #endif /* _LINUX_CPUFREQ_H */ diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index c43921ec27fe..6aa67b15b76f 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -1,42 +1,9 @@ #ifndef __LINUX_CPUMASK_H #define __LINUX_CPUMASK_H -#include <linux/config.h> -#include <linux/kernel.h> #include <linux/threads.h> -#include <linux/types.h> -#include <linux/bitmap.h> - -#if NR_CPUS > BITS_PER_LONG && NR_CPUS != 1 -#define CPU_ARRAY_SIZE BITS_TO_LONGS(NR_CPUS) - -struct cpumask -{ - unsigned long mask[CPU_ARRAY_SIZE]; -}; - -typedef struct cpumask cpumask_t; - -#else -typedef unsigned long cpumask_t; -#endif - -#ifdef CONFIG_SMP -#if NR_CPUS > BITS_PER_LONG -#include <asm-generic/cpumask_array.h> -#else -#include <asm-generic/cpumask_arith.h> -#endif -#else -#include <asm-generic/cpumask_up.h> -#endif - -#if NR_CPUS <= 4*BITS_PER_LONG -#include <asm-generic/cpumask_const_value.h> -#else -#include <asm-generic/cpumask_const_reference.h> -#endif - +#include <asm/cpumask.h> +#include <asm/bug.h> #ifdef CONFIG_SMP @@ -53,19 +20,31 @@ extern cpumask_t cpu_online_map; static inline int next_online_cpu(int cpu, cpumask_t map) { do - cpu = next_cpu_const(cpu, map); + cpu = next_cpu_const(cpu, mk_cpumask_const(map)); while (cpu < NR_CPUS && !cpu_online(cpu)); return cpu; } #define for_each_cpu(cpu, map) \ - for (cpu = first_cpu_const(map); \ + for (cpu = first_cpu_const(mk_cpumask_const(map)); \ cpu < NR_CPUS; \ - cpu = next_cpu_const(cpu,map)) + cpu = next_cpu_const(cpu,mk_cpumask_const(map))) #define for_each_online_cpu(cpu, map) \ - for (cpu = first_cpu_const(map); \ + for (cpu = first_cpu_const(mk_cpumask_const(map)); \ cpu < NR_CPUS; \ cpu = next_online_cpu(cpu,map)) +extern int __mask_snprintf_len(char *buf, unsigned int buflen, + const unsigned long *maskp, unsigned int maskbytes); + +#define cpumask_snprintf(buf, buflen, map) \ + __mask_snprintf_len(buf, buflen, cpus_addr(map), sizeof(map)) + +extern int __mask_parse_len(const char __user *ubuf, unsigned int ubuflen, + unsigned long *maskp, unsigned int maskbytes); + +#define cpumask_parse(buf, buflen, map) \ + __mask_parse_len(buf, buflen, cpus_addr(map), sizeof(map)) + #endif /* __LINUX_CPUMASK_H */ diff --git a/include/linux/device.h b/include/linux/device.h index 6c43fdbbf23a..8f008e19b83f 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -372,7 +372,7 @@ extern int platform_device_register(struct platform_device *); extern void platform_device_unregister(struct platform_device *); extern struct bus_type platform_bus_type; -extern struct device legacy_bus; +extern struct device platform_bus; /* drivers/base/power.c */ extern void device_shutdown(void); diff --git a/include/linux/efi.h b/include/linux/efi.h index 645fc382081c..86e9d2ebb5eb 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -16,6 +16,8 @@ #include <linux/time.h> #include <linux/types.h> #include <linux/proc_fs.h> +#include <linux/rtc.h> +#include <linux/ioport.h> #include <asm/page.h> #include <asm/system.h> @@ -77,18 +79,23 @@ typedef struct { #define EFI_MAX_MEMORY_TYPE 14 /* Attribute values: */ -#define EFI_MEMORY_UC 0x0000000000000001 /* uncached */ -#define EFI_MEMORY_WC 0x0000000000000002 /* write-coalescing */ -#define EFI_MEMORY_WT 0x0000000000000004 /* write-through */ -#define EFI_MEMORY_WB 0x0000000000000008 /* write-back */ -#define EFI_MEMORY_WP 0x0000000000001000 /* write-protect */ -#define EFI_MEMORY_RP 0x0000000000002000 /* read-protect */ -#define EFI_MEMORY_XP 0x0000000000004000 /* execute-protect */ -#define EFI_MEMORY_RUNTIME 0x8000000000000000 /* range requires runtime mapping */ +#define EFI_MEMORY_UC ((u64)0x0000000000000001ULL) /* uncached */ +#define EFI_MEMORY_WC ((u64)0x0000000000000002ULL) /* write-coalescing */ +#define EFI_MEMORY_WT ((u64)0x0000000000000004ULL) /* write-through */ +#define EFI_MEMORY_WB ((u64)0x0000000000000008ULL) /* write-back */ +#define EFI_MEMORY_WP ((u64)0x0000000000001000ULL) /* write-protect */ +#define EFI_MEMORY_RP ((u64)0x0000000000002000ULL) /* read-protect */ +#define EFI_MEMORY_XP ((u64)0x0000000000004000ULL) /* execute-protect */ +#define EFI_MEMORY_RUNTIME ((u64)0x8000000000000000ULL) /* range requires runtime mapping */ #define EFI_MEMORY_DESCRIPTOR_VERSION 1 #define EFI_PAGE_SHIFT 12 +/* + * For current x86 implementations of EFI, there is + * additional padding in the mem descriptors. This is not + * the case in ia64. Need to have this fixed in the f/w. + */ typedef struct { u32 type; u32 pad; @@ -96,6 +103,9 @@ typedef struct { u64 virt_addr; u64 num_pages; u64 attribute; +#if defined (__i386__) + u64 pad1; +#endif } efi_memory_desc_t; typedef int efi_freemem_callback_t (unsigned long start, unsigned long end, void *arg); @@ -132,11 +142,12 @@ typedef struct { */ #define EFI_RESET_COLD 0 #define EFI_RESET_WARM 1 +#define EFI_RESET_SHUTDOWN 2 /* * EFI Runtime Services table */ -#define EFI_RUNTIME_SERVICES_SIGNATURE 0x5652453544e5552 +#define EFI_RUNTIME_SERVICES_SIGNATURE ((u64)0x5652453544e5552ULL) #define EFI_RUNTIME_SERVICES_REVISION 0x00010000 typedef struct { @@ -169,6 +180,10 @@ typedef efi_status_t efi_set_variable_t (efi_char16_t *name, efi_guid_t *vendor, typedef efi_status_t efi_get_next_high_mono_count_t (u32 *count); typedef void efi_reset_system_t (int reset_type, efi_status_t status, unsigned long data_size, efi_char16_t *data); +typedef efi_status_t efi_set_virtual_address_map_t (unsigned long memory_map_size, + unsigned long descriptor_size, + u32 descriptor_version, + efi_memory_desc_t *virtual_map); /* * EFI Configuration Table and GUID definitions @@ -194,12 +209,15 @@ typedef void efi_reset_system_t (int reset_type, efi_status_t status, #define HCDP_TABLE_GUID \ EFI_GUID( 0xf951938d, 0x620b, 0x42ef, 0x82, 0x79, 0xa8, 0x4b, 0x79, 0x61, 0x78, 0x98 ) +#define UGA_IO_PROTOCOL_GUID \ + EFI_GUID( 0x61a4d49e, 0x6f68, 0x4f1b, 0xb9, 0x22, 0xa8, 0x6e, 0xed, 0xb, 0x7, 0xa2 ) + typedef struct { efi_guid_t guid; unsigned long table; } efi_config_table_t; -#define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249 +#define EFI_SYSTEM_TABLE_SIGNATURE ((u64)0x5453595320494249ULL) #define EFI_SYSTEM_TABLE_REVISION ((1 << 16) | 00) typedef struct { @@ -218,6 +236,13 @@ typedef struct { unsigned long tables; } efi_system_table_t; +struct efi_memory_map { + efi_memory_desc_t *phys_map; + efi_memory_desc_t *map; + int nr_map; + unsigned long desc_version; +}; + /* * All runtime access to EFI goes through this structure: */ @@ -230,6 +255,7 @@ extern struct efi { void *sal_systab; /* SAL system table */ void *boot_info; /* boot info table */ void *hcdp; /* HCDP table */ + void *uga; /* UGA table */ efi_get_time_t *get_time; efi_set_time_t *set_time; efi_get_wakeup_time_t *get_wakeup_time; @@ -239,6 +265,7 @@ extern struct efi { efi_set_variable_t *set_variable; efi_get_next_high_mono_count_t *get_next_high_mono_count; efi_reset_system_t *reset_system; + efi_set_virtual_address_map_t *set_virtual_address_map; } efi; static inline int @@ -260,12 +287,25 @@ efi_guid_unparse(efi_guid_t *guid, char *out) extern void efi_init (void); extern void efi_map_pal_code (void); +extern void efi_map_memmap(void); extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg); extern void efi_gettimeofday (struct timespec *ts); extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */ extern u64 efi_get_iobase (void); extern u32 efi_mem_type (unsigned long phys_addr); extern u64 efi_mem_attributes (unsigned long phys_addr); +extern void efi_initialize_iomem_resources(struct resource *code_resource, + struct resource *data_resource); +extern efi_status_t phys_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc); +extern unsigned long inline __init efi_get_time(void); +extern int inline __init efi_set_rtc_mmss(unsigned long nowtime); +extern struct efi_memory_map memmap; + +#ifdef CONFIG_EFI +extern int efi_enabled; +#else +#define efi_enabled 0 +#endif /* * Variable Attributes diff --git a/include/linux/fs.h b/include/linux/fs.h index b3a714c094d2..ab962f0b00c2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -630,6 +630,7 @@ extern int __break_lease(struct inode *inode, unsigned int flags); extern void lease_get_mtime(struct inode *, struct timespec *time); extern int lock_may_read(struct inode *, loff_t start, unsigned long count); extern int lock_may_write(struct inode *, loff_t start, unsigned long count); +extern void steal_locks(fl_owner_t from); struct fasync_struct { int magic; @@ -1408,5 +1409,8 @@ static inline ino_t parent_ino(struct dentry *dentry) return res; } +/* kernel/fork.c */ +extern int unshare_files(void); + #endif /* __KERNEL__ */ #endif /* _LINUX_FS_H */ diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index b3dd00de8dc3..72bda668895b 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -39,6 +39,7 @@ mark_mm_hugetlb(struct mm_struct *mm, struct vm_area_struct *vma) #ifndef ARCH_HAS_HUGEPAGE_ONLY_RANGE #define is_hugepage_only_range(addr, len) 0 +#define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0) #endif #else /* !CONFIG_HUGETLB_PAGE */ @@ -63,6 +64,7 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) #define is_aligned_hugepage_range(addr, len) 0 #define pmd_huge(x) 0 #define is_hugepage_only_range(addr, len) 0 +#define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0) #ifndef HPAGE_MASK #define HPAGE_MASK 0 /* Keep the compiler happy */ diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h index 1c78b593851a..d228230ffe5d 100644 --- a/include/linux/i2c-dev.h +++ b/include/linux/i2c-dev.h @@ -43,4 +43,6 @@ struct i2c_rdwr_ioctl_data { __u32 nmsgs; /* number of i2c_msgs */ }; +#define I2C_RDRW_IOCTL_MAX_MSGS 42 + #endif /* _LINUX_I2C_DEV_H */ diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 7dc4abf806c2..74a7286240ba 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h @@ -153,6 +153,7 @@ #define I2C_DRIVERID_FS451 1037 #define I2C_DRIVERID_W83627HF 1038 #define I2C_DRIVERID_LM85 1039 +#define I2C_DRIVERID_LM83 1040 /* * ---- Adapter types ---------------------------------------------------- @@ -258,6 +259,7 @@ #define I2C_HW_SMBUS_AMD8111 0x0a #define I2C_HW_SMBUS_SCX200 0x0b #define I2C_HW_SMBUS_NFORCE2 0x0c +#define I2C_HW_SMBUS_W9968CF 0x0d /* --- ISA pseudo-adapter */ #define I2C_HW_ISA 0x00 diff --git a/include/linux/ide.h b/include/linux/ide.h index fe10ca8d3dd8..e27f0d9d733f 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -51,9 +51,6 @@ #ifndef SUPPORT_VLB_SYNC /* 1 to support weird 32-bit chips */ #define SUPPORT_VLB_SYNC 1 /* 0 to reduce kernel size */ #endif -#ifndef DISK_RECOVERY_TIME /* off=0; on=access_delay_time */ -#define DISK_RECOVERY_TIME 0 /* for hardware that needs it */ -#endif #ifndef OK_TO_RESET_CONTROLLER /* 1 needed for good error recovery */ #define OK_TO_RESET_CONTROLLER 1 /* 0 for use with AH2372A/B interface */ #endif @@ -246,11 +243,11 @@ typedef unsigned char byte; /* used everywhere */ /* * Timeouts for various operations: */ -#define WAIT_DRQ (5*HZ/100) /* 50msec - spec allows up to 20ms */ +#define WAIT_DRQ (HZ/10) /* 100msec - spec allows up to 20ms */ #if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) #define WAIT_READY (5*HZ) /* 5sec - some laptops are very slow */ #else -#define WAIT_READY (3*HZ/100) /* 30msec - should be instantaneous */ +#define WAIT_READY (HZ/10) /* 100msec - should be instantaneous */ #endif /* CONFIG_APM || CONFIG_APM_MODULE */ #define WAIT_PIDENTIFY (10*HZ) /* 10sec - should be less than 3ms (?), if all ATAPI CD is closed at boot */ #define WAIT_WORSTCASE (30*HZ) /* 30sec - worst case when spinning up */ @@ -999,10 +996,6 @@ typedef struct hwif_s { unsigned dma_extra; /* extra addr for dma ports */ unsigned long config_data; /* for use by chipset-specific code */ unsigned long select_data; /* for use by chipset-specific code */ -#if (DISK_RECOVERY_TIME > 0) - unsigned long last_time; /* time when previous rq was done */ -#endif - unsigned noprobe : 1; /* don't probe for this interface */ unsigned present : 1; /* this interface exists */ @@ -1693,6 +1686,8 @@ extern void ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, ide_pci_de #define GOOD_DMA_DRIVE 1 #ifdef CONFIG_BLK_DEV_IDEDMA_PCI +extern int ide_build_sglist(ide_drive_t *, struct request *); +extern int ide_raw_build_sglist(ide_drive_t *, struct request *); extern int ide_build_dmatable(ide_drive_t *, struct request *); extern void ide_destroy_dmatable(ide_drive_t *); extern ide_startstop_t ide_dma_intr(ide_drive_t *); diff --git a/include/linux/input.h b/include/linux/input.h index 189476217b5c..eff36f445c25 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -870,6 +870,7 @@ struct input_handler { char *name; struct input_device_id *id_table; + struct input_device_id *blacklist; struct list_head h_list; struct list_head node; diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index f4ff32632c5d..459630f41680 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -10,7 +10,7 @@ /* * The 64-bit value is not volatile - you MUST NOT read it - * without holding read_lock_irq(&xtime_lock). + * without sampling the sequence number in xtime_lock. * get_jiffies_64() will do this for you as appropriate. */ extern u64 jiffies_64; diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 6d4cb2db44db..74af714ff946 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -87,6 +87,8 @@ extern int session_of_pgrp(int pgrp); asmlinkage int printk(const char * fmt, ...) __attribute__ ((format (printf, 1, 2))); +unsigned long int_sqrt(unsigned long); + static inline void console_silent(void) { console_loglevel = 0; diff --git a/include/linux/keyboard.h b/include/linux/keyboard.h index a7fcf94e5a0d..f9c6ad75213a 100644 --- a/include/linux/keyboard.h +++ b/include/linux/keyboard.h @@ -2,7 +2,6 @@ #define __LINUX_KEYBOARD_H #include <linux/wait.h> -#include <linux/input.h> #define KG_SHIFT 0 #define KG_CTRL 2 @@ -17,7 +16,7 @@ #define NR_SHIFT 9 -#define NR_KEYS (KEY_MAX+1) +#define NR_KEYS 255 #define MAX_NR_KEYMAPS 256 /* This means 128Kb if all keymaps are allocated. Only the superuser may increase the number of keymaps beyond MAX_NR_OF_USER_KEYMAPS. */ diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 8412faeea0f7..7c5af18df9d1 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h @@ -24,6 +24,8 @@ #include <linux/compiler.h> #ifdef CONFIG_KMOD +/* modprobe exit status on success, -ve on error. Return value + * usually useless though. */ extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2))); #else static inline int request_module(const char * name, ...) { return -ENOSYS; } diff --git a/include/linux/libata.h b/include/linux/libata.h index feabeae1cfc0..53ce430954da 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -28,6 +28,7 @@ #include <asm/io.h> #include <linux/ata.h> + /* * compile-time options */ @@ -66,8 +67,6 @@ /* defines only for the constants which don't work well as enums */ #define ATA_TAG_POISON 0xfafbfcfdU -#define ATA_DMA_BOUNDARY 0xffffUL -#define ATA_DMA_MASK 0xffffffffULL enum { /* various global constants */ @@ -171,6 +170,7 @@ enum { }; /* forward declarations */ +struct scsi_device; struct ata_port_operations; struct ata_port; struct ata_queued_cmd; @@ -247,8 +247,8 @@ struct ata_queued_cmd { struct ata_port *ap; struct ata_device *dev; - Scsi_Cmnd *scsicmd; - void (*scsidone)(Scsi_Cmnd *); + struct scsi_cmnd *scsicmd; + void (*scsidone)(struct scsi_cmnd *); struct list_head node; unsigned long flags; /* ATA_QCFLAG_xxx */ @@ -403,7 +403,7 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i extern void ata_pci_remove_one (struct pci_dev *pdev); extern int ata_device_add(struct ata_probe_ent *ent); extern int ata_scsi_detect(Scsi_Host_Template *sht); -extern int ata_scsi_queuecmd(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *)); +extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); extern int ata_scsi_error(struct Scsi_Host *host); extern int ata_scsi_release(struct Scsi_Host *host); extern int ata_scsi_slave_config(struct scsi_device *sdev); @@ -427,6 +427,9 @@ extern void ata_bmdma_start_pio (struct ata_queued_cmd *qc); extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits); extern void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat, unsigned int done_late); extern void ata_eng_timeout(struct ata_port *ap); +extern int ata_std_bios_param(struct scsi_device *sdev, + struct block_device *bdev, + sector_t capacity, int geom[]); static inline unsigned long msecs_to_jiffies(unsigned long msecs) diff --git a/include/linux/list.h b/include/linux/list.h index 0835011b0ffb..9a5df31af22e 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -212,6 +212,12 @@ static inline int list_empty(const struct list_head *head) * list_empty_careful - tests whether a list is * empty _and_ checks that no other CPU might be * in the process of still modifying either member + * + * NOTE: using list_empty_careful() without synchronization + * can only be safe if the only activity that can happen + * to the list entry is list_del_init(). Eg. it cannot be used + * if another CPU could re-list_add() it. + * * @head: the list to test. */ static inline int list_empty_careful(const struct list_head *head) diff --git a/include/linux/mm.h b/include/linux/mm.h index f72772e17665..881091514f01 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -143,7 +143,7 @@ extern pgprot_t protection_map[16]; struct vm_operations_struct { void (*open)(struct vm_area_struct * area); void (*close)(struct vm_area_struct * area); - struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int unused); + struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type); int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock); }; @@ -322,8 +322,10 @@ static inline void put_page(struct page *page) /* * The zone field is never updated after free_area_init_core() * sets it, so none of the operations on it need to be atomic. + * We'll have up to log2(MAX_NUMNODES * MAX_NR_ZONES) zones + * total, so we use NODES_SHIFT here to get enough bits. */ -#define ZONE_SHIFT (BITS_PER_LONG - 8) +#define ZONE_SHIFT (BITS_PER_LONG - NODES_SHIFT - MAX_NR_ZONES_SHIFT) struct zone; extern struct zone *zone_table[]; @@ -405,7 +407,7 @@ static inline int page_mapped(struct page *page) extern void show_free_areas(void); struct page *shmem_nopage(struct vm_area_struct * vma, - unsigned long address, int unused); + unsigned long address, int *type); struct file *shmem_file_setup(char * name, loff_t size, unsigned long flags); void shmem_lock(struct file * file, int lock); int shmem_zero_setup(struct vm_area_struct *); @@ -563,7 +565,7 @@ extern unsigned long page_unuse(struct page *); extern void truncate_inode_pages(struct address_space *, loff_t); /* generic vm_area_ops exported for stackable file systems */ -extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int); +struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int *); /* mm/page-writeback.c */ int write_one_page(struct page *page, int wait); diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index bea51c4f5b22..a089e01dad03 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -159,7 +159,10 @@ struct zone { #define ZONE_DMA 0 #define ZONE_NORMAL 1 #define ZONE_HIGHMEM 2 -#define MAX_NR_ZONES 3 + +#define MAX_NR_ZONES 3 /* Sync this with MAX_NR_ZONES_SHIFT */ +#define MAX_NR_ZONES_SHIFT 2 /* ceil(log2(MAX_NR_ZONES)) */ + #define GFP_ZONEMASK 0x03 /* @@ -284,8 +287,6 @@ struct ctl_table; struct file; int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *, void *, size_t *); -extern void setup_per_zone_pages_min(void); - #ifdef CONFIG_NUMA #define MAX_NR_MEMBLKS BITS_PER_LONG /* Max number of Memory Blocks */ diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index b1fb57c91086..f5c6209bc8f1 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h @@ -4,13 +4,8 @@ /* * The MS-DOS filesystem constants/structures */ -#include <linux/buffer_head.h> -#include <linux/string.h> #include <asm/byteorder.h> -struct statfs; - - #define SECTOR_SIZE 512 /* sector size (bytes) */ #define SECTOR_BITS 9 /* log2(SECTOR_SIZE) */ #define MSDOS_DPB (MSDOS_DPS) /* dir entries per block */ @@ -18,6 +13,9 @@ struct statfs; #define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry)) #define MSDOS_DPS_BITS 4 /* log2(MSDOS_DPS) */ + +#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ + #define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */ #define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */ @@ -25,8 +23,6 @@ struct statfs; #define FAT_MAX_DIR_ENTRIES (65536) #define FAT_MAX_DIR_SIZE (FAT_MAX_DIR_ENTRIES << MSDOS_DIR_BITS) -#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ - #define ATTR_NONE 0 /* no attribute bits */ #define ATTR_RO 1 /* read-only */ #define ATTR_HIDDEN 2 /* hidden */ @@ -35,10 +31,10 @@ struct statfs; #define ATTR_DIR 16 /* directory */ #define ATTR_ARCH 32 /* archived */ +/* attribute bits that are copied "as is" */ #define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN) - /* attribute bits that are copied "as is" */ +/* bits that are used by the Windows 95/Windows NT extended FAT */ #define ATTR_EXT (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME) - /* bits that are used by the Windows 95/Windows NT extended FAT */ #define CASE_LOWER_BASE 8 /* base is lower case */ #define CASE_LOWER_EXT 16 /* extension is lower case */ @@ -46,8 +42,12 @@ struct statfs; #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ #define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) +/* valid file mode bits */ #define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO) - /* valid file mode bits */ +/* Convert attribute bits and a mask to the UNIX mode. */ +#define MSDOS_MKMODE(a, m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO)) +/* Convert the UNIX mode to MS-DOS attribute bits. */ +#define MSDOS_MKATTR(m) ((m & S_IWUGO) ? ATTR_NONE : ATTR_RO) #define MSDOS_NAME 11 /* maximum name length */ #define MSDOS_LONGNAME 256 /* maximum name length */ @@ -55,24 +55,29 @@ struct statfs; #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ -#define MSDOS_FAT12 4084 /* maximum number of clusters in a 12 bit FAT */ - /* media of boot sector */ #define FAT_VALID_MEDIA(x) ((0xF8 <= (x) && (x) <= 0xFF) || (x) == 0xF0) #define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x)) +/* maximum number of clusters */ +#define MAX_FAT12 0xFF4 +#define MAX_FAT16 0xFFF4 +#define MAX_FAT32 0x0FFFFFF6 +#define MAX_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? MAX_FAT32 : \ + MSDOS_SB(s)->fat_bits == 16 ? MAX_FAT16 : MAX_FAT12) + /* bad cluster mark */ #define BAD_FAT12 0xFF7 #define BAD_FAT16 0xFFF7 -#define BAD_FAT32 0xFFFFFF7 +#define BAD_FAT32 0x0FFFFFF7 #define BAD_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? BAD_FAT32 : \ MSDOS_SB(s)->fat_bits == 16 ? BAD_FAT16 : BAD_FAT12) /* standard EOF */ #define EOF_FAT12 0xFFF #define EOF_FAT16 0xFFFF -#define EOF_FAT32 0xFFFFFFF +#define EOF_FAT32 0x0FFFFFFF #define EOF_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? EOF_FAT32 : \ MSDOS_SB(s)->fat_bits == 16 ? EOF_FAT16 : EOF_FAT12) @@ -80,8 +85,8 @@ struct statfs; #define FAT_ENT_BAD (BAD_FAT32) #define FAT_ENT_EOF (EOF_FAT32) -#define FAT_FSINFO_SIG1 0x41615252 -#define FAT_FSINFO_SIG2 0x61417272 +#define FAT_FSINFO_SIG1 0x41615252 +#define FAT_FSINFO_SIG2 0x61417272 #define IS_FSINFO(x) (CF_LE_L((x)->signature1) == FAT_FSINFO_SIG1 \ && CF_LE_L((x)->signature2) == FAT_FSINFO_SIG2) @@ -179,15 +184,10 @@ struct vfat_slot_info { loff_t i_pos; /* on-disk position of directory entry */ }; -/* Convert attribute bits and a mask to the UNIX mode. */ -#define MSDOS_MKMODE(a,m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO)) - -/* Convert the UNIX mode to MS-DOS attribute bits. */ -#define MSDOS_MKATTR(m) ((m & S_IWUGO) ? ATTR_NONE : ATTR_RO) - - #ifdef __KERNEL__ +#include <linux/buffer_head.h> +#include <linux/string.h> #include <linux/nls.h> #include <linux/msdos_fs_i.h> #include <linux/msdos_fs_sb.h> diff --git a/include/linux/msdos_fs_sb.h b/include/linux/msdos_fs_sb.h index 546458d82ece..c79a172225d3 100644 --- a/include/linux/msdos_fs_sb.h +++ b/include/linux/msdos_fs_sb.h @@ -47,9 +47,9 @@ struct msdos_sb_info { unsigned long data_start; /* first data sector */ unsigned long clusters; /* number of clusters */ unsigned long root_cluster; /* first cluster of the root directory */ - unsigned long fsinfo_sector; /* FAT32 fsinfo offset from start of disk */ + unsigned long fsinfo_sector; /* sector number of FAT32 fsinfo */ struct semaphore fat_lock; - int prev_free; /* previously returned free cluster number */ + int prev_free; /* previously allocated cluster number */ int free_clusters; /* -1 if undefined */ struct fat_mount_options options; struct nls_table *nls_disk; /* Codepage used on disk */ diff --git a/include/linux/nbd.h b/include/linux/nbd.h index 8a3311efe284..dcb0228efcae 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h @@ -35,6 +35,9 @@ enum { /* Define PARANOIA to include extra sanity checking code in here & driver */ #define PARANOIA +/* userspace doesn't need the nbd_device structure */ +#ifdef __KERNEL__ + struct nbd_device { int flags; int harderror; /* Code of hard error */ @@ -53,6 +56,8 @@ struct nbd_device { u64 bytesize; }; +#endif + /* This now IS in some kind of include file... */ /* These are send over network in request/reply magic field */ diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index 88cc98af2dce..bc4f5988251c 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h @@ -8,10 +8,8 @@ #include <linux/netfilter.h> #if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER) #include <asm/atomic.h> -#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) #include <linux/if_ether.h> #endif -#endif /* Bridge Hooks */ /* After promisc drops, checksum checks. */ @@ -71,13 +69,11 @@ static inline void nf_bridge_maybe_copy_header(struct sk_buff *skb) { if (skb->nf_bridge) { -#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) if (skb->protocol == __constant_htons(ETH_P_8021Q)) { - memcpy(skb->data - 18, skb->nf_bridge->hh, 18); + memcpy(skb->data - 18, skb->nf_bridge->data, 18); skb_push(skb, 4); } else -#endif - memcpy(skb->data - 16, skb->nf_bridge->hh, 16); + memcpy(skb->data - 16, skb->nf_bridge->data, 16); } } @@ -86,11 +82,10 @@ void nf_bridge_save_header(struct sk_buff *skb) { int header_size = 16; -#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) if (skb->protocol == __constant_htons(ETH_P_8021Q)) header_size = 18; -#endif - memcpy(skb->nf_bridge->hh, skb->data - header_size, header_size); + + memcpy(skb->nf_bridge->data, skb->data - header_size, header_size); } struct bridge_skb_cb { diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 006fde0295d5..0b35e7111465 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -133,6 +133,7 @@ extern void get_full_page_state(struct page_state *ret); #define inc_page_state(member) mod_page_state(member, 1UL) #define dec_page_state(member) mod_page_state(member, 0UL - 1) +#define add_page_state(member,delta) mod_page_state(member, (delta)) #define sub_page_state(member,delta) mod_page_state(member, 0UL - (delta)) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 8fc118dc90cc..e552cb04a0ed 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -8,7 +8,6 @@ #include <linux/fs.h> #include <linux/list.h> #include <linux/highmem.h> -#include <linux/pagemap.h> #include <asm/uaccess.h> #include <linux/gfp.h> diff --git a/include/linux/parser.h b/include/linux/parser.h index 5f982a1a2600..fa3332861a09 100644 --- a/include/linux/parser.h +++ b/include/linux/parser.h @@ -1,3 +1,14 @@ +/* + * linux/include/linux/parser.h + * + * Header for lib/parser.c + * Intended use of these functions is parsing filesystem argument lists, + * but could potentially be used anywhere else that simple option=arg + * parsing is required. + */ + + +/* associates an integer enumerator with a pattern string. */ struct match_token { int token; char *pattern; @@ -5,15 +16,16 @@ struct match_token { typedef struct match_token match_table_t[]; +/* Maximum number of arguments that match_token will find in a pattern */ enum {MAX_OPT_ARGS = 3}; +/* Describe the location within a string of a substring */ typedef struct { char *from; char *to; } substring_t; -int match_token(char *s, match_table_t table, substring_t args[]); - +int match_token(char *, match_table_t table, substring_t args[]); int match_int(substring_t *, int *result); int match_octal(substring_t *, int *result); int match_hex(substring_t *, int *result); diff --git a/include/linux/pci.h b/include/linux/pci.h index 654840dad226..b88b9d3f5bfc 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -36,6 +36,7 @@ #define PCI_COMMAND_WAIT 0x80 /* Enable address/data stepping */ #define PCI_COMMAND_SERR 0x100 /* Enable SERR */ #define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */ +#define PCI_COMMAND_INTX_DISABLE 0x400 /* INTx Emulation Disable */ #define PCI_STATUS 0x06 /* 16 bits */ #define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */ @@ -198,6 +199,8 @@ #define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */ #define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */ #define PCI_CAP_ID_PCIX 0x07 /* PCI-X */ +#define PCI_CAP_ID_EXP 0x10 /* PCI Express */ +#define PCI_CAP_ID_MSIX 0x11 /* MSI-X */ #define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ #define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ #define PCI_CAP_SIZEOF 4 @@ -275,11 +278,13 @@ #define PCI_MSI_FLAGS_QSIZE 0x70 /* Message queue size configured */ #define PCI_MSI_FLAGS_QMASK 0x0e /* Maximum queue size available */ #define PCI_MSI_FLAGS_ENABLE 0x01 /* MSI feature enabled */ +#define PCI_MSI_FLAGS_MASKBIT 0x100 /* 64-bit mask bits allowed */ #define PCI_MSI_RFU 3 /* Rest of capability flags */ #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ #define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ +#define PCI_MSI_MASK_BIT 16 /* Mask bits register */ /* CompactPCI Hotswap Register */ @@ -695,6 +700,18 @@ void pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t addr); extern struct pci_dev *isa_bridge; #endif +#ifndef CONFIG_PCI_USE_VECTOR +static inline void pci_scan_msi_device(struct pci_dev *dev) {} +static inline int pci_enable_msi(struct pci_dev *dev) {return -1;} +static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {} +#else +extern void pci_scan_msi_device(struct pci_dev *dev); +extern int pci_enable_msi(struct pci_dev *dev); +extern void msi_remove_pci_irq_vectors(struct pci_dev *dev); +extern int msi_alloc_vectors(struct pci_dev* dev, int *vector, int nvec); +extern int msi_free_vectors(struct pci_dev* dev, int *vector, int nvec); +#endif + #endif /* CONFIG_PCI */ /* Include architecture-dependent settings and functions */ diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 074323455323..34e5bb79396b 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -901,6 +901,7 @@ #define PCI_VENDOR_ID_SGI 0x10a9 #define PCI_DEVICE_ID_SGI_IOC3 0x0003 +#define PCI_DEVICE_ID_SGI_IOC4 0x100a #define PCI_VENDOR_ID_SGI_LITHIUM 0x1002 #define PCI_VENDOR_ID_ACC 0x10aa @@ -1785,11 +1786,13 @@ #define PCI_DEVICE_ID_TIGON3_5702 0x1646 #define PCI_DEVICE_ID_TIGON3_5703 0x1647 #define PCI_DEVICE_ID_TIGON3_5704 0x1648 +#define PCI_DEVICE_ID_TIGON3_5704S_2 0x1649 #define PCI_DEVICE_ID_TIGON3_5702FE 0x164d #define PCI_DEVICE_ID_TIGON3_5705 0x1653 #define PCI_DEVICE_ID_TIGON3_5705_2 0x1654 #define PCI_DEVICE_ID_TIGON3_5705M 0x165d #define PCI_DEVICE_ID_TIGON3_5705M_2 0x165e +#define PCI_DEVICE_ID_TIGON3_5705F 0x166e #define PCI_DEVICE_ID_TIGON3_5782 0x1696 #define PCI_DEVICE_ID_TIGON3_5788 0x169c #define PCI_DEVICE_ID_TIGON3_5702X 0x16a6 @@ -2053,6 +2056,7 @@ #define PCI_DEVICE_ID_INTEL_82443MX_3 0x719b #define PCI_DEVICE_ID_INTEL_82443GX_0 0x71a0 #define PCI_DEVICE_ID_INTEL_82443GX_1 0x71a1 +#define PCI_DEVICE_ID_INTEL_82443GX_2 0x71a2 #define PCI_DEVICE_ID_INTEL_82372FB_0 0x7600 #define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601 #define PCI_DEVICE_ID_INTEL_82372FB_2 0x7602 diff --git a/include/linux/pci_msi.h b/include/linux/pci_msi.h new file mode 100644 index 000000000000..0e42e65bc3e1 --- /dev/null +++ b/include/linux/pci_msi.h @@ -0,0 +1,193 @@ +/* + * ../include/linux/pci_msi.h + * + */ + +#ifndef _ASM_PCI_MSI_H +#define _ASM_PCI_MSI_H + +#include <linux/pci.h> + +#define MSI_AUTO -1 +#define NR_REPEATS 23 +#define NR_RESERVED_VECTORS 3 /*FIRST_DEVICE_VECTOR,FIRST_SYSTEM_VECTOR,0x80 */ + +/* + * Assume the maximum number of hot plug slots supported by the system is about + * ten. The worstcase is that each of these slots is hot-added with a device, + * which has two MSI/MSI-X capable functions. To avoid any MSI-X driver, which + * attempts to request all available vectors, NR_HP_RESERVED_VECTORS is defined + * as below to ensure at least one message is assigned to each detected MSI/ + * MSI-X device function. + */ +#define NR_HP_RESERVED_VECTORS 20 + +extern int vector_irq[NR_IRQS]; +extern cpumask_t pending_irq_balance_cpumask[NR_IRQS]; +extern void (*interrupt[NR_IRQS])(void); + +#ifdef CONFIG_SMP +#define set_msi_irq_affinity set_msi_affinity +#else +#define set_msi_irq_affinity NULL +static inline void move_msi(int vector) {} +#endif + +#ifndef CONFIG_X86_IO_APIC +static inline int get_ioapic_vector(struct pci_dev *dev) { return -1;} +static inline void restore_ioapic_irq_handler(int irq) {} +#else +extern void restore_ioapic_irq_handler(int irq); +#endif + +/* + * MSI-X Address Register + */ +#define PCI_MSIX_FLAGS_QSIZE 0x7FF +#define PCI_MSIX_FLAGS_ENABLE (1 << 15) +#define PCI_MSIX_FLAGS_BIRMASK (7 << 0) +#define PCI_MSIX_FLAGS_BITMASK (1 << 0) + +#define PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET 0 +#define PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET 4 +#define PCI_MSIX_ENTRY_DATA_OFFSET 8 +#define PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET 12 +#define PCI_MSIX_ENTRY_SIZE 16 + +#define msi_control_reg(base) (base + PCI_MSI_FLAGS) +#define msi_lower_address_reg(base) (base + PCI_MSI_ADDRESS_LO) +#define msi_upper_address_reg(base) (base + PCI_MSI_ADDRESS_HI) +#define msi_data_reg(base, is64bit) \ + ( (is64bit == 1) ? base+PCI_MSI_DATA_64 : base+PCI_MSI_DATA_32 ) +#define msi_mask_bits_reg(base, is64bit) \ + ( (is64bit == 1) ? base+PCI_MSI_MASK_BIT : base+PCI_MSI_MASK_BIT-4) +#define msi_disable(control) control &= ~PCI_MSI_FLAGS_ENABLE +#define multi_msi_capable(control) \ + (1 << ((control & PCI_MSI_FLAGS_QMASK) >> 1)) +#define multi_msi_enable(control, num) \ + control |= (((num >> 1) << 4) & PCI_MSI_FLAGS_QSIZE); +#define is_64bit_address(control) (control & PCI_MSI_FLAGS_64BIT) +#define is_mask_bit_support(control) (control & PCI_MSI_FLAGS_MASKBIT) +#define msi_enable(control, num) multi_msi_enable(control, num); \ + control |= PCI_MSI_FLAGS_ENABLE + +#define msix_control_reg msi_control_reg +#define msix_table_offset_reg(base) (base + 0x04) +#define msix_pba_offset_reg(base) (base + 0x08) +#define msix_enable(control) control |= PCI_MSIX_FLAGS_ENABLE +#define msix_disable(control) control &= ~PCI_MSIX_FLAGS_ENABLE +#define msix_table_size(control) ((control & PCI_MSIX_FLAGS_QSIZE)+1) +#define multi_msix_capable msix_table_size +#define msix_unmask(address) (address & ~PCI_MSIX_FLAGS_BITMASK) +#define msix_mask(address) (address | PCI_MSIX_FLAGS_BITMASK) +#define msix_is_pending(address) (address & PCI_MSIX_FLAGS_PENDMASK) + +extern char __dbg_str_buf[256]; +#define _DEFINE_DBG_BUFFER char __dbg_str_buf[256]; +#define _DBG_K_TRACE_ENTRY ((unsigned int)0x00000001) +#define _DBG_K_TRACE_EXIT ((unsigned int)0x00000002) +#define _DBG_K_INFO ((unsigned int)0x00000004) +#define _DBG_K_ERROR ((unsigned int)0x00000008) +#define _DBG_K_TRACE (_DBG_K_TRACE_ENTRY | _DBG_K_TRACE_EXIT) + +#define _DEBUG_LEVEL (_DBG_K_INFO | _DBG_K_ERROR | _DBG_K_TRACE) +#define _DBG_PRINT( dbg_flags, args... ) \ +if ( _DEBUG_LEVEL & (dbg_flags) ) \ +{ \ + int len; \ + len = sprintf(__dbg_str_buf, "%s:%d: %s ", \ + __FILE__, __LINE__, __FUNCTION__ ); \ + sprintf(__dbg_str_buf + len, args); \ + printk(KERN_INFO "%s\n", __dbg_str_buf); \ +} + +#define MSI_FUNCTION_TRACE_ENTER \ + _DBG_PRINT (_DBG_K_TRACE_ENTRY, "%s", "[Entry]"); +#define MSI_FUNCTION_TRACE_EXIT \ + _DBG_PRINT (_DBG_K_TRACE_EXIT, "%s", "[Entry]"); + +/* + * MSI Defined Data Structures + */ +#define MSI_ADDRESS_HEADER 0xfee +#define MSI_ADDRESS_HEADER_SHIFT 12 +#define MSI_ADDRESS_HEADER_MASK 0xfff000 +#define MSI_TARGET_CPU_SHIFT 4 +#define MSI_TARGET_CPU_MASK 0xff +#define MSI_DELIVERY_MODE 0 +#define MSI_LEVEL_MODE 1 /* Edge always assert */ +#define MSI_TRIGGER_MODE 0 /* MSI is edge sensitive */ +#define MSI_LOGICAL_MODE 1 +#define MSI_REDIRECTION_HINT_MODE 0 +#ifdef CONFIG_SMP +#define MSI_TARGET_CPU logical_smp_processor_id() +#else +#define MSI_TARGET_CPU TARGET_CPUS +#endif + +struct msg_data { +#if defined(__LITTLE_ENDIAN_BITFIELD) + __u32 vector : 8; + __u32 delivery_mode : 3; /* 000b: FIXED | 001b: lowest prior */ + __u32 reserved_1 : 3; + __u32 level : 1; /* 0: deassert | 1: assert */ + __u32 trigger : 1; /* 0: edge | 1: level */ + __u32 reserved_2 : 16; +#elif defined(__BIG_ENDIAN_BITFIELD) + __u32 reserved_2 : 16; + __u32 trigger : 1; /* 0: edge | 1: level */ + __u32 level : 1; /* 0: deassert | 1: assert */ + __u32 reserved_1 : 3; + __u32 delivery_mode : 3; /* 000b: FIXED | 001b: lowest prior */ + __u32 vector : 8; +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif +} __attribute__ ((packed)); + +struct msg_address { + union { + struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) + __u32 reserved_1 : 2; + __u32 dest_mode : 1; /*0:physic | 1:logic */ + __u32 redirection_hint: 1; /*0: dedicated CPU + 1: lowest priority */ + __u32 reserved_2 : 4; + __u32 dest_id : 24; /* Destination ID */ +#elif defined(__BIG_ENDIAN_BITFIELD) + __u32 dest_id : 24; /* Destination ID */ + __u32 reserved_2 : 4; + __u32 redirection_hint: 1; /*0: dedicated CPU + 1: lowest priority */ + __u32 dest_mode : 1; /*0:physic | 1:logic */ + __u32 reserved_1 : 2; +#else +#error "Bitfield endianness not defined! Check your byteorder.h" +#endif + }u; + __u32 value; + }lo_address; + __u32 hi_address; +} __attribute__ ((packed)); + +struct msi_desc { + struct { + __u8 type : 5; /* {0: unused, 5h:MSI, 11h:MSI-X} */ + __u8 maskbit : 1; /* mask-pending bit supported ? */ + __u8 reserved: 2; /* reserved */ + __u8 entry_nr; /* specific enabled entry */ + __u8 default_vector; /* default pre-assigned vector */ + __u8 current_cpu; /* current destination cpu */ + }msi_attrib; + + struct { + __u16 head; + __u16 tail; + }link; + + unsigned long mask_base; + struct pci_dev *dev; +}; + +#endif /* _ASM_PCI_MSI_H */ diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index 53c52176c391..594f564e031a 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h @@ -8,17 +8,14 @@ #include <linux/spinlock.h> #include <linux/smp.h> #include <linux/threads.h> +#include <linux/percpu.h> #ifdef CONFIG_SMP -struct __percpu_counter { - long count; -} ____cacheline_aligned; - struct percpu_counter { spinlock_t lock; long count; - struct __percpu_counter counters[NR_CPUS]; + long *counters; }; #if NR_CPUS >= 16 @@ -29,12 +26,14 @@ struct percpu_counter { static inline void percpu_counter_init(struct percpu_counter *fbc) { - int i; - spin_lock_init(&fbc->lock); fbc->count = 0; - for (i = 0; i < NR_CPUS; i++) - fbc->counters[i].count = 0; + fbc->counters = alloc_percpu(long); +} + +static inline void percpu_counter_destroy(struct percpu_counter *fbc) +{ + free_percpu(fbc->counters); } void percpu_counter_mod(struct percpu_counter *fbc, long amount); @@ -69,6 +68,10 @@ static inline void percpu_counter_init(struct percpu_counter *fbc) fbc->count = 0; } +static inline void percpu_counter_destroy(struct percpu_counter *fbc) +{ +} + static inline void percpu_counter_mod(struct percpu_counter *fbc, long amount) { diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index fafb0fc55cf7..d8de4a1b03ef 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -141,6 +141,8 @@ extern void proc_rtas_init(void); extern struct proc_dir_entry *proc_symlink(const char *, struct proc_dir_entry *, const char *); extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *); +extern struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, + struct proc_dir_entry *parent); static inline struct proc_dir_entry *create_proc_read_entry(const char *name, mode_t mode, struct proc_dir_entry *base, diff --git a/include/linux/quota.h b/include/linux/quota.h index 447b5e192a74..2f65eb567384 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -250,7 +250,7 @@ struct dquot_operations { void (*free_space) (struct inode *, qsize_t); void (*free_inode) (const struct inode *, unsigned long); int (*transfer) (struct inode *, struct iattr *); - int (*sync_dquot) (struct dquot *); + int (*write_dquot) (struct dquot *); }; /* Operations handling requests from userspace */ diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index a34e79044978..32fe6c84b3b6 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h @@ -1719,7 +1719,7 @@ void reiserfs_allow_writes(struct super_block *s) ; void reiserfs_check_lock_depth(char *caller) ; void reiserfs_prepare_for_journal(struct super_block *, struct buffer_head *bh, int wait) ; void reiserfs_restore_prepared_buffer(struct super_block *, struct buffer_head *bh) ; -int journal_init(struct super_block *, const char * j_dev_name, int old_format) ; +int journal_init(struct super_block *, const char * j_dev_name, int old_format, unsigned int) ; int journal_release(struct reiserfs_transaction_handle*, struct super_block *) ; int journal_release_error(struct reiserfs_transaction_handle*, struct super_block *) ; int journal_end(struct reiserfs_transaction_handle *, struct super_block *, unsigned long) ; diff --git a/include/linux/sched.h b/include/linux/sched.h index fbf3c753ef8a..8bea1256eb08 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -205,7 +205,6 @@ struct mm_struct { unsigned long rss, total_vm, locked_vm; unsigned long def_flags; cpumask_t cpu_vm_mask; - unsigned long swap_address; unsigned long saved_auxv[40]; /* for /proc/PID/auxv */ diff --git a/include/linux/serio.h b/include/linux/serio.h index a3cf7dd02072..d99e973302de 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h @@ -49,6 +49,7 @@ struct serio_dev { irqreturn_t (*interrupt)(struct serio *, unsigned char, unsigned int, struct pt_regs *); void (*connect)(struct serio *, struct serio_dev *dev); + int (*reconnect)(struct serio *); void (*disconnect)(struct serio *); void (*cleanup)(struct serio *); @@ -58,12 +59,15 @@ struct serio_dev { int serio_open(struct serio *serio, struct serio_dev *dev); void serio_close(struct serio *serio); void serio_rescan(struct serio *serio); +void serio_reconnect(struct serio *serio); irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs); void serio_register_port(struct serio *serio); -void serio_register_slave_port(struct serio *serio); +void serio_register_port_delayed(struct serio *serio); +void __serio_register_port(struct serio *serio); void serio_unregister_port(struct serio *serio); -void serio_unregister_slave_port(struct serio *serio); +void serio_unregister_port_delayed(struct serio *serio); +void __serio_unregister_port(struct serio *serio); void serio_register_device(struct serio_dev *dev); void serio_unregister_device(struct serio_dev *dev); diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index b7c23dd89b9a..77162e4c2819 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -107,7 +107,7 @@ struct nf_bridge_info { struct net_device *netoutdev; #endif unsigned int mask; - unsigned long hh[32 / sizeof(unsigned long)]; + unsigned long data[32 / sizeof(unsigned long)]; }; #endif @@ -764,10 +764,10 @@ static inline struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list) } /** - * skb_dequeue - remove from the head of the queue + * skb_dequeue_tail - remove from the tail of the queue * @list: list to dequeue from * - * Remove the head of the list. The list lock is taken so the function + * Remove the tail of the list. The list lock is taken so the function * may be used safely with other locking list functions. The tail item is * returned or %NULL if the list is empty. */ diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 4c1b633d5fbf..c94fb1d1862a 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -579,6 +579,14 @@ enum { NET_SCTP_MAX_BURST = 12, }; +/* /proc/sys/net/bridge */ +enum { + NET_BRIDGE_NF_CALL_ARPTABLES = 1, + NET_BRIDGE_NF_CALL_IPTABLES = 2, + NET_BRIDGE_NF_CALL_IP6TABLES = 3, + NET_BRIDGE_NF_FILTER_VLAN_TAGGED = 4, +}; + /* CTL_PROC names: */ /* CTL_FS names: */ diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 3a2e7bf3c44a..d25e5bd21c4d 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -386,7 +386,10 @@ struct tcp_sock { struct tcp_opt tcp; }; -#define tcp_sk(__sk) (&((struct tcp_sock *)__sk)->tcp) +static inline struct tcp_opt * tcp_sk(const struct sock *__sk) +{ + return &((struct tcp_sock *)__sk)->tcp; +} #endif diff --git a/include/linux/usb.h b/include/linux/usb.h index 41c2ca3dc629..5e49f861230d 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -414,9 +414,6 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size) * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set * or your driver's probe function will never get called. * @driver: the driver model core driver structure. - * @serialize: a semaphore used to serialize access to this driver. Used - * in the probe and disconnect functions. Only the USB core should use - * this lock. * * USB drivers must provide a name, probe() and disconnect() methods, * and an id_table. Other driver fields are optional. @@ -451,8 +448,6 @@ struct usb_driver { const struct usb_device_id *id_table; struct device_driver driver; - - struct semaphore serialize; }; #define to_usb_driver(d) container_of(d, struct usb_driver, driver) diff --git a/include/linux/usb_ch9.h b/include/linux/usb_ch9.h index 916378f747c1..682e95114870 100644 --- a/include/linux/usb_ch9.h +++ b/include/linux/usb_ch9.h @@ -116,6 +116,17 @@ struct usb_ctrlrequest { #define USB_DT_DEVICE_QUALIFIER 0x06 #define USB_DT_OTHER_SPEED_CONFIG 0x07 #define USB_DT_INTERFACE_POWER 0x08 +/* these are from a minor usb 2.0 revision (ECN) */ +#define USB_DT_OTG 0x09 +#define USB_DT_DEBUG 0x0a +#define USB_DT_INTERFACE_ASSOCIATION 0x0b + +/* conventional codes for class-specific descriptors */ +#define USB_DT_CS_DEVICE 0x21 +#define USB_DT_CS_CONFIG 0x22 +#define USB_DT_CS_STRING 0x23 +#define USB_DT_CS_INTERFACE 0x24 +#define USB_DT_CS_ENDPOINT 0x25 /* All standard descriptors have these 2 fields at the beginning */ struct usb_descriptor_header { @@ -165,6 +176,7 @@ struct usb_device_descriptor { #define USB_CLASS_CDC_DATA 0x0a #define USB_CLASS_CSCID 0x0b /* chip+ smart card */ #define USB_CLASS_CONTENT_SEC 0x0d /* content security */ +#define USB_CLASS_VIDEO 0x0e #define USB_CLASS_APP_SPEC 0xfe #define USB_CLASS_VENDOR_SPEC 0xff @@ -283,6 +295,36 @@ struct usb_qualifier_descriptor { /*-------------------------------------------------------------------------*/ +/* USB_DT_OTG (from OTG 1.0a supplement) */ +struct usb_otg_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u8 bmAttributes; /* support for HNP, SRP, etc */ +} __attribute__ ((packed)); + +/* from usb_otg_descriptor.bmAttributes */ +#define USB_OTG_SRP (1 << 0) +#define USB_OTG_HNP (1 << 1) /* swap host/device roles */ + +/*-------------------------------------------------------------------------*/ + +/* USB_DT_INTERFACE_ASSOCIATION: groups interfaces */ +struct usb_interface_assoc_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u8 bFirstInterface; + __u8 bInterfaceCount; + __u8 bFunctionClass; + __u8 bFunctionSubClass; + __u8 bFunctionProtocol; + __u8 iFunction; +} __attribute__ ((packed)); + + +/*-------------------------------------------------------------------------*/ + /* USB 2.0 defines three speeds, here's how Linux identifies them */ enum usb_device_speed { diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h index da2d9749baf6..1cfb33ebf348 100644 --- a/include/linux/usb_gadget.h +++ b/include/linux/usb_gadget.h @@ -28,12 +28,20 @@ struct usb_ep; * for mapping and unmapping the buffer. * @length: Length of that data * @no_interrupt: If true, hints that no completion irq is needed. - * Helpful sometimes with deep request queues. + * Helpful sometimes with deep request queues that are handled + * directly by DMA controllers. * @zero: If true, when writing data, makes the last packet be "short" * by adding a zero length packet as needed; * @short_not_ok: When reading data, makes short packets be * treated as errors (queue stops advancing till cleanup). - * @complete: Function called when request completes + * @complete: Function called when request completes, so this request and + * its buffer may be re-used. + * Reads terminate with a short packet, or when the buffer fills, + * whichever comes first. When writes terminate, some data bytes + * will usually still be in flight (often in a hardware fifo). + * Errors (for reads or writes) stop the queue from advancing + * until the completion function returns, so that any transfers + * invalidated by the error may first be dequeued. * @context: For use by the completion callback * @list: For use by the gadget driver. * @status: Reports completion code, zero or a negative errno. @@ -41,12 +49,13 @@ struct usb_ep; * the completion callback returns. * Code "-ESHUTDOWN" indicates completion caused by device disconnect, * or when the driver disabled the endpoint. - * @actual: Reports actual bytes transferred. For reads (OUT + * @actual: Reports bytes transferred to/from the buffer. For reads (OUT * transfers) this may be less than the requested length. If the * short_not_ok flag is set, short reads are treated as errors * even when status otherwise indicates successful completion. - * Note that for writes (IN transfers) the data bytes may still - * reside in a device-side FIFO. + * Note that for writes (IN transfers) some data bytes may still + * reside in a device-side FIFO when the request is reported as + * complete. * * These are allocated/freed through the endpoint they're used with. The * hardware's driver can add extra per-request data to the memory it returns, @@ -287,6 +296,9 @@ usb_ep_free_buffer (struct usb_ep *ep, void *buf, dma_addr_t dma, unsigned len) * Each request is turned into one or more packets. The controller driver * never merges adjacent requests into the same packet. OUT transfers * will sometimes use data that's already buffered in the hardware. + * Drivers can rely on the fact that the first byte of the request's buffer + * always corresponds to the first byte of some USB packet, for both + * IN and OUT transfers. * * Bulk endpoints can queue any amount of data; the transfer is packetized * automatically. The last packet will be short if the request doesn't fill it @@ -361,6 +373,9 @@ static inline int usb_ep_dequeue (struct usb_ep *ep, struct usb_request *req) * * Returns zero, or a negative error code. On success, this call sets * underlying hardware state that blocks data transfers. + * Attempts to halt IN endpoints will fail (returning -EAGAIN) if any + * transfer requests are still queued, or if the controller hardware + * (usually a FIFO) still holds bytes that the host hasn't collected. */ static inline int usb_ep_set_halt (struct usb_ep *ep) @@ -393,8 +408,8 @@ usb_ep_clear_halt (struct usb_ep *ep) * * FIFO endpoints may have "unclaimed data" in them in certain cases, * such as after aborted transfers. Hosts may not have collected all - * the IN data written by the gadget driver, as reported by a request - * completion. The gadget driver may not have collected all the data + * the IN data written by the gadget driver (and reported by a request + * completion). The gadget driver may not have collected all the data * written OUT to it by the host. Drivers that need precise handling for * fault reporting or recovery may need to use this call. * diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 8abbd9e9e596..9b00fb693783 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h @@ -429,6 +429,7 @@ struct video_code #define VID_HARDWARE_CPIA2 33 #define VID_HARDWARE_VICAM 34 #define VID_HARDWARE_SF16FMR2 35 +#define VID_HARDWARE_W9968CF 36 /* W996[87]CF JPEG USB Dual Mode Cam */ #endif /* __LINUX_VIDEODEV_H */ /* |
