aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-at91rm9200/hardware.h3
-rw-r--r--include/asm-powerpc/eeh.h20
-rw-r--r--include/asm-powerpc/hvcall.h185
-rw-r--r--include/asm-sparc/unistd.h6
-rw-r--r--include/asm-sparc64/unistd.h4
-rw-r--r--include/linux/gameport.h7
-rw-r--r--include/linux/input.h23
-rw-r--r--include/linux/kbd_kern.h2
-rw-r--r--include/linux/keyboard.h13
-rw-r--r--include/linux/libps2.h2
-rw-r--r--include/linux/netfilter/x_tables.h67
-rw-r--r--include/linux/netfilter/xt_esp.h14
-rw-r--r--include/linux/netfilter/xt_multiport.h30
-rw-r--r--include/linux/netfilter_ipv4/ip_tables.h18
-rw-r--r--include/linux/netfilter_ipv4/ipt_esp.h14
-rw-r--r--include/linux/netfilter_ipv4/ipt_multiport.h31
-rw-r--r--include/linux/netfilter_ipv6/ip6t_esp.h12
-rw-r--r--include/linux/netfilter_ipv6/ip6t_multiport.h25
-rw-r--r--include/linux/pipe_fs_i.h3
-rw-r--r--include/linux/serio.h9
-rw-r--r--include/linux/uinput.h4
-rw-r--r--include/net/xfrm.h19
-rw-r--r--include/pcmcia/bulkmem.h4
-rw-r--r--include/pcmcia/ciscode.h5
-rw-r--r--include/pcmcia/cistpl.h21
-rw-r--r--include/pcmcia/cs.h34
-rw-r--r--include/pcmcia/ds.h80
-rw-r--r--include/pcmcia/ss.h11
28 files changed, 437 insertions, 229 deletions
diff --git a/include/asm-arm/arch-at91rm9200/hardware.h b/include/asm-arm/arch-at91rm9200/hardware.h
index 2646c01f8e97..59e6f44d3a0d 100644
--- a/include/asm-arm/arch-at91rm9200/hardware.h
+++ b/include/asm-arm/arch-at91rm9200/hardware.h
@@ -65,6 +65,9 @@
65/* SmartMedia */ 65/* SmartMedia */
66#define AT91_SMARTMEDIA_BASE 0x40000000 /* NCS3: Smartmedia physical base address */ 66#define AT91_SMARTMEDIA_BASE 0x40000000 /* NCS3: Smartmedia physical base address */
67 67
68/* Compact Flash */
69#define AT91_CF_BASE 0x50000000 /* NCS4-NCS6: Compact Flash physical base address */
70
68/* Multi-Master Memory controller */ 71/* Multi-Master Memory controller */
69#define AT91_UHP_BASE 0x00300000 /* USB Host controller */ 72#define AT91_UHP_BASE 0x00300000 /* USB Host controller */
70 73
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h
index 5207758a6dd9..868c7139dbff 100644
--- a/include/asm-powerpc/eeh.h
+++ b/include/asm-powerpc/eeh.h
@@ -60,24 +60,10 @@ void __init pci_addr_cache_build(void);
60 * device (including config space i/o). Call eeh_add_device_late 60 * device (including config space i/o). Call eeh_add_device_late
61 * to finish the eeh setup for this device. 61 * to finish the eeh setup for this device.
62 */ 62 */
63void eeh_add_device_early(struct device_node *);
64void eeh_add_device_late(struct pci_dev *dev);
65void eeh_add_device_tree_early(struct device_node *); 63void eeh_add_device_tree_early(struct device_node *);
66void eeh_add_device_tree_late(struct pci_bus *); 64void eeh_add_device_tree_late(struct pci_bus *);
67 65
68/** 66/**
69 * eeh_remove_device - undo EEH setup for the indicated pci device
70 * @dev: pci device to be removed
71 *
72 * This routine should be called when a device is removed from
73 * a running system (e.g. by hotplug or dlpar). It unregisters
74 * the PCI device from the EEH subsystem. I/O errors affecting
75 * this device will no longer be detected after this call; thus,
76 * i/o errors affecting this slot may leave this device unusable.
77 */
78void eeh_remove_device(struct pci_dev *);
79
80/**
81 * eeh_remove_device_recursive - undo EEH for device & children. 67 * eeh_remove_device_recursive - undo EEH for device & children.
82 * @dev: pci device to be removed 68 * @dev: pci device to be removed
83 * 69 *
@@ -116,12 +102,6 @@ static inline int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *d
116 102
117static inline void pci_addr_cache_build(void) { } 103static inline void pci_addr_cache_build(void) { }
118 104
119static inline void eeh_add_device_early(struct device_node *dn) { }
120
121static inline void eeh_add_device_late(struct pci_dev *dev) { }
122
123static inline void eeh_remove_device(struct pci_dev *dev) { }
124
125static inline void eeh_add_device_tree_early(struct device_node *dn) { } 105static inline void eeh_add_device_tree_early(struct device_node *dn) { }
126 106
127static inline void eeh_add_device_tree_late(struct pci_bus *bus) { } 107static inline void eeh_add_device_tree_late(struct pci_bus *bus) { }
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h
index b72c04f3f551..6cc7e1fb7bfd 100644
--- a/include/asm-powerpc/hvcall.h
+++ b/include/asm-powerpc/hvcall.h
@@ -4,47 +4,88 @@
4 4
5#define HVSC .long 0x44000022 5#define HVSC .long 0x44000022
6 6
7#define H_Success 0 7#define H_SUCCESS 0
8#define H_Busy 1 /* Hardware busy -- retry later */ 8#define H_BUSY 1 /* Hardware busy -- retry later */
9#define H_Closed 2 /* Resource closed */ 9#define H_CLOSED 2 /* Resource closed */
10#define H_Constrained 4 /* Resource request constrained to max allowed */ 10#define H_NOT_AVAILABLE 3
11#define H_InProgress 14 /* Kind of like busy */ 11#define H_CONSTRAINED 4 /* Resource request constrained to max allowed */
12#define H_Pending 17 /* returned from H_POLL_PENDING */ 12#define H_PARTIAL 5
13#define H_Continue 18 /* Returned from H_Join on success */ 13#define H_IN_PROGRESS 14 /* Kind of like busy */
14#define H_LongBusyStartRange 9900 /* Start of long busy range */ 14#define H_PAGE_REGISTERED 15
15#define H_LongBusyOrder1msec 9900 /* Long busy, hint that 1msec is a good time to retry */ 15#define H_PARTIAL_STORE 16
16#define H_LongBusyOrder10msec 9901 /* Long busy, hint that 10msec is a good time to retry */ 16#define H_PENDING 17 /* returned from H_POLL_PENDING */
17#define H_LongBusyOrder100msec 9902 /* Long busy, hint that 100msec is a good time to retry */ 17#define H_CONTINUE 18 /* Returned from H_Join on success */
18#define H_LongBusyOrder1sec 9903 /* Long busy, hint that 1sec is a good time to retry */ 18#define H_LONG_BUSY_START_RANGE 9900 /* Start of long busy range */
19#define H_LongBusyOrder10sec 9904 /* Long busy, hint that 10sec is a good time to retry */ 19#define H_LONG_BUSY_ORDER_1_MSEC 9900 /* Long busy, hint that 1msec \
20#define H_LongBusyOrder100sec 9905 /* Long busy, hint that 100sec is a good time to retry */ 20 is a good time to retry */
21#define H_LongBusyEndRange 9905 /* End of long busy range */ 21#define H_LONG_BUSY_ORDER_10_MSEC 9901 /* Long busy, hint that 10msec \
22#define H_Hardware -1 /* Hardware error */ 22 is a good time to retry */
23#define H_Function -2 /* Function not supported */ 23#define H_LONG_BUSY_ORDER_100_MSEC 9902 /* Long busy, hint that 100msec \
24#define H_Privilege -3 /* Caller not privileged */ 24 is a good time to retry */
25#define H_Parameter -4 /* Parameter invalid, out-of-range or conflicting */ 25#define H_LONG_BUSY_ORDER_1_SEC 9903 /* Long busy, hint that 1sec \
26#define H_Bad_Mode -5 /* Illegal msr value */ 26 is a good time to retry */
27#define H_PTEG_Full -6 /* PTEG is full */ 27#define H_LONG_BUSY_ORDER_10_SEC 9904 /* Long busy, hint that 10sec \
28#define H_Not_Found -7 /* PTE was not found" */ 28 is a good time to retry */
29#define H_Reserved_DABR -8 /* DABR address is reserved by the hypervisor on this processor" */ 29#define H_LONG_BUSY_ORDER_100_SEC 9905 /* Long busy, hint that 100sec \
30#define H_NoMem -9 30 is a good time to retry */
31#define H_Authority -10 31#define H_LONG_BUSY_END_RANGE 9905 /* End of long busy range */
32#define H_Permission -11 32#define H_HARDWARE -1 /* Hardware error */
33#define H_Dropped -12 33#define H_FUNCTION -2 /* Function not supported */
34#define H_SourceParm -13 34#define H_PRIVILEGE -3 /* Caller not privileged */
35#define H_DestParm -14 35#define H_PARAMETER -4 /* Parameter invalid, out-of-range or conflicting */
36#define H_RemoteParm -15 36#define H_BAD_MODE -5 /* Illegal msr value */
37#define H_Resource -16 37#define H_PTEG_FULL -6 /* PTEG is full */
38#define H_NOT_FOUND -7 /* PTE was not found" */
39#define H_RESERVED_DABR -8 /* DABR address is reserved by the hypervisor on this processor" */
40#define H_NO_MEM -9
41#define H_AUTHORITY -10
42#define H_PERMISSION -11
43#define H_DROPPED -12
44#define H_SOURCE_PARM -13
45#define H_DEST_PARM -14
46#define H_REMOTE_PARM -15
47#define H_RESOURCE -16
48#define H_ADAPTER_PARM -17
49#define H_RH_PARM -18
50#define H_RCQ_PARM -19
51#define H_SCQ_PARM -20
52#define H_EQ_PARM -21
53#define H_RT_PARM -22
54#define H_ST_PARM -23
55#define H_SIGT_PARM -24
56#define H_TOKEN_PARM -25
57#define H_MLENGTH_PARM -27
58#define H_MEM_PARM -28
59#define H_MEM_ACCESS_PARM -29
60#define H_ATTR_PARM -30
61#define H_PORT_PARM -31
62#define H_MCG_PARM -32
63#define H_VL_PARM -33
64#define H_TSIZE_PARM -34
65#define H_TRACE_PARM -35
66
67#define H_MASK_PARM -37
68#define H_MCG_FULL -38
69#define H_ALIAS_EXIST -39
70#define H_P_COUNTER -40
71#define H_TABLE_FULL -41
72#define H_ALT_TABLE -42
73#define H_MR_CONDITION -43
74#define H_NOT_ENOUGH_RESOURCES -44
75#define H_R_STATE -45
76#define H_RESCINDEND -46
77
38 78
39/* Long Busy is a condition that can be returned by the firmware 79/* Long Busy is a condition that can be returned by the firmware
40 * when a call cannot be completed now, but the identical call 80 * when a call cannot be completed now, but the identical call
41 * should be retried later. This prevents calls blocking in the 81 * should be retried later. This prevents calls blocking in the
42 * firmware for long periods of time. Annoyingly the firmware can return 82 * firmware for long periods of time. Annoyingly the firmware can return
43 * a range of return codes, hinting at how long we should wait before 83 * a range of return codes, hinting at how long we should wait before
44 * retrying. If you don't care for the hint, the macro below is a good 84 * retrying. If you don't care for the hint, the macro below is a good
45 * way to check for the long_busy return codes 85 * way to check for the long_busy return codes
46 */ 86 */
47#define H_isLongBusy(x) ((x >= H_LongBusyStartRange) && (x <= H_LongBusyEndRange)) 87#define H_IS_LONG_BUSY(x) ((x >= H_LONG_BUSY_START_RANGE) \
88 && (x <= H_LONG_BUSY_END_RANGE))
48 89
49/* Flags */ 90/* Flags */
50#define H_LARGE_PAGE (1UL<<(63-16)) 91#define H_LARGE_PAGE (1UL<<(63-16))
@@ -66,6 +107,9 @@
66#define H_DABRX_KERNEL (1UL<<(63-62)) 107#define H_DABRX_KERNEL (1UL<<(63-62))
67#define H_DABRX_USER (1UL<<(63-63)) 108#define H_DABRX_USER (1UL<<(63-63))
68 109
110/* Each control block has to be on a 4K bondary */
111#define H_CB_ALIGNMENT 4096
112
69/* pSeries hypervisor opcodes */ 113/* pSeries hypervisor opcodes */
70#define H_REMOVE 0x04 114#define H_REMOVE 0x04
71#define H_ENTER 0x08 115#define H_ENTER 0x08
@@ -99,25 +143,52 @@
99#define H_PERFMON 0x7c 143#define H_PERFMON 0x7c
100#define H_MIGRATE_DMA 0x78 144#define H_MIGRATE_DMA 0x78
101#define H_REGISTER_VPA 0xDC 145#define H_REGISTER_VPA 0xDC
102#define H_CEDE 0xE0 146#define H_CEDE 0xE0
103#define H_CONFER 0xE4 147#define H_CONFER 0xE4
104#define H_PROD 0xE8 148#define H_PROD 0xE8
105#define H_GET_PPP 0xEC 149#define H_GET_PPP 0xEC
106#define H_SET_PPP 0xF0 150#define H_SET_PPP 0xF0
107#define H_PURR 0xF4 151#define H_PURR 0xF4
108#define H_PIC 0xF8 152#define H_PIC 0xF8
109#define H_REG_CRQ 0xFC 153#define H_REG_CRQ 0xFC
110#define H_FREE_CRQ 0x100 154#define H_FREE_CRQ 0x100
111#define H_VIO_SIGNAL 0x104 155#define H_VIO_SIGNAL 0x104
112#define H_SEND_CRQ 0x108 156#define H_SEND_CRQ 0x108
113#define H_COPY_RDMA 0x110 157#define H_COPY_RDMA 0x110
114#define H_SET_XDABR 0x134 158#define H_SET_XDABR 0x134
115#define H_STUFF_TCE 0x138 159#define H_STUFF_TCE 0x138
116#define H_PUT_TCE_INDIRECT 0x13C 160#define H_PUT_TCE_INDIRECT 0x13C
117#define H_VTERM_PARTNER_INFO 0x150 161#define H_VTERM_PARTNER_INFO 0x150
118#define H_REGISTER_VTERM 0x154 162#define H_REGISTER_VTERM 0x154
119#define H_FREE_VTERM 0x158 163#define H_FREE_VTERM 0x158
120#define H_POLL_PENDING 0x1D8 164#define H_RESET_EVENTS 0x15C
165#define H_ALLOC_RESOURCE 0x160
166#define H_FREE_RESOURCE 0x164
167#define H_MODIFY_QP 0x168
168#define H_QUERY_QP 0x16C
169#define H_REREGISTER_PMR 0x170
170#define H_REGISTER_SMR 0x174
171#define H_QUERY_MR 0x178
172#define H_QUERY_MW 0x17C
173#define H_QUERY_HCA 0x180
174#define H_QUERY_PORT 0x184
175#define H_MODIFY_PORT 0x188
176#define H_DEFINE_AQP1 0x18C
177#define H_GET_TRACE_BUFFER 0x190
178#define H_DEFINE_AQP0 0x194
179#define H_RESIZE_MR 0x198
180#define H_ATTACH_MCQP 0x19C
181#define H_DETACH_MCQP 0x1A0
182#define H_CREATE_RPT 0x1A4
183#define H_REMOVE_RPT 0x1A8
184#define H_REGISTER_RPAGES 0x1AC
185#define H_DISABLE_AND_GETC 0x1B0
186#define H_ERROR_DATA 0x1B4
187#define H_GET_HCA_INFO 0x1B8
188#define H_GET_PERF_COUNT 0x1BC
189#define H_MANAGE_TRACE 0x1C0
190#define H_QUERY_INT_STATE 0x1E4
191#define H_POLL_PENDING 0x1D8
121#define H_JOIN 0x298 192#define H_JOIN 0x298
122#define H_ENABLE_CRQ 0x2B0 193#define H_ENABLE_CRQ 0x2B0
123 194
@@ -152,7 +223,7 @@ long plpar_hcall_norets(unsigned long opcode, ...);
152 */ 223 */
153long plpar_hcall_8arg_2ret(unsigned long opcode, 224long plpar_hcall_8arg_2ret(unsigned long opcode,
154 unsigned long arg1, 225 unsigned long arg1,
155 unsigned long arg2, 226 unsigned long arg2,
156 unsigned long arg3, 227 unsigned long arg3,
157 unsigned long arg4, 228 unsigned long arg4,
158 unsigned long arg5, 229 unsigned long arg5,
@@ -176,6 +247,42 @@ long plpar_hcall_4out(unsigned long opcode,
176 unsigned long *out3, 247 unsigned long *out3,
177 unsigned long *out4); 248 unsigned long *out4);
178 249
250long plpar_hcall_7arg_7ret(unsigned long opcode,
251 unsigned long arg1,
252 unsigned long arg2,
253 unsigned long arg3,
254 unsigned long arg4,
255 unsigned long arg5,
256 unsigned long arg6,
257 unsigned long arg7,
258 unsigned long *out1,
259 unsigned long *out2,
260 unsigned long *out3,
261 unsigned long *out4,
262 unsigned long *out5,
263 unsigned long *out6,
264 unsigned long *out7);
265
266long plpar_hcall_9arg_9ret(unsigned long opcode,
267 unsigned long arg1,
268 unsigned long arg2,
269 unsigned long arg3,
270 unsigned long arg4,
271 unsigned long arg5,
272 unsigned long arg6,
273 unsigned long arg7,
274 unsigned long arg8,
275 unsigned long arg9,
276 unsigned long *out1,
277 unsigned long *out2,
278 unsigned long *out3,
279 unsigned long *out4,
280 unsigned long *out5,
281 unsigned long *out6,
282 unsigned long *out7,
283 unsigned long *out8,
284 unsigned long *out9);
285
179#endif /* __ASSEMBLY__ */ 286#endif /* __ASSEMBLY__ */
180#endif /* __KERNEL__ */ 287#endif /* __KERNEL__ */
181#endif /* _ASM_POWERPC_HVCALL_H */ 288#endif /* _ASM_POWERPC_HVCALL_H */
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h
index 64ec640a40ee..264f0ebeaedc 100644
--- a/include/asm-sparc/unistd.h
+++ b/include/asm-sparc/unistd.h
@@ -180,7 +180,7 @@
180#define __NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS */ 180#define __NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS */
181#define __NR_getdomainname 162 /* SunOS Specific */ 181#define __NR_getdomainname 162 /* SunOS Specific */
182#define __NR_setdomainname 163 /* Common */ 182#define __NR_setdomainname 163 /* Common */
183/* #define __NR_ni_syscall 164 ENOSYS under SunOS */ 183/* #define __NR_utrap_install 164 Linux sparc64 specific */
184#define __NR_quotactl 165 /* Common */ 184#define __NR_quotactl 165 /* Common */
185#define __NR_set_tid_address 166 /* Linux specific, exportfs under SunOS */ 185#define __NR_set_tid_address 166 /* Linux specific, exportfs under SunOS */
186#define __NR_mount 167 /* Common */ 186#define __NR_mount 167 /* Common */
@@ -248,7 +248,7 @@
248#define __NR_setfsgid 229 /* Linux Specific */ 248#define __NR_setfsgid 229 /* Linux Specific */
249#define __NR__newselect 230 /* Linux Specific */ 249#define __NR__newselect 230 /* Linux Specific */
250#define __NR_time 231 /* Linux Specific */ 250#define __NR_time 231 /* Linux Specific */
251/* #define __NR_oldstat 232 Linux Specific */ 251#define __NR_sys_splice 232 /* Linux Specific */
252#define __NR_stime 233 /* Linux Specific */ 252#define __NR_stime 233 /* Linux Specific */
253#define __NR_statfs64 234 /* Linux Specific */ 253#define __NR_statfs64 234 /* Linux Specific */
254#define __NR_fstatfs64 235 /* Linux Specific */ 254#define __NR_fstatfs64 235 /* Linux Specific */
@@ -271,7 +271,7 @@
271#define __NR_getsid 252 271#define __NR_getsid 252
272#define __NR_fdatasync 253 272#define __NR_fdatasync 253
273#define __NR_nfsservctl 254 273#define __NR_nfsservctl 254
274#define __NR_aplib 255 274#define __NR_sys_sync_file_range 255
275#define __NR_clock_settime 256 275#define __NR_clock_settime 256
276#define __NR_clock_gettime 257 276#define __NR_clock_gettime 257
277#define __NR_clock_getres 258 277#define __NR_clock_getres 258
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h
index a284986b1541..d0544b4f47b7 100644
--- a/include/asm-sparc64/unistd.h
+++ b/include/asm-sparc64/unistd.h
@@ -250,7 +250,7 @@
250#ifdef __KERNEL__ 250#ifdef __KERNEL__
251#define __NR_time 231 /* Linux sparc32 */ 251#define __NR_time 231 /* Linux sparc32 */
252#endif 252#endif
253/* #define __NR_oldstat 232 Linux Specific */ 253#define __NR_sys_splice 232 /* Linux Specific */
254#define __NR_stime 233 /* Linux Specific */ 254#define __NR_stime 233 /* Linux Specific */
255#define __NR_statfs64 234 /* Linux Specific */ 255#define __NR_statfs64 234 /* Linux Specific */
256#define __NR_fstatfs64 235 /* Linux Specific */ 256#define __NR_fstatfs64 235 /* Linux Specific */
@@ -273,7 +273,7 @@
273#define __NR_getsid 252 273#define __NR_getsid 252
274#define __NR_fdatasync 253 274#define __NR_fdatasync 253
275#define __NR_nfsservctl 254 275#define __NR_nfsservctl 254
276#define __NR_aplib 255 276#define __NR_sys_sync_file_range 255
277#define __NR_clock_settime 256 277#define __NR_clock_settime 256
278#define __NR_clock_gettime 257 278#define __NR_clock_gettime 257
279#define __NR_clock_getres 258 279#define __NR_clock_getres 258
diff --git a/include/linux/gameport.h b/include/linux/gameport.h
index 9c8e6da2393b..71e7b2847cb3 100644
--- a/include/linux/gameport.h
+++ b/include/linux/gameport.h
@@ -11,6 +11,7 @@
11 11
12#include <asm/io.h> 12#include <asm/io.h>
13#include <linux/list.h> 13#include <linux/list.h>
14#include <linux/mutex.h>
14#include <linux/device.h> 15#include <linux/device.h>
15#include <linux/timer.h> 16#include <linux/timer.h>
16 17
@@ -40,7 +41,7 @@ struct gameport {
40 struct gameport *parent, *child; 41 struct gameport *parent, *child;
41 42
42 struct gameport_driver *drv; 43 struct gameport_driver *drv;
43 struct semaphore drv_sem; /* protects serio->drv so attributes can pin driver */ 44 struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */
44 45
45 struct device dev; 46 struct device dev;
46 unsigned int registered; /* port has been fully registered with driver core */ 47 unsigned int registered; /* port has been fully registered with driver core */
@@ -137,12 +138,12 @@ static inline void gameport_set_drvdata(struct gameport *gameport, void *data)
137 */ 138 */
138static inline int gameport_pin_driver(struct gameport *gameport) 139static inline int gameport_pin_driver(struct gameport *gameport)
139{ 140{
140 return down_interruptible(&gameport->drv_sem); 141 return mutex_lock_interruptible(&gameport->drv_mutex);
141} 142}
142 143
143static inline void gameport_unpin_driver(struct gameport *gameport) 144static inline void gameport_unpin_driver(struct gameport *gameport)
144{ 145{
145 up(&gameport->drv_sem); 146 mutex_unlock(&gameport->drv_mutex);
146} 147}
147 148
148void __gameport_register_driver(struct gameport_driver *drv, struct module *owner); 149void __gameport_register_driver(struct gameport_driver *drv, struct module *owner);
diff --git a/include/linux/input.h b/include/linux/input.h
index 1d4e341b72e6..b0e612dda0cf 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -421,7 +421,7 @@ struct input_absinfo {
421#define BTN_GEAR_UP 0x151 421#define BTN_GEAR_UP 0x151
422 422
423#define KEY_OK 0x160 423#define KEY_OK 0x160
424#define KEY_SELECT 0x161 424#define KEY_SELECT 0x161
425#define KEY_GOTO 0x162 425#define KEY_GOTO 0x162
426#define KEY_CLEAR 0x163 426#define KEY_CLEAR 0x163
427#define KEY_POWER2 0x164 427#define KEY_POWER2 0x164
@@ -512,6 +512,15 @@ struct input_absinfo {
512#define KEY_FN_S 0x1e3 512#define KEY_FN_S 0x1e3
513#define KEY_FN_B 0x1e4 513#define KEY_FN_B 0x1e4
514 514
515#define KEY_BRL_DOT1 0x1f1
516#define KEY_BRL_DOT2 0x1f2
517#define KEY_BRL_DOT3 0x1f3
518#define KEY_BRL_DOT4 0x1f4
519#define KEY_BRL_DOT5 0x1f5
520#define KEY_BRL_DOT6 0x1f6
521#define KEY_BRL_DOT7 0x1f7
522#define KEY_BRL_DOT8 0x1f8
523
515/* We avoid low common keys in module aliases so they don't get huge. */ 524/* We avoid low common keys in module aliases so they don't get huge. */
516#define KEY_MIN_INTERESTING KEY_MUTE 525#define KEY_MIN_INTERESTING KEY_MUTE
517#define KEY_MAX 0x1ff 526#define KEY_MAX 0x1ff
@@ -929,7 +938,7 @@ struct input_dev {
929 938
930 struct input_handle *grab; 939 struct input_handle *grab;
931 940
932 struct semaphore sem; /* serializes open and close operations */ 941 struct mutex mutex; /* serializes open and close operations */
933 unsigned int users; 942 unsigned int users;
934 943
935 struct class_device cdev; 944 struct class_device cdev;
@@ -995,11 +1004,6 @@ static inline void init_input_dev(struct input_dev *dev)
995 1004
996struct input_dev *input_allocate_device(void); 1005struct input_dev *input_allocate_device(void);
997 1006
998static inline void input_free_device(struct input_dev *dev)
999{
1000 kfree(dev);
1001}
1002
1003static inline struct input_dev *input_get_device(struct input_dev *dev) 1007static inline struct input_dev *input_get_device(struct input_dev *dev)
1004{ 1008{
1005 return to_input_dev(class_device_get(&dev->cdev)); 1009 return to_input_dev(class_device_get(&dev->cdev));
@@ -1010,6 +1014,11 @@ static inline void input_put_device(struct input_dev *dev)
1010 class_device_put(&dev->cdev); 1014 class_device_put(&dev->cdev);
1011} 1015}
1012 1016
1017static inline void input_free_device(struct input_dev *dev)
1018{
1019 input_put_device(dev);
1020}
1021
1013int input_register_device(struct input_dev *); 1022int input_register_device(struct input_dev *);
1014void input_unregister_device(struct input_dev *); 1023void input_unregister_device(struct input_dev *);
1015 1024
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h
index e87c32a5c86a..4eb851ece080 100644
--- a/include/linux/kbd_kern.h
+++ b/include/linux/kbd_kern.h
@@ -135,6 +135,8 @@ static inline void chg_vc_kbd_led(struct kbd_struct * kbd, int flag)
135 135
136#define U(x) ((x) ^ 0xf000) 136#define U(x) ((x) ^ 0xf000)
137 137
138#define BRL_UC_ROW 0x2800
139
138/* keyboard.c */ 140/* keyboard.c */
139 141
140struct console; 142struct console;
diff --git a/include/linux/keyboard.h b/include/linux/keyboard.h
index 08488042d74a..de76843bbe8a 100644
--- a/include/linux/keyboard.h
+++ b/include/linux/keyboard.h
@@ -44,6 +44,7 @@ extern unsigned short plain_map[NR_KEYS];
44#define KT_ASCII 9 44#define KT_ASCII 9
45#define KT_LOCK 10 45#define KT_LOCK 10
46#define KT_SLOCK 12 46#define KT_SLOCK 12
47#define KT_BRL 14
47 48
48#define K(t,v) (((t)<<8)|(v)) 49#define K(t,v) (((t)<<8)|(v))
49#define KTYP(x) ((x) >> 8) 50#define KTYP(x) ((x) >> 8)
@@ -427,5 +428,17 @@ extern unsigned short plain_map[NR_KEYS];
427 428
428#define NR_LOCK 8 429#define NR_LOCK 8
429 430
431#define K_BRL_BLANK K(KT_BRL, 0)
432#define K_BRL_DOT1 K(KT_BRL, 1)
433#define K_BRL_DOT2 K(KT_BRL, 2)
434#define K_BRL_DOT3 K(KT_BRL, 3)
435#define K_BRL_DOT4 K(KT_BRL, 4)
436#define K_BRL_DOT5 K(KT_BRL, 5)
437#define K_BRL_DOT6 K(KT_BRL, 6)
438#define K_BRL_DOT7 K(KT_BRL, 7)
439#define K_BRL_DOT8 K(KT_BRL, 8)
440
441#define NR_BRL 9
442
430#define MAX_DIACR 256 443#define MAX_DIACR 256
431#endif 444#endif
diff --git a/include/linux/libps2.h b/include/linux/libps2.h
index a710bddda4eb..08a450a9dbf7 100644
--- a/include/linux/libps2.h
+++ b/include/linux/libps2.h
@@ -28,7 +28,7 @@ struct ps2dev {
28 struct serio *serio; 28 struct serio *serio;
29 29
30 /* Ensures that only one command is executing at a time */ 30 /* Ensures that only one command is executing at a time */
31 struct semaphore cmd_sem; 31 struct mutex cmd_mutex;
32 32
33 /* Used to signal completion from interrupt handler */ 33 /* Used to signal completion from interrupt handler */
34 wait_queue_head_t wait; 34 wait_queue_head_t wait;
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index 1350e47b0234..f6bdef82a322 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -142,6 +142,12 @@ struct xt_counters_info
142#define ASSERT_WRITE_LOCK(x) 142#define ASSERT_WRITE_LOCK(x)
143#include <linux/netfilter_ipv4/listhelp.h> 143#include <linux/netfilter_ipv4/listhelp.h>
144 144
145#ifdef CONFIG_COMPAT
146#define COMPAT_TO_USER 1
147#define COMPAT_FROM_USER -1
148#define COMPAT_CALC_SIZE 0
149#endif
150
145struct xt_match 151struct xt_match
146{ 152{
147 struct list_head list; 153 struct list_head list;
@@ -175,6 +181,9 @@ struct xt_match
175 void (*destroy)(const struct xt_match *match, void *matchinfo, 181 void (*destroy)(const struct xt_match *match, void *matchinfo,
176 unsigned int matchinfosize); 182 unsigned int matchinfosize);
177 183
184 /* Called when userspace align differs from kernel space one */
185 int (*compat)(void *match, void **dstptr, int *size, int convert);
186
178 /* Set this to THIS_MODULE if you are a module, otherwise NULL */ 187 /* Set this to THIS_MODULE if you are a module, otherwise NULL */
179 struct module *me; 188 struct module *me;
180 189
@@ -220,6 +229,9 @@ struct xt_target
220 void (*destroy)(const struct xt_target *target, void *targinfo, 229 void (*destroy)(const struct xt_target *target, void *targinfo,
221 unsigned int targinfosize); 230 unsigned int targinfosize);
222 231
232 /* Called when userspace align differs from kernel space one */
233 int (*compat)(void *target, void **dstptr, int *size, int convert);
234
223 /* Set this to THIS_MODULE if you are a module, otherwise NULL */ 235 /* Set this to THIS_MODULE if you are a module, otherwise NULL */
224 struct module *me; 236 struct module *me;
225 237
@@ -314,6 +326,61 @@ extern void xt_proto_fini(int af);
314extern struct xt_table_info *xt_alloc_table_info(unsigned int size); 326extern struct xt_table_info *xt_alloc_table_info(unsigned int size);
315extern void xt_free_table_info(struct xt_table_info *info); 327extern void xt_free_table_info(struct xt_table_info *info);
316 328
329#ifdef CONFIG_COMPAT
330#include <net/compat.h>
331
332struct compat_xt_entry_match
333{
334 union {
335 struct {
336 u_int16_t match_size;
337 char name[XT_FUNCTION_MAXNAMELEN - 1];
338 u_int8_t revision;
339 } user;
340 u_int16_t match_size;
341 } u;
342 unsigned char data[0];
343};
344
345struct compat_xt_entry_target
346{
347 union {
348 struct {
349 u_int16_t target_size;
350 char name[XT_FUNCTION_MAXNAMELEN - 1];
351 u_int8_t revision;
352 } user;
353 u_int16_t target_size;
354 } u;
355 unsigned char data[0];
356};
357
358/* FIXME: this works only on 32 bit tasks
359 * need to change whole approach in order to calculate align as function of
360 * current task alignment */
361
362struct compat_xt_counters
363{
364 u_int32_t cnt[4];
365};
366
367struct compat_xt_counters_info
368{
369 char name[XT_TABLE_MAXNAMELEN];
370 compat_uint_t num_counters;
371 struct compat_xt_counters counters[0];
372};
373
374#define COMPAT_XT_ALIGN(s) (((s) + (__alignof__(struct compat_xt_counters)-1)) \
375 & ~(__alignof__(struct compat_xt_counters)-1))
376
377extern void xt_compat_lock(int af);
378extern void xt_compat_unlock(int af);
379extern int xt_compat_match(void *match, void **dstptr, int *size, int convert);
380extern int xt_compat_target(void *target, void **dstptr, int *size,
381 int convert);
382
383#endif /* CONFIG_COMPAT */
317#endif /* __KERNEL__ */ 384#endif /* __KERNEL__ */
318 385
319#endif /* _X_TABLES_H */ 386#endif /* _X_TABLES_H */
diff --git a/include/linux/netfilter/xt_esp.h b/include/linux/netfilter/xt_esp.h
new file mode 100644
index 000000000000..9380fb1c27da
--- /dev/null
+++ b/include/linux/netfilter/xt_esp.h
@@ -0,0 +1,14 @@
1#ifndef _XT_ESP_H
2#define _XT_ESP_H
3
4struct xt_esp
5{
6 u_int32_t spis[2]; /* Security Parameter Index */
7 u_int8_t invflags; /* Inverse flags */
8};
9
10/* Values for "invflags" field in struct xt_esp. */
11#define XT_ESP_INV_SPI 0x01 /* Invert the sense of spi. */
12#define XT_ESP_INV_MASK 0x01 /* All possible flags. */
13
14#endif /*_XT_ESP_H*/
diff --git a/include/linux/netfilter/xt_multiport.h b/include/linux/netfilter/xt_multiport.h
new file mode 100644
index 000000000000..d49ee4183710
--- /dev/null
+++ b/include/linux/netfilter/xt_multiport.h
@@ -0,0 +1,30 @@
1#ifndef _XT_MULTIPORT_H
2#define _XT_MULTIPORT_H
3
4enum xt_multiport_flags
5{
6 XT_MULTIPORT_SOURCE,
7 XT_MULTIPORT_DESTINATION,
8 XT_MULTIPORT_EITHER
9};
10
11#define XT_MULTI_PORTS 15
12
13/* Must fit inside union xt_matchinfo: 16 bytes */
14struct xt_multiport
15{
16 u_int8_t flags; /* Type of comparison */
17 u_int8_t count; /* Number of ports */
18 u_int16_t ports[XT_MULTI_PORTS]; /* Ports */
19};
20
21struct xt_multiport_v1
22{
23 u_int8_t flags; /* Type of comparison */
24 u_int8_t count; /* Number of ports */
25 u_int16_t ports[XT_MULTI_PORTS]; /* Ports */
26 u_int8_t pflags[XT_MULTI_PORTS]; /* Port flags */
27 u_int8_t invert; /* Invert flag */
28};
29
30#endif /*_XT_MULTIPORT_H*/
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index d5b8c0d6a12b..c0dac16e1902 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -316,5 +316,23 @@ extern unsigned int ipt_do_table(struct sk_buff **pskb,
316 void *userdata); 316 void *userdata);
317 317
318#define IPT_ALIGN(s) XT_ALIGN(s) 318#define IPT_ALIGN(s) XT_ALIGN(s)
319
320#ifdef CONFIG_COMPAT
321#include <net/compat.h>
322
323struct compat_ipt_entry
324{
325 struct ipt_ip ip;
326 compat_uint_t nfcache;
327 u_int16_t target_offset;
328 u_int16_t next_offset;
329 compat_uint_t comefrom;
330 struct compat_xt_counters counters;
331 unsigned char elems[0];
332};
333
334#define COMPAT_IPT_ALIGN(s) COMPAT_XT_ALIGN(s)
335
336#endif /* CONFIG_COMPAT */
319#endif /*__KERNEL__*/ 337#endif /*__KERNEL__*/
320#endif /* _IPTABLES_H */ 338#endif /* _IPTABLES_H */
diff --git a/include/linux/netfilter_ipv4/ipt_esp.h b/include/linux/netfilter_ipv4/ipt_esp.h
index c782a83e53e0..78296e7eeff9 100644
--- a/include/linux/netfilter_ipv4/ipt_esp.h
+++ b/include/linux/netfilter_ipv4/ipt_esp.h
@@ -1,16 +1,10 @@
1#ifndef _IPT_ESP_H 1#ifndef _IPT_ESP_H
2#define _IPT_ESP_H 2#define _IPT_ESP_H
3 3
4struct ipt_esp 4#include <linux/netfilter/xt_esp.h>
5{
6 u_int32_t spis[2]; /* Security Parameter Index */
7 u_int8_t invflags; /* Inverse flags */
8};
9 5
10 6#define ipt_esp xt_esp
11 7#define IPT_ESP_INV_SPI XT_ESP_INV_SPI
12/* Values for "invflags" field in struct ipt_esp. */ 8#define IPT_ESP_INV_MASK XT_ESP_INV_MASK
13#define IPT_ESP_INV_SPI 0x01 /* Invert the sense of spi. */
14#define IPT_ESP_INV_MASK 0x01 /* All possible flags. */
15 9
16#endif /*_IPT_ESP_H*/ 10#endif /*_IPT_ESP_H*/
diff --git a/include/linux/netfilter_ipv4/ipt_multiport.h b/include/linux/netfilter_ipv4/ipt_multiport.h
index e6b6fff811df..55fe85eca88c 100644
--- a/include/linux/netfilter_ipv4/ipt_multiport.h
+++ b/include/linux/netfilter_ipv4/ipt_multiport.h
@@ -1,30 +1,15 @@
1#ifndef _IPT_MULTIPORT_H 1#ifndef _IPT_MULTIPORT_H
2#define _IPT_MULTIPORT_H 2#define _IPT_MULTIPORT_H
3#include <linux/netfilter_ipv4/ip_tables.h>
4 3
5enum ipt_multiport_flags 4#include <linux/netfilter/xt_multiport.h>
6{
7 IPT_MULTIPORT_SOURCE,
8 IPT_MULTIPORT_DESTINATION,
9 IPT_MULTIPORT_EITHER
10};
11 5
12#define IPT_MULTI_PORTS 15 6#define IPT_MULTIPORT_SOURCE XT_MULTIPORT_SOURCE
7#define IPT_MULTIPORT_DESTINATION XT_MULTIPORT_DESTINATION
8#define IPT_MULTIPORT_EITHER XT_MULTIPORT_EITHER
13 9
14/* Must fit inside union ipt_matchinfo: 16 bytes */ 10#define IPT_MULTI_PORTS XT_MULTI_PORTS
15struct ipt_multiport 11
16{ 12#define ipt_multiport xt_multiport
17 u_int8_t flags; /* Type of comparison */ 13#define ipt_multiport_v1 xt_multiport_v1
18 u_int8_t count; /* Number of ports */
19 u_int16_t ports[IPT_MULTI_PORTS]; /* Ports */
20};
21 14
22struct ipt_multiport_v1
23{
24 u_int8_t flags; /* Type of comparison */
25 u_int8_t count; /* Number of ports */
26 u_int16_t ports[IPT_MULTI_PORTS]; /* Ports */
27 u_int8_t pflags[IPT_MULTI_PORTS]; /* Port flags */
28 u_int8_t invert; /* Invert flag */
29};
30#endif /*_IPT_MULTIPORT_H*/ 15#endif /*_IPT_MULTIPORT_H*/
diff --git a/include/linux/netfilter_ipv6/ip6t_esp.h b/include/linux/netfilter_ipv6/ip6t_esp.h
index a91b6abc8079..f62eaf53c16c 100644
--- a/include/linux/netfilter_ipv6/ip6t_esp.h
+++ b/include/linux/netfilter_ipv6/ip6t_esp.h
@@ -1,14 +1,10 @@
1#ifndef _IP6T_ESP_H 1#ifndef _IP6T_ESP_H
2#define _IP6T_ESP_H 2#define _IP6T_ESP_H
3 3
4struct ip6t_esp 4#include <linux/netfilter/xt_esp.h>
5{
6 u_int32_t spis[2]; /* Security Parameter Index */
7 u_int8_t invflags; /* Inverse flags */
8};
9 5
10/* Values for "invflags" field in struct ip6t_esp. */ 6#define ip6t_esp xt_esp
11#define IP6T_ESP_INV_SPI 0x01 /* Invert the sense of spi. */ 7#define IP6T_ESP_INV_SPI XT_ESP_INV_SPI
12#define IP6T_ESP_INV_MASK 0x01 /* All possible flags. */ 8#define IP6T_ESP_INV_MASK XT_ESP_INV_MASK
13 9
14#endif /*_IP6T_ESP_H*/ 10#endif /*_IP6T_ESP_H*/
diff --git a/include/linux/netfilter_ipv6/ip6t_multiport.h b/include/linux/netfilter_ipv6/ip6t_multiport.h
index efe4954a8681..042c92661cee 100644
--- a/include/linux/netfilter_ipv6/ip6t_multiport.h
+++ b/include/linux/netfilter_ipv6/ip6t_multiport.h
@@ -1,21 +1,14 @@
1#ifndef _IP6T_MULTIPORT_H 1#ifndef _IP6T_MULTIPORT_H
2#define _IP6T_MULTIPORT_H 2#define _IP6T_MULTIPORT_H
3#include <linux/netfilter_ipv6/ip6_tables.h>
4 3
5enum ip6t_multiport_flags 4#include <linux/netfilter/xt_multiport.h>
6{
7 IP6T_MULTIPORT_SOURCE,
8 IP6T_MULTIPORT_DESTINATION,
9 IP6T_MULTIPORT_EITHER
10};
11 5
12#define IP6T_MULTI_PORTS 15 6#define IP6T_MULTIPORT_SOURCE XT_MULTIPORT_SOURCE
7#define IP6T_MULTIPORT_DESTINATION XT_MULTIPORT_DESTINATION
8#define IP6T_MULTIPORT_EITHER XT_MULTIPORT_EITHER
13 9
14/* Must fit inside union ip6t_matchinfo: 16 bytes */ 10#define IP6T_MULTI_PORTS XT_MULTI_PORTS
15struct ip6t_multiport 11
16{ 12#define ip6t_multiport xt_multiport
17 u_int8_t flags; /* Type of comparison */ 13
18 u_int8_t count; /* Number of ports */ 14#endif /*_IP6T_MULTIPORT_H*/
19 u_int16_t ports[IP6T_MULTI_PORTS]; /* Ports */
20};
21#endif /*_IPT_MULTIPORT_H*/
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index 75c7f55023ab..d218fc729319 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -60,5 +60,8 @@ void free_pipe_info(struct inode* inode);
60 * add the splice flags here. 60 * add the splice flags here.
61 */ 61 */
62#define SPLICE_F_MOVE (0x01) /* move pages instead of copying */ 62#define SPLICE_F_MOVE (0x01) /* move pages instead of copying */
63#define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */
64 /* we may still block on the fd we splice */
65 /* from/to, of course */
63 66
64#endif 67#endif
diff --git a/include/linux/serio.h b/include/linux/serio.h
index 690aabca8ed0..6348e8330897 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -18,6 +18,7 @@
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/list.h> 19#include <linux/list.h>
20#include <linux/spinlock.h> 20#include <linux/spinlock.h>
21#include <linux/mutex.h>
21#include <linux/device.h> 22#include <linux/device.h>
22#include <linux/mod_devicetable.h> 23#include <linux/mod_devicetable.h>
23 24
@@ -42,7 +43,7 @@ struct serio {
42 struct serio *parent, *child; 43 struct serio *parent, *child;
43 44
44 struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ 45 struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */
45 struct semaphore drv_sem; /* protects serio->drv so attributes can pin driver */ 46 struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */
46 47
47 struct device dev; 48 struct device dev;
48 unsigned int registered; /* port has been fully registered with driver core */ 49 unsigned int registered; /* port has been fully registered with driver core */
@@ -151,17 +152,17 @@ static inline void serio_continue_rx(struct serio *serio)
151 */ 152 */
152static inline int serio_pin_driver(struct serio *serio) 153static inline int serio_pin_driver(struct serio *serio)
153{ 154{
154 return down_interruptible(&serio->drv_sem); 155 return mutex_lock_interruptible(&serio->drv_mutex);
155} 156}
156 157
157static inline void serio_pin_driver_uninterruptible(struct serio *serio) 158static inline void serio_pin_driver_uninterruptible(struct serio *serio)
158{ 159{
159 down(&serio->drv_sem); 160 mutex_lock(&serio->drv_mutex);
160} 161}
161 162
162static inline void serio_unpin_driver(struct serio *serio) 163static inline void serio_unpin_driver(struct serio *serio)
163{ 164{
164 up(&serio->drv_sem); 165 mutex_unlock(&serio->drv_mutex);
165} 166}
166 167
167 168
diff --git a/include/linux/uinput.h b/include/linux/uinput.h
index 0ff7ca68e5c5..7168302f9844 100644
--- a/include/linux/uinput.h
+++ b/include/linux/uinput.h
@@ -20,7 +20,7 @@
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 * 21 *
22 * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> 22 * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
23 * 23 *
24 * Changes/Revisions: 24 * Changes/Revisions:
25 * 0.2 16/10/2004 (Micah Dowty <micah@navi.cx>) 25 * 0.2 16/10/2004 (Micah Dowty <micah@navi.cx>)
26 * - added force feedback support 26 * - added force feedback support
@@ -51,7 +51,7 @@ struct uinput_request {
51 51
52struct uinput_device { 52struct uinput_device {
53 struct input_dev *dev; 53 struct input_dev *dev;
54 struct semaphore sem; 54 struct mutex mutex;
55 enum uinput_state state; 55 enum uinput_state state;
56 wait_queue_head_t waitq; 56 wait_queue_head_t waitq;
57 unsigned char ready; 57 unsigned char ready;
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index e100291e43f4..0d5529c382e8 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -242,7 +242,6 @@ extern int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo);
242 242
243extern void xfrm_state_delete_tunnel(struct xfrm_state *x); 243extern void xfrm_state_delete_tunnel(struct xfrm_state *x);
244 244
245struct xfrm_decap_state;
246struct xfrm_type 245struct xfrm_type
247{ 246{
248 char *description; 247 char *description;
@@ -251,7 +250,7 @@ struct xfrm_type
251 250
252 int (*init_state)(struct xfrm_state *x); 251 int (*init_state)(struct xfrm_state *x);
253 void (*destructor)(struct xfrm_state *); 252 void (*destructor)(struct xfrm_state *);
254 int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); 253 int (*input)(struct xfrm_state *, struct sk_buff *skb);
255 int (*output)(struct xfrm_state *, struct sk_buff *pskb); 254 int (*output)(struct xfrm_state *, struct sk_buff *pskb);
256 /* Estimate maximal size of result of transformation of a dgram */ 255 /* Estimate maximal size of result of transformation of a dgram */
257 u32 (*get_max_size)(struct xfrm_state *, int size); 256 u32 (*get_max_size)(struct xfrm_state *, int size);
@@ -606,25 +605,11 @@ static inline void xfrm_dst_destroy(struct xfrm_dst *xdst)
606 605
607extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); 606extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev);
608 607
609/* Decapsulation state, used by the input to store data during
610 * decapsulation procedure, to be used later (during the policy
611 * check
612 */
613struct xfrm_decap_state {
614 char decap_data[20];
615 __u16 decap_type;
616};
617
618struct sec_decap_state {
619 struct xfrm_state *xvec;
620 struct xfrm_decap_state decap;
621};
622
623struct sec_path 608struct sec_path
624{ 609{
625 atomic_t refcnt; 610 atomic_t refcnt;
626 int len; 611 int len;
627 struct sec_decap_state x[XFRM_MAX_DEPTH]; 612 struct xfrm_state *xvec[XFRM_MAX_DEPTH];
628}; 613};
629 614
630static inline struct sec_path * 615static inline struct sec_path *
diff --git a/include/pcmcia/bulkmem.h b/include/pcmcia/bulkmem.h
index b53b78d497ba..6bc7472293b2 100644
--- a/include/pcmcia/bulkmem.h
+++ b/include/pcmcia/bulkmem.h
@@ -35,7 +35,7 @@ typedef struct region_info_t {
35#define REGION_BAR_MASK 0xe000 35#define REGION_BAR_MASK 0xe000
36#define REGION_BAR_SHIFT 13 36#define REGION_BAR_SHIFT 13
37 37
38int pcmcia_get_first_region(client_handle_t handle, region_info_t *rgn); 38int pcmcia_get_first_region(struct pcmcia_device *handle, region_info_t *rgn);
39int pcmcia_get_next_region(client_handle_t handle, region_info_t *rgn); 39int pcmcia_get_next_region(struct pcmcia_device *handle, region_info_t *rgn);
40 40
41#endif /* _LINUX_BULKMEM_H */ 41#endif /* _LINUX_BULKMEM_H */
diff --git a/include/pcmcia/ciscode.h b/include/pcmcia/ciscode.h
index da19c297dd65..c1da8558339a 100644
--- a/include/pcmcia/ciscode.h
+++ b/include/pcmcia/ciscode.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * ciscode.h -- Definitions for bulk memory services 2 * ciscode.h
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as 5 * it under the terms of the GNU General Public License version 2 as
@@ -122,4 +122,7 @@
122 122
123#define MANFID_XIRCOM 0x0105 123#define MANFID_XIRCOM 0x0105
124 124
125#define MANFID_POSSIO 0x030c
126#define PRODID_POSSIO_GCC 0x0003
127
125#endif /* _LINUX_CISCODE_H */ 128#endif /* _LINUX_CISCODE_H */
diff --git a/include/pcmcia/cistpl.h b/include/pcmcia/cistpl.h
index c6a069554fd7..d3bbb19caf81 100644
--- a/include/pcmcia/cistpl.h
+++ b/include/pcmcia/cistpl.h
@@ -586,12 +586,7 @@ typedef struct cisdump_t {
586 cisdata_t Data[CISTPL_MAX_CIS_SIZE]; 586 cisdata_t Data[CISTPL_MAX_CIS_SIZE];
587} cisdump_t; 587} cisdump_t;
588 588
589int pcmcia_get_first_tuple(client_handle_t handle, tuple_t *tuple);
590int pcmcia_get_next_tuple(client_handle_t handle, tuple_t *tuple);
591int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple);
592int pcmcia_parse_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse);
593 589
594int pcmcia_validate_cis(client_handle_t handle, cisinfo_t *info);
595int pcmcia_replace_cis(struct pcmcia_socket *s, cisdump_t *cis); 590int pcmcia_replace_cis(struct pcmcia_socket *s, cisdump_t *cis);
596 591
597/* don't use outside of PCMCIA core yet */ 592/* don't use outside of PCMCIA core yet */
@@ -602,4 +597,20 @@ int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse);
602 597
603int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, cisinfo_t *info); 598int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, cisinfo_t *info);
604 599
600/* ... but use these wrappers instead */
601#define pcmcia_get_first_tuple(p_dev, tuple) \
602 pccard_get_first_tuple(p_dev->socket, p_dev->func, tuple)
603
604#define pcmcia_get_next_tuple(p_dev, tuple) \
605 pccard_get_next_tuple(p_dev->socket, p_dev->func, tuple)
606
607#define pcmcia_get_tuple_data(p_dev, tuple) \
608 pccard_get_tuple_data(p_dev->socket, tuple)
609
610#define pcmcia_parse_tuple(p_dev, tuple, parse) \
611 pccard_parse_tuple(tuple, parse)
612
613#define pcmcia_validate_cis(p_dev, info) \
614 pccard_validate_cis(p_dev->socket, p_dev->func, info)
615
605#endif /* LINUX_CISTPL_H */ 616#endif /* LINUX_CISTPL_H */
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h
index 52660f32663d..d5838c30d20f 100644
--- a/include/pcmcia/cs.h
+++ b/include/pcmcia/cs.h
@@ -109,17 +109,6 @@ typedef struct client_req_t {
109 109
110#define CLIENT_THIS_SOCKET 0x01 110#define CLIENT_THIS_SOCKET 0x01
111 111
112/* For RegisterClient */
113typedef struct client_reg_t {
114 dev_info_t *dev_info;
115 u_int Attributes; /* UNUSED */
116 u_int EventMask;
117 int (*event_handler)(event_t event, int priority,
118 event_callback_args_t *);
119 event_callback_args_t event_callback_args;
120 u_int Version;
121} client_reg_t;
122
123/* ModifyConfiguration */ 112/* ModifyConfiguration */
124typedef struct modconf_t { 113typedef struct modconf_t {
125 u_int Attributes; 114 u_int Attributes;
@@ -127,15 +116,16 @@ typedef struct modconf_t {
127} modconf_t; 116} modconf_t;
128 117
129/* Attributes for ModifyConfiguration */ 118/* Attributes for ModifyConfiguration */
130#define CONF_IRQ_CHANGE_VALID 0x100 119#define CONF_IRQ_CHANGE_VALID 0x0100
131#define CONF_VCC_CHANGE_VALID 0x200 120#define CONF_VCC_CHANGE_VALID 0x0200
132#define CONF_VPP1_CHANGE_VALID 0x400 121#define CONF_VPP1_CHANGE_VALID 0x0400
133#define CONF_VPP2_CHANGE_VALID 0x800 122#define CONF_VPP2_CHANGE_VALID 0x0800
123#define CONF_IO_CHANGE_WIDTH 0x1000
134 124
135/* For RequestConfiguration */ 125/* For RequestConfiguration */
136typedef struct config_req_t { 126typedef struct config_req_t {
137 u_int Attributes; 127 u_int Attributes;
138 u_int Vcc, Vpp1, Vpp2; 128 u_int Vpp; /* both Vpp1 and Vpp2 */
139 u_int IntType; 129 u_int IntType;
140 u_int ConfigBase; 130 u_int ConfigBase;
141 u_char Status, Pin, Copy, ExtStatus; 131 u_char Status, Pin, Copy, ExtStatus;
@@ -389,23 +379,27 @@ int pcmcia_get_status(struct pcmcia_device *p_dev, cs_status_t *status);
389int pcmcia_get_mem_page(window_handle_t win, memreq_t *req); 379int pcmcia_get_mem_page(window_handle_t win, memreq_t *req);
390int pcmcia_map_mem_page(window_handle_t win, memreq_t *req); 380int pcmcia_map_mem_page(window_handle_t win, memreq_t *req);
391int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod); 381int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod);
392int pcmcia_release_configuration(struct pcmcia_device *p_dev);
393int pcmcia_release_io(struct pcmcia_device *p_dev, io_req_t *req);
394int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req);
395int pcmcia_release_window(window_handle_t win); 382int pcmcia_release_window(window_handle_t win);
396int pcmcia_request_configuration(struct pcmcia_device *p_dev, config_req_t *req); 383int pcmcia_request_configuration(struct pcmcia_device *p_dev, config_req_t *req);
397int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req); 384int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req);
398int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req); 385int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req);
399int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh); 386int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh);
400int pcmcia_reset_card(struct pcmcia_device *p_dev, client_req_t *req);
401int pcmcia_suspend_card(struct pcmcia_socket *skt); 387int pcmcia_suspend_card(struct pcmcia_socket *skt);
402int pcmcia_resume_card(struct pcmcia_socket *skt); 388int pcmcia_resume_card(struct pcmcia_socket *skt);
403int pcmcia_eject_card(struct pcmcia_socket *skt); 389int pcmcia_eject_card(struct pcmcia_socket *skt);
404int pcmcia_insert_card(struct pcmcia_socket *skt); 390int pcmcia_insert_card(struct pcmcia_socket *skt);
391int pccard_reset_card(struct pcmcia_socket *skt);
392
393struct pcmcia_device * pcmcia_dev_present(struct pcmcia_device *p_dev);
394void pcmcia_disable_device(struct pcmcia_device *p_dev);
405 395
406struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt); 396struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt);
407void pcmcia_put_socket(struct pcmcia_socket *skt); 397void pcmcia_put_socket(struct pcmcia_socket *skt);
408 398
399/* compatibility functions */
400#define pcmcia_reset_card(p_dev, req) \
401 pccard_reset_card(p_dev->socket)
402
409#endif /* __KERNEL__ */ 403#endif /* __KERNEL__ */
410 404
411#endif /* _LINUX_CS_H */ 405#endif /* _LINUX_CS_H */
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index 8e2a96396478..8c339f5678cf 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -39,7 +39,7 @@ typedef struct win_info_t {
39typedef struct bind_info_t { 39typedef struct bind_info_t {
40 dev_info_t dev_info; 40 dev_info_t dev_info;
41 u_char function; 41 u_char function;
42 struct dev_link_t *instance; 42 struct pcmcia_device *instance;
43 char name[DEV_NAME_LEN]; 43 char name[DEV_NAME_LEN];
44 u_short major, minor; 44 u_short major, minor;
45 void *next; 45 void *next;
@@ -96,6 +96,7 @@ typedef union ds_ioctl_arg_t {
96 96
97#ifdef __KERNEL__ 97#ifdef __KERNEL__
98#include <linux/device.h> 98#include <linux/device.h>
99#include <pcmcia/ss.h>
99 100
100typedef struct dev_node_t { 101typedef struct dev_node_t {
101 char dev_name[DEV_NAME_LEN]; 102 char dev_name[DEV_NAME_LEN];
@@ -103,34 +104,9 @@ typedef struct dev_node_t {
103 struct dev_node_t *next; 104 struct dev_node_t *next;
104} dev_node_t; 105} dev_node_t;
105 106
106typedef struct dev_link_t {
107 dev_node_t *dev;
108 u_int state, open;
109 wait_queue_head_t pending;
110 client_handle_t handle;
111 io_req_t io;
112 irq_req_t irq;
113 config_req_t conf;
114 window_handle_t win;
115 void *priv;
116 struct dev_link_t *next;
117} dev_link_t;
118
119/* Flags for device state */
120#define DEV_PRESENT 0x01
121#define DEV_CONFIG 0x02
122#define DEV_STALE_CONFIG 0x04 /* release on close */
123#define DEV_STALE_LINK 0x08 /* detach on release */
124#define DEV_CONFIG_PENDING 0x10
125#define DEV_RELEASE_PENDING 0x20
126#define DEV_SUSPEND 0x40
127#define DEV_BUSY 0x80
128
129#define DEV_OK(l) \
130 ((l) && ((l->state & ~DEV_BUSY) == (DEV_CONFIG|DEV_PRESENT)))
131
132 107
133struct pcmcia_socket; 108struct pcmcia_socket;
109struct config_t;
134 110
135struct pcmcia_driver { 111struct pcmcia_driver {
136 int (*probe) (struct pcmcia_device *dev); 112 int (*probe) (struct pcmcia_device *dev);
@@ -148,6 +124,7 @@ struct pcmcia_driver {
148int pcmcia_register_driver(struct pcmcia_driver *driver); 124int pcmcia_register_driver(struct pcmcia_driver *driver);
149void pcmcia_unregister_driver(struct pcmcia_driver *driver); 125void pcmcia_unregister_driver(struct pcmcia_driver *driver);
150 126
127
151struct pcmcia_device { 128struct pcmcia_device {
152 /* the socket and the device_no [for multifunction devices] 129 /* the socket and the device_no [for multifunction devices]
153 uniquely define a pcmcia_device */ 130 uniquely define a pcmcia_device */
@@ -160,21 +137,40 @@ struct pcmcia_device {
160 /* the hardware "function" device; certain subdevices can 137 /* the hardware "function" device; certain subdevices can
161 * share one hardware "function" device. */ 138 * share one hardware "function" device. */
162 u8 func; 139 u8 func;
140 struct config_t* function_config;
163 141
164 struct list_head socket_device_list; 142 struct list_head socket_device_list;
165 143
166 /* deprecated, a cleaned up version will be moved into this 144 /* deprecated, will be cleaned up soon */
167 struct soon */ 145 dev_node_t *dev_node;
168 dev_link_t *instance; 146 u_int open;
169 u_int state; 147 io_req_t io;
148 irq_req_t irq;
149 config_req_t conf;
150 window_handle_t win;
151
152 /* Is the device suspended, or in the process of
153 * being removed? */
154 u16 suspended:1;
155 u16 _removed:1;
156
157 /* Flags whether io, irq, win configurations were
158 * requested, and whether the configuration is "locked" */
159 u16 _irq:1;
160 u16 _io:1;
161 u16 _win:4;
162 u16 _locked:1;
163
164 /* Flag whether a "fuzzy" func_id based match is
165 * allowed. */
166 u16 allow_func_id_match:1;
170 167
171 /* information about this device */ 168 /* information about this device */
172 u8 has_manf_id:1; 169 u16 has_manf_id:1;
173 u8 has_card_id:1; 170 u16 has_card_id:1;
174 u8 has_func_id:1; 171 u16 has_func_id:1;
175 172
176 u8 allow_func_id_match:1; 173 u16 reserved:3;
177 u8 reserved:4;
178 174
179 u8 func_id; 175 u8 func_id;
180 u16 manf_id; 176 u16 manf_id;
@@ -182,22 +178,24 @@ struct pcmcia_device {
182 178
183 char * prod_id[4]; 179 char * prod_id[4];
184 180
181 struct device dev;
182
183#ifdef CONFIG_PCMCIA_IOCTL
185 /* device driver wanted by cardmgr */ 184 /* device driver wanted by cardmgr */
186 struct pcmcia_driver * cardmgr; 185 struct pcmcia_driver * cardmgr;
186#endif
187 187
188 struct device dev; 188 /* data private to drivers */
189 void *priv;
189}; 190};
190 191
191#define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev) 192#define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev)
192#define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv) 193#define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv)
193 194
194#define handle_to_pdev(handle) (handle)
195#define handle_to_dev(handle) (handle->dev) 195#define handle_to_dev(handle) (handle->dev)
196 196
197#define dev_to_instance(dev) (dev->instance)
198
199/* error reporting */ 197/* error reporting */
200void cs_error(client_handle_t handle, int func, int ret); 198void cs_error(struct pcmcia_device *handle, int func, int ret);
201 199
202#endif /* __KERNEL__ */ 200#endif /* __KERNEL__ */
203#endif /* _LINUX_DS_H */ 201#endif /* _LINUX_DS_H */
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h
index 2889a69a7a8f..5e0a01ab2216 100644
--- a/include/pcmcia/ss.h
+++ b/include/pcmcia/ss.h
@@ -18,6 +18,7 @@
18#include <linux/config.h> 18#include <linux/config.h>
19#include <linux/device.h> 19#include <linux/device.h>
20#include <linux/sched.h> /* task_struct, completion */ 20#include <linux/sched.h> /* task_struct, completion */
21#include <linux/mutex.h>
21 22
22#include <pcmcia/cs_types.h> 23#include <pcmcia/cs_types.h>
23#include <pcmcia/cs.h> 24#include <pcmcia/cs.h>
@@ -146,14 +147,15 @@ extern struct pccard_resource_ops pccard_static_ops;
146/* !SS_CAP_STATIC_MAP */ 147/* !SS_CAP_STATIC_MAP */
147extern struct pccard_resource_ops pccard_nonstatic_ops; 148extern struct pccard_resource_ops pccard_nonstatic_ops;
148 149
150/* static mem, dynamic IO sockets */
151extern struct pccard_resource_ops pccard_iodyn_ops;
152
149/* 153/*
150 * Calls to set up low-level "Socket Services" drivers 154 * Calls to set up low-level "Socket Services" drivers
151 */ 155 */
152struct pcmcia_socket; 156struct pcmcia_socket;
153 157
154typedef struct io_window_t { 158typedef struct io_window_t {
155 u_int Attributes;
156 kio_addr_t BasePort, NumPorts;
157 kio_addr_t InUse, Config; 159 kio_addr_t InUse, Config;
158 struct resource *res; 160 struct resource *res;
159} io_window_t; 161} io_window_t;
@@ -162,7 +164,7 @@ typedef struct io_window_t {
162typedef struct window_t { 164typedef struct window_t {
163 u_short magic; 165 u_short magic;
164 u_short index; 166 u_short index;
165 client_handle_t handle; 167 struct pcmcia_device *handle;
166 struct pcmcia_socket *sock; 168 struct pcmcia_socket *sock;
167 pccard_mem_map ctl; 169 pccard_mem_map ctl;
168} window_t; 170} window_t;
@@ -186,7 +188,6 @@ struct pcmcia_socket {
186 u_short lock_count; 188 u_short lock_count;
187 pccard_mem_map cis_mem; 189 pccard_mem_map cis_mem;
188 void __iomem *cis_virt; 190 void __iomem *cis_virt;
189 struct config_t *config;
190 struct { 191 struct {
191 u_int AssignedIRQ; 192 u_int AssignedIRQ;
192 u_int Config; 193 u_int Config;
@@ -241,7 +242,7 @@ struct pcmcia_socket {
241#endif 242#endif
242 243
243 /* state thread */ 244 /* state thread */
244 struct semaphore skt_sem; /* protects socket h/w state */ 245 struct mutex skt_mutex; /* protects socket h/w state */
245 246
246 struct task_struct *thread; 247 struct task_struct *thread;
247 struct completion thread_done; 248 struct completion thread_done;