diff options
Diffstat (limited to 'include')
51 files changed, 847 insertions, 449 deletions
diff --git a/include/asm-alpha/namei.h b/include/asm-alpha/namei.h deleted file mode 100644 index 5cc9bb39499d..000000000000 --- a/include/asm-alpha/namei.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* $Id: namei.h,v 1.1 1996/12/13 14:48:21 jj Exp $ | ||
2 | * linux/include/asm-alpha/namei.h | ||
3 | * | ||
4 | * Included from linux/fs/namei.c | ||
5 | */ | ||
6 | |||
7 | #ifndef __ALPHA_NAMEI_H | ||
8 | #define __ALPHA_NAMEI_H | ||
9 | |||
10 | /* This dummy routine maybe changed to something useful | ||
11 | * for /usr/gnemul/ emulation stuff. | ||
12 | * Look at asm-sparc/namei.h for details. | ||
13 | */ | ||
14 | |||
15 | #define __emul_prefix() NULL | ||
16 | |||
17 | #endif /* __ALPHA_NAMEI_H */ | ||
diff --git a/include/asm-arm/namei.h b/include/asm-arm/namei.h deleted file mode 100644 index a402d3b9d0f7..000000000000 --- a/include/asm-arm/namei.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/namei.h | ||
3 | * | ||
4 | * Routines to handle famous /usr/gnemul | ||
5 | * Derived from the Sparc version of this file | ||
6 | * | ||
7 | * Included from linux/fs/namei.c | ||
8 | */ | ||
9 | |||
10 | #ifndef __ASMARM_NAMEI_H | ||
11 | #define __ASMARM_NAMEI_H | ||
12 | |||
13 | #define ARM_BSD_EMUL "usr/gnemul/bsd/" | ||
14 | |||
15 | static inline char *__emul_prefix(void) | ||
16 | { | ||
17 | switch (current->personality) { | ||
18 | case PER_BSD: | ||
19 | return ARM_BSD_EMUL; | ||
20 | default: | ||
21 | return NULL; | ||
22 | } | ||
23 | } | ||
24 | |||
25 | #endif /* __ASMARM_NAMEI_H */ | ||
diff --git a/include/asm-avr32/namei.h b/include/asm-avr32/namei.h deleted file mode 100644 index f0a26de06cab..000000000000 --- a/include/asm-avr32/namei.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef __ASM_AVR32_NAMEI_H | ||
2 | #define __ASM_AVR32_NAMEI_H | ||
3 | |||
4 | /* This dummy routine may be changed to something useful */ | ||
5 | #define __emul_prefix() NULL | ||
6 | |||
7 | #endif /* __ASM_AVR32_NAMEI_H */ | ||
diff --git a/include/asm-blackfin/namei.h b/include/asm-blackfin/namei.h deleted file mode 100644 index 8b89a2d65cb4..000000000000 --- a/include/asm-blackfin/namei.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm/namei.h | ||
3 | * | ||
4 | * Included from linux/fs/namei.c | ||
5 | * | ||
6 | * Changes made by Lineo Inc. May 2001 | ||
7 | */ | ||
8 | |||
9 | #ifndef __BFIN_NAMEI_H | ||
10 | #define __BFIN_NAMEI_H | ||
11 | |||
12 | /* This dummy routine maybe changed to something useful | ||
13 | * for /usr/gnemul/ emulation stuff. | ||
14 | * Look at asm-sparc/namei.h for details. | ||
15 | */ | ||
16 | |||
17 | #define __emul_prefix() NULL | ||
18 | |||
19 | #endif | ||
diff --git a/include/asm-cris/namei.h b/include/asm-cris/namei.h deleted file mode 100644 index 8a3be7a6d9f6..000000000000 --- a/include/asm-cris/namei.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* $Id: namei.h,v 1.1 2000/07/10 16:32:31 bjornw Exp $ | ||
2 | * linux/include/asm-cris/namei.h | ||
3 | * | ||
4 | * Included from linux/fs/namei.c | ||
5 | */ | ||
6 | |||
7 | #ifndef __CRIS_NAMEI_H | ||
8 | #define __CRIS_NAMEI_H | ||
9 | |||
10 | /* used to find file-system prefixes for doing emulations | ||
11 | * see for example asm-sparc/namei.h | ||
12 | * we don't use it... | ||
13 | */ | ||
14 | |||
15 | #define __emul_prefix() NULL | ||
16 | |||
17 | #endif /* __CRIS_NAMEI_H */ | ||
diff --git a/include/asm-frv/namei.h b/include/asm-frv/namei.h deleted file mode 100644 index 4ea57171d951..000000000000 --- a/include/asm-frv/namei.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-frv/namei.h | ||
3 | * | ||
4 | * Included from linux/fs/namei.c | ||
5 | */ | ||
6 | |||
7 | #ifndef __ASM_NAMEI_H | ||
8 | #define __ASM_NAMEI_H | ||
9 | |||
10 | /* This dummy routine maybe changed to something useful | ||
11 | * for /usr/gnemul/ emulation stuff. | ||
12 | * Look at asm-sparc/namei.h for details. | ||
13 | */ | ||
14 | |||
15 | #define __emul_prefix() NULL | ||
16 | |||
17 | #endif | ||
18 | |||
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index a3034d20ebd5..c764a8fcb058 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
@@ -13,7 +13,7 @@ | |||
13 | * | 13 | * |
14 | * While the GPIO programming interface defines valid GPIO numbers | 14 | * While the GPIO programming interface defines valid GPIO numbers |
15 | * to be in the range 0..MAX_INT, this library restricts them to the | 15 | * to be in the range 0..MAX_INT, this library restricts them to the |
16 | * smaller range 0..ARCH_NR_GPIOS. | 16 | * smaller range 0..ARCH_NR_GPIOS-1. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #ifndef ARCH_NR_GPIOS | 19 | #ifndef ARCH_NR_GPIOS |
diff --git a/include/asm-h8300/namei.h b/include/asm-h8300/namei.h deleted file mode 100644 index ab6f196db6e0..000000000000 --- a/include/asm-h8300/namei.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-h8300/namei.h | ||
3 | * | ||
4 | * Included from linux/fs/namei.c | ||
5 | */ | ||
6 | |||
7 | #ifndef __H8300_NAMEI_H | ||
8 | #define __H8300_NAMEI_H | ||
9 | |||
10 | /* This dummy routine maybe changed to something useful | ||
11 | * for /usr/gnemul/ emulation stuff. | ||
12 | * Look at asm-sparc/namei.h for details. | ||
13 | */ | ||
14 | |||
15 | #define __emul_prefix() NULL | ||
16 | |||
17 | #endif | ||
diff --git a/include/asm-ia64/namei.h b/include/asm-ia64/namei.h deleted file mode 100644 index 78e768079083..000000000000 --- a/include/asm-ia64/namei.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _ASM_IA64_NAMEI_H | ||
2 | #define _ASM_IA64_NAMEI_H | ||
3 | |||
4 | /* | ||
5 | * Modified 1998, 1999, 2001 | ||
6 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | ||
7 | */ | ||
8 | |||
9 | #include <asm/ptrace.h> | ||
10 | #include <asm/system.h> | ||
11 | |||
12 | #define EMUL_PREFIX_LINUX_IA32 "/emul/ia32-linux/" | ||
13 | |||
14 | static inline char * | ||
15 | __emul_prefix (void) | ||
16 | { | ||
17 | switch (current->personality) { | ||
18 | case PER_LINUX32: | ||
19 | return EMUL_PREFIX_LINUX_IA32; | ||
20 | default: | ||
21 | return NULL; | ||
22 | } | ||
23 | } | ||
24 | |||
25 | #endif /* _ASM_IA64_NAMEI_H */ | ||
diff --git a/include/asm-m32r/namei.h b/include/asm-m32r/namei.h deleted file mode 100644 index 210f8056b805..000000000000 --- a/include/asm-m32r/namei.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_NAMEI_H | ||
2 | #define _ASM_M32R_NAMEI_H | ||
3 | |||
4 | /* | ||
5 | * linux/include/asm-m32r/namei.h | ||
6 | * | ||
7 | * Included from linux/fs/namei.c | ||
8 | */ | ||
9 | |||
10 | /* This dummy routine maybe changed to something useful | ||
11 | * for /usr/gnemul/ emulation stuff. | ||
12 | * Look at asm-sparc/namei.h for details. | ||
13 | */ | ||
14 | |||
15 | #define __emul_prefix() NULL | ||
16 | |||
17 | #endif /* _ASM_M32R_NAMEI_H */ | ||
diff --git a/include/asm-m68k/namei.h b/include/asm-m68k/namei.h deleted file mode 100644 index f33f243b644a..000000000000 --- a/include/asm-m68k/namei.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-m68k/namei.h | ||
3 | * | ||
4 | * Included from linux/fs/namei.c | ||
5 | */ | ||
6 | |||
7 | #ifndef __M68K_NAMEI_H | ||
8 | #define __M68K_NAMEI_H | ||
9 | |||
10 | /* This dummy routine maybe changed to something useful | ||
11 | * for /usr/gnemul/ emulation stuff. | ||
12 | * Look at asm-sparc/namei.h for details. | ||
13 | */ | ||
14 | |||
15 | #define __emul_prefix() NULL | ||
16 | |||
17 | #endif | ||
diff --git a/include/asm-m68knommu/namei.h b/include/asm-m68knommu/namei.h deleted file mode 100644 index 31a85d27b931..000000000000 --- a/include/asm-m68knommu/namei.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-m68k/namei.h> | ||
diff --git a/include/asm-mips/namei.h b/include/asm-mips/namei.h deleted file mode 100644 index a6605a752469..000000000000 --- a/include/asm-mips/namei.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef _ASM_NAMEI_H | ||
2 | #define _ASM_NAMEI_H | ||
3 | |||
4 | /* | ||
5 | * This dummy routine maybe changed to something useful | ||
6 | * for /usr/gnemul/ emulation stuff. | ||
7 | */ | ||
8 | |||
9 | #define __emul_prefix() NULL | ||
10 | |||
11 | #endif /* _ASM_NAMEI_H */ | ||
diff --git a/include/asm-mn10300/namei.h b/include/asm-mn10300/namei.h deleted file mode 100644 index bd9ce94aeb65..000000000000 --- a/include/asm-mn10300/namei.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* Emulation stuff | ||
2 | * | ||
3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ASM_NAMEI_H | ||
13 | #define _ASM_NAMEI_H | ||
14 | |||
15 | /* This dummy routine maybe changed to something useful | ||
16 | * for /usr/gnemul/ emulation stuff. | ||
17 | * Look at asm-sparc/namei.h for details. | ||
18 | */ | ||
19 | |||
20 | #define __emul_prefix() NULL | ||
21 | |||
22 | #endif /* _ASM_NAMEI_H */ | ||
diff --git a/include/asm-parisc/namei.h b/include/asm-parisc/namei.h deleted file mode 100644 index 8d29b3d9fb33..000000000000 --- a/include/asm-parisc/namei.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* $Id: namei.h,v 1.1 1996/12/13 14:48:21 jj Exp $ | ||
2 | * linux/include/asm-parisc/namei.h | ||
3 | * | ||
4 | * Included from linux/fs/namei.c | ||
5 | */ | ||
6 | |||
7 | #ifndef __PARISC_NAMEI_H | ||
8 | #define __PARISC_NAMEI_H | ||
9 | |||
10 | /* This dummy routine maybe changed to something useful | ||
11 | * for /usr/gnemul/ emulation stuff. | ||
12 | * Look at asm-sparc/namei.h for details. | ||
13 | */ | ||
14 | |||
15 | #define __emul_prefix() NULL | ||
16 | |||
17 | #endif /* __PARISC_NAMEI_H */ | ||
diff --git a/include/asm-powerpc/namei.h b/include/asm-powerpc/namei.h deleted file mode 100644 index 657443474a6a..000000000000 --- a/include/asm-powerpc/namei.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef _ASM_POWERPC_NAMEI_H | ||
2 | #define _ASM_POWERPC_NAMEI_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | /* | ||
7 | * Adapted from include/asm-alpha/namei.h | ||
8 | * | ||
9 | * Included from fs/namei.c | ||
10 | */ | ||
11 | |||
12 | /* This dummy routine maybe changed to something useful | ||
13 | * for /usr/gnemul/ emulation stuff. | ||
14 | * Look at asm-sparc/namei.h for details. | ||
15 | */ | ||
16 | |||
17 | #define __emul_prefix() NULL | ||
18 | |||
19 | #endif /* __KERNEL__ */ | ||
20 | #endif /* _ASM_POWERPC_NAMEI_H */ | ||
diff --git a/include/asm-s390/namei.h b/include/asm-s390/namei.h deleted file mode 100644 index 3e286bdde4b0..000000000000 --- a/include/asm-s390/namei.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-s390/namei.h | ||
3 | * | ||
4 | * S390 version | ||
5 | * | ||
6 | * Derived from "include/asm-i386/namei.h" | ||
7 | * | ||
8 | * Included from linux/fs/namei.c | ||
9 | */ | ||
10 | |||
11 | #ifndef __S390_NAMEI_H | ||
12 | #define __S390_NAMEI_H | ||
13 | |||
14 | /* This dummy routine maybe changed to something useful | ||
15 | * for /usr/gnemul/ emulation stuff. | ||
16 | * Look at asm-sparc/namei.h for details. | ||
17 | */ | ||
18 | |||
19 | #define __emul_prefix() NULL | ||
20 | |||
21 | #endif /* __S390_NAMEI_H */ | ||
diff --git a/include/asm-sh/namei.h b/include/asm-sh/namei.h deleted file mode 100644 index 338a5d947143..000000000000 --- a/include/asm-sh/namei.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* $Id: namei.h,v 1.3 2000/07/04 06:24:49 gniibe Exp $ | ||
2 | * linux/include/asm-sh/namei.h | ||
3 | * | ||
4 | * Included from linux/fs/namei.c | ||
5 | */ | ||
6 | |||
7 | #ifndef __ASM_SH_NAMEI_H | ||
8 | #define __ASM_SH_NAMEI_H | ||
9 | |||
10 | /* This dummy routine maybe changed to something useful | ||
11 | * for /usr/gnemul/ emulation stuff. | ||
12 | * Look at asm-sparc/namei.h for details. | ||
13 | */ | ||
14 | |||
15 | #define __emul_prefix() NULL | ||
16 | |||
17 | #endif /* __ASM_SH_NAMEI_H */ | ||
diff --git a/include/asm-sparc/namei.h b/include/asm-sparc/namei.h deleted file mode 100644 index eff944b8e321..000000000000 --- a/include/asm-sparc/namei.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef ___ASM_SPARC_NAMEI_H | ||
2 | #define ___ASM_SPARC_NAMEI_H | ||
3 | #if defined(__sparc__) && defined(__arch64__) | ||
4 | #include <asm-sparc/namei_64.h> | ||
5 | #else | ||
6 | #include <asm-sparc/namei_32.h> | ||
7 | #endif | ||
8 | #endif | ||
diff --git a/include/asm-sparc/namei_32.h b/include/asm-sparc/namei_32.h deleted file mode 100644 index 0646102fb020..000000000000 --- a/include/asm-sparc/namei_32.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-sparc/namei.h | ||
3 | * | ||
4 | * Routines to handle famous /usr/gnemul/s*. | ||
5 | * Included from linux/fs/namei.c | ||
6 | */ | ||
7 | |||
8 | #ifndef __SPARC_NAMEI_H | ||
9 | #define __SPARC_NAMEI_H | ||
10 | |||
11 | #define __emul_prefix() NULL | ||
12 | |||
13 | #endif /* __SPARC_NAMEI_H */ | ||
diff --git a/include/asm-sparc/namei_64.h b/include/asm-sparc/namei_64.h deleted file mode 100644 index cbc1b4c06891..000000000000 --- a/include/asm-sparc/namei_64.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-sparc64/namei.h | ||
3 | * | ||
4 | * Routines to handle famous /usr/gnemul/s*. | ||
5 | * Included from linux/fs/namei.c | ||
6 | */ | ||
7 | |||
8 | #ifndef __SPARC64_NAMEI_H | ||
9 | #define __SPARC64_NAMEI_H | ||
10 | |||
11 | #define __emul_prefix() NULL | ||
12 | |||
13 | #endif /* __SPARC64_NAMEI_H */ | ||
diff --git a/include/asm-sparc64/namei.h b/include/asm-sparc64/namei.h deleted file mode 100644 index 1344a910ba2f..000000000000 --- a/include/asm-sparc64/namei.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-sparc/namei.h> | ||
diff --git a/include/asm-um/namei.h b/include/asm-um/namei.h deleted file mode 100644 index 002984d5bc85..000000000000 --- a/include/asm-um/namei.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __UM_NAMEI_H | ||
2 | #define __UM_NAMEI_H | ||
3 | |||
4 | #include "asm/arch/namei.h" | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-v850/namei.h b/include/asm-v850/namei.h deleted file mode 100644 index ee8339b23843..000000000000 --- a/include/asm-v850/namei.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-v850/namei.h | ||
3 | * | ||
4 | * Included from linux/fs/namei.c | ||
5 | */ | ||
6 | |||
7 | #ifndef __V850_NAMEI_H__ | ||
8 | #define __V850_NAMEI_H__ | ||
9 | |||
10 | /* This dummy routine maybe changed to something useful | ||
11 | * for /usr/gnemul/ emulation stuff. | ||
12 | * Look at asm-sparc/namei.h for details. | ||
13 | */ | ||
14 | |||
15 | #define __emul_prefix() NULL | ||
16 | |||
17 | #endif /* __V850_NAMEI_H__ */ | ||
diff --git a/include/asm-x86/namei.h b/include/asm-x86/namei.h deleted file mode 100644 index 415ef5d9550e..000000000000 --- a/include/asm-x86/namei.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef _ASM_X86_NAMEI_H | ||
2 | #define _ASM_X86_NAMEI_H | ||
3 | |||
4 | /* This dummy routine maybe changed to something useful | ||
5 | * for /usr/gnemul/ emulation stuff. | ||
6 | * Look at asm-sparc/namei.h for details. | ||
7 | */ | ||
8 | |||
9 | #define __emul_prefix() NULL | ||
10 | |||
11 | #endif /* _ASM_X86_NAMEI_H */ | ||
diff --git a/include/asm-xtensa/namei.h b/include/asm-xtensa/namei.h deleted file mode 100644 index 3fdff039d27d..000000000000 --- a/include/asm-xtensa/namei.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/namei.h | ||
3 | * | ||
4 | * Included from linux/fs/namei.c | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | * | ||
10 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
11 | */ | ||
12 | |||
13 | #ifndef _XTENSA_NAMEI_H | ||
14 | #define _XTENSA_NAMEI_H | ||
15 | |||
16 | #ifdef __KERNEL__ | ||
17 | |||
18 | /* This dummy routine maybe changed to something useful | ||
19 | * for /usr/gnemul/ emulation stuff. | ||
20 | * Look at asm-sparc/namei.h for details. | ||
21 | */ | ||
22 | |||
23 | #define __emul_prefix() NULL | ||
24 | |||
25 | #endif /* __KERNEL__ */ | ||
26 | #endif /* _XTENSA_NAMEI_H */ | ||
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h index 31b75311e2ca..dcc228aa335a 100644 --- a/include/linux/coda_linux.h +++ b/include/linux/coda_linux.h | |||
@@ -37,7 +37,7 @@ extern const struct file_operations coda_ioctl_operations; | |||
37 | /* operations shared over more than one file */ | 37 | /* operations shared over more than one file */ |
38 | int coda_open(struct inode *i, struct file *f); | 38 | int coda_open(struct inode *i, struct file *f); |
39 | int coda_release(struct inode *i, struct file *f); | 39 | int coda_release(struct inode *i, struct file *f); |
40 | int coda_permission(struct inode *inode, int mask, struct nameidata *nd); | 40 | int coda_permission(struct inode *inode, int mask); |
41 | int coda_revalidate_inode(struct dentry *); | 41 | int coda_revalidate_inode(struct dentry *); |
42 | int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 42 | int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
43 | int coda_setattr(struct dentry *, struct iattr *); | 43 | int coda_setattr(struct dentry *, struct iattr *); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 53d2edb709b3..8252b045e624 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -60,6 +60,8 @@ extern int dir_notify_enable; | |||
60 | #define MAY_WRITE 2 | 60 | #define MAY_WRITE 2 |
61 | #define MAY_READ 4 | 61 | #define MAY_READ 4 |
62 | #define MAY_APPEND 8 | 62 | #define MAY_APPEND 8 |
63 | #define MAY_ACCESS 16 | ||
64 | #define MAY_OPEN 32 | ||
63 | 65 | ||
64 | #define FMODE_READ 1 | 66 | #define FMODE_READ 1 |
65 | #define FMODE_WRITE 2 | 67 | #define FMODE_WRITE 2 |
@@ -277,7 +279,7 @@ extern int dir_notify_enable; | |||
277 | #include <linux/types.h> | 279 | #include <linux/types.h> |
278 | #include <linux/kdev_t.h> | 280 | #include <linux/kdev_t.h> |
279 | #include <linux/dcache.h> | 281 | #include <linux/dcache.h> |
280 | #include <linux/namei.h> | 282 | #include <linux/path.h> |
281 | #include <linux/stat.h> | 283 | #include <linux/stat.h> |
282 | #include <linux/cache.h> | 284 | #include <linux/cache.h> |
283 | #include <linux/kobject.h> | 285 | #include <linux/kobject.h> |
@@ -318,22 +320,23 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, | |||
318 | * Attribute flags. These should be or-ed together to figure out what | 320 | * Attribute flags. These should be or-ed together to figure out what |
319 | * has been changed! | 321 | * has been changed! |
320 | */ | 322 | */ |
321 | #define ATTR_MODE 1 | 323 | #define ATTR_MODE (1 << 0) |
322 | #define ATTR_UID 2 | 324 | #define ATTR_UID (1 << 1) |
323 | #define ATTR_GID 4 | 325 | #define ATTR_GID (1 << 2) |
324 | #define ATTR_SIZE 8 | 326 | #define ATTR_SIZE (1 << 3) |
325 | #define ATTR_ATIME 16 | 327 | #define ATTR_ATIME (1 << 4) |
326 | #define ATTR_MTIME 32 | 328 | #define ATTR_MTIME (1 << 5) |
327 | #define ATTR_CTIME 64 | 329 | #define ATTR_CTIME (1 << 6) |
328 | #define ATTR_ATIME_SET 128 | 330 | #define ATTR_ATIME_SET (1 << 7) |
329 | #define ATTR_MTIME_SET 256 | 331 | #define ATTR_MTIME_SET (1 << 8) |
330 | #define ATTR_FORCE 512 /* Not a change, but a change it */ | 332 | #define ATTR_FORCE (1 << 9) /* Not a change, but a change it */ |
331 | #define ATTR_ATTR_FLAG 1024 | 333 | #define ATTR_ATTR_FLAG (1 << 10) |
332 | #define ATTR_KILL_SUID 2048 | 334 | #define ATTR_KILL_SUID (1 << 11) |
333 | #define ATTR_KILL_SGID 4096 | 335 | #define ATTR_KILL_SGID (1 << 12) |
334 | #define ATTR_FILE 8192 | 336 | #define ATTR_FILE (1 << 13) |
335 | #define ATTR_KILL_PRIV 16384 | 337 | #define ATTR_KILL_PRIV (1 << 14) |
336 | #define ATTR_OPEN 32768 /* Truncating from open(O_TRUNC) */ | 338 | #define ATTR_OPEN (1 << 15) /* Truncating from open(O_TRUNC) */ |
339 | #define ATTR_TIMES_SET (1 << 16) | ||
337 | 340 | ||
338 | /* | 341 | /* |
339 | * This is the Inode Attributes structure, used for notify_change(). It | 342 | * This is the Inode Attributes structure, used for notify_change(). It |
@@ -792,7 +795,7 @@ struct file { | |||
792 | #define f_dentry f_path.dentry | 795 | #define f_dentry f_path.dentry |
793 | #define f_vfsmnt f_path.mnt | 796 | #define f_vfsmnt f_path.mnt |
794 | const struct file_operations *f_op; | 797 | const struct file_operations *f_op; |
795 | atomic_t f_count; | 798 | atomic_long_t f_count; |
796 | unsigned int f_flags; | 799 | unsigned int f_flags; |
797 | mode_t f_mode; | 800 | mode_t f_mode; |
798 | loff_t f_pos; | 801 | loff_t f_pos; |
@@ -821,8 +824,8 @@ extern spinlock_t files_lock; | |||
821 | #define file_list_lock() spin_lock(&files_lock); | 824 | #define file_list_lock() spin_lock(&files_lock); |
822 | #define file_list_unlock() spin_unlock(&files_lock); | 825 | #define file_list_unlock() spin_unlock(&files_lock); |
823 | 826 | ||
824 | #define get_file(x) atomic_inc(&(x)->f_count) | 827 | #define get_file(x) atomic_long_inc(&(x)->f_count) |
825 | #define file_count(x) atomic_read(&(x)->f_count) | 828 | #define file_count(x) atomic_long_read(&(x)->f_count) |
826 | 829 | ||
827 | #ifdef CONFIG_DEBUG_WRITECOUNT | 830 | #ifdef CONFIG_DEBUG_WRITECOUNT |
828 | static inline void file_take_write(struct file *f) | 831 | static inline void file_take_write(struct file *f) |
@@ -1136,7 +1139,7 @@ extern int vfs_permission(struct nameidata *, int); | |||
1136 | extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); | 1139 | extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); |
1137 | extern int vfs_mkdir(struct inode *, struct dentry *, int); | 1140 | extern int vfs_mkdir(struct inode *, struct dentry *, int); |
1138 | extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); | 1141 | extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); |
1139 | extern int vfs_symlink(struct inode *, struct dentry *, const char *, int); | 1142 | extern int vfs_symlink(struct inode *, struct dentry *, const char *); |
1140 | extern int vfs_link(struct dentry *, struct inode *, struct dentry *); | 1143 | extern int vfs_link(struct dentry *, struct inode *, struct dentry *); |
1141 | extern int vfs_rmdir(struct inode *, struct dentry *); | 1144 | extern int vfs_rmdir(struct inode *, struct dentry *); |
1142 | extern int vfs_unlink(struct inode *, struct dentry *); | 1145 | extern int vfs_unlink(struct inode *, struct dentry *); |
@@ -1272,7 +1275,7 @@ struct inode_operations { | |||
1272 | void * (*follow_link) (struct dentry *, struct nameidata *); | 1275 | void * (*follow_link) (struct dentry *, struct nameidata *); |
1273 | void (*put_link) (struct dentry *, struct nameidata *, void *); | 1276 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
1274 | void (*truncate) (struct inode *); | 1277 | void (*truncate) (struct inode *); |
1275 | int (*permission) (struct inode *, int, struct nameidata *); | 1278 | int (*permission) (struct inode *, int); |
1276 | int (*setattr) (struct dentry *, struct iattr *); | 1279 | int (*setattr) (struct dentry *, struct iattr *); |
1277 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); | 1280 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); |
1278 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); | 1281 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); |
@@ -1696,9 +1699,9 @@ extern void init_special_inode(struct inode *, umode_t, dev_t); | |||
1696 | extern void make_bad_inode(struct inode *); | 1699 | extern void make_bad_inode(struct inode *); |
1697 | extern int is_bad_inode(struct inode *); | 1700 | extern int is_bad_inode(struct inode *); |
1698 | 1701 | ||
1699 | extern const struct file_operations read_fifo_fops; | 1702 | extern const struct file_operations read_pipefifo_fops; |
1700 | extern const struct file_operations write_fifo_fops; | 1703 | extern const struct file_operations write_pipefifo_fops; |
1701 | extern const struct file_operations rdwr_fifo_fops; | 1704 | extern const struct file_operations rdwr_pipefifo_fops; |
1702 | 1705 | ||
1703 | extern int fs_may_remount_ro(struct super_block *); | 1706 | extern int fs_may_remount_ro(struct super_block *); |
1704 | 1707 | ||
@@ -1767,7 +1770,7 @@ extern int do_remount_sb(struct super_block *sb, int flags, | |||
1767 | extern sector_t bmap(struct inode *, sector_t); | 1770 | extern sector_t bmap(struct inode *, sector_t); |
1768 | #endif | 1771 | #endif |
1769 | extern int notify_change(struct dentry *, struct iattr *); | 1772 | extern int notify_change(struct dentry *, struct iattr *); |
1770 | extern int permission(struct inode *, int, struct nameidata *); | 1773 | extern int inode_permission(struct inode *, int); |
1771 | extern int generic_permission(struct inode *, int, | 1774 | extern int generic_permission(struct inode *, int, |
1772 | int (*check_acl)(struct inode *, int)); | 1775 | int (*check_acl)(struct inode *, int)); |
1773 | 1776 | ||
@@ -1831,7 +1834,7 @@ extern void clear_inode(struct inode *); | |||
1831 | extern void destroy_inode(struct inode *); | 1834 | extern void destroy_inode(struct inode *); |
1832 | extern struct inode *new_inode(struct super_block *); | 1835 | extern struct inode *new_inode(struct super_block *); |
1833 | extern int should_remove_suid(struct dentry *); | 1836 | extern int should_remove_suid(struct dentry *); |
1834 | extern int remove_suid(struct dentry *); | 1837 | extern int file_remove_suid(struct file *); |
1835 | 1838 | ||
1836 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); | 1839 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); |
1837 | extern void remove_inode_hash(struct inode *); | 1840 | extern void remove_inode_hash(struct inode *); |
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index 282f54219129..9e5a06e78d02 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h | |||
@@ -7,7 +7,7 @@ struct fs_struct { | |||
7 | atomic_t count; | 7 | atomic_t count; |
8 | rwlock_t lock; | 8 | rwlock_t lock; |
9 | int umask; | 9 | int umask; |
10 | struct path root, pwd, altroot; | 10 | struct path root, pwd; |
11 | }; | 11 | }; |
12 | 12 | ||
13 | #define INIT_FS { \ | 13 | #define INIT_FS { \ |
@@ -19,7 +19,6 @@ struct fs_struct { | |||
19 | extern struct kmem_cache *fs_cachep; | 19 | extern struct kmem_cache *fs_cachep; |
20 | 20 | ||
21 | extern void exit_fs(struct task_struct *); | 21 | extern void exit_fs(struct task_struct *); |
22 | extern void set_fs_altroot(void); | ||
23 | extern void set_fs_root(struct fs_struct *, struct path *); | 22 | extern void set_fs_root(struct fs_struct *, struct path *); |
24 | extern void set_fs_pwd(struct fs_struct *, struct path *); | 23 | extern void set_fs_pwd(struct fs_struct *, struct path *); |
25 | extern struct fs_struct *copy_fs_struct(struct fs_struct *); | 24 | extern struct fs_struct *copy_fs_struct(struct fs_struct *); |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 9a71d4cc88c8..32e0ef0f6e1f 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -273,7 +273,10 @@ struct hstate {}; | |||
273 | #define huge_page_mask(h) PAGE_MASK | 273 | #define huge_page_mask(h) PAGE_MASK |
274 | #define huge_page_order(h) 0 | 274 | #define huge_page_order(h) 0 |
275 | #define huge_page_shift(h) PAGE_SHIFT | 275 | #define huge_page_shift(h) PAGE_SHIFT |
276 | #define pages_per_huge_page(h) 1 | 276 | static inline unsigned int pages_per_huge_page(struct hstate *h) |
277 | { | ||
278 | return 1; | ||
279 | } | ||
277 | #endif | 280 | #endif |
278 | 281 | ||
279 | #endif /* _LINUX_HUGETLB_H */ | 282 | #endif /* _LINUX_HUGETLB_H */ |
diff --git a/include/linux/mISDNdsp.h b/include/linux/mISDNdsp.h new file mode 100644 index 000000000000..6b71d2dce508 --- /dev/null +++ b/include/linux/mISDNdsp.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef __mISDNdsp_H__ | ||
2 | #define __mISDNdsp_H__ | ||
3 | |||
4 | struct mISDN_dsp_element_arg { | ||
5 | char *name; | ||
6 | char *def; | ||
7 | char *desc; | ||
8 | }; | ||
9 | |||
10 | struct mISDN_dsp_element { | ||
11 | char *name; | ||
12 | void *(*new)(const char *arg); | ||
13 | void (*free)(void *p); | ||
14 | void (*process_tx)(void *p, unsigned char *data, int len); | ||
15 | void (*process_rx)(void *p, unsigned char *data, int len); | ||
16 | int num_args; | ||
17 | struct mISDN_dsp_element_arg | ||
18 | *args; | ||
19 | }; | ||
20 | |||
21 | extern int mISDN_dsp_element_register(struct mISDN_dsp_element *elem); | ||
22 | extern void mISDN_dsp_element_unregister(struct mISDN_dsp_element *elem); | ||
23 | |||
24 | struct dsp_features { | ||
25 | int hfc_id; /* unique id to identify the chip (or -1) */ | ||
26 | int hfc_dtmf; /* set if HFCmulti card supports dtmf */ | ||
27 | int hfc_loops; /* set if card supports tone loops */ | ||
28 | int hfc_echocanhw; /* set if card supports echocancelation*/ | ||
29 | int pcm_id; /* unique id to identify the pcm bus (or -1) */ | ||
30 | int pcm_slots; /* number of slots on the pcm bus */ | ||
31 | int pcm_banks; /* number of IO banks of pcm bus */ | ||
32 | int unclocked; /* data is not clocked (has jitter/loss) */ | ||
33 | int unordered; /* data is unordered (packets have index) */ | ||
34 | }; | ||
35 | |||
36 | #endif | ||
37 | |||
diff --git a/include/linux/mISDNhw.h b/include/linux/mISDNhw.h new file mode 100644 index 000000000000..e794dfb87504 --- /dev/null +++ b/include/linux/mISDNhw.h | |||
@@ -0,0 +1,193 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Author Karsten Keil <kkeil@novell.com> | ||
4 | * | ||
5 | * Basic declarations for the mISDN HW channels | ||
6 | * | ||
7 | * Copyright 2008 by Karsten Keil <kkeil@novell.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #ifndef MISDNHW_H | ||
21 | #define MISDNHW_H | ||
22 | #include <linux/mISDNif.h> | ||
23 | #include <linux/timer.h> | ||
24 | |||
25 | /* | ||
26 | * HW DEBUG 0xHHHHGGGG | ||
27 | * H - hardware driver specific bits | ||
28 | * G - for all drivers | ||
29 | */ | ||
30 | |||
31 | #define DEBUG_HW 0x00000001 | ||
32 | #define DEBUG_HW_OPEN 0x00000002 | ||
33 | #define DEBUG_HW_DCHANNEL 0x00000100 | ||
34 | #define DEBUG_HW_DFIFO 0x00000200 | ||
35 | #define DEBUG_HW_BCHANNEL 0x00001000 | ||
36 | #define DEBUG_HW_BFIFO 0x00002000 | ||
37 | |||
38 | #define MAX_DFRAME_LEN_L1 300 | ||
39 | #define MAX_MON_FRAME 32 | ||
40 | #define MAX_LOG_SPACE 2048 | ||
41 | #define MISDN_COPY_SIZE 32 | ||
42 | |||
43 | /* channel->Flags bit field */ | ||
44 | #define FLG_TX_BUSY 0 /* tx_buf in use */ | ||
45 | #define FLG_TX_NEXT 1 /* next_skb in use */ | ||
46 | #define FLG_L1_BUSY 2 /* L1 is permanent busy */ | ||
47 | #define FLG_L2_ACTIVATED 3 /* activated from L2 */ | ||
48 | #define FLG_OPEN 5 /* channel is in use */ | ||
49 | #define FLG_ACTIVE 6 /* channel is activated */ | ||
50 | #define FLG_BUSY_TIMER 7 | ||
51 | /* channel type */ | ||
52 | #define FLG_DCHANNEL 8 /* channel is D-channel */ | ||
53 | #define FLG_BCHANNEL 9 /* channel is B-channel */ | ||
54 | #define FLG_ECHANNEL 10 /* channel is E-channel */ | ||
55 | #define FLG_TRANSPARENT 12 /* channel use transparent data */ | ||
56 | #define FLG_HDLC 13 /* channel use hdlc data */ | ||
57 | #define FLG_L2DATA 14 /* channel use L2 DATA primitivs */ | ||
58 | #define FLG_ORIGIN 15 /* channel is on origin site */ | ||
59 | /* channel specific stuff */ | ||
60 | /* arcofi specific */ | ||
61 | #define FLG_ARCOFI_TIMER 16 | ||
62 | #define FLG_ARCOFI_ERROR 17 | ||
63 | /* isar specific */ | ||
64 | #define FLG_INITIALIZED 16 | ||
65 | #define FLG_DLEETX 17 | ||
66 | #define FLG_LASTDLE 18 | ||
67 | #define FLG_FIRST 19 | ||
68 | #define FLG_LASTDATA 20 | ||
69 | #define FLG_NMD_DATA 21 | ||
70 | #define FLG_FTI_RUN 22 | ||
71 | #define FLG_LL_OK 23 | ||
72 | #define FLG_LL_CONN 24 | ||
73 | #define FLG_DTMFSEND 25 | ||
74 | |||
75 | /* workq events */ | ||
76 | #define FLG_RECVQUEUE 30 | ||
77 | #define FLG_PHCHANGE 31 | ||
78 | |||
79 | #define schedule_event(s, ev) do { \ | ||
80 | test_and_set_bit(ev, &((s)->Flags)); \ | ||
81 | schedule_work(&((s)->workq)); \ | ||
82 | } while (0) | ||
83 | |||
84 | struct dchannel { | ||
85 | struct mISDNdevice dev; | ||
86 | u_long Flags; | ||
87 | struct work_struct workq; | ||
88 | void (*phfunc) (struct dchannel *); | ||
89 | u_int state; | ||
90 | void *l1; | ||
91 | /* HW access */ | ||
92 | u_char (*read_reg) (void *, u_char); | ||
93 | void (*write_reg) (void *, u_char, u_char); | ||
94 | void (*read_fifo) (void *, u_char *, int); | ||
95 | void (*write_fifo) (void *, u_char *, int); | ||
96 | void *hw; | ||
97 | int slot; /* multiport card channel slot */ | ||
98 | struct timer_list timer; | ||
99 | /* receive data */ | ||
100 | struct sk_buff *rx_skb; | ||
101 | int maxlen; | ||
102 | /* send data */ | ||
103 | struct sk_buff_head squeue; | ||
104 | struct sk_buff_head rqueue; | ||
105 | struct sk_buff *tx_skb; | ||
106 | int tx_idx; | ||
107 | int debug; | ||
108 | /* statistics */ | ||
109 | int err_crc; | ||
110 | int err_tx; | ||
111 | int err_rx; | ||
112 | }; | ||
113 | |||
114 | typedef int (dchannel_l1callback)(struct dchannel *, u_int); | ||
115 | extern int create_l1(struct dchannel *, dchannel_l1callback *); | ||
116 | |||
117 | /* private L1 commands */ | ||
118 | #define INFO0 0x8002 | ||
119 | #define INFO1 0x8102 | ||
120 | #define INFO2 0x8202 | ||
121 | #define INFO3_P8 0x8302 | ||
122 | #define INFO3_P10 0x8402 | ||
123 | #define INFO4_P8 0x8502 | ||
124 | #define INFO4_P10 0x8602 | ||
125 | #define LOSTFRAMING 0x8702 | ||
126 | #define ANYSIGNAL 0x8802 | ||
127 | #define HW_POWERDOWN 0x8902 | ||
128 | #define HW_RESET_REQ 0x8a02 | ||
129 | #define HW_POWERUP_REQ 0x8b02 | ||
130 | #define HW_DEACT_REQ 0x8c02 | ||
131 | #define HW_ACTIVATE_REQ 0x8e02 | ||
132 | #define HW_D_NOBLOCKED 0x8f02 | ||
133 | #define HW_RESET_IND 0x9002 | ||
134 | #define HW_POWERUP_IND 0x9102 | ||
135 | #define HW_DEACT_IND 0x9202 | ||
136 | #define HW_ACTIVATE_IND 0x9302 | ||
137 | #define HW_DEACT_CNF 0x9402 | ||
138 | #define HW_TESTLOOP 0x9502 | ||
139 | #define HW_TESTRX_RAW 0x9602 | ||
140 | #define HW_TESTRX_HDLC 0x9702 | ||
141 | #define HW_TESTRX_OFF 0x9802 | ||
142 | |||
143 | struct layer1; | ||
144 | extern int l1_event(struct layer1 *, u_int); | ||
145 | |||
146 | |||
147 | struct bchannel { | ||
148 | struct mISDNchannel ch; | ||
149 | int nr; | ||
150 | u_long Flags; | ||
151 | struct work_struct workq; | ||
152 | u_int state; | ||
153 | /* HW access */ | ||
154 | u_char (*read_reg) (void *, u_char); | ||
155 | void (*write_reg) (void *, u_char, u_char); | ||
156 | void (*read_fifo) (void *, u_char *, int); | ||
157 | void (*write_fifo) (void *, u_char *, int); | ||
158 | void *hw; | ||
159 | int slot; /* multiport card channel slot */ | ||
160 | struct timer_list timer; | ||
161 | /* receive data */ | ||
162 | struct sk_buff *rx_skb; | ||
163 | int maxlen; | ||
164 | /* send data */ | ||
165 | struct sk_buff *next_skb; | ||
166 | struct sk_buff *tx_skb; | ||
167 | struct sk_buff_head rqueue; | ||
168 | int rcount; | ||
169 | int tx_idx; | ||
170 | int debug; | ||
171 | /* statistics */ | ||
172 | int err_crc; | ||
173 | int err_tx; | ||
174 | int err_rx; | ||
175 | }; | ||
176 | |||
177 | extern int mISDN_initdchannel(struct dchannel *, int, void *); | ||
178 | extern int mISDN_initbchannel(struct bchannel *, int); | ||
179 | extern int mISDN_freedchannel(struct dchannel *); | ||
180 | extern int mISDN_freebchannel(struct bchannel *); | ||
181 | extern void queue_ch_frame(struct mISDNchannel *, u_int, | ||
182 | int, struct sk_buff *); | ||
183 | extern int dchannel_senddata(struct dchannel *, struct sk_buff *); | ||
184 | extern int bchannel_senddata(struct bchannel *, struct sk_buff *); | ||
185 | extern void recv_Dchannel(struct dchannel *); | ||
186 | extern void recv_Bchannel(struct bchannel *); | ||
187 | extern void recv_Dchannel_skb(struct dchannel *, struct sk_buff *); | ||
188 | extern void recv_Bchannel_skb(struct bchannel *, struct sk_buff *); | ||
189 | extern void confirm_Bsend(struct bchannel *bch); | ||
190 | extern int get_next_bframe(struct bchannel *); | ||
191 | extern int get_next_dframe(struct dchannel *); | ||
192 | |||
193 | #endif | ||
diff --git a/include/linux/mISDNif.h b/include/linux/mISDNif.h new file mode 100644 index 000000000000..5c948f337817 --- /dev/null +++ b/include/linux/mISDNif.h | |||
@@ -0,0 +1,487 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Author Karsten Keil <kkeil@novell.com> | ||
4 | * | ||
5 | * Copyright 2008 by Karsten Keil <kkeil@novell.com> | ||
6 | * | ||
7 | * This code is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE | ||
9 | * version 2.1 as published by the Free Software Foundation. | ||
10 | * | ||
11 | * This code is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU LESSER GENERAL PUBLIC LICENSE for more details. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef mISDNIF_H | ||
19 | #define mISDNIF_H | ||
20 | |||
21 | #include <stdarg.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/errno.h> | ||
24 | #include <linux/socket.h> | ||
25 | |||
26 | /* | ||
27 | * ABI Version 32 bit | ||
28 | * | ||
29 | * <8 bit> Major version | ||
30 | * - changed if any interface become backwards incompatible | ||
31 | * | ||
32 | * <8 bit> Minor version | ||
33 | * - changed if any interface is extended but backwards compatible | ||
34 | * | ||
35 | * <16 bit> Release number | ||
36 | * - should be incremented on every checkin | ||
37 | */ | ||
38 | #define MISDN_MAJOR_VERSION 1 | ||
39 | #define MISDN_MINOR_VERSION 0 | ||
40 | #define MISDN_RELEASE 18 | ||
41 | |||
42 | /* primitives for information exchange | ||
43 | * generell format | ||
44 | * <16 bit 0 > | ||
45 | * <8 bit command> | ||
46 | * BIT 8 = 1 LAYER private | ||
47 | * BIT 7 = 1 answer | ||
48 | * BIT 6 = 1 DATA | ||
49 | * <8 bit target layer mask> | ||
50 | * | ||
51 | * Layer = 00 is reserved for general commands | ||
52 | Layer = 01 L2 -> HW | ||
53 | Layer = 02 HW -> L2 | ||
54 | Layer = 04 L3 -> L2 | ||
55 | Layer = 08 L2 -> L3 | ||
56 | * Layer = FF is reserved for broadcast commands | ||
57 | */ | ||
58 | |||
59 | #define MISDN_CMDMASK 0xff00 | ||
60 | #define MISDN_LAYERMASK 0x00ff | ||
61 | |||
62 | /* generell commands */ | ||
63 | #define OPEN_CHANNEL 0x0100 | ||
64 | #define CLOSE_CHANNEL 0x0200 | ||
65 | #define CONTROL_CHANNEL 0x0300 | ||
66 | #define CHECK_DATA 0x0400 | ||
67 | |||
68 | /* layer 2 -> layer 1 */ | ||
69 | #define PH_ACTIVATE_REQ 0x0101 | ||
70 | #define PH_DEACTIVATE_REQ 0x0201 | ||
71 | #define PH_DATA_REQ 0x2001 | ||
72 | #define MPH_ACTIVATE_REQ 0x0501 | ||
73 | #define MPH_DEACTIVATE_REQ 0x0601 | ||
74 | #define MPH_INFORMATION_REQ 0x0701 | ||
75 | #define PH_CONTROL_REQ 0x0801 | ||
76 | |||
77 | /* layer 1 -> layer 2 */ | ||
78 | #define PH_ACTIVATE_IND 0x0102 | ||
79 | #define PH_ACTIVATE_CNF 0x4102 | ||
80 | #define PH_DEACTIVATE_IND 0x0202 | ||
81 | #define PH_DEACTIVATE_CNF 0x4202 | ||
82 | #define PH_DATA_IND 0x2002 | ||
83 | #define MPH_ACTIVATE_IND 0x0502 | ||
84 | #define MPH_DEACTIVATE_IND 0x0602 | ||
85 | #define MPH_INFORMATION_IND 0x0702 | ||
86 | #define PH_DATA_CNF 0x6002 | ||
87 | #define PH_CONTROL_IND 0x0802 | ||
88 | #define PH_CONTROL_CNF 0x4802 | ||
89 | |||
90 | /* layer 3 -> layer 2 */ | ||
91 | #define DL_ESTABLISH_REQ 0x1004 | ||
92 | #define DL_RELEASE_REQ 0x1104 | ||
93 | #define DL_DATA_REQ 0x3004 | ||
94 | #define DL_UNITDATA_REQ 0x3104 | ||
95 | #define DL_INFORMATION_REQ 0x0004 | ||
96 | |||
97 | /* layer 2 -> layer 3 */ | ||
98 | #define DL_ESTABLISH_IND 0x1008 | ||
99 | #define DL_ESTABLISH_CNF 0x5008 | ||
100 | #define DL_RELEASE_IND 0x1108 | ||
101 | #define DL_RELEASE_CNF 0x5108 | ||
102 | #define DL_DATA_IND 0x3008 | ||
103 | #define DL_UNITDATA_IND 0x3108 | ||
104 | #define DL_INFORMATION_IND 0x0008 | ||
105 | |||
106 | /* intern layer 2 managment */ | ||
107 | #define MDL_ASSIGN_REQ 0x1804 | ||
108 | #define MDL_ASSIGN_IND 0x1904 | ||
109 | #define MDL_REMOVE_REQ 0x1A04 | ||
110 | #define MDL_REMOVE_IND 0x1B04 | ||
111 | #define MDL_STATUS_UP_IND 0x1C04 | ||
112 | #define MDL_STATUS_DOWN_IND 0x1D04 | ||
113 | #define MDL_STATUS_UI_IND 0x1E04 | ||
114 | #define MDL_ERROR_IND 0x1F04 | ||
115 | #define MDL_ERROR_RSP 0x5F04 | ||
116 | |||
117 | /* DL_INFORMATION_IND types */ | ||
118 | #define DL_INFO_L2_CONNECT 0x0001 | ||
119 | #define DL_INFO_L2_REMOVED 0x0002 | ||
120 | |||
121 | /* PH_CONTROL types */ | ||
122 | /* TOUCH TONE IS 0x20XX XX "0"..."9", "A","B","C","D","*","#" */ | ||
123 | #define DTMF_TONE_VAL 0x2000 | ||
124 | #define DTMF_TONE_MASK 0x007F | ||
125 | #define DTMF_TONE_START 0x2100 | ||
126 | #define DTMF_TONE_STOP 0x2200 | ||
127 | #define DTMF_HFC_COEF 0x4000 | ||
128 | #define DSP_CONF_JOIN 0x2403 | ||
129 | #define DSP_CONF_SPLIT 0x2404 | ||
130 | #define DSP_RECEIVE_OFF 0x2405 | ||
131 | #define DSP_RECEIVE_ON 0x2406 | ||
132 | #define DSP_ECHO_ON 0x2407 | ||
133 | #define DSP_ECHO_OFF 0x2408 | ||
134 | #define DSP_MIX_ON 0x2409 | ||
135 | #define DSP_MIX_OFF 0x240a | ||
136 | #define DSP_DELAY 0x240b | ||
137 | #define DSP_JITTER 0x240c | ||
138 | #define DSP_TXDATA_ON 0x240d | ||
139 | #define DSP_TXDATA_OFF 0x240e | ||
140 | #define DSP_TX_DEJITTER 0x240f | ||
141 | #define DSP_TX_DEJ_OFF 0x2410 | ||
142 | #define DSP_TONE_PATT_ON 0x2411 | ||
143 | #define DSP_TONE_PATT_OFF 0x2412 | ||
144 | #define DSP_VOL_CHANGE_TX 0x2413 | ||
145 | #define DSP_VOL_CHANGE_RX 0x2414 | ||
146 | #define DSP_BF_ENABLE_KEY 0x2415 | ||
147 | #define DSP_BF_DISABLE 0x2416 | ||
148 | #define DSP_BF_ACCEPT 0x2416 | ||
149 | #define DSP_BF_REJECT 0x2417 | ||
150 | #define DSP_PIPELINE_CFG 0x2418 | ||
151 | #define HFC_VOL_CHANGE_TX 0x2601 | ||
152 | #define HFC_VOL_CHANGE_RX 0x2602 | ||
153 | #define HFC_SPL_LOOP_ON 0x2603 | ||
154 | #define HFC_SPL_LOOP_OFF 0x2604 | ||
155 | |||
156 | /* DSP_TONE_PATT_ON parameter */ | ||
157 | #define TONE_OFF 0x0000 | ||
158 | #define TONE_GERMAN_DIALTONE 0x0001 | ||
159 | #define TONE_GERMAN_OLDDIALTONE 0x0002 | ||
160 | #define TONE_AMERICAN_DIALTONE 0x0003 | ||
161 | #define TONE_GERMAN_DIALPBX 0x0004 | ||
162 | #define TONE_GERMAN_OLDDIALPBX 0x0005 | ||
163 | #define TONE_AMERICAN_DIALPBX 0x0006 | ||
164 | #define TONE_GERMAN_RINGING 0x0007 | ||
165 | #define TONE_GERMAN_OLDRINGING 0x0008 | ||
166 | #define TONE_AMERICAN_RINGPBX 0x000b | ||
167 | #define TONE_GERMAN_RINGPBX 0x000c | ||
168 | #define TONE_GERMAN_OLDRINGPBX 0x000d | ||
169 | #define TONE_AMERICAN_RINGING 0x000e | ||
170 | #define TONE_GERMAN_BUSY 0x000f | ||
171 | #define TONE_GERMAN_OLDBUSY 0x0010 | ||
172 | #define TONE_AMERICAN_BUSY 0x0011 | ||
173 | #define TONE_GERMAN_HANGUP 0x0012 | ||
174 | #define TONE_GERMAN_OLDHANGUP 0x0013 | ||
175 | #define TONE_AMERICAN_HANGUP 0x0014 | ||
176 | #define TONE_SPECIAL_INFO 0x0015 | ||
177 | #define TONE_GERMAN_GASSENBESETZT 0x0016 | ||
178 | #define TONE_GERMAN_AUFSCHALTTON 0x0016 | ||
179 | |||
180 | /* MPH_INFORMATION_IND */ | ||
181 | #define L1_SIGNAL_LOS_OFF 0x0010 | ||
182 | #define L1_SIGNAL_LOS_ON 0x0011 | ||
183 | #define L1_SIGNAL_AIS_OFF 0x0012 | ||
184 | #define L1_SIGNAL_AIS_ON 0x0013 | ||
185 | #define L1_SIGNAL_RDI_OFF 0x0014 | ||
186 | #define L1_SIGNAL_RDI_ON 0x0015 | ||
187 | #define L1_SIGNAL_SLIP_RX 0x0020 | ||
188 | #define L1_SIGNAL_SLIP_TX 0x0021 | ||
189 | |||
190 | /* | ||
191 | * protocol ids | ||
192 | * D channel 1-31 | ||
193 | * B channel 33 - 63 | ||
194 | */ | ||
195 | |||
196 | #define ISDN_P_NONE 0 | ||
197 | #define ISDN_P_BASE 0 | ||
198 | #define ISDN_P_TE_S0 0x01 | ||
199 | #define ISDN_P_NT_S0 0x02 | ||
200 | #define ISDN_P_TE_E1 0x03 | ||
201 | #define ISDN_P_NT_E1 0x04 | ||
202 | #define ISDN_P_LAPD_TE 0x10 | ||
203 | #define ISDN_P_LAPD_NT 0x11 | ||
204 | |||
205 | #define ISDN_P_B_MASK 0x1f | ||
206 | #define ISDN_P_B_START 0x20 | ||
207 | |||
208 | #define ISDN_P_B_RAW 0x21 | ||
209 | #define ISDN_P_B_HDLC 0x22 | ||
210 | #define ISDN_P_B_X75SLP 0x23 | ||
211 | #define ISDN_P_B_L2DTMF 0x24 | ||
212 | #define ISDN_P_B_L2DSP 0x25 | ||
213 | #define ISDN_P_B_L2DSPHDLC 0x26 | ||
214 | |||
215 | #define OPTION_L2_PMX 1 | ||
216 | #define OPTION_L2_PTP 2 | ||
217 | #define OPTION_L2_FIXEDTEI 3 | ||
218 | #define OPTION_L2_CLEANUP 4 | ||
219 | |||
220 | /* should be in sync with linux/kobject.h:KOBJ_NAME_LEN */ | ||
221 | #define MISDN_MAX_IDLEN 20 | ||
222 | |||
223 | struct mISDNhead { | ||
224 | unsigned int prim; | ||
225 | unsigned int id; | ||
226 | } __attribute__((packed)); | ||
227 | |||
228 | #define MISDN_HEADER_LEN sizeof(struct mISDNhead) | ||
229 | #define MAX_DATA_SIZE 2048 | ||
230 | #define MAX_DATA_MEM (MAX_DATA_SIZE + MISDN_HEADER_LEN) | ||
231 | #define MAX_DFRAME_LEN 260 | ||
232 | |||
233 | #define MISDN_ID_ADDR_MASK 0xFFFF | ||
234 | #define MISDN_ID_TEI_MASK 0xFF00 | ||
235 | #define MISDN_ID_SAPI_MASK 0x00FF | ||
236 | #define MISDN_ID_TEI_ANY 0x7F00 | ||
237 | |||
238 | #define MISDN_ID_ANY 0xFFFF | ||
239 | #define MISDN_ID_NONE 0xFFFE | ||
240 | |||
241 | #define GROUP_TEI 127 | ||
242 | #define TEI_SAPI 63 | ||
243 | #define CTRL_SAPI 0 | ||
244 | |||
245 | #define MISDN_CHMAP_SIZE 4 | ||
246 | |||
247 | #define SOL_MISDN 0 | ||
248 | |||
249 | struct sockaddr_mISDN { | ||
250 | sa_family_t family; | ||
251 | unsigned char dev; | ||
252 | unsigned char channel; | ||
253 | unsigned char sapi; | ||
254 | unsigned char tei; | ||
255 | }; | ||
256 | |||
257 | /* timer device ioctl */ | ||
258 | #define IMADDTIMER _IOR('I', 64, int) | ||
259 | #define IMDELTIMER _IOR('I', 65, int) | ||
260 | /* socket ioctls */ | ||
261 | #define IMGETVERSION _IOR('I', 66, int) | ||
262 | #define IMGETCOUNT _IOR('I', 67, int) | ||
263 | #define IMGETDEVINFO _IOR('I', 68, int) | ||
264 | #define IMCTRLREQ _IOR('I', 69, int) | ||
265 | #define IMCLEAR_L2 _IOR('I', 70, int) | ||
266 | |||
267 | struct mISDNversion { | ||
268 | unsigned char major; | ||
269 | unsigned char minor; | ||
270 | unsigned short release; | ||
271 | }; | ||
272 | |||
273 | struct mISDN_devinfo { | ||
274 | u_int id; | ||
275 | u_int Dprotocols; | ||
276 | u_int Bprotocols; | ||
277 | u_int protocol; | ||
278 | u_long channelmap[MISDN_CHMAP_SIZE]; | ||
279 | u_int nrbchan; | ||
280 | char name[MISDN_MAX_IDLEN]; | ||
281 | }; | ||
282 | |||
283 | /* CONTROL_CHANNEL parameters */ | ||
284 | #define MISDN_CTRL_GETOP 0x0000 | ||
285 | #define MISDN_CTRL_LOOP 0x0001 | ||
286 | #define MISDN_CTRL_CONNECT 0x0002 | ||
287 | #define MISDN_CTRL_DISCONNECT 0x0004 | ||
288 | #define MISDN_CTRL_PCMCONNECT 0x0010 | ||
289 | #define MISDN_CTRL_PCMDISCONNECT 0x0020 | ||
290 | #define MISDN_CTRL_SETPEER 0x0040 | ||
291 | #define MISDN_CTRL_UNSETPEER 0x0080 | ||
292 | #define MISDN_CTRL_RX_OFF 0x0100 | ||
293 | #define MISDN_CTRL_HW_FEATURES_OP 0x2000 | ||
294 | #define MISDN_CTRL_HW_FEATURES 0x2001 | ||
295 | #define MISDN_CTRL_HFC_OP 0x4000 | ||
296 | #define MISDN_CTRL_HFC_PCM_CONN 0x4001 | ||
297 | #define MISDN_CTRL_HFC_PCM_DISC 0x4002 | ||
298 | #define MISDN_CTRL_HFC_CONF_JOIN 0x4003 | ||
299 | #define MISDN_CTRL_HFC_CONF_SPLIT 0x4004 | ||
300 | #define MISDN_CTRL_HFC_RECEIVE_OFF 0x4005 | ||
301 | #define MISDN_CTRL_HFC_RECEIVE_ON 0x4006 | ||
302 | #define MISDN_CTRL_HFC_ECHOCAN_ON 0x4007 | ||
303 | #define MISDN_CTRL_HFC_ECHOCAN_OFF 0x4008 | ||
304 | |||
305 | |||
306 | /* socket options */ | ||
307 | #define MISDN_TIME_STAMP 0x0001 | ||
308 | |||
309 | struct mISDN_ctrl_req { | ||
310 | int op; | ||
311 | int channel; | ||
312 | int p1; | ||
313 | int p2; | ||
314 | }; | ||
315 | |||
316 | /* muxer options */ | ||
317 | #define MISDN_OPT_ALL 1 | ||
318 | #define MISDN_OPT_TEIMGR 2 | ||
319 | |||
320 | #ifdef __KERNEL__ | ||
321 | #include <linux/list.h> | ||
322 | #include <linux/skbuff.h> | ||
323 | #include <linux/net.h> | ||
324 | #include <net/sock.h> | ||
325 | #include <linux/completion.h> | ||
326 | |||
327 | #define DEBUG_CORE 0x000000ff | ||
328 | #define DEBUG_CORE_FUNC 0x00000002 | ||
329 | #define DEBUG_SOCKET 0x00000004 | ||
330 | #define DEBUG_MANAGER 0x00000008 | ||
331 | #define DEBUG_SEND_ERR 0x00000010 | ||
332 | #define DEBUG_MSG_THREAD 0x00000020 | ||
333 | #define DEBUG_QUEUE_FUNC 0x00000040 | ||
334 | #define DEBUG_L1 0x0000ff00 | ||
335 | #define DEBUG_L1_FSM 0x00000200 | ||
336 | #define DEBUG_L2 0x00ff0000 | ||
337 | #define DEBUG_L2_FSM 0x00020000 | ||
338 | #define DEBUG_L2_CTRL 0x00040000 | ||
339 | #define DEBUG_L2_RECV 0x00080000 | ||
340 | #define DEBUG_L2_TEI 0x00100000 | ||
341 | #define DEBUG_L2_TEIFSM 0x00200000 | ||
342 | #define DEBUG_TIMER 0x01000000 | ||
343 | |||
344 | #define mISDN_HEAD_P(s) ((struct mISDNhead *)&s->cb[0]) | ||
345 | #define mISDN_HEAD_PRIM(s) (((struct mISDNhead *)&s->cb[0])->prim) | ||
346 | #define mISDN_HEAD_ID(s) (((struct mISDNhead *)&s->cb[0])->id) | ||
347 | |||
348 | /* socket states */ | ||
349 | #define MISDN_OPEN 1 | ||
350 | #define MISDN_BOUND 2 | ||
351 | #define MISDN_CLOSED 3 | ||
352 | |||
353 | struct mISDNchannel; | ||
354 | struct mISDNdevice; | ||
355 | struct mISDNstack; | ||
356 | |||
357 | struct channel_req { | ||
358 | u_int protocol; | ||
359 | struct sockaddr_mISDN adr; | ||
360 | struct mISDNchannel *ch; | ||
361 | }; | ||
362 | |||
363 | typedef int (ctrl_func_t)(struct mISDNchannel *, u_int, void *); | ||
364 | typedef int (send_func_t)(struct mISDNchannel *, struct sk_buff *); | ||
365 | typedef int (create_func_t)(struct channel_req *); | ||
366 | |||
367 | struct Bprotocol { | ||
368 | struct list_head list; | ||
369 | char *name; | ||
370 | u_int Bprotocols; | ||
371 | create_func_t *create; | ||
372 | }; | ||
373 | |||
374 | struct mISDNchannel { | ||
375 | struct list_head list; | ||
376 | u_int protocol; | ||
377 | u_int nr; | ||
378 | u_long opt; | ||
379 | u_int addr; | ||
380 | struct mISDNstack *st; | ||
381 | struct mISDNchannel *peer; | ||
382 | send_func_t *send; | ||
383 | send_func_t *recv; | ||
384 | ctrl_func_t *ctrl; | ||
385 | }; | ||
386 | |||
387 | struct mISDN_sock_list { | ||
388 | struct hlist_head head; | ||
389 | rwlock_t lock; | ||
390 | }; | ||
391 | |||
392 | struct mISDN_sock { | ||
393 | struct sock sk; | ||
394 | struct mISDNchannel ch; | ||
395 | u_int cmask; | ||
396 | struct mISDNdevice *dev; | ||
397 | }; | ||
398 | |||
399 | |||
400 | |||
401 | struct mISDNdevice { | ||
402 | struct mISDNchannel D; | ||
403 | u_int id; | ||
404 | char name[MISDN_MAX_IDLEN]; | ||
405 | u_int Dprotocols; | ||
406 | u_int Bprotocols; | ||
407 | u_int nrbchan; | ||
408 | u_long channelmap[MISDN_CHMAP_SIZE]; | ||
409 | struct list_head bchannels; | ||
410 | struct mISDNchannel *teimgr; | ||
411 | struct device dev; | ||
412 | }; | ||
413 | |||
414 | struct mISDNstack { | ||
415 | u_long status; | ||
416 | struct mISDNdevice *dev; | ||
417 | struct task_struct *thread; | ||
418 | struct completion *notify; | ||
419 | wait_queue_head_t workq; | ||
420 | struct sk_buff_head msgq; | ||
421 | struct list_head layer2; | ||
422 | struct mISDNchannel *layer1; | ||
423 | struct mISDNchannel own; | ||
424 | struct mutex lmutex; /* protect lists */ | ||
425 | struct mISDN_sock_list l1sock; | ||
426 | #ifdef MISDN_MSG_STATS | ||
427 | u_int msg_cnt; | ||
428 | u_int sleep_cnt; | ||
429 | u_int stopped_cnt; | ||
430 | #endif | ||
431 | }; | ||
432 | |||
433 | /* global alloc/queue dunctions */ | ||
434 | |||
435 | static inline struct sk_buff * | ||
436 | mI_alloc_skb(unsigned int len, gfp_t gfp_mask) | ||
437 | { | ||
438 | struct sk_buff *skb; | ||
439 | |||
440 | skb = alloc_skb(len + MISDN_HEADER_LEN, gfp_mask); | ||
441 | if (likely(skb)) | ||
442 | skb_reserve(skb, MISDN_HEADER_LEN); | ||
443 | return skb; | ||
444 | } | ||
445 | |||
446 | static inline struct sk_buff * | ||
447 | _alloc_mISDN_skb(u_int prim, u_int id, u_int len, void *dp, gfp_t gfp_mask) | ||
448 | { | ||
449 | struct sk_buff *skb = mI_alloc_skb(len, gfp_mask); | ||
450 | struct mISDNhead *hh; | ||
451 | |||
452 | if (!skb) | ||
453 | return NULL; | ||
454 | if (len) | ||
455 | memcpy(skb_put(skb, len), dp, len); | ||
456 | hh = mISDN_HEAD_P(skb); | ||
457 | hh->prim = prim; | ||
458 | hh->id = id; | ||
459 | return skb; | ||
460 | } | ||
461 | |||
462 | static inline void | ||
463 | _queue_data(struct mISDNchannel *ch, u_int prim, | ||
464 | u_int id, u_int len, void *dp, gfp_t gfp_mask) | ||
465 | { | ||
466 | struct sk_buff *skb; | ||
467 | |||
468 | if (!ch->peer) | ||
469 | return; | ||
470 | skb = _alloc_mISDN_skb(prim, id, len, dp, gfp_mask); | ||
471 | if (!skb) | ||
472 | return; | ||
473 | if (ch->recv(ch->peer, skb)) | ||
474 | dev_kfree_skb(skb); | ||
475 | } | ||
476 | |||
477 | /* global register/unregister functions */ | ||
478 | |||
479 | extern int mISDN_register_device(struct mISDNdevice *, char *name); | ||
480 | extern void mISDN_unregister_device(struct mISDNdevice *); | ||
481 | extern int mISDN_register_Bprotocol(struct Bprotocol *); | ||
482 | extern void mISDN_unregister_Bprotocol(struct Bprotocol *); | ||
483 | |||
484 | extern void set_channel_address(struct mISDNchannel *, u_int, u_int); | ||
485 | |||
486 | #endif /* __KERNEL__ */ | ||
487 | #endif /* mISDNIF_H */ | ||
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 0d508ac17d64..ee6e822d5994 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -111,6 +111,8 @@ struct mmc_card { | |||
111 | unsigned num_info; /* number of info strings */ | 111 | unsigned num_info; /* number of info strings */ |
112 | const char **info; /* info strings */ | 112 | const char **info; /* info strings */ |
113 | struct sdio_func_tuple *tuples; /* unknown common tuples */ | 113 | struct sdio_func_tuple *tuples; /* unknown common tuples */ |
114 | |||
115 | struct dentry *debugfs_root; | ||
114 | }; | 116 | }; |
115 | 117 | ||
116 | #define mmc_card_mmc(c) ((c)->type == MMC_TYPE_MMC) | 118 | #define mmc_card_mmc(c) ((c)->type == MMC_TYPE_MMC) |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 10a2080086ca..9c288c909878 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -157,6 +157,8 @@ struct mmc_host { | |||
157 | struct led_trigger *led; /* activity led */ | 157 | struct led_trigger *led; /* activity led */ |
158 | #endif | 158 | #endif |
159 | 159 | ||
160 | struct dentry *debugfs_root; | ||
161 | |||
160 | unsigned long private[0] ____cacheline_aligned; | 162 | unsigned long private[0] ____cacheline_aligned; |
161 | }; | 163 | }; |
162 | 164 | ||
diff --git a/include/linux/mount.h b/include/linux/mount.h index 4374d1adeb4b..b5efaa2132ab 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -47,7 +47,7 @@ struct vfsmount { | |||
47 | struct list_head mnt_child; /* and going through their mnt_child */ | 47 | struct list_head mnt_child; /* and going through their mnt_child */ |
48 | int mnt_flags; | 48 | int mnt_flags; |
49 | /* 4 bytes hole on 64bits arches */ | 49 | /* 4 bytes hole on 64bits arches */ |
50 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ | 50 | const char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ |
51 | struct list_head mnt_list; | 51 | struct list_head mnt_list; |
52 | struct list_head mnt_expire; /* link in fs-specific expiry list */ | 52 | struct list_head mnt_expire; /* link in fs-specific expiry list */ |
53 | struct list_head mnt_share; /* circular list of shared mounts */ | 53 | struct list_head mnt_share; /* circular list of shared mounts */ |
diff --git a/include/linux/namei.h b/include/linux/namei.h index 24d88e98a626..68f8c3203c89 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -47,27 +47,24 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; | |||
47 | #define LOOKUP_DIRECTORY 2 | 47 | #define LOOKUP_DIRECTORY 2 |
48 | #define LOOKUP_CONTINUE 4 | 48 | #define LOOKUP_CONTINUE 4 |
49 | #define LOOKUP_PARENT 16 | 49 | #define LOOKUP_PARENT 16 |
50 | #define LOOKUP_NOALT 32 | ||
51 | #define LOOKUP_REVAL 64 | 50 | #define LOOKUP_REVAL 64 |
52 | /* | 51 | /* |
53 | * Intent data | 52 | * Intent data |
54 | */ | 53 | */ |
55 | #define LOOKUP_OPEN (0x0100) | 54 | #define LOOKUP_OPEN (0x0100) |
56 | #define LOOKUP_CREATE (0x0200) | 55 | #define LOOKUP_CREATE (0x0200) |
57 | #define LOOKUP_ACCESS (0x0400) | 56 | |
58 | #define LOOKUP_CHDIR (0x0800) | 57 | extern int user_path_at(int, const char __user *, unsigned, struct path *); |
59 | 58 | ||
60 | extern int __user_walk(const char __user *, unsigned, struct nameidata *); | 59 | #define user_path(name, path) user_path_at(AT_FDCWD, name, LOOKUP_FOLLOW, path) |
61 | extern int __user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *); | 60 | #define user_lpath(name, path) user_path_at(AT_FDCWD, name, 0, path) |
62 | #define user_path_walk(name,nd) \ | 61 | #define user_path_dir(name, path) \ |
63 | __user_walk_fd(AT_FDCWD, name, LOOKUP_FOLLOW, nd) | 62 | user_path_at(AT_FDCWD, name, LOOKUP_FOLLOW | LOOKUP_DIRECTORY, path) |
64 | #define user_path_walk_link(name,nd) \ | 63 | |
65 | __user_walk_fd(AT_FDCWD, name, 0, nd) | ||
66 | extern int path_lookup(const char *, unsigned, struct nameidata *); | 64 | extern int path_lookup(const char *, unsigned, struct nameidata *); |
67 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, | 65 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, |
68 | const char *, unsigned int, struct nameidata *); | 66 | const char *, unsigned int, struct nameidata *); |
69 | 67 | ||
70 | extern int __user_path_lookup_open(const char __user *, unsigned lookup_flags, struct nameidata *nd, int open_flags); | ||
71 | extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags); | 68 | extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags); |
72 | extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, | 69 | extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, |
73 | int (*open)(struct inode *, struct file *)); | 70 | int (*open)(struct inode *, struct file *)); |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 29d261918734..78a5922a2f11 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <linux/in.h> | 42 | #include <linux/in.h> |
43 | #include <linux/kref.h> | 43 | #include <linux/kref.h> |
44 | #include <linux/mm.h> | 44 | #include <linux/mm.h> |
45 | #include <linux/namei.h> | ||
46 | #include <linux/pagemap.h> | 45 | #include <linux/pagemap.h> |
47 | #include <linux/rbtree.h> | 46 | #include <linux/rbtree.h> |
48 | #include <linux/rwsem.h> | 47 | #include <linux/rwsem.h> |
@@ -332,7 +331,7 @@ extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *); | |||
332 | extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr); | 331 | extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr); |
333 | extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr); | 332 | extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr); |
334 | extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 333 | extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
335 | extern int nfs_permission(struct inode *, int, struct nameidata *); | 334 | extern int nfs_permission(struct inode *, int); |
336 | extern int nfs_open(struct inode *, struct file *); | 335 | extern int nfs_open(struct inode *, struct file *); |
337 | extern int nfs_release(struct inode *, struct file *); | 336 | extern int nfs_release(struct inode *, struct file *); |
338 | extern int nfs_attribute_timeout(struct inode *inode); | 337 | extern int nfs_attribute_timeout(struct inode *inode); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c3b1761aba26..ffe479ba0779 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1832,7 +1832,13 @@ | |||
1832 | #define PCI_DEVICE_ID_MOXA_C320 0x3200 | 1832 | #define PCI_DEVICE_ID_MOXA_C320 0x3200 |
1833 | 1833 | ||
1834 | #define PCI_VENDOR_ID_CCD 0x1397 | 1834 | #define PCI_VENDOR_ID_CCD 0x1397 |
1835 | #define PCI_DEVICE_ID_CCD_HFC4S 0x08B4 | ||
1836 | #define PCI_SUBDEVICE_ID_CCD_PMX2S 0x1234 | ||
1837 | #define PCI_DEVICE_ID_CCD_HFC8S 0x16B8 | ||
1835 | #define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 | 1838 | #define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 |
1839 | #define PCI_DEVICE_ID_CCD_HFCE1 0x30B1 | ||
1840 | #define PCI_SUBDEVICE_ID_CCD_SPD4S 0x3136 | ||
1841 | #define PCI_SUBDEVICE_ID_CCD_SPDE1 0x3137 | ||
1836 | #define PCI_DEVICE_ID_CCD_B000 0xb000 | 1842 | #define PCI_DEVICE_ID_CCD_B000 0xb000 |
1837 | #define PCI_DEVICE_ID_CCD_B006 0xb006 | 1843 | #define PCI_DEVICE_ID_CCD_B006 0xb006 |
1838 | #define PCI_DEVICE_ID_CCD_B007 0xb007 | 1844 | #define PCI_DEVICE_ID_CCD_B007 0xb007 |
@@ -1842,8 +1848,32 @@ | |||
1842 | #define PCI_DEVICE_ID_CCD_B00B 0xb00b | 1848 | #define PCI_DEVICE_ID_CCD_B00B 0xb00b |
1843 | #define PCI_DEVICE_ID_CCD_B00C 0xb00c | 1849 | #define PCI_DEVICE_ID_CCD_B00C 0xb00c |
1844 | #define PCI_DEVICE_ID_CCD_B100 0xb100 | 1850 | #define PCI_DEVICE_ID_CCD_B100 0xb100 |
1851 | #define PCI_SUBDEVICE_ID_CCD_IOB4ST 0xB520 | ||
1852 | #define PCI_SUBDEVICE_ID_CCD_IOB8STR 0xB521 | ||
1853 | #define PCI_SUBDEVICE_ID_CCD_IOB8ST 0xB522 | ||
1854 | #define PCI_SUBDEVICE_ID_CCD_IOB1E1 0xB523 | ||
1855 | #define PCI_SUBDEVICE_ID_CCD_SWYX4S 0xB540 | ||
1856 | #define PCI_SUBDEVICE_ID_CCD_JH4S20 0xB550 | ||
1857 | #define PCI_SUBDEVICE_ID_CCD_IOB8ST_1 0xB552 | ||
1858 | #define PCI_SUBDEVICE_ID_CCD_BN4S 0xB560 | ||
1859 | #define PCI_SUBDEVICE_ID_CCD_BN8S 0xB562 | ||
1860 | #define PCI_SUBDEVICE_ID_CCD_BNE1 0xB563 | ||
1861 | #define PCI_SUBDEVICE_ID_CCD_BNE1D 0xB564 | ||
1862 | #define PCI_SUBDEVICE_ID_CCD_BNE1DP 0xB565 | ||
1863 | #define PCI_SUBDEVICE_ID_CCD_BN2S 0xB566 | ||
1864 | #define PCI_SUBDEVICE_ID_CCD_BN1SM 0xB567 | ||
1865 | #define PCI_SUBDEVICE_ID_CCD_BN4SM 0xB568 | ||
1866 | #define PCI_SUBDEVICE_ID_CCD_BN2SM 0xB569 | ||
1867 | #define PCI_SUBDEVICE_ID_CCD_BNE1M 0xB56A | ||
1868 | #define PCI_SUBDEVICE_ID_CCD_BN8SP 0xB56B | ||
1869 | #define PCI_SUBDEVICE_ID_CCD_HFC4S 0xB620 | ||
1870 | #define PCI_SUBDEVICE_ID_CCD_HFC8S 0xB622 | ||
1845 | #define PCI_DEVICE_ID_CCD_B700 0xb700 | 1871 | #define PCI_DEVICE_ID_CCD_B700 0xb700 |
1846 | #define PCI_DEVICE_ID_CCD_B701 0xb701 | 1872 | #define PCI_DEVICE_ID_CCD_B701 0xb701 |
1873 | #define PCI_SUBDEVICE_ID_CCD_HFCE1 0xC523 | ||
1874 | #define PCI_SUBDEVICE_ID_CCD_OV2S 0xE884 | ||
1875 | #define PCI_SUBDEVICE_ID_CCD_OV4S 0xE888 | ||
1876 | #define PCI_SUBDEVICE_ID_CCD_OV8S 0xE998 | ||
1847 | 1877 | ||
1848 | #define PCI_VENDOR_ID_EXAR 0x13a8 | 1878 | #define PCI_VENDOR_ID_EXAR 0x13a8 |
1849 | #define PCI_DEVICE_ID_EXAR_XR17C152 0x0152 | 1879 | #define PCI_DEVICE_ID_EXAR_XR17C152 0x0152 |
@@ -2523,6 +2553,9 @@ | |||
2523 | 2553 | ||
2524 | #define PCI_VENDOR_ID_3COM_2 0xa727 | 2554 | #define PCI_VENDOR_ID_3COM_2 0xa727 |
2525 | 2555 | ||
2556 | #define PCI_VENDOR_ID_DIGIUM 0xd161 | ||
2557 | #define PCI_DEVICE_ID_DIGIUM_HFC4S 0xb410 | ||
2558 | |||
2526 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d | 2559 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d |
2527 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 | 2560 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 |
2528 | #define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055 | 2561 | #define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055 |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index f560d1705afe..fb61850d1cfc 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -282,11 +282,16 @@ union proc_op { | |||
282 | struct task_struct *task); | 282 | struct task_struct *task); |
283 | }; | 283 | }; |
284 | 284 | ||
285 | struct ctl_table_header; | ||
286 | struct ctl_table; | ||
287 | |||
285 | struct proc_inode { | 288 | struct proc_inode { |
286 | struct pid *pid; | 289 | struct pid *pid; |
287 | int fd; | 290 | int fd; |
288 | union proc_op op; | 291 | union proc_op op; |
289 | struct proc_dir_entry *pde; | 292 | struct proc_dir_entry *pde; |
293 | struct ctl_table_header *sysctl; | ||
294 | struct ctl_table *sysctl_entry; | ||
290 | struct inode vfs_inode; | 295 | struct inode vfs_inode; |
291 | }; | 296 | }; |
292 | 297 | ||
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 66a96814d614..af135ae895db 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -55,7 +55,7 @@ int reiserfs_removexattr(struct dentry *dentry, const char *name); | |||
55 | int reiserfs_delete_xattrs(struct inode *inode); | 55 | int reiserfs_delete_xattrs(struct inode *inode); |
56 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); | 56 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); |
57 | int reiserfs_xattr_init(struct super_block *sb, int mount_flags); | 57 | int reiserfs_xattr_init(struct super_block *sb, int mount_flags); |
58 | int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd); | 58 | int reiserfs_permission(struct inode *inode, int mask); |
59 | 59 | ||
60 | int reiserfs_xattr_del(struct inode *, const char *); | 60 | int reiserfs_xattr_del(struct inode *, const char *); |
61 | int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t); | 61 | int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t); |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index f4d386c191f5..ca643b13b026 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -755,13 +755,6 @@ extern void __rtnl_unlock(void); | |||
755 | } \ | 755 | } \ |
756 | } while(0) | 756 | } while(0) |
757 | 757 | ||
758 | #define BUG_TRAP(x) do { \ | ||
759 | if (unlikely(!(x))) { \ | ||
760 | printk(KERN_ERR "KERNEL: assertion (%s) failed at %s (%d)\n", \ | ||
761 | #x, __FILE__ , __LINE__); \ | ||
762 | } \ | ||
763 | } while(0) | ||
764 | |||
765 | static inline u32 rtm_get_table(struct rtattr **rta, u8 table) | 758 | static inline u32 rtm_get_table(struct rtattr **rta, u8 table) |
766 | { | 759 | { |
767 | return RTA_GET_U32(rta[RTA_TABLE-1]); | 760 | return RTA_GET_U32(rta[RTA_TABLE-1]); |
diff --git a/include/linux/security.h b/include/linux/security.h index f0e9adb22ac2..fd96e7f8a6f9 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1362,7 +1362,7 @@ struct security_operations { | |||
1362 | struct inode *new_dir, struct dentry *new_dentry); | 1362 | struct inode *new_dir, struct dentry *new_dentry); |
1363 | int (*inode_readlink) (struct dentry *dentry); | 1363 | int (*inode_readlink) (struct dentry *dentry); |
1364 | int (*inode_follow_link) (struct dentry *dentry, struct nameidata *nd); | 1364 | int (*inode_follow_link) (struct dentry *dentry, struct nameidata *nd); |
1365 | int (*inode_permission) (struct inode *inode, int mask, struct nameidata *nd); | 1365 | int (*inode_permission) (struct inode *inode, int mask); |
1366 | int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); | 1366 | int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); |
1367 | int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); | 1367 | int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); |
1368 | void (*inode_delete) (struct inode *inode); | 1368 | void (*inode_delete) (struct inode *inode); |
@@ -1628,7 +1628,7 @@ int security_inode_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
1628 | struct inode *new_dir, struct dentry *new_dentry); | 1628 | struct inode *new_dir, struct dentry *new_dentry); |
1629 | int security_inode_readlink(struct dentry *dentry); | 1629 | int security_inode_readlink(struct dentry *dentry); |
1630 | int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd); | 1630 | int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd); |
1631 | int security_inode_permission(struct inode *inode, int mask, struct nameidata *nd); | 1631 | int security_inode_permission(struct inode *inode, int mask); |
1632 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr); | 1632 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr); |
1633 | int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry); | 1633 | int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry); |
1634 | void security_inode_delete(struct inode *inode); | 1634 | void security_inode_delete(struct inode *inode); |
@@ -2021,8 +2021,7 @@ static inline int security_inode_follow_link(struct dentry *dentry, | |||
2021 | return 0; | 2021 | return 0; |
2022 | } | 2022 | } |
2023 | 2023 | ||
2024 | static inline int security_inode_permission(struct inode *inode, int mask, | 2024 | static inline int security_inode_permission(struct inode *inode, int mask) |
2025 | struct nameidata *nd) | ||
2026 | { | 2025 | { |
2027 | return 0; | 2026 | return 0; |
2028 | } | 2027 | } |
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index f2d12d5a21b8..fd83f2584b15 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h | |||
@@ -43,7 +43,7 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode) | |||
43 | } | 43 | } |
44 | 44 | ||
45 | #ifdef CONFIG_TMPFS_POSIX_ACL | 45 | #ifdef CONFIG_TMPFS_POSIX_ACL |
46 | int shmem_permission(struct inode *, int, struct nameidata *); | 46 | int shmem_permission(struct inode *, int); |
47 | int shmem_acl_init(struct inode *, struct inode *); | 47 | int shmem_acl_init(struct inode *, struct inode *); |
48 | void shmem_acl_destroy_inode(struct inode *); | 48 | void shmem_acl_destroy_inode(struct inode *); |
49 | 49 | ||
diff --git a/include/linux/slab.h b/include/linux/slab.h index 9ff8e8499403..5ff9676c1e2c 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -96,6 +96,7 @@ int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | |||
96 | /* | 96 | /* |
97 | * Common kmalloc functions provided by all allocators | 97 | * Common kmalloc functions provided by all allocators |
98 | */ | 98 | */ |
99 | void * __must_check __krealloc(const void *, size_t, gfp_t); | ||
99 | void * __must_check krealloc(const void *, size_t, gfp_t); | 100 | void * __must_check krealloc(const void *, size_t, gfp_t); |
100 | void kfree(const void *); | 101 | void kfree(const void *); |
101 | size_t ksize(const void *); | 102 | size_t ksize(const void *); |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 950af631e7fb..dc5086fe7736 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -189,7 +189,8 @@ struct ucred { | |||
189 | #define AF_BLUETOOTH 31 /* Bluetooth sockets */ | 189 | #define AF_BLUETOOTH 31 /* Bluetooth sockets */ |
190 | #define AF_IUCV 32 /* IUCV sockets */ | 190 | #define AF_IUCV 32 /* IUCV sockets */ |
191 | #define AF_RXRPC 33 /* RxRPC sockets */ | 191 | #define AF_RXRPC 33 /* RxRPC sockets */ |
192 | #define AF_MAX 34 /* For now.. */ | 192 | #define AF_ISDN 34 /* mISDN sockets */ |
193 | #define AF_MAX 35 /* For now.. */ | ||
193 | 194 | ||
194 | /* Protocol families, same as address families. */ | 195 | /* Protocol families, same as address families. */ |
195 | #define PF_UNSPEC AF_UNSPEC | 196 | #define PF_UNSPEC AF_UNSPEC |
@@ -225,6 +226,7 @@ struct ucred { | |||
225 | #define PF_BLUETOOTH AF_BLUETOOTH | 226 | #define PF_BLUETOOTH AF_BLUETOOTH |
226 | #define PF_IUCV AF_IUCV | 227 | #define PF_IUCV AF_IUCV |
227 | #define PF_RXRPC AF_RXRPC | 228 | #define PF_RXRPC AF_RXRPC |
229 | #define PF_ISDN AF_ISDN | ||
228 | #define PF_MAX AF_MAX | 230 | #define PF_MAX AF_MAX |
229 | 231 | ||
230 | /* Maximum queue length specifiable by listen. */ | 232 | /* Maximum queue length specifiable by listen. */ |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 24141b4d1a11..d0437f36921f 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -947,6 +947,22 @@ struct ctl_table; | |||
947 | struct nsproxy; | 947 | struct nsproxy; |
948 | struct ctl_table_root; | 948 | struct ctl_table_root; |
949 | 949 | ||
950 | struct ctl_table_set { | ||
951 | struct list_head list; | ||
952 | struct ctl_table_set *parent; | ||
953 | int (*is_seen)(struct ctl_table_set *); | ||
954 | }; | ||
955 | |||
956 | extern void setup_sysctl_set(struct ctl_table_set *p, | ||
957 | struct ctl_table_set *parent, | ||
958 | int (*is_seen)(struct ctl_table_set *)); | ||
959 | |||
960 | struct ctl_table_header; | ||
961 | |||
962 | extern void sysctl_head_get(struct ctl_table_header *); | ||
963 | extern void sysctl_head_put(struct ctl_table_header *); | ||
964 | extern int sysctl_is_seen(struct ctl_table_header *); | ||
965 | extern struct ctl_table_header *sysctl_head_grab(struct ctl_table_header *); | ||
950 | extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev); | 966 | extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev); |
951 | extern struct ctl_table_header *__sysctl_head_next(struct nsproxy *namespaces, | 967 | extern struct ctl_table_header *__sysctl_head_next(struct nsproxy *namespaces, |
952 | struct ctl_table_header *prev); | 968 | struct ctl_table_header *prev); |
@@ -1049,8 +1065,8 @@ struct ctl_table | |||
1049 | 1065 | ||
1050 | struct ctl_table_root { | 1066 | struct ctl_table_root { |
1051 | struct list_head root_list; | 1067 | struct list_head root_list; |
1052 | struct list_head header_list; | 1068 | struct ctl_table_set default_set; |
1053 | struct list_head *(*lookup)(struct ctl_table_root *root, | 1069 | struct ctl_table_set *(*lookup)(struct ctl_table_root *root, |
1054 | struct nsproxy *namespaces); | 1070 | struct nsproxy *namespaces); |
1055 | int (*permissions)(struct ctl_table_root *root, | 1071 | int (*permissions)(struct ctl_table_root *root, |
1056 | struct nsproxy *namespaces, struct ctl_table *table); | 1072 | struct nsproxy *namespaces, struct ctl_table *table); |
@@ -1063,9 +1079,14 @@ struct ctl_table_header | |||
1063 | struct ctl_table *ctl_table; | 1079 | struct ctl_table *ctl_table; |
1064 | struct list_head ctl_entry; | 1080 | struct list_head ctl_entry; |
1065 | int used; | 1081 | int used; |
1082 | int count; | ||
1066 | struct completion *unregistering; | 1083 | struct completion *unregistering; |
1067 | struct ctl_table *ctl_table_arg; | 1084 | struct ctl_table *ctl_table_arg; |
1068 | struct ctl_table_root *root; | 1085 | struct ctl_table_root *root; |
1086 | struct ctl_table_set *set; | ||
1087 | struct ctl_table *attached_by; | ||
1088 | struct ctl_table *attached_to; | ||
1089 | struct ctl_table_header *parent; | ||
1069 | }; | 1090 | }; |
1070 | 1091 | ||
1071 | /* struct ctl_path describes where in the hierarchy a table is added */ | 1092 | /* struct ctl_path describes where in the hierarchy a table is added */ |
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 2dfa96b0575e..7dd29b7e461d 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
@@ -51,7 +51,7 @@ struct unix_sock { | |||
51 | struct sock *peer; | 51 | struct sock *peer; |
52 | struct sock *other; | 52 | struct sock *other; |
53 | struct list_head link; | 53 | struct list_head link; |
54 | atomic_t inflight; | 54 | atomic_long_t inflight; |
55 | spinlock_t lock; | 55 | spinlock_t lock; |
56 | unsigned int gc_candidate : 1; | 56 | unsigned int gc_candidate : 1; |
57 | wait_queue_head_t peer_wait; | 57 | wait_queue_head_t peer_wait; |
diff --git a/include/net/ip.h b/include/net/ip.h index b5862b975207..250e6ef025a4 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -188,6 +188,8 @@ extern int sysctl_ip_dynaddr; | |||
188 | 188 | ||
189 | extern void ipfrag_init(void); | 189 | extern void ipfrag_init(void); |
190 | 190 | ||
191 | extern void ip_static_sysctl_init(void); | ||
192 | |||
191 | #ifdef CONFIG_INET | 193 | #ifdef CONFIG_INET |
192 | #include <net/dst.h> | 194 | #include <net/dst.h> |
193 | 195 | ||
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 3855620b78a9..a8eb43cf0c7e 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -38,7 +38,9 @@ struct net { | |||
38 | struct proc_dir_entry *proc_net; | 38 | struct proc_dir_entry *proc_net; |
39 | struct proc_dir_entry *proc_net_stat; | 39 | struct proc_dir_entry *proc_net_stat; |
40 | 40 | ||
41 | struct list_head sysctl_table_headers; | 41 | #ifdef CONFIG_SYSCTL |
42 | struct ctl_table_set sysctls; | ||
43 | #endif | ||
42 | 44 | ||
43 | struct net_device *loopback_dev; /* The loopback */ | 45 | struct net_device *loopback_dev; /* The loopback */ |
44 | 46 | ||
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index 0c96e7bed5db..8d6e991ef4df 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <linux/bug.h> | ||
21 | 22 | ||
22 | #include <net/sock.h> | 23 | #include <net/sock.h> |
23 | 24 | ||
@@ -170,7 +171,7 @@ static inline struct request_sock *reqsk_queue_remove(struct request_sock_queue | |||
170 | { | 171 | { |
171 | struct request_sock *req = queue->rskq_accept_head; | 172 | struct request_sock *req = queue->rskq_accept_head; |
172 | 173 | ||
173 | BUG_TRAP(req != NULL); | 174 | WARN_ON(req == NULL); |
174 | 175 | ||
175 | queue->rskq_accept_head = req->dl_next; | 176 | queue->rskq_accept_head = req->dl_next; |
176 | if (queue->rskq_accept_head == NULL) | 177 | if (queue->rskq_accept_head == NULL) |
@@ -185,7 +186,7 @@ static inline struct sock *reqsk_queue_get_child(struct request_sock_queue *queu | |||
185 | struct request_sock *req = reqsk_queue_remove(queue); | 186 | struct request_sock *req = reqsk_queue_remove(queue); |
186 | struct sock *child = req->sk; | 187 | struct sock *child = req->sk; |
187 | 188 | ||
188 | BUG_TRAP(child != NULL); | 189 | WARN_ON(child == NULL); |
189 | 190 | ||
190 | sk_acceptq_removed(parent); | 191 | sk_acceptq_removed(parent); |
191 | __reqsk_free(req); | 192 | __reqsk_free(req); |