diff options
| author | Russell King <rmk@flint.arm.linux.org.uk> | 2002-04-04 11:45:09 +0100 |
|---|---|---|
| committer | Russell King <rmk@flint.arm.linux.org.uk> | 2002-04-04 11:45:09 +0100 |
| commit | 94394e5bc92026a2ff31cd03e11e015adfdb3260 (patch) | |
| tree | 8f24a3e60e98d45ba7416821aadb84508e18d79d /include | |
| parent | 3f4d4f4e46865cb01d2e2717c6906e2ae079c042 (diff) | |
| parent | 5e4b50795ee8c7659a1181cea4c98712e02ea63e (diff) | |
Merge flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5
into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-rmk
Diffstat (limited to 'include')
67 files changed, 574 insertions, 535 deletions
diff --git a/include/asm-arm/arch-cl7500/system.h b/include/asm-arm/arch-cl7500/system.h index 6cb002194834..fee569dd0303 100644 --- a/include/asm-arm/arch-cl7500/system.h +++ b/include/asm-arm/arch-cl7500/system.h @@ -18,6 +18,6 @@ static void arch_idle(void) do { \ iomd_writeb(0, IOMD_ROMCR0); \ cpu_reset(0); \ - } while (0); + } while (0) #endif diff --git a/include/asm-arm/arch-sa1100/keyboard.h b/include/asm-arm/arch-sa1100/keyboard.h index 0207ba65ed6e..aa7f317092e5 100644 --- a/include/asm-arm/arch-sa1100/keyboard.h +++ b/include/asm-arm/arch-sa1100/keyboard.h @@ -10,8 +10,8 @@ #include <asm/mach-types.h> #include <asm/arch/assabet.h> -#define kbd_disable_irq() do { } while(0); -#define kbd_enable_irq() do { } while(0); +#define kbd_disable_irq() do { } while(0) +#define kbd_enable_irq() do { } while(0) extern int sa1111_kbd_init_hw(void); extern void gc_kbd_init_hw(void); diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index 89921f9d7843..d36b2f10f731 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h @@ -3,6 +3,7 @@ #include <linux/config.h> #include <linux/pm.h> +#include <asm/fixmap.h> #include <asm/apicdef.h> #include <asm/system.h> diff --git a/include/asm-i386/apicdef.h b/include/asm-i386/apicdef.h index f855a7d88d82..a91e6ede6b0a 100644 --- a/include/asm-i386/apicdef.h +++ b/include/asm-i386/apicdef.h @@ -71,6 +71,7 @@ #define GET_APIC_DEST_FIELD(x) (((x)>>24)&0xFF) #define SET_APIC_DEST_FIELD(x) ((x)<<24) #define APIC_LVTT 0x320 +#define APIC_LVTTHMR 0x330 #define APIC_LVTPC 0x340 #define APIC_LVT0 0x350 #define APIC_LVT_TIMER_BASE_MASK (0x3<<18) @@ -280,7 +281,16 @@ struct local_apic { u32 __reserved_4[3]; } lvt_timer; -/*330*/ struct { u32 __reserved[4]; } __reserved_15; +/*330*/ struct { /* LVT - Thermal Sensor */ + u32 vector : 8, + delivery_mode : 3, + __reserved_1 : 1, + delivery_status : 1, + __reserved_2 : 3, + mask : 1, + __reserved_3 : 15; + u32 __reserved_4[3]; + } lvt_thermal; /*340*/ struct { /* LVT - Performance Counter */ u32 vector : 8, diff --git a/include/asm-i386/checksum.h b/include/asm-i386/checksum.h index 6b9761aa8f37..7c0527f9256b 100644 --- a/include/asm-i386/checksum.h +++ b/include/asm-i386/checksum.h @@ -1,6 +1,7 @@ #ifndef _I386_CHECKSUM_H #define _I386_CHECKSUM_H +#include <linux/in6.h> /* * computes the checksum of a memory block at buff, length len, diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h index 1461dab08d90..bf447a1b97b2 100644 --- a/include/asm-i386/hw_irq.h +++ b/include/asm-i386/hw_irq.h @@ -43,6 +43,7 @@ #define RESCHEDULE_VECTOR 0xfc #define CALL_FUNCTION_VECTOR 0xfb +#define THERMAL_APIC_VECTOR 0xf0 /* * Local APIC timer IRQ vector is on a different priority level, * to work around the 'lost local interrupt if more than 2 IRQ diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h index f578b76c40cf..a54484360fa9 100644 --- a/include/asm-i386/io.h +++ b/include/asm-i386/io.h @@ -57,15 +57,37 @@ #define __io_virt(x) ((void *)(x)) #endif -/* - * Change virtual addresses to physical addresses and vv. - * These are pretty trivial +/** + * virt_to_phys - map virtual addresses to physical + * @address: address to remap + * + * The returned physical address is the physical (CPU) mapping for + * the memory address given. It is only valid to use this function on + * addresses directly mapped or allocated via kmalloc. + * + * This function does not give bus mappings for DMA transfers. In + * almost all conceivable cases a device driver should not be using + * this function */ + static inline unsigned long virt_to_phys(volatile void * address) { return __pa(address); } +/** + * phys_to_virt - map physical address to virtual + * @address: address to remap + * + * The returned virtual address is a current CPU mapping for + * the memory address given. It is only valid to use this function on + * addresses that have a kernel mapping + * + * This function does not handle bus mappings for DMA transfers. In + * almost all conceivable cases a device driver should not be using + * this function + */ + static inline void * phys_to_virt(unsigned long address) { return __va(address); @@ -74,20 +96,51 @@ static inline void * phys_to_virt(unsigned long address) /* * Change "struct page" to physical address. */ +#ifdef CONFIG_HIGHMEM64G +#define page_to_phys(page) ((u64)(page - mem_map) << PAGE_SHIFT) +#else #define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT) +#endif extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); +/** + * ioremap - map bus memory into CPU space + * @offset: bus address of the memory + * @size: size of the resource to map + * + * ioremap performs a platform specific sequence of operations to + * make bus memory CPU accessible via the readb/readw/readl/writeb/ + * writew/writel functions and the other mmio helpers. The returned + * address is not guaranteed to be usable directly as a virtual + * address. + */ + static inline void * ioremap (unsigned long offset, unsigned long size) { return __ioremap(offset, size, 0); } -/* - * This one maps high address device memory and turns off caching for that area. - * it's useful if some control registers are in such an area and write combining - * or read caching is not desirable: +/** + * ioremap_nocache - map bus memory into CPU space + * @offset: bus address of the memory + * @size: size of the resource to map + * + * ioremap_nocache performs a platform specific sequence of operations to + * make bus memory CPU accessible via the readb/readw/readl/writeb/ + * writew/writel functions and the other mmio helpers. The returned + * address is not guaranteed to be usable directly as a virtual + * address. + * + * This version of ioremap ensures that the memory is marked uncachable + * on the CPU as well as honouring existing caching rules from things like + * the PCI bus. Note that there are other caches and buffers on many + * busses. In paticular driver authors should read up on PCI writes + * + * It's useful if some control registers are in such an area and + * write combining or read caching is not desirable: */ + static inline void * ioremap_nocache (unsigned long offset, unsigned long size) { return __ioremap(offset, size, _PAGE_PCD); @@ -172,6 +225,17 @@ extern unsigned long bus_to_virt_not_defined_use_pci_map(volatile void *addr); #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(b),(c),(d)) #define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(__ISA_IO_base + (b)),(c),(d)) +/** + * check_signature - find BIOS signatures + * @io_addr: mmio address to check + * @signature: signature block + * @length: length of signature + * + * Perform a signature comparison with the mmio address io_addr. This + * address should have been obtained by ioremap. + * Returns 1 on a match. + */ + static inline int check_signature(unsigned long io_addr, const unsigned char *signature, int length) { @@ -188,6 +252,20 @@ out: return retval; } +/** + * isa_check_signature - find BIOS signatures + * @io_addr: mmio address to check + * @signature: signature block + * @length: length of signature + * + * Perform a signature comparison with the ISA mmio address io_addr. + * Returns 1 on a match. + * + * This function is deprecated. New drivers should use ioremap and + * check_signature. + */ + + static inline int isa_check_signature(unsigned long io_addr, const unsigned char *signature, int length) { diff --git a/include/asm-i386/irq.h b/include/asm-i386/irq.h index c1bcd739bc7b..269bf3e1aa8b 100644 --- a/include/asm-i386/irq.h +++ b/include/asm-i386/irq.h @@ -11,6 +11,7 @@ */ #include <linux/config.h> +#include <linux/sched.h> #define TIMER_IRQ 0 diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h index d3f23faa638a..2a57654f0d0f 100644 --- a/include/asm-i386/msr.h +++ b/include/asm-i386/msr.h @@ -48,8 +48,8 @@ #define MSR_IA32_UCODE_WRITE 0x79 #define MSR_IA32_UCODE_REV 0x8b -#define MSR_IA32_PERFCTR0 0xc1 -#define MSR_IA32_PERFCTR1 0xc2 +#define MSR_P6_PERFCTR0 0xc1 +#define MSR_P6_PERFCTR1 0xc2 #define MSR_IA32_BBL_CR_CTL 0x119 @@ -57,8 +57,13 @@ #define MSR_IA32_MCG_STATUS 0x17a #define MSR_IA32_MCG_CTL 0x17b -#define MSR_IA32_EVNTSEL0 0x186 -#define MSR_IA32_EVNTSEL1 0x187 +#define MSR_P6_EVNTSEL0 0x186 +#define MSR_P6_EVNTSEL1 0x187 + +#define MSR_IA32_THERM_CONTROL 0x19a +#define MSR_IA32_THERM_INTERRUPT 0x19b +#define MSR_IA32_THERM_STATUS 0x19c +#define MSR_IA32_MISC_ENABLE 0x1a0 #define MSR_IA32_DEBUGCTLMSR 0x1d9 #define MSR_IA32_LASTBRANCHFROMIP 0x1db diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 573dac8f51ab..13eec87ba8fd 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -59,6 +59,7 @@ struct cpuinfo_x86 { #define X86_VENDOR_CENTAUR 5 #define X86_VENDOR_RISE 6 #define X86_VENDOR_TRANSMETA 7 +#define X86_VENDOR_NSC 8 #define X86_VENDOR_UNKNOWN 0xff /* @@ -216,7 +217,7 @@ static inline void clear_in_cr4 (unsigned long mask) } /* - * Cyrix CPU configuration register indexes + * NSC/Cyrix CPU configuration register indexes */ #define CX86_CCR0 0xc0 #define CX86_CCR1 0xc1 @@ -232,7 +233,7 @@ static inline void clear_in_cr4 (unsigned long mask) #define CX86_RCR_BASE 0xdc /* - * Cyrix CPU indexed register access macros + * NSC/Cyrix CPU indexed register access macros */ #define getCx86(reg) ({ outb((reg), 0x22); inb(0x23); }) diff --git a/include/asm-i386/rwsem.h b/include/asm-i386/rwsem.h index 3cac14272380..9caff19cfd2e 100644 --- a/include/asm-i386/rwsem.h +++ b/include/asm-i386/rwsem.h @@ -164,7 +164,7 @@ LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtracts 1, returns the old valu " jmp 1b\n" LOCK_SECTION_END "# ending __up_read\n" - : "+m"(sem->count), "+d"(tmp) + : /*"+m"(sem->count),*/ "+d"(tmp) : "a"(sem) : "memory", "cc"); } diff --git a/include/asm-i386/string-486.h b/include/asm-i386/string-486.h index 51bfd051bc00..4104ab9bc9f9 100644 --- a/include/asm-i386/string-486.h +++ b/include/asm-i386/string-486.h @@ -5,7 +5,7 @@ * This string-include defines all string functions as inline * functions. Use gcc. It also assumes ds=es=data space, this should be * normal. Most of the string-functions are rather heavily hand-optimized, - * see especially strtok,strstr,str[c]spn. They should work, but are not + * see especially strsep,strstr,str[c]spn. They should work, but are not * very easy to understand. Everything is done entirely within the register * set, making the functions fast and clean. * diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h index d4d7899dc1aa..96f4e52fc7f7 100644 --- a/include/asm-i386/string.h +++ b/include/asm-i386/string.h @@ -20,7 +20,7 @@ * This string-include defines all string functions as inline * functions. Use gcc. It also assumes ds=es=data space, this should be * normal. Most of the string-functions are rather heavily hand-optimized, - * see especially strtok,strstr,str[c]spn. They should work, but are not + * see especially strsep,strstr,str[c]spn. They should work, but are not * very easy to understand. Everything is done entirely within the register * set, making the functions fast and clean. String instructions have been * used through-out, making for "slightly" unclear code :-) diff --git a/include/asm-i386/timex.h b/include/asm-i386/timex.h index 97099dd0d414..6cfc7c9a08fc 100644 --- a/include/asm-i386/timex.h +++ b/include/asm-i386/timex.h @@ -9,7 +9,12 @@ #include <linux/config.h> #include <asm/msr.h> -#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ +#ifdef CONFIG_MELAN +# define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */ +#else +# define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ +#endif + #define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */ #define FINETUNE ((((((long)LATCH * HZ - CLOCK_TICK_RATE) << SHIFT_HZ) * \ (1000000/CLOCK_TICK_FACTOR) / (CLOCK_TICK_RATE/CLOCK_TICK_FACTOR)) \ diff --git a/include/asm-m68k/string.h b/include/asm-m68k/string.h index 5183aa0096d8..5604739225b3 100644 --- a/include/asm-m68k/string.h +++ b/include/asm-m68k/string.h @@ -117,29 +117,6 @@ static inline size_t strspn(const char *s, const char *accept) } #endif -#if 0 -#define __HAVE_ARCH_STRTOK -extern inline char * strtok(char * s,const char * ct) -{ - char *sbegin, *send; - - sbegin = s ? s : ___strtok; - if (!sbegin) { - return NULL; - } - sbegin += strspn(sbegin,ct); - if (*sbegin == '\0') { - ___strtok = NULL; - return( NULL ); - } - send = strpbrk( sbegin, ct); - if (send && *send != '\0') - *send++ = '\0'; - ___strtok = send; - return (sbegin); -} -#endif - /* strstr !! */ #define __HAVE_ARCH_STRLEN diff --git a/include/asm-mips/spinlock.h b/include/asm-mips/spinlock.h index 61ebfa6603eb..fb02686f7896 100644 --- a/include/asm-mips/spinlock.h +++ b/include/asm-mips/spinlock.h @@ -19,10 +19,10 @@ typedef struct { #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 } -#define spin_lock_init(x) do { (x)->lock = 0; } while(0); +#define spin_lock_init(x) do { (x)->lock = 0; } while(0) #define spin_is_locked(x) ((x)->lock != 0) -#define spin_unlock_wait(x) ({ do { barrier(); } while ((x)->lock); }) +#define spin_unlock_wait(x) do { barrier(); } while ((x)->lock) /* * Simple spin lock operations. There are two variants, one clears IRQ's diff --git a/include/asm-mips64/spinlock.h b/include/asm-mips64/spinlock.h index 7e560d4c05a4..9ce6c6c2e13c 100644 --- a/include/asm-mips64/spinlock.h +++ b/include/asm-mips64/spinlock.h @@ -19,10 +19,10 @@ typedef struct { #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 } -#define spin_lock_init(x) do { (x)->lock = 0; } while(0); +#define spin_lock_init(x) do { (x)->lock = 0; } while(0) #define spin_is_locked(x) ((x)->lock != 0) -#define spin_unlock_wait(x) ({ do { barrier(); } while ((x)->lock); }) +#define spin_unlock_wait(x) do { barrier(); } while ((x)->lock) /* * Simple spin lock operations. There are two variants, one clears IRQ's diff --git a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h index b29fa8aef9be..37e7511bedd7 100644 --- a/include/asm-parisc/pgalloc.h +++ b/include/asm-parisc/pgalloc.h @@ -123,7 +123,7 @@ extern void flush_instruction_tlb(void); #define flush_tlb() do { \ flush_data_tlb(); \ flush_instruction_tlb(); \ -} while(0); +} while(0) #define flush_tlb_all() flush_tlb() /* XXX p[id]tlb */ diff --git a/include/asm-sparc/elf.h b/include/asm-sparc/elf.h index 436d1a9ad56b..d6e8a340495d 100644 --- a/include/asm-sparc/elf.h +++ b/include/asm-sparc/elf.h @@ -41,7 +41,7 @@ do { unsigned long *dest = &(__elf_regs[0]); \ dest[34] = src->npc; \ dest[35] = src->y; \ dest[36] = dest[37] = 0; /* XXX */ \ -} while(0); +} while(0) typedef struct { union { diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index 518f15379394..b73aaa20847e 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h @@ -293,6 +293,9 @@ BTFIXUPDEF_CALL_CONST(pte_t, pte_mkyoung, pte_t) #define page_pte_prot(page, prot) mk_pte(page, prot) #define page_pte(page) page_pte_prot(page, __pgprot(0)) +/* Permanent address of a page. */ +#define page_address(page) ((page)->virtual) + BTFIXUPDEF_CALL(struct page *, pte_page, pte_t) #define pte_page(pte) BTFIXUP_CALL(pte_page)(pte) diff --git a/include/asm-sparc/sbus.h b/include/asm-sparc/sbus.h index 6a687a465c21..d26fd0326a03 100644 --- a/include/asm-sparc/sbus.h +++ b/include/asm-sparc/sbus.h @@ -94,7 +94,8 @@ sbus_is_slave(struct sbus_dev *dev) for((device) = (bus)->devices; (device); (device)=(device)->next) #define for_all_sbusdev(device, bus) \ - for((bus) = sbus_root, ((device) = (bus) ? (bus)->devices : 0); (bus); (device)=((device)->next ? (device)->next : ((bus) = (bus)->next, (bus) ? (bus)->devices : 0))) + for ((bus) = sbus_root; (bus); (bus) = (bus)->next) \ + for ((device) = (bus)->devices; (device); (device) = (device)->next) /* Driver DVMA interfaces. */ #define sbus_can_dma_64bit(sdev) (0) /* actually, sparc_cpu_model==sun4d */ diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h index d2909390fc6d..7f3f59461552 100644 --- a/include/asm-sparc64/pgalloc.h +++ b/include/asm-sparc64/pgalloc.h @@ -10,13 +10,6 @@ #include <asm/spitfire.h> #include <asm/pgtable.h> -#define VPTE_BASE_SPITFIRE 0xfffffffe00000000 -#if 1 -#define VPTE_BASE_CHEETAH VPTE_BASE_SPITFIRE -#else -#define VPTE_BASE_CHEETAH 0xffe0000000000000 -#endif - static __inline__ void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end) { @@ -42,8 +35,6 @@ static __inline__ void flush_tlb_pgtables(struct mm_struct *mm, unsigned long st vpte_base + (e >> (PAGE_SHIFT - 3))); } } -#undef VPTE_BASE_SPITFIRE -#undef VPTE_BASE_CHEETAH /* Page table allocation/freeing. */ #ifdef CONFIG_SMP diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h index 1815502bf700..2f9061f38856 100644 --- a/include/asm-sparc64/processor.h +++ b/include/asm-sparc64/processor.h @@ -39,9 +39,25 @@ * address that the kernel will allocate out. */ #define VA_BITS 44 +#ifndef __ASSEMBLY__ #define VPTE_SIZE (1UL << (VA_BITS - PAGE_SHIFT + 3)) +#else +#define VPTE_SIZE (1 << (VA_BITS - PAGE_SHIFT + 3)) +#endif #define TASK_SIZE ((unsigned long)-VPTE_SIZE) +/* + * The vpte base must be able to hold the entire vpte, half + * of which lives above, and half below, the base. And it + * is placed as close to the highest address range as possible. + */ +#define VPTE_BASE_SPITFIRE (-(VPTE_SIZE/2)) +#if 1 +#define VPTE_BASE_CHEETAH VPTE_BASE_SPITFIRE +#else +#define VPTE_BASE_CHEETAH 0xffe0000000000000 +#endif + #ifndef __ASSEMBLY__ typedef struct { diff --git a/include/asm-sparc64/sbus.h b/include/asm-sparc64/sbus.h index e9f7344b47cf..5970645950ab 100644 --- a/include/asm-sparc64/sbus.h +++ b/include/asm-sparc64/sbus.h @@ -87,7 +87,8 @@ extern struct sbus_bus *sbus_root; for((device) = (bus)->devices; (device); (device)=(device)->next) #define for_all_sbusdev(device, bus) \ - for((bus) = sbus_root, ((device) = (bus) ? (bus)->devices : 0); (bus); (device)=((device)->next ? (device)->next : ((bus) = (bus)->next, (bus) ? (bus)->devices : 0))) + for ((bus) = sbus_root; (bus); (bus) = (bus)->next) \ + for ((device) = (bus)->devices; (device); (device) = (device)->next) /* Driver DVMA interfaces. */ #define sbus_can_dma_64bit(sdev) (1) diff --git a/include/linux/device.h b/include/linux/device.h index f8234fdff19f..585dd1e57f8b 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -83,7 +83,7 @@ struct device { device */ void *driver_data; /* data private to the driver */ void *platform_data; /* Platform specific data (e.g. ACPI, - BIOS data relevant to device */ + BIOS data relevant to device) */ u32 current_state; /* Current operating state. In ACPI-speak, this is D0-D3, D0 diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 192959f7477d..6f8ebf32d744 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -36,7 +36,8 @@ struct ethtool_drvinfo { char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */ /* For PCI devices, use pci_dev->slot_name. */ char reserved1[32]; - char reserved2[24]; + char reserved2[20]; + u32 testinfo_len; u32 eedump_len; /* Size of data from ETHTOOL_GEEPROM (bytes) */ u32 regdump_len; /* Size of data from ETHTOOL_GREGS (bytes) */ }; @@ -210,6 +211,34 @@ struct ethtool_pauseparam { u32 tx_pause; }; +#define ETH_GSTRING_LEN 32 +enum ethtool_stringset { + ETH_SS_TEST = 0, + ETH_SS_STATS, +}; + +/* for passing string sets for data tagging */ +struct ethtool_gstrings { + u32 cmd; /* ETHTOOL_GSTRINGS */ + u32 string_set; /* string set id e.c. ETH_SS_TEST, etc*/ + u32 len; /* number of strings in the string set */ + u8 data[0]; +}; + +enum ethtool_test_flags { + ETH_TEST_FL_OFFLINE = (1 << 0), /* online / offline */ + ETH_TEST_FL_FAILED = (1 << 1), /* test passed / failed */ +}; + +/* for requesting NIC test and getting results*/ +struct ethtool_test { + u32 cmd; /* ETHTOOL_TEST */ + u32 flags; /* ETH_TEST_FL_xxx */ + u32 reserved; + u32 len; /* result length, in number of u64 elements */ + u64 data[0]; +}; + /* CMDs currently supported */ #define ETHTOOL_GSET 0x00000001 /* Get settings. */ #define ETHTOOL_SSET 0x00000002 /* Set settings, privileged. */ @@ -222,13 +251,13 @@ struct ethtool_pauseparam { #define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation, priv. */ #define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */ #define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ -#define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data */ +#define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data, priv. */ #define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ -#define ETHTOOL_SCOALESCE 0x0000000f /* Set coalesce config */ +#define ETHTOOL_SCOALESCE 0x0000000f /* Set coalesce config, priv. */ #define ETHTOOL_GRINGPARAM 0x00000010 /* Get ring parameters */ -#define ETHTOOL_SRINGPARAM 0x00000011 /* Set ring parameters */ +#define ETHTOOL_SRINGPARAM 0x00000011 /* Set ring parameters, priv. */ #define ETHTOOL_GPAUSEPARAM 0x00000012 /* Get pause parameters */ -#define ETHTOOL_SPAUSEPARAM 0x00000013 /* Set pause parameters */ +#define ETHTOOL_SPAUSEPARAM 0x00000013 /* Set pause parameters, priv. */ #define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */ #define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */ #define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */ @@ -236,7 +265,9 @@ struct ethtool_pauseparam { #define ETHTOOL_GSG 0x00000018 /* Get scatter-gather enable * (ethtool_value) */ #define ETHTOOL_SSG 0x00000019 /* Set scatter-gather enable - * (ethtool_value) */ + * (ethtool_value), priv. */ +#define ETHTOOL_TEST 0x0000001a /* execute NIC self-test, priv. */ +#define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */ /* compatibility with older code */ #define SPARC_ETH_GSET ETHTOOL_GSET diff --git a/include/linux/fs.h b/include/linux/fs.h index 85ae3dcb6496..cac7a59f6462 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -664,6 +664,7 @@ struct super_block { kdev_t s_dev; unsigned long s_blocksize; unsigned char s_blocksize_bits; + unsigned long s_old_blocksize; unsigned char s_dirt; unsigned long long s_maxbytes; /* Max file size */ struct file_system_type *s_type; diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h index 8c847b572601..73de808b4749 100644 --- a/include/linux/hdreg.h +++ b/include/linux/hdreg.h @@ -54,16 +54,9 @@ * HDIO_DRIVE_CMD and HDIO_DRIVE_TASK */ -#if 0 -#include <asm/hdreg.h> -typedef ide_ioreg_t task_ioreg_t; -#else -typedef unsigned char task_ioreg_t; -#endif - -#define HDIO_DRIVE_CMD_HDR_SIZE 4*sizeof(task_ioreg_t) -#define HDIO_DRIVE_TASK_HDR_SIZE 8*sizeof(task_ioreg_t) -#define HDIO_DRIVE_HOB_HDR_SIZE 8*sizeof(task_ioreg_t) +#define HDIO_DRIVE_CMD_HDR_SIZE (4 * sizeof(u8)) +#define HDIO_DRIVE_TASK_HDR_SIZE (8 * sizeof(u8)) +#define HDIO_DRIVE_HOB_HDR_SIZE (8 * sizeof(u8)) #define IDE_DRIVE_TASK_INVALID -1 #define IDE_DRIVE_TASK_NO_DATA 0 @@ -74,57 +67,27 @@ typedef unsigned char task_ioreg_t; #define IDE_DRIVE_TASK_OUT 3 #define IDE_DRIVE_TASK_RAW_WRITE 4 -struct hd_drive_cmd_hdr { - task_ioreg_t command; - task_ioreg_t sector_number; - task_ioreg_t feature; - task_ioreg_t sector_count; -}; - -typedef struct hd_drive_task_hdr { - task_ioreg_t data; - task_ioreg_t feature; - task_ioreg_t sector_count; - task_ioreg_t sector_number; - task_ioreg_t low_cylinder; - task_ioreg_t high_cylinder; - task_ioreg_t device_head; - task_ioreg_t command; -} task_struct_t; - -typedef struct hd_drive_hob_hdr { - task_ioreg_t data; - task_ioreg_t feature; - task_ioreg_t sector_count; - task_ioreg_t sector_number; - task_ioreg_t low_cylinder; - task_ioreg_t high_cylinder; - task_ioreg_t device_head; - task_ioreg_t control; -} hob_struct_t; - -typedef union ide_reg_valid_s { - unsigned all : 16; - struct { - unsigned data : 1; - unsigned error_feature : 1; - unsigned sector : 1; - unsigned nsector : 1; - unsigned lcyl : 1; - unsigned hcyl : 1; - unsigned select : 1; - unsigned status_command : 1; - - unsigned data_hob : 1; - unsigned error_feature_hob : 1; - unsigned sector_hob : 1; - unsigned nsector_hob : 1; - unsigned lcyl_hob : 1; - unsigned hcyl_hob : 1; - unsigned select_hob : 1; - unsigned control_hob : 1; - } b; -} ide_reg_valid_t; +struct hd_drive_task_hdr { + u8 data; + u8 feature; + u8 sector_count; + u8 sector_number; + u8 low_cylinder; + u8 high_cylinder; + u8 device_head; + u8 command; +} __attribute__((packed)); + +struct hd_drive_hob_hdr { + u8 data; + u8 feature; + u8 sector_count; + u8 sector_number; + u8 low_cylinder; + u8 high_cylinder; + u8 device_head; + u8 control; +} __attribute__((packed)); /* * Define standard taskfile in/out register @@ -134,23 +97,6 @@ typedef union ide_reg_valid_s { #define IDE_HOB_STD_OUT_FLAGS 0xC0 #define IDE_HOB_STD_IN_FLAGS 0xC0 -typedef struct ide_task_request_s { - task_ioreg_t io_ports[8]; - task_ioreg_t hob_ports[8]; - ide_reg_valid_t out_flags; - ide_reg_valid_t in_flags; - int data_phase; - int req_cmd; - unsigned long out_size; - unsigned long in_size; -} ide_task_request_t; - -typedef struct ide_ioctl_request_s { - ide_task_request_t *task_request; - unsigned char *out_buffer; - unsigned char *in_buffer; -} ide_ioctl_request_t; - #define TASKFILE_INVALID 0x7fff #define TASKFILE_48 0x8000 @@ -212,7 +158,7 @@ typedef struct ide_ioctl_request_s { #define WIN_PIDENTIFY 0xA1 /* identify ATAPI device */ #define WIN_QUEUED_SERVICE 0xA2 #define WIN_SMART 0xB0 /* self-monitoring and reporting */ -#define CFA_ERASE_SECTORS 0xC0 +#define CFA_ERASE_SECTORS 0xC0 #define WIN_MULTREAD 0xC4 /* read sectors using multiple mode*/ #define WIN_MULTWRITE 0xC5 /* write sectors using multiple mode */ #define WIN_SETMULT 0xC6 /* enable/disable multiple mode */ @@ -221,12 +167,12 @@ typedef struct ide_ioctl_request_s { #define WIN_WRITEDMA 0xCA /* write sectors using DMA transfers */ #define WIN_WRITEDMA_QUEUED 0xCC /* write sectors using Queued DMA transfers */ #define CFA_WRITE_MULTI_WO_ERASE 0xCD /* CFA Write multiple without erase */ -#define WIN_GETMEDIASTATUS 0xDA +#define WIN_GETMEDIASTATUS 0xDA #define WIN_DOORLOCK 0xDE /* lock door on removable drives */ #define WIN_DOORUNLOCK 0xDF /* unlock door on removable drives */ #define WIN_STANDBYNOW1 0xE0 #define WIN_IDLEIMMEDIATE 0xE1 /* force drive to become "ready" */ -#define WIN_STANDBY 0xE2 /* Set device in Standby Mode */ +#define WIN_STANDBY 0xE2 /* Set device in Standby Mode */ #define WIN_SETIDLE1 0xE3 #define WIN_READ_BUFFER 0xE4 /* force read only 1 sector */ #define WIN_CHECKPOWERMODE1 0xE5 @@ -268,7 +214,7 @@ typedef struct ide_ioctl_request_s { #define SMART_LCYL_PASS 0x4F #define SMART_HCYL_PASS 0xC2 - + /* WIN_SETFEATURES sub-commands */ #define SETFEATURES_EN_WCACHE 0x02 /* Enable write cache */ @@ -638,8 +584,5 @@ struct hd_driveid { */ #define IDE_NICE_DSC_OVERLAP (0) /* per the DSC overlap protocol */ #define IDE_NICE_ATAPI_OVERLAP (1) /* not supported yet */ -#define IDE_NICE_0 (2) /* when sure that it won't affect us */ -#define IDE_NICE_1 (3) /* when probably won't affect us much */ -#define IDE_NICE_2 (4) /* when we know it's on our expense */ #endif /* _LINUX_HDREG_H */ diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h index 4f57c1174598..eb948560836d 100644 --- a/include/linux/hiddev.h +++ b/include/linux/hiddev.h @@ -119,13 +119,17 @@ struct hiddev_usage_ref { __s32 value; }; +/* FIELD_INDEX_NONE is returned in read() data from the kernel when flags + * is set to (HIDDEV_FLAG_UREF | HIDDEV_FLAG_REPORT) and a new report has + * been sent by the device + */ #define HID_FIELD_INDEX_NONE 0xffffffff /* * Protocol version. */ -#define HID_VERSION 0x010002 +#define HID_VERSION 0x010003 /* * IOCTLs (0x00 - 0x7f) @@ -139,20 +143,20 @@ struct hiddev_usage_ref { #define HIDIOCGNAME(len) _IOC(_IOC_READ, 'H', 0x06, len) #define HIDIOCGREPORT _IOW('H', 0x07, struct hiddev_report_info) #define HIDIOCSREPORT _IOW('H', 0x08, struct hiddev_report_info) -#define HIDIOCGREPORTINFO _IOWR('H', 0x09, struct hiddev_report_info) -#define HIDIOCGFIELDINFO _IOWR('H', 0x0A, struct hiddev_field_info) -#define HIDIOCGUSAGE _IOWR('H', 0x0B, struct hiddev_usage_ref) -#define HIDIOCSUSAGE _IOW('H', 0x0C, struct hiddev_usage_ref) -#define HIDIOCGUCODE _IOWR('H', 0x0D, struct hiddev_usage_ref) -#define HIDIOCGFLAG _IOR('H', 0x0E, int) -#define HIDIOCSFLAG _IOW('H', 0x0F, int) +#define HIDIOCGREPORTINFO _IOWR('H', 0x09, struct hiddev_report_info) +#define HIDIOCGFIELDINFO _IOWR('H', 0x0A, struct hiddev_field_info) +#define HIDIOCGUSAGE _IOWR('H', 0x0B, struct hiddev_usage_ref) +#define HIDIOCSUSAGE _IOW('H', 0x0C, struct hiddev_usage_ref) +#define HIDIOCGUCODE _IOWR('H', 0x0D, struct hiddev_usage_ref) +#define HIDIOCGFLAG _IOR('H', 0x0E, int) +#define HIDIOCSFLAG _IOW('H', 0x0F, int) /* * Flags to be used in HIDIOCSFLAG */ -#define HIDDEV_FLAG_UREF 0x1 -#define HIDDEV_FLAG_REPORT 0x2 -#define HIDDEV_FLAGS 0x3 +#define HIDDEV_FLAG_UREF 0x1 +#define HIDDEV_FLAG_REPORT 0x2 +#define HIDDEV_FLAGS 0x3 /* To traverse the input report descriptor info for a HID device, perform the * following: diff --git a/include/linux/ide.h b/include/linux/ide.h index 6dafc47697ff..6d80160690b2 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -68,8 +68,8 @@ typedef unsigned char byte; /* used everywhere */ */ #define DMA_PIO_RETRY 1 /* retrying in PIO */ -#define HWIF(drive) ((drive)->hwif) -#define HWGROUP(drive) (HWIF(drive)->hwgroup) +#define HWIF(drive) ((drive)->channel) +#define HWGROUP(drive) (drive->channel->hwgroup) /* * Definitions for accessing IDE controller registers @@ -90,37 +90,16 @@ typedef unsigned char byte; /* used everywhere */ #define IDE_FEATURE_OFFSET IDE_ERROR_OFFSET #define IDE_COMMAND_OFFSET IDE_STATUS_OFFSET -#define IDE_DATA_OFFSET_HOB (0) -#define IDE_ERROR_OFFSET_HOB (1) -#define IDE_NSECTOR_OFFSET_HOB (2) -#define IDE_SECTOR_OFFSET_HOB (3) -#define IDE_LCYL_OFFSET_HOB (4) -#define IDE_HCYL_OFFSET_HOB (5) -#define IDE_SELECT_OFFSET_HOB (6) -#define IDE_CONTROL_OFFSET_HOB (7) - -#define IDE_FEATURE_OFFSET_HOB IDE_ERROR_OFFSET_HOB - -#define IDE_DATA_REG (HWIF(drive)->io_ports[IDE_DATA_OFFSET]) -#define IDE_ERROR_REG (HWIF(drive)->io_ports[IDE_ERROR_OFFSET]) -#define IDE_NSECTOR_REG (HWIF(drive)->io_ports[IDE_NSECTOR_OFFSET]) -#define IDE_SECTOR_REG (HWIF(drive)->io_ports[IDE_SECTOR_OFFSET]) -#define IDE_LCYL_REG (HWIF(drive)->io_ports[IDE_LCYL_OFFSET]) -#define IDE_HCYL_REG (HWIF(drive)->io_ports[IDE_HCYL_OFFSET]) -#define IDE_SELECT_REG (HWIF(drive)->io_ports[IDE_SELECT_OFFSET]) -#define IDE_STATUS_REG (HWIF(drive)->io_ports[IDE_STATUS_OFFSET]) -#define IDE_CONTROL_REG (HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]) -#define IDE_IRQ_REG (HWIF(drive)->io_ports[IDE_IRQ_OFFSET]) - -#define IDE_DATA_REG_HOB (HWIF(drive)->io_ports[IDE_DATA_OFFSET]) -#define IDE_ERROR_REG_HOB (HWIF(drive)->io_ports[IDE_ERROR_OFFSET]) -#define IDE_NSECTOR_REG_HOB (HWIF(drive)->io_ports[IDE_NSECTOR_OFFSET]) -#define IDE_SECTOR_REG_HOB (HWIF(drive)->io_ports[IDE_SECTOR_OFFSET]) -#define IDE_LCYL_REG_HOB (HWIF(drive)->io_ports[IDE_LCYL_OFFSET]) -#define IDE_HCYL_REG_HOB (HWIF(drive)->io_ports[IDE_HCYL_OFFSET]) -#define IDE_SELECT_REG_HOB (HWIF(drive)->io_ports[IDE_SELECT_OFFSET]) -#define IDE_STATUS_REG_HOB (HWIF(drive)->io_ports[IDE_STATUS_OFFSET]) -#define IDE_CONTROL_REG_HOB (HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]) +#define IDE_DATA_REG (drive->channel->io_ports[IDE_DATA_OFFSET]) +#define IDE_ERROR_REG (drive->channel->io_ports[IDE_ERROR_OFFSET]) +#define IDE_NSECTOR_REG (drive->channel->io_ports[IDE_NSECTOR_OFFSET]) +#define IDE_SECTOR_REG (drive->channel->io_ports[IDE_SECTOR_OFFSET]) +#define IDE_LCYL_REG (drive->channel->io_ports[IDE_LCYL_OFFSET]) +#define IDE_HCYL_REG (drive->channel->io_ports[IDE_HCYL_OFFSET]) +#define IDE_SELECT_REG (drive->channel->io_ports[IDE_SELECT_OFFSET]) +#define IDE_STATUS_REG (drive->channel->io_ports[IDE_STATUS_OFFSET]) +#define IDE_CONTROL_REG (drive->channel->io_ports[IDE_CONTROL_OFFSET]) +#define IDE_IRQ_REG (drive->channel->io_ports[IDE_IRQ_OFFSET]) #define IDE_FEATURE_REG IDE_ERROR_REG #define IDE_COMMAND_REG IDE_STATUS_REG @@ -175,24 +154,24 @@ typedef unsigned char byte; /* used everywhere */ #define WAIT_CMD (10*HZ) /* 10sec - maximum wait for an IRQ to happen */ #define WAIT_MIN_SLEEP (2*HZ/100) /* 20msec - minimum sleep time */ -#define SELECT_DRIVE(hwif,drive) \ +#define SELECT_DRIVE(channel, drive) \ { \ - if (hwif->selectproc) \ - hwif->selectproc(drive); \ - OUT_BYTE((drive)->select.all, hwif->io_ports[IDE_SELECT_OFFSET]); \ + if (channel->selectproc) \ + channel->selectproc(drive); \ + OUT_BYTE((drive)->select.all, channel->io_ports[IDE_SELECT_OFFSET]); \ } -#define SELECT_MASK(hwif,drive,mask) \ +#define SELECT_MASK(channel, drive, mask) \ { \ - if (hwif->maskproc) \ - hwif->maskproc(drive,mask); \ + if (channel->maskproc) \ + channel->maskproc(drive,mask); \ } /* * Check for an interrupt and acknowledge the interrupt status */ -struct hwif_s; -typedef int (ide_ack_intr_t)(struct hwif_s *); +struct ata_channel; +typedef int (ide_ack_intr_t)(struct ata_channel *); #ifndef NO_DMA # define NO_DMA 255 @@ -235,7 +214,6 @@ typedef struct hw_regs_s { int irq; /* our irq number */ int dma; /* our dma entry */ ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ - void *priv; /* interface specific data */ hwif_chipset_t chipset; } hw_regs_t; @@ -291,20 +269,28 @@ typedef union { struct ide_settings_s; typedef struct ide_drive_s { - unsigned int usage; /* current "open()" count for drive */ + struct ata_channel *channel; /* parent pointer to the channel we are attached to */ + + unsigned int usage; /* current "open()" count for drive */ char type; /* distingiush different devices: disk, cdrom, tape, floppy, ... */ /* NOTE: If we had proper separation between channel and host chip, we * could move this to the chanell and many sync problems would * magically just go away. */ - request_queue_t queue; /* per device request queue */ + request_queue_t queue; /* per device request queue */ struct ide_drive_s *next; /* circular list of hwgroup drives */ - unsigned long sleep; /* sleep until this time */ - unsigned long service_start; /* time we started last request */ - unsigned long service_time; /* service time of last request */ - unsigned long timeout; /* max time to wait for irq */ + + /* Those are directly injected jiffie values. They should go away and + * we should use generic timers instead!!! + */ + + unsigned long PADAM_sleep; /* sleep until this time */ + unsigned long PADAM_service_start; /* time we started last request */ + unsigned long PADAM_service_time; /* service time of last request */ + unsigned long PADAM_timeout; /* max time to wait for irq */ + special_t special; /* special action flags */ byte keep_settings; /* restore settings after drive reset */ byte using_dma; /* disk is using dma for read/write */ @@ -314,11 +300,13 @@ typedef struct ide_drive_s { byte slow; /* flag: slow data port */ byte bswap; /* flag: byte swap data */ byte dsc_overlap; /* flag: DSC overlap */ - byte nice1; /* flag: give potential excess bandwidth */ + unsigned waiting_for_dma: 1; /* dma currently in progress */ + unsigned busy : 1; /* currently doing revalidate_disk() */ + unsigned blocked : 1; /* 1=powermanagment told us not to do anything, so sleep nicely */ + unsigned present : 1; /* drive is physically present */ unsigned noprobe : 1; /* from: hdx=noprobe */ - unsigned busy : 1; /* currently doing revalidate_disk() */ unsigned removable : 1; /* 1 if need to do check_media_change */ unsigned forced_geom : 1; /* 1 if hdx=c,h,s was given at boot */ unsigned no_unmask : 1; /* disallow setting unmask bit */ @@ -326,21 +314,18 @@ typedef struct ide_drive_s { unsigned nobios : 1; /* flag: do not probe bios for drive */ unsigned revalidate : 1; /* request revalidation */ unsigned atapi_overlap : 1; /* flag: ATAPI overlap (not supported) */ - unsigned nice0 : 1; /* flag: give obvious excess bandwidth */ - unsigned nice2 : 1; /* flag: give a share in our own bandwidth */ unsigned doorlocking : 1; /* flag: for removable only: door lock/unlock works */ unsigned autotune : 2; /* 1=autotune, 2=noautotune, 0=default */ unsigned remap_0_to_1 : 2; /* 0=remap if ezdrive, 1=remap, 2=noremap */ unsigned ata_flash : 1; /* 1=present, 0=default */ - unsigned blocked : 1; /* 1=powermanagment told us not to do anything, so sleep nicely */ unsigned addressing; /* : 2; 0=28-bit, 1=48-bit, 2=64-bit */ byte scsi; /* 0=default, 1=skip current ide-subdriver for ide-scsi emulation */ select_t select; /* basic drive/head select reg value */ byte ctl; /* "normal" value for IDE_CONTROL_REG */ byte ready_stat; /* min status value for drive ready */ byte mult_count; /* current multiple sector setting */ - byte mult_req; /* requested multiple sector setting */ - byte tune_req; /* requested drive tuning setting */ + byte mult_req; /* requested multiple sector setting */ + byte tune_req; /* requested drive tuning setting */ byte io_32bit; /* 0=16-bit, 1=32-bit, 2/3=32bit+sync */ byte bad_wstat; /* used for ignoring WRERR_STAT */ byte nowerr; /* used for ignoring WRERR_STAT */ @@ -354,20 +339,25 @@ typedef struct ide_drive_s { unsigned long capacity; /* total number of sectors */ unsigned long long capacity48; /* total number of sectors */ unsigned int drive_data; /* for use by tuneproc/selectproc as needed */ - struct hwif_s *hwif; /* parent pointer to the interface we are attached to */ + wait_queue_head_t wqueue; /* used to wait for drive in open() */ + struct hd_driveid *id; /* drive model identification info */ struct hd_struct *part; /* drive partition table */ + char name[4]; /* drive name, such as "hda" */ struct ata_operations *driver; + void *driver_data; /* extra driver data */ devfs_handle_t de; /* directory for device */ struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ struct ide_settings_s *settings; /* /proc/ide/ drive settings */ char driver_req[10]; /* requests specific driver */ + int last_lun; /* last logical unit */ int forced_lun; /* if hdxlun was given at boot */ int lun; /* logical unit */ + int crc_count; /* crc counter to reduce drive speed */ byte quirk_list; /* drive is considered quirky if set for a specific host */ byte suspend_reset; /* drive suspend mode flag, soft-reset recovers */ @@ -409,7 +399,7 @@ typedef int (ide_dmaproc_t)(ide_dma_action_t, ide_drive_t *); * * If it is not defined for a controller, standard-code is used from ide.c. * - * Controllers which are not memory-mapped in the standard way need to + * Controllers which are not memory-mapped in the standard way need to * override that mechanism using this function to work. * */ @@ -448,11 +438,18 @@ typedef void (ide_rw_proc_t) (ide_drive_t *, ide_dma_action_t); */ typedef int (ide_busproc_t) (ide_drive_t *, int); -typedef struct hwif_s { - struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ +struct ata_channel { + struct device dev; /* device handle */ + int unit; /* channel number */ + + struct ata_channel *next; /* for linked-list in ide_hwgroup_t */ struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */ + ide_ioreg_t io_ports[IDE_NR_PORTS]; /* task file registers */ hw_regs_t hw; /* Hardware info */ +#ifdef CONFIG_BLK_DEV_IDEPCI + struct pci_dev *pci_dev; /* for pci chipsets */ +#endif ide_drive_t drives[MAX_DRIVES]; /* drive info */ struct gendisk *gd; /* gendisk structure */ ide_tuneproc_t *tuneproc; /* routine to tune PIO mode for drives */ @@ -470,7 +467,7 @@ typedef struct hwif_s { struct scatterlist *sg_table; /* Scatter-gather list used to build the above */ int sg_nents; /* Current number of entries in it */ int sg_dma_direction; /* dma transfer direction */ - struct hwif_s *mate; /* other hwif from same PCI chip */ + struct ata_channel *mate; /* other hwif from same PCI chip */ unsigned long dma_base; /* base addr for dma ports */ unsigned dma_extra; /* extra addr for dma ports */ unsigned long config_data; /* for use by chipset-specific code */ @@ -478,7 +475,7 @@ typedef struct hwif_s { struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ int irq; /* our irq number */ int major; /* our major number */ - char name[80]; /* name of interface */ + char name[8]; /* name of interface */ int index; /* 0 for ide0; 1 for ide1; ... */ hwif_chipset_t chipset; /* sub-module for tuning.. */ unsigned noprobe : 1; /* don't probe for this interface */ @@ -489,24 +486,19 @@ typedef struct hwif_s { unsigned autodma : 1; /* automatically try to enable DMA at boot */ unsigned udma_four : 1; /* 1=ATA-66 capable, 0=default */ unsigned highmem : 1; /* can do full 32-bit dma */ - byte channel; /* for dual-port chips: 0=primary, 1=secondary */ -#ifdef CONFIG_BLK_DEV_IDEPCI - struct pci_dev *pci_dev; /* for pci chipsets */ -#endif #if (DISK_RECOVERY_TIME > 0) unsigned long last_time; /* time when previous rq was done */ #endif byte straight8; /* Alan's straight 8 check */ ide_busproc_t *busproc; /* driver soft-power interface */ byte bus_state; /* power state of the IDE bus */ - struct device device; /* global device tree handle */ -} ide_hwif_t; +}; /* * Register new hardware with ide */ -extern int ide_register_hw(hw_regs_t *hw, struct hwif_s **hwifp); -extern void ide_unregister(ide_hwif_t *hwif); +extern int ide_register_hw(hw_regs_t *hw, struct ata_channel **hwifp); +extern void ide_unregister(struct ata_channel *hwif); /* * Status returned from various ide_ functions @@ -536,7 +528,7 @@ typedef struct hwgroup_s { ide_handler_t *handler;/* irq handler, if active */ unsigned long flags; /* BUSY, SLEEPING */ ide_drive_t *drive; /* current drive */ - ide_hwif_t *hwif; /* ptr to current hwif in linked-list */ + struct ata_channel *hwif; /* ptr to current hwif in linked-list */ struct request *rq; /* current request */ struct timer_list timer; /* failsafe timer */ struct request wrq; /* local copy of current write rq */ @@ -595,7 +587,7 @@ typedef struct { #ifdef CONFIG_PROC_FS void proc_ide_create(void); void proc_ide_destroy(void); -void destroy_proc_ide_drives(ide_hwif_t *); +void destroy_proc_ide_drives(struct ata_channel *); void create_proc_ide_interfaces(void); void ide_add_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p, void *data); void ide_remove_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p); @@ -630,7 +622,6 @@ read_proc_t proc_ide_read_geometry; struct ata_operations { struct module *owner; - unsigned busy: 1; /* FIXME: this will go soon away... */ int (*cleanup)(ide_drive_t *); int (*standby)(ide_drive_t *); ide_startstop_t (*do_request)(ide_drive_t *, struct request *, unsigned long); @@ -645,6 +636,7 @@ struct ata_operations { void (*pre_reset)(ide_drive_t *); unsigned long (*capacity)(ide_drive_t *); ide_startstop_t (*special)(ide_drive_t *); + ide_proc_entry_t *proc; }; @@ -670,15 +662,7 @@ extern int register_ata_driver(unsigned int type, struct ata_operations *driver) #define ata_ops(drive) ((drive)->driver) -/* - * ide_hwifs[] is the master data structure used to keep track - * of just about everything in ide.c. Whenever possible, routines - * should be using pointers to a drive (ide_drive_t *) or - * pointers to a hwif (ide_hwif_t *), rather than indexing this - * structure directly (the allocation/layout may change!). - * - */ -extern struct hwif_s ide_hwifs[]; /* master data repository */ +extern struct ata_channel ide_hwifs[]; /* master data repository */ extern int noautodma; /* @@ -771,35 +755,7 @@ typedef enum { */ #define ide_rq_offset(rq) (((rq)->hard_cur_sectors - (rq)->current_nr_sectors) << 9) -#define task_rq_offset(rq) \ - (((rq)->nr_sectors - (rq)->current_nr_sectors) * SECTOR_SIZE) - -/* - * This function issues a special IDE device request - * onto the request queue. - * - * If action is ide_wait, then the rq is queued at the end of the - * request queue, and the function sleeps until it has been processed. - * This is for use when invoked from an ioctl handler. - * - * If action is ide_preempt, then the rq is queued at the head of - * the request queue, displacing the currently-being-processed - * request and this function returns immediately without waiting - * for the new rq to be completed. This is VERY DANGEROUS, and is - * intended for careful use by the ATAPI tape/cdrom driver code. - * - * If action is ide_next, then the rq is queued immediately after - * the currently-being-processed-request (if any), and the function - * returns without waiting for the new rq to be completed. As above, - * This is VERY DANGEROUS, and is intended for careful use by the - * ATAPI tape/cdrom driver code. - * - * If action is ide_end, then the rq is queued at the end of the - * request queue, and the function returns immediately without waiting - * for the new rq to be completed. This is again intended for careful - * use by the ATAPI tape/cdrom driver code. - */ -int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t action); +extern int ide_do_drive_cmd(ide_drive_t *drive, struct request *rq, ide_action_t action); /* * Clean up after success/failure of an explicit drive cmd. @@ -807,17 +763,11 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio void ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err); typedef struct ide_task_s { - task_ioreg_t tfRegister[8]; - task_ioreg_t hobRegister[8]; - ide_reg_valid_t tf_out_flags; - ide_reg_valid_t tf_in_flags; - int data_phase; + struct hd_drive_task_hdr taskfile; + struct hd_drive_hob_hdr hobfile; int command_type; ide_pre_handler_t *prehandler; ide_handler_t *handler; - void *special; /* valid_t generally */ - struct request *rq; /* copy of request */ - unsigned long block; /* copy of block */ } ide_task_t; void ata_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount); @@ -827,15 +777,12 @@ void atapi_output_bytes (ide_drive_t *drive, void *buffer, unsigned int bytecoun void taskfile_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount); void taskfile_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount); -/* - * taskfile io for disks for now... - */ -ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task); - -/* - * Builds request from ide_ioctl - */ -void do_taskfile (ide_drive_t *drive, struct hd_drive_task_hdr *taskfile, struct hd_drive_hob_hdr *hobfile, ide_handler_t *handler); +extern ide_startstop_t ata_taskfile(ide_drive_t *drive, + struct hd_drive_task_hdr *taskfile, + struct hd_drive_hob_hdr *hobfile, + ide_handler_t *handler, + ide_pre_handler_t *prehandler, + struct request *rq); /* * Special Flagged Register Validation Caller @@ -871,7 +818,7 @@ extern int system_bus_speed; * idedisk_input_data() is a wrapper around ide_input_data() which copes * with byte-swapping the input data if required. */ -inline void idedisk_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount); +extern void idedisk_input_data(ide_drive_t *drive, void *buffer, unsigned int wcount); /* * ide_stall_queue() can be used by a drive to give excess bandwidth back @@ -939,15 +886,14 @@ extern int ide_unregister_subdriver(ide_drive_t *drive); void __init ide_scan_pcibus(int scan_direction); #endif #ifdef CONFIG_BLK_DEV_IDEDMA -# define BAD_DMA_DRIVE 0 -# define GOOD_DMA_DRIVE 1 int ide_build_dmatable (ide_drive_t *drive, ide_dma_action_t func); void ide_destroy_dmatable (ide_drive_t *drive); ide_startstop_t ide_dma_intr (ide_drive_t *drive); int check_drive_lists (ide_drive_t *drive, int good_bad); int ide_dmaproc (ide_dma_action_t func, ide_drive_t *drive); -extern void ide_release_dma(ide_hwif_t *hwif); -void ide_setup_dma (ide_hwif_t *hwif, unsigned long dmabase, unsigned int num_ports) __init; +extern void ide_release_dma(struct ata_channel *hwif); +extern void ide_setup_dma(struct ata_channel *hwif, + unsigned long dmabase, unsigned int num_ports) __init; #endif extern spinlock_t ide_lock; diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 47ee810f813c..ddd8e23c1ca5 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h @@ -18,6 +18,7 @@ struct ipv4_devconf int mc_forwarding; int tag; int arp_filter; + int medium_id; void *sysctl; }; @@ -48,6 +49,7 @@ struct in_device #define IN_DEV_TX_REDIRECTS(in_dev) (ipv4_devconf.send_redirects || (in_dev)->cnf.send_redirects) #define IN_DEV_SEC_REDIRECTS(in_dev) (ipv4_devconf.secure_redirects || (in_dev)->cnf.secure_redirects) #define IN_DEV_IDTAG(in_dev) ((in_dev)->cnf.tag) +#define IN_DEV_MEDIUM_ID(in_dev) ((in_dev)->cnf.medium_id) #define IN_DEV_RX_REDIRECTS(in_dev) \ ((IN_DEV_FORWARD(in_dev) && \ diff --git a/include/linux/iobuf.h b/include/linux/iobuf.h index 869b05dc6b80..fb147b5c48a7 100644 --- a/include/linux/iobuf.h +++ b/include/linux/iobuf.h @@ -80,9 +80,9 @@ extern void free_kiobuf_bhs(struct kiobuf *); /* fs/buffer.c */ int brw_kiovec(int rw, int nr, struct kiobuf *iovec[], - kdev_t dev, sector_t [], int size); + struct block_device *bdev, sector_t [], int size); /* fs/bio.c */ -void ll_rw_kio(int rw, struct kiobuf *kio, kdev_t dev, sector_t block); +void ll_rw_kio(int rw, struct kiobuf *kio, struct block_device *bdev, sector_t block); #endif /* __LINUX_IOBUF_H */ diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h index 586b49bb61bd..1ecc3cc8cef5 100644 --- a/include/linux/minix_fs.h +++ b/include/linux/minix_fs.h @@ -29,11 +29,6 @@ #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode))) #define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode))) -#define MINIX_V1 0x0001 /* original minix fs */ -#define MINIX_V2 0x0002 /* minix V2 fs */ - -#define INODE_VERSION(inode) minix_sb(inode->i_sb)->s_version - /* * This is the original minix inode layout on disk. * Note the 8-bit gid and atime and ctime. @@ -87,61 +82,4 @@ struct minix_dir_entry { char name[0]; }; -#ifdef __KERNEL__ - -#include <linux/minix_fs_i.h> -#include <linux/minix_fs_sb.h> - -/* - * change the define below to 0 if you want names > info->s_namelen chars to be - * truncated. Else they will be disallowed (ENAMETOOLONG). - */ -#define NO_TRUNCATE 1 - -extern struct minix_inode * minix_V1_raw_inode(struct super_block *, ino_t, struct buffer_head **); -extern struct minix2_inode * minix_V2_raw_inode(struct super_block *, ino_t, struct buffer_head **); -extern struct inode * minix_new_inode(const struct inode * dir, int * error); -extern void minix_free_inode(struct inode * inode); -extern unsigned long minix_count_free_inodes(struct super_block *sb); -extern int minix_new_block(struct inode * inode); -extern void minix_free_block(struct inode * inode, int block); -extern unsigned long minix_count_free_blocks(struct super_block *sb); - -extern void V1_minix_truncate(struct inode *); -extern void V2_minix_truncate(struct inode *); -extern void minix_truncate(struct inode *); -extern int minix_sync_inode(struct inode *); -extern void minix_set_inode(struct inode *, dev_t); -extern int V1_minix_get_block(struct inode *, long, struct buffer_head *, int); -extern int V2_minix_get_block(struct inode *, long, struct buffer_head *, int); - -extern struct minix_dir_entry *minix_find_entry(struct dentry*, struct page**); -extern int minix_add_link(struct dentry*, struct inode*); -extern int minix_delete_entry(struct minix_dir_entry*, struct page*); -extern int minix_make_empty(struct inode*, struct inode*); -extern int minix_empty_dir(struct inode*); -extern void minix_set_link(struct minix_dir_entry*, struct page*, struct inode*); -extern struct minix_dir_entry *minix_dotdot(struct inode*, struct page**); -extern ino_t minix_inode_by_name(struct dentry*); - -extern int minix_sync_file(struct file *, struct dentry *, int); - -extern struct inode_operations minix_file_inode_operations; -extern struct inode_operations minix_dir_inode_operations; -extern struct file_operations minix_file_operations; -extern struct file_operations minix_dir_operations; -extern struct dentry_operations minix_dentry_operations; - -static inline struct minix_sb_info *minix_sb(struct super_block *sb) -{ - return sb->u.generic_sbp; -} - -static inline struct minix_inode_info *minix_i(struct inode *inode) -{ - return list_entry(inode, struct minix_inode_info, vfs_inode); -} - -#endif /* __KERNEL__ */ - #endif diff --git a/include/linux/minix_fs_i.h b/include/linux/minix_fs_i.h deleted file mode 100644 index 1ffd85ed4070..000000000000 --- a/include/linux/minix_fs_i.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _MINIX_FS_I -#define _MINIX_FS_I - -/* - * minix fs inode data in memory - */ -struct minix_inode_info { - union { - __u16 i1_data[16]; - __u32 i2_data[16]; - } u; - struct inode vfs_inode; -}; - -#endif diff --git a/include/linux/minix_fs_sb.h b/include/linux/minix_fs_sb.h deleted file mode 100644 index 54c82af99a8f..000000000000 --- a/include/linux/minix_fs_sb.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef _MINIX_FS_SB -#define _MINIX_FS_SB - -/* - * minix super-block data in memory - */ -struct minix_sb_info { - unsigned long s_ninodes; - unsigned long s_nzones; - unsigned long s_imap_blocks; - unsigned long s_zmap_blocks; - unsigned long s_firstdatazone; - unsigned long s_log_zone_size; - unsigned long s_max_size; - int s_dirsize; - int s_namelen; - int s_link_max; - struct buffer_head ** s_imap; - struct buffer_head ** s_zmap; - struct buffer_head * s_sbh; - struct minix_super_block * s_ms; - unsigned short s_mount_state; - unsigned short s_version; -}; - -#endif diff --git a/include/linux/mtd/compatmac.h b/include/linux/mtd/compatmac.h index e6844448c327..9c9a2276f57e 100644 --- a/include/linux/mtd/compatmac.h +++ b/include/linux/mtd/compatmac.h @@ -190,8 +190,8 @@ static inline int try_inc_mod_count(struct module *mod) #if LINUX_VERSION_CODE < 0x20300 #include <linux/interrupt.h> -#define spin_lock_bh(lock) do {start_bh_atomic();spin_lock(lock);}while(0); -#define spin_unlock_bh(lock) do {spin_unlock(lock);end_bh_atomic();}while(0); +#define spin_lock_bh(lock) do {start_bh_atomic();spin_lock(lock);} while(0) +#define spin_unlock_bh(lock) do {spin_unlock(lock);end_bh_atomic();} while(0) #else #include <asm/softirq.h> #include <linux/spinlock.h> diff --git a/include/linux/nbd.h b/include/linux/nbd.h index f1b5135d288e..b6120317731d 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h @@ -70,7 +70,7 @@ struct nbd_device { struct file * file; /* If == NULL, device is not ready, yet */ int magic; /* FIXME: not if debugging is off */ struct list_head queue_head; /* Requests are added here... */ - struct semaphore queue_lock; + struct semaphore tx_lock; }; #endif diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 32b6db3c7a2c..706c6240ecca 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -246,8 +246,6 @@ struct net_device * I/O specific fields * FIXME: Merge these and struct ifmap into one */ - unsigned long rmem_end; /* shmem "recv" end */ - unsigned long rmem_start; /* shmem "recv" start */ unsigned long mem_end; /* shared mem end */ unsigned long mem_start; /* shared mem start */ unsigned long base_addr; /* device I/O address */ diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index 107cce0c67a3..de76fd298762 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h @@ -6,6 +6,7 @@ #include <linux/config.h> #include <linux/netfilter_ipv4/ip_conntrack_tuple.h> +#include <asm/atomic.h> enum ip_conntrack_info { @@ -62,27 +63,58 @@ do { \ #define IP_NF_ASSERT(x) #endif +#ifdef CONFIG_IP_NF_NAT_NEEDED +#include <linux/netfilter_ipv4/ip_nat.h> +#endif + +/* Add protocol helper include file here */ +#include <linux/netfilter_ipv4/ip_conntrack_ftp.h> +#include <linux/netfilter_ipv4/ip_conntrack_irc.h> + struct ip_conntrack_expect { - /* Internal linked list */ + /* Internal linked list (global expectation list) */ struct list_head list; + /* expectation list for this master */ + struct list_head expected_list; + + /* The conntrack of the master connection */ + struct ip_conntrack *expectant; + + /* The conntrack of the sibling connection, set after + * expectation arrived */ + struct ip_conntrack *sibling; + + /* Tuple saved for conntrack */ + struct ip_conntrack_tuple ct_tuple; + + /* Timer function; deletes the expectation. */ + struct timer_list timeout; + + /* Data filled out by the conntrack helpers follow: */ + /* We expect this tuple, with the following mask */ struct ip_conntrack_tuple tuple, mask; /* Function to call after setup and insertion */ int (*expectfn)(struct ip_conntrack *new); - /* The conntrack we are part of (set iff we're live) */ - struct ip_conntrack *expectant; -}; - + /* At which sequence number did this expectation occur */ + u_int32_t seq; + + union { + /* insert conntrack helper private data (expect) here */ + struct ip_ct_ftp_expect exp_ftp_info; + struct ip_ct_irc_expect exp_irc_info; + #ifdef CONFIG_IP_NF_NAT_NEEDED -#include <linux/netfilter_ipv4/ip_nat.h> + union { + /* insert nat helper private data (expect) here */ + } nat; #endif - -#include <linux/netfilter_ipv4/ip_conntrack_ftp.h> -#include <linux/netfilter_ipv4/ip_conntrack_irc.h> + } help; +}; struct ip_conntrack { @@ -101,10 +133,13 @@ struct ip_conntrack /* If we're expecting another related connection, this will be in expected linked list */ - struct ip_conntrack_expect expected; + struct list_head sibling_list; + + /* Current number of expected connections */ + unsigned int expecting; - /* If we were expected by another connection, this will be it */ - struct nf_ct_info master; + /* If we were expected by an expectation, this will be it */ + struct ip_conntrack_expect *master; /* Helper, if any. */ struct ip_conntrack_helper *helper; @@ -121,8 +156,9 @@ struct ip_conntrack } proto; union { - struct ip_ct_ftp ct_ftp_info; - struct ip_ct_irc ct_irc_info; + /* insert conntrack helper private data (master) here */ + struct ip_ct_ftp_master ct_ftp_info; + struct ip_ct_irc_master ct_irc_info; } help; #ifdef CONFIG_IP_NF_NAT_NEEDED @@ -140,6 +176,9 @@ struct ip_conntrack }; +/* get master conntrack via master expectation */ +#define master_ct(conntr) (conntr->master ? conntr->master->expectant : NULL) + /* Alter reply tuple (maybe alter helper). If it's already taken, return 0 and don't do alteration. */ extern int diff --git a/include/linux/netfilter_ipv4/ip_conntrack_core.h b/include/linux/netfilter_ipv4/ip_conntrack_core.h index 6ed40793af6a..49f26c463e85 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_core.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_core.h @@ -15,7 +15,7 @@ extern int ip_conntrack_init(void); extern void ip_conntrack_cleanup(void); struct ip_conntrack_protocol; -extern struct ip_conntrack_protocol *find_proto(u_int8_t protocol); +extern struct ip_conntrack_protocol *ip_ct_find_proto(u_int8_t protocol); /* Like above, but you already have conntrack read lock. */ extern struct ip_conntrack_protocol *__find_proto(u_int8_t protocol); extern struct list_head protocol_list; diff --git a/include/linux/netfilter_ipv4/ip_conntrack_ftp.h b/include/linux/netfilter_ipv4/ip_conntrack_ftp.h index 4b560e237ba3..06f6f588ce37 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_ftp.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_ftp.h @@ -11,6 +11,8 @@ /* Protects ftp part of conntracks */ DECLARE_LOCK_EXTERN(ip_ftp_lock); +#define FTP_PORT 21 + enum ip_ct_ftp_type { /* PORT command from client */ @@ -23,18 +25,20 @@ enum ip_ct_ftp_type IP_CT_FTP_EPSV, }; -/* We record seq number and length of ftp ip/port text here: all in - host order. */ -struct ip_ct_ftp +/* This structure is per expected connection */ +struct ip_ct_ftp_expect { - /* This tells NAT that this is an ftp connection */ - int is_ftp; - u_int32_t seq; - /* 0 means not found yet */ - u_int32_t len; - enum ip_ct_ftp_type ftptype; - /* Port that was to be used */ - u_int16_t port; + /* We record seq number and length of ftp ip/port text here: all in + * host order. */ + + /* sequence number of IP address in packet is in ip_conntrack_expect */ + u_int32_t len; /* length of IP address */ + enum ip_ct_ftp_type ftptype; /* PORT or PASV ? */ + u_int16_t port; /* TCP port that was to be used */ +}; + +/* This structure exists only once per master */ +struct ip_ct_ftp_master { /* Next valid seq position for cmd matching after newline */ u_int32_t seq_aft_nl[IP_CT_DIR_MAX]; /* 0 means seq_match_aft_nl not set */ diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper.h b/include/linux/netfilter_ipv4/ip_conntrack_helper.h index 728e7bde6b3f..d092a4fcb33b 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_helper.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_helper.h @@ -5,10 +5,19 @@ struct module; +/* Reuse expectation when max_expected reached */ +#define IP_CT_HELPER_F_REUSE_EXPECT 0x01 + struct ip_conntrack_helper { - /* Internal use. */ - struct list_head list; + struct list_head list; /* Internal use. */ + + const char *name; /* name of the module */ + unsigned char flags; /* Flags (see above) */ + struct module *me; /* pointer to self */ + unsigned int max_expected; /* Maximum number of concurrent + * expected connections */ + unsigned int timeout; /* timeout for expecteds */ /* Mask of things we will help (compared against server response) */ struct ip_conntrack_tuple tuple; @@ -24,11 +33,13 @@ struct ip_conntrack_helper extern int ip_conntrack_helper_register(struct ip_conntrack_helper *); extern void ip_conntrack_helper_unregister(struct ip_conntrack_helper *); -/* Add an expected connection: can only have one per connection */ +extern struct ip_conntrack_helper *ip_ct_find_helper(const struct ip_conntrack_tuple *tuple); + +/* Add an expected connection: can have more than one per connection */ extern int ip_conntrack_expect_related(struct ip_conntrack *related_to, - const struct ip_conntrack_tuple *tuple, - const struct ip_conntrack_tuple *mask, - int (*expectfn)(struct ip_conntrack *)); -extern void ip_conntrack_unexpect_related(struct ip_conntrack *related_to); + struct ip_conntrack_expect *exp); +extern int ip_conntrack_change_expect(struct ip_conntrack_expect *expect, + struct ip_conntrack_tuple *newtuple); +extern void ip_conntrack_unexpect_related(struct ip_conntrack_expect *exp); #endif /*_IP_CONNTRACK_HELPER_H*/ diff --git a/include/linux/netfilter_ipv4/ip_conntrack_irc.h b/include/linux/netfilter_ipv4/ip_conntrack_irc.h index 8069814530ea..bc96a5df6a4b 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_irc.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_irc.h @@ -20,7 +20,7 @@ #include <linux/netfilter_ipv4/lockhelp.h> -#define IP_CONNTR_IRC 2 +#define IRC_PORT 6667 struct dccproto { char* match; @@ -32,16 +32,18 @@ DECLARE_LOCK_EXTERN(ip_irc_lock); /* We record seq number and length of irc ip/port text here: all in host order. */ -struct ip_ct_irc + +/* This structure is per expected connection */ +struct ip_ct_irc_expect { - /* This tells NAT that this is an IRC connection */ - int is_irc; - /* sequence number where address part of DCC command begins */ - u_int32_t seq; - /* 0 means not found yet */ + /* length of IP address */ u_int32_t len; /* Port that was to be used */ u_int16_t port; }; +/* This structure exists only once per master */ +struct ip_ct_irc_master { +}; + #endif /* _IP_CONNTRACK_IRC_H */ diff --git a/include/linux/netfilter_ipv4/ip_conntrack_protocol.h b/include/linux/netfilter_ipv4/ip_conntrack_protocol.h index 83076c3c5f25..e99cd7ded26f 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_protocol.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_protocol.h @@ -42,6 +42,13 @@ struct ip_conntrack_protocol int (*new)(struct ip_conntrack *conntrack, struct iphdr *iph, size_t len); + /* Called when a conntrack entry is destroyed */ + void (*destroy)(struct ip_conntrack *conntrack); + + /* Has to decide if a expectation matches one packet or not */ + int (*exp_matches_pkt)(struct ip_conntrack_expect *exp, + struct sk_buff **pskb); + /* Module (if any) which this is connected to. */ struct module *me; }; diff --git a/include/linux/netfilter_ipv4/ip_nat_helper.h b/include/linux/netfilter_ipv4/ip_nat_helper.h index d85cd0669826..2c1fb8d9bb54 100644 --- a/include/linux/netfilter_ipv4/ip_nat_helper.h +++ b/include/linux/netfilter_ipv4/ip_nat_helper.h @@ -6,23 +6,37 @@ struct sk_buff; +/* Flags */ +/* NAT helper must be called on every packet (for TCP) */ +#define IP_NAT_HELPER_F_ALWAYS 0x01 +/* Standalone NAT helper, without a conntrack part */ +#define IP_NAT_HELPER_F_STANDALONE 0x02 + struct ip_nat_helper { - /* Internal use */ - struct list_head list; + struct list_head list; /* Internal use */ + const char *name; /* name of the module */ + unsigned char flags; /* Flags (see above) */ + struct module *me; /* pointer to self */ + /* Mask of things we will help: vs. tuple from server */ struct ip_conntrack_tuple tuple; struct ip_conntrack_tuple mask; /* Helper function: returns verdict */ unsigned int (*help)(struct ip_conntrack *ct, + struct ip_conntrack_expect *exp, struct ip_nat_info *info, enum ip_conntrack_info ctinfo, unsigned int hooknum, struct sk_buff **pskb); - const char *name; + /* Returns verdict and sets up NAT for this connection */ + unsigned int (*expect)(struct sk_buff **pskb, + unsigned int hooknum, + struct ip_conntrack *ct, + struct ip_nat_info *info); }; extern struct list_head helpers; @@ -39,5 +53,5 @@ extern int ip_nat_mangle_tcp_packet(struct sk_buff **skb, extern int ip_nat_seq_adjust(struct sk_buff *skb, struct ip_conntrack *ct, enum ip_conntrack_info ctinfo); -extern void ip_nat_delete_sack(struct sk_buff *skb, struct tcphdr *tcph); +extern void ip_nat_delete_sack(struct sk_buff *skb); #endif diff --git a/include/linux/netfilter_ipv4/ip_nat_rule.h b/include/linux/netfilter_ipv4/ip_nat_rule.h index 6c92b285d184..488efcee2f3c 100644 --- a/include/linux/netfilter_ipv4/ip_nat_rule.h +++ b/include/linux/netfilter_ipv4/ip_nat_rule.h @@ -5,24 +5,7 @@ #include <linux/netfilter_ipv4/ip_nat.h> #ifdef __KERNEL__ -/* Want to be told when we first NAT an expected packet for a conntrack? */ -struct ip_nat_expect -{ - struct list_head list; - /* Returns 1 (and sets verdict) if it has setup NAT for this - connection */ - int (*expect)(struct sk_buff **pskb, - unsigned int hooknum, - struct ip_conntrack *ct, - struct ip_nat_info *info, - struct ip_conntrack *master, - struct ip_nat_info *masterinfo, - unsigned int *verdict); -}; - -extern int ip_nat_expect_register(struct ip_nat_expect *expect); -extern void ip_nat_expect_unregister(struct ip_nat_expect *expect); extern int ip_nat_rule_init(void) __init; extern void ip_nat_rule_cleanup(void); extern int ip_nat_rule_find(struct sk_buff **pskb, diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 41eed9cd438e..13ab68e4c0d5 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -355,6 +355,7 @@ #define PCI_VENDOR_ID_WD 0x101c #define PCI_DEVICE_ID_WD_7197 0x3296 +#define PCI_DEVICE_ID_WD_90C 0xc24a #define PCI_VENDOR_ID_AMI 0x101e #define PCI_DEVICE_ID_AMI_MEGARAID3 0x1960 @@ -445,6 +446,7 @@ #define PCI_DEVICE_ID_NEC_PCX2 0x0046 #define PCI_DEVICE_ID_NEC_NILE4 0x005a #define PCI_DEVICE_ID_NEC_VRC5476 0x009b +#define PCI_DEVICE_ID_NEC_VRC5477_AC97 0x00a6 #define PCI_VENDOR_ID_FD 0x1036 #define PCI_DEVICE_ID_FD_36C70 0x0000 @@ -537,10 +539,6 @@ #define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 #define PCI_DEVICE_ID_ELSA_QS3000 0x3000 -#define PCI_VENDOR_ID_ELSA 0x1048 -#define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 -#define PCI_DEVICE_ID_ELSA_QS3000 0x3000 - #define PCI_VENDOR_ID_SGS 0x104a #define PCI_DEVICE_ID_SGS_2000 0x0008 #define PCI_DEVICE_ID_SGS_1764 0x0009 @@ -597,6 +595,7 @@ #define PCI_DEVICE_ID_MOTOROLA_MPC106 0x0002 #define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801 #define PCI_DEVICE_ID_MOTOROLA_FALCON 0x4802 +#define PCI_DEVICE_ID_MOTOROLA_HAWK 0x4803 #define PCI_DEVICE_ID_MOTOROLA_CPX8216 0x4806 #define PCI_VENDOR_ID_PROMISE 0x105a @@ -608,6 +607,7 @@ #define PCI_DEVICE_ID_PROMISE_20268R 0x6268 #define PCI_DEVICE_ID_PROMISE_20269 0x4d69 #define PCI_DEVICE_ID_PROMISE_20275 0x1275 +#define PCI_DEVICE_ID_PROMISE_20276 0x5275 #define PCI_DEVICE_ID_PROMISE_5300 0x5300 #define PCI_VENDOR_ID_N9 0x105d @@ -649,6 +649,12 @@ #define PCI_DEVICE_ID_APPLE_KL_USB 0x0019 #define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020 #define PCI_DEVICE_ID_APPLE_UNI_N_GMAC 0x0021 +#define PCI_DEVICE_ID_APPLE_KEYLARGO 0x0022 +#define PCI_DEVICE_ID_APPLE_UNI_N_GMACP 0x0024 +#define PCI_DEVICE_ID_APPLE_KEYLARGO_P 0x0025 +#define PCI_DEVICE_ID_APPLE_KL_USB_P 0x0026 +#define PCI_DEVICE_ID_APPLE_UNI_N_AGP_P 0x0027 +#define PCI_DEVICE_ID_APPLE_UNI_N_AGP15 0x002d #define PCI_DEVICE_ID_APPLE_UNI_N_FW2 0x0030 #define PCI_VENDOR_ID_YAMAHA 0x1073 @@ -860,12 +866,18 @@ #define PCI_DEVICE_ID_NVIDIA_QUADRO 0x0103 #define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX 0x0110 #define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX2 0x0111 +#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GO 0x0112 #define PCI_DEVICE_ID_NVIDIA_QUADRO2_MXR 0x0113 #define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS 0x0150 #define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS2 0x0151 #define PCI_DEVICE_ID_NVIDIA_GEFORCE2_ULTRA 0x0152 #define PCI_DEVICE_ID_NVIDIA_QUADRO2_PRO 0x0153 +#define PCI_DEVICE_ID_NVIDIA_IGEFORCE2 0x01a0 #define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc +#define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200 +#define PCI_DEVICE_ID_NVIDIA_GEFORCE3_1 0x0201 +#define PCI_DEVICE_ID_NVIDIA_GEFORCE3_2 0x0202 +#define PCI_DEVICE_ID_NVIDIA_QUADRO_DDC 0x0203 #define PCI_VENDOR_ID_IMS 0x10e0 #define PCI_DEVICE_ID_IMS_8849 0x8849 @@ -1106,6 +1118,11 @@ #define PCI_DEVICE_ID_TOSHIBA_TOPIC95 0x060a #define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f +#define PCI_VENDOR_ID_TOSHIBA_2 0x102f +#define PCI_DEVICE_ID_TOSHIBA_TX3927 0x000a +#define PCI_DEVICE_ID_TOSHIBA_TC35815CF 0x0030 +#define PCI_DEVICE_ID_TOSHIBA_TX4927 0x0180 + #define PCI_VENDOR_ID_RICOH 0x1180 #define PCI_DEVICE_ID_RICOH_RL5C465 0x0465 #define PCI_DEVICE_ID_RICOH_RL5C466 0x0466 @@ -1118,6 +1135,8 @@ #define PCI_DEVICE_ID_ARTOP_ATP850UF 0x0005 #define PCI_DEVICE_ID_ARTOP_ATP860 0x0006 #define PCI_DEVICE_ID_ARTOP_ATP860R 0x0007 +#define PCI_DEVICE_ID_ARTOP_ATP865 0x0008 +#define PCI_DEVICE_ID_ARTOP_ATP865R 0x0009 #define PCI_DEVICE_ID_ARTOP_AEC7610 0x8002 #define PCI_DEVICE_ID_ARTOP_AEC7612UW 0x8010 #define PCI_DEVICE_ID_ARTOP_AEC7612U 0x8020 @@ -1279,13 +1298,8 @@ #define PCI_VENDOR_ID_ITE 0x1283 #define PCI_DEVICE_ID_ITE_IT8172G 0x8172 #define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801 - -#define PCI_VENDOR_ID_ITE 0x1283 -#define PCI_DEVICE_ID_ITE_IT8172G 0x8172 - -#define PCI_VENDOR_ID_ITE 0x1283 #define PCI_DEVICE_ID_ITE_8872 0x8872 - +#define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 /* formerly Platform Tech */ #define PCI_VENDOR_ID_ESS_OLD 0x1285 @@ -1450,6 +1464,8 @@ #define PCI_DEVICE_ID_LAVA_DSERIAL 0x0100 /* 2x 16550 */ #define PCI_DEVICE_ID_LAVA_QUATRO_A 0x0101 /* 2x 16550, half of 4 port */ #define PCI_DEVICE_ID_LAVA_QUATRO_B 0x0102 /* 2x 16550, half of 4 port */ +#define PCI_DEVICE_ID_LAVA_OCTO_A 0x0180 /* 4x 16550A, half of 8 port */ +#define PCI_DEVICE_ID_LAVA_OCTO_B 0x0181 /* 4x 16550A, half of 8 port */ #define PCI_DEVICE_ID_LAVA_PORT_PLUS 0x0200 /* 2x 16650 */ #define PCI_DEVICE_ID_LAVA_QUAD_A 0x0201 /* 2x 16650, half of 4 port */ #define PCI_DEVICE_ID_LAVA_QUAD_B 0x0202 /* 2x 16650, half of 4 port */ @@ -1639,16 +1655,6 @@ #define PCI_DEVICE_ID_INTEL_82801BA_2 0x2443 #define PCI_DEVICE_ID_INTEL_82801BA_3 0x2444 #define PCI_DEVICE_ID_INTEL_82801BA_4 0x2445 -#define PCI_DEVICE_ID_INTEL_82801CA_0 0x2480 -#define PCI_DEVICE_ID_INTEL_82801CA_2 0x2482 -#define PCI_DEVICE_ID_INTEL_82801CA_3 0x2483 -#define PCI_DEVICE_ID_INTEL_82801CA_4 0x2484 -#define PCI_DEVICE_ID_INTEL_82801CA_5 0x2485 -#define PCI_DEVICE_ID_INTEL_82801CA_6 0x2486 -#define PCI_DEVICE_ID_INTEL_82801CA_7 0x2487 -#define PCI_DEVICE_ID_INTEL_82801CA_10 0x248a -#define PCI_DEVICE_ID_INTEL_82801CA_11 0x248b -#define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c #define PCI_DEVICE_ID_INTEL_82801BA_5 0x2446 #define PCI_DEVICE_ID_INTEL_82801BA_6 0x2448 #define PCI_DEVICE_ID_INTEL_82801BA_7 0x2449 diff --git a/include/linux/pnpbios.h b/include/linux/pnpbios.h index b1b2b6f9e5e6..e1e8542bda0a 100644 --- a/include/linux/pnpbios.h +++ b/include/linux/pnpbios.h @@ -143,20 +143,21 @@ static __inline struct pnpbios_driver *pnpbios_dev_driver(const struct pci_dev * extern int pnpbios_dont_use_current_config; extern void *pnpbios_kmalloc(size_t size, int f); extern int pnpbios_init (void); -extern void pnpbios_proc_init (void); +extern int pnpbios_proc_init (void); +extern void pnpbios_proc_exit (void); extern int pnp_bios_dev_node_info (struct pnp_dev_node_info *data); extern int pnp_bios_get_dev_node (u8 *nodenum, char config, struct pnp_bios_node *data); extern int pnp_bios_set_dev_node (u8 nodenum, char config, struct pnp_bios_node *data); +extern int pnp_bios_get_stat_res (char *info); +extern int pnp_bios_isapnp_config (struct pnp_isa_config_struc *data); +extern int pnp_bios_escd_info (struct escd_info_struc *data); +extern int pnp_bios_read_escd (char *data, u32 nvram_base); #if needed extern int pnp_bios_get_event (u16 *message); extern int pnp_bios_send_message (u16 message); extern int pnp_bios_set_stat_res (char *info); -extern int pnp_bios_get_stat_res (char *info); extern int pnp_bios_apm_id_table (char *table, u16 *size); -extern int pnp_bios_isapnp_config (struct pnp_isa_config_struc *data); -extern int pnp_bios_escd_info (struct escd_info_struc *data); -extern int pnp_bios_read_escd (char *data, u32 nvram_base); extern int pnp_bios_write_escd (char *data, u32 nvram_base); #endif diff --git a/include/linux/quota.h b/include/linux/quota.h index d155eb2bd51a..b2d5de7368f6 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -144,7 +144,6 @@ struct dqstats { #ifdef __KERNEL__ -extern int nr_dquots, nr_free_dquots; extern int dquot_root_squash; #define NR_DQHASH 43 /* Just an arbitrary number */ diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index 233163eb2872..07e24c4dc71e 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h @@ -18,8 +18,6 @@ #ifndef _MD_H #define _MD_H -#include <linux/mm.h> -#include <linux/fs.h> #include <linux/blkdev.h> #include <asm/semaphore.h> #include <linux/major.h> diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index b0778a2d45e7..3854002c7eec 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -589,7 +589,7 @@ extern void rtnetlink_init(void); #define ASSERT_RTNL() do { if (down_trylock(&rtnl_sem) == 0) { up(&rtnl_sem); \ printk("RTNL: assertion failed at " __FILE__ "(%d)\n", __LINE__); } \ - } while(0); + } while(0) #define BUG_TRAP(x) if (!(x)) { printk("KERNEL: assertion (" #x ") failed at " __FILE__ "(%d)\n", __LINE__); } diff --git a/include/linux/sched.h b/include/linux/sched.h index 205c801bea22..024e34706cc9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -79,7 +79,6 @@ extern int nr_threads; extern int last_pid; extern unsigned long nr_running(void); -#include <linux/fs.h> #include <linux/time.h> #include <linux/param.h> #include <linux/resource.h> diff --git a/include/linux/securebits.h b/include/linux/securebits.h index 1e10badcbdba..5b0617840fa4 100644 --- a/include/linux/securebits.h +++ b/include/linux/securebits.h @@ -6,7 +6,7 @@ extern unsigned securebits; /* When set UID 0 has no special privileges. When unset, we support - inheritance of root-permissions and suid-root executablew under + inheritance of root-permissions and suid-root executable under compatibility mode. We raise the effective and inheritable bitmasks *of the executable file* if the effective uid of the new process is 0. If the real uid is 0, we raise the inheritable bitmask of the diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 2bec5fabc4dc..372d30d0cd55 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -16,7 +16,6 @@ #include <linux/config.h> #include <linux/kernel.h> -#include <linux/sched.h> #include <linux/time.h> #include <linux/cache.h> diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h index f554cf9057a8..e049feae8dea 100644 --- a/include/linux/smb_fs.h +++ b/include/linux/smb_fs.h @@ -12,6 +12,7 @@ #include <linux/smb.h> #include <linux/smb_fs_i.h> #include <linux/smb_fs_sb.h> +#include <linux/fs.h> /* * ioctl commands diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 48aab6f712a3..4a53f5b8852a 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h @@ -73,11 +73,28 @@ #define SONYPI_EVENT_BACK_PRESSED 35 #define SONYPI_EVENT_LID_CLOSED 36 #define SONYPI_EVENT_LID_OPENED 37 +#define SONYPI_EVENT_BLUETOOTH_ON 38 +#define SONYPI_EVENT_BLUETOOTH_OFF 39 +/* get/set brightness */ +#define SONYPI_IOCGBRT _IOR('v', 0, __u8) +#define SONYPI_IOCSBRT _IOW('v', 0, __u8) -/* brightness etc. ioctls */ -#define SONYPI_IOCGBRT _IOR('v', 0, __u8) -#define SONYPI_IOCSBRT _IOW('v', 0, __u8) +/* get battery full capacity/remaining capacity */ +#define SONYPI_IOCGBAT1CAP _IOR('v', 2, __u16) +#define SONYPI_IOCGBAT1REM _IOR('v', 3, __u16) +#define SONYPI_IOCGBAT2CAP _IOR('v', 4, __u16) +#define SONYPI_IOCGBAT2REM _IOR('v', 5, __u16) + +/* get battery flags: battery1/battery2/ac adapter present */ +#define SONYPI_BFLAGS_B1 0x01 +#define SONYPI_BFLAGS_B2 0x02 +#define SONYPI_BFLAGS_AC 0x04 +#define SONYPI_IOCGBATFLAGS _IOR('v', 7, __u8) + +/* get/set bluetooth subsystem state on/off */ +#define SONYPI_IOCGBLUE _IOR('v', 8, __u8) +#define SONYPI_IOCSBLUE _IOW('v', 9, __u8) #ifdef __KERNEL__ diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index cd7428798399..a78cd80f4ab6 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h @@ -204,7 +204,7 @@ do { \ #else -#define preempt_get_count() do { } while (0) +#define preempt_get_count() (0) #define preempt_disable() do { } while (0) #define preempt_enable_no_resched() do {} while(0) #define preempt_enable() do { } while (0) diff --git a/include/linux/string.h b/include/linux/string.h index b5497d139d28..3d344c0190d8 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -12,9 +12,7 @@ extern "C" { #endif -extern char * ___strtok; extern char * strpbrk(const char *,const char *); -extern char * strtok(char *,const char *); extern char * strsep(char **,const char *); extern __kernel_size_t strspn(const char *,const char *); diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 01829afb8e41..30caa40c26be 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -288,7 +288,8 @@ enum NET_TCP_ADV_WIN_SCALE=87, NET_IPV4_NONLOCAL_BIND=88, NET_IPV4_ICMP_RATELIMIT=89, - NET_IPV4_ICMP_RATEMASK=90 + NET_IPV4_ICMP_RATEMASK=90, + NET_TCP_TW_REUSE=91 }; enum { @@ -333,7 +334,8 @@ enum NET_IPV4_CONF_BOOTP_RELAY=10, NET_IPV4_CONF_LOG_MARTIANS=11, NET_IPV4_CONF_TAG=12, - NET_IPV4_CONF_ARPFILTER=13 + NET_IPV4_CONF_ARPFILTER=13, + NET_IPV4_CONF_MEDIUM_ID=14, }; /* /proc/sys/net/ipv6 */ diff --git a/include/linux/ticable.h b/include/linux/ticable.h new file mode 100644 index 000000000000..5aa24b451fba --- /dev/null +++ b/include/linux/ticable.h @@ -0,0 +1,42 @@ +/* Hey EMACS -*- linux-c -*- + * + * tipar/tiser/tiusb - low level driver for handling link cables + * designed for Texas Instruments graphing calculators. + * + * Copyright (C) 2000-2002, Romain Lievin <roms@lpg.ticalc.org> + * + * Redistribution of this file is permitted under the terms of the GNU + * Public License (GPL) + */ + +#ifndef _TICABLE_H +#define _TICABLE_H 1 + +/* Internal default constants for the kernel module */ +#define TIMAXTIME 15 /* 1.5 seconds */ +#define IO_DELAY 10 /* 10 micro-seconds */ + +/* Major & minor number for character devices */ +#define TIPAR_MAJOR 115 /* 0 to 7 */ +#define TIPAR_MINOR 0 + +#define TISER_MAJOR 115 /* 8 to 15 */ +#define TISER_MINOR 8 + +#define TIUSB_MAJOR 115 /* 16 to 31 */ +#define TIUSB_MINOR 16 + +/* + * Request values for the 'ioctl' function. + */ +#define IOCTL_TIPAR_DELAY _IOW('p', 0xa8, int) /* set delay */ +#define IOCTL_TIPAR_TIMEOUT _IOW('p', 0xa9, int) /* set timeout */ + +#define IOCTL_TISER_DELAY _IOW('p', 0xa0, int) /* set delay */ +#define IOCTL_TISER_TIMEOUT _IOW('p', 0xa1, int) /* set timeout */ + +#define IOCTL_TIUSB_TIMEOUT _IOW('N', 0x20, int) /* set timeout */ +#define IOCTL_TIUSB_RESET_DEVICE _IOW('N', 0x21, int) /* reset device */ +#define IOCTL_TIUSB_RESET_PIPES _IOW('N', 0x22, int) /* reset both pipes*/ + +#endif /* TICABLE_H */ diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h index 77a54446df3d..07cbb273974f 100644 --- a/include/linux/udf_fs.h +++ b/include/linux/udf_fs.h @@ -34,6 +34,10 @@ #ifndef _UDF_FS_H #define _UDF_FS_H 1 +#include <linux/config.h> + +#include <linux/config.h> + #define UDF_PREALLOCATE #define UDF_DEFAULT_PREALLOC_BLOCKS 8 diff --git a/include/linux/usb.h b/include/linux/usb.h index 391668010831..3b5c1df0ba46 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -588,7 +588,7 @@ typedef void (*usb_complete_t)(struct urb *); /** * struct urb - USB Request Block * @urb_list: For use by current owner of the URB. - * @next: Used primarily to link ISO requests into rings. + * @next: Used to link ISO requests into rings. * @pipe: Holds endpoint number, direction, type, and max packet size. * Create these values with the eight macros available; * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the type is "ctrl" @@ -627,8 +627,9 @@ typedef void (*usb_complete_t)(struct urb *); * @start_frame: Returns the initial frame for interrupt or isochronous * transfers. * @number_of_packets: Lists the number of ISO transfer buffers. - * @interval: Specifies the polling interval for interrupt transfers, in - * milliseconds. + * @interval: Specifies the polling interval for interrupt or isochronous + * transfers. The units are frames (milliseconds) for for full and low + * speed devices, and microframes (1/8 millisecond) for highspeed ones. * @error_count: Returns the number of ISO transfers that reported errors. * @context: For use in completion functions. This normally points to * request-specific driver context. @@ -668,12 +669,16 @@ typedef void (*usb_complete_t)(struct urb *); * * Control URBs must provide a setup_packet. * - * Interupt UBS must provide an interval, saying how often (in milliseconds) + * Interrupt UBS must provide an interval, saying how often (in milliseconds + * or, for highspeed devices, 125 microsecond units) * to poll for transfers. After the URB has been submitted, the interval * and start_frame fields reflect how the transfer was actually scheduled. * The polling interval may be more frequent than requested. * For example, some controllers have a maximum interval of 32 microseconds, * while others support intervals of up to 1024 microseconds. + * Isochronous URBs also have transfer intervals. (Note that for isochronous + * endpoints, as well as high speed interrupt endpoints, the encoding of + * the transfer interval in the endpoint descriptor is logarithmic.) * * Isochronous URBs normally use the USB_ISO_ASAP transfer flag, telling * the host controller to schedule the transfer as soon as bandwidth @@ -682,8 +687,8 @@ typedef void (*usb_complete_t)(struct urb *); * and handle the case where the transfer can't begin then. However, drivers * won't know how bandwidth is currently allocated, and while they can * find the current frame using usb_get_current_frame_number () they can't - * know the range for that frame number. (Common ranges for the frame - * counter include 256, 512, and 1024 frames.) + * know the range for that frame number. (Ranges for frame counter values + * are HC-specific, and can go from 256 to 65536 frames from "now".) * * Isochronous URBs have a different data transfer model, in part because * the quality of service is only "best effort". Callers provide specially @@ -734,7 +739,7 @@ struct urb unsigned char *setup_packet; /* (in) setup packet (control only) */ int start_frame; /* (modify) start frame (INT/ISO) */ int number_of_packets; /* (in) number of ISO packets */ - int interval; /* (in) polling interval (INT only) */ + int interval; /* (in) transfer interval (INT/ISO) */ int error_count; /* (return) number of ISO errors */ int timeout; /* (in) timeout, in jiffies */ void *context; /* (in) context for completion */ diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 542e3ececef4..80966ed8e288 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h @@ -37,8 +37,6 @@ struct video_device * video_generic_ioctl() does the userspace copying of the * ioctl arguments */ struct file_operations *fops; - int (*kernel_ioctl)(struct inode *inode, struct file *file, - unsigned int cmd, void *arg); void *priv; /* Used to be 'private' but that upsets C++ */ /* for videodev.c intenal usage -- don't touch */ @@ -60,8 +58,10 @@ extern struct video_device* video_devdata(struct file*); extern int video_exclusive_open(struct inode *inode, struct file *file); extern int video_exclusive_release(struct inode *inode, struct file *file); -extern int video_generic_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg); +extern int video_usercopy(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg, + int (*func)(struct inode *inode, struct file *file, + unsigned int cmd, void *arg)); #endif /* __KERNEL__ */ #define VID_TYPE_CAPTURE 1 /* Can capture */ diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 2c37a36e4aa2..407268c78def 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h @@ -42,11 +42,7 @@ extern struct neigh_table nd_tbl; struct nd_msg { struct icmp6hdr icmph; struct in6_addr target; - struct { - __u8 opt_type; - __u8 opt_len; - __u8 link_addr[MAX_ADDR_LEN]; - } opt; + __u8 opt[0]; }; struct ra_msg { diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 58aa70d2cf84..84c94256dc65 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -358,8 +358,8 @@ extern int psched_tod_diff(int delta_sec, int bound); #define PSCHED_TDIFF(tv1, tv2) (long)((tv1) - (tv2)) #define PSCHED_TDIFF_SAFE(tv1, tv2, bound, guard) \ ({ \ - long __delta = (tv1) - (tv2); \ - if ( __delta > (bound)) { __delta = (bound); guard; } \ + long long __delta = (tv1) - (tv2); \ + if ( __delta > (long long)(bound)) { __delta = (bound); guard; } \ __delta; \ }) diff --git a/include/net/sock.h b/include/net/sock.h index d50815f55ff3..57159c6ce0bd 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -80,7 +80,7 @@ typedef struct { do { spin_lock_init(&((__sk)->lock.slock)); \ (__sk)->lock.users = 0; \ init_waitqueue_head(&((__sk)->lock.wq)); \ -} while(0); +} while(0) struct sock { /* Begin of struct sock/struct tcp_tw_bucket shared layout */ diff --git a/include/net/tcp.h b/include/net/tcp.h index c45fc3e12845..1e7cf2cdce47 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -78,7 +78,7 @@ struct tcp_ehash_bucket { */ struct tcp_bind_bucket { unsigned short port; - unsigned short fastreuse; + signed short fastreuse; struct tcp_bind_bucket *next; struct sock *owners; struct tcp_bind_bucket **pprev; @@ -469,6 +469,7 @@ extern int sysctl_tcp_wmem[3]; extern int sysctl_tcp_rmem[3]; extern int sysctl_tcp_app_win; extern int sysctl_tcp_adv_win_scale; +extern int sysctl_tcp_tw_reuse; extern atomic_t tcp_memory_allocated; extern atomic_t tcp_sockets_allocated; @@ -507,7 +508,7 @@ struct open_request { __u16 rmt_port; __u16 mss; __u8 retrans; - __u8 index; + __u8 __pad; __u16 snd_wscale : 4, rcv_wscale : 4, tstamp_ok : 1, @@ -577,9 +578,7 @@ struct tcp_func { struct sk_buff *skb, struct open_request *req, struct dst_entry *dst); - - int (*hash_connecting) (struct sock *sk); - + int (*remember_stamp) (struct sock *sk); __u16 net_header_len; @@ -781,8 +780,7 @@ extern int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); -extern int tcp_connect(struct sock *sk, - struct sk_buff *skb); +extern int tcp_connect(struct sock *sk); extern struct sk_buff * tcp_make_synack(struct sock *sk, struct dst_entry *dst, @@ -1834,6 +1832,6 @@ static inline int tcp_paws_check(struct tcp_opt *tp, int rst) return 1; } -#define TCP_CHECK_TIMER(sk) do { } while (0); +#define TCP_CHECK_TIMER(sk) do { } while (0) #endif /* _TCP_H */ |
