diff options
Diffstat (limited to 'include/linux')
77 files changed, 2002 insertions, 644 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index f317c270d4bf..127d2d192b5a 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -49,6 +49,7 @@ header-y += consolemap.h | |||
49 | header-y += const.h | 49 | header-y += const.h |
50 | header-y += cycx_cfm.h | 50 | header-y += cycx_cfm.h |
51 | header-y += dlm_device.h | 51 | header-y += dlm_device.h |
52 | header-y += dlm_netlink.h | ||
52 | header-y += dm-ioctl.h | 53 | header-y += dm-ioctl.h |
53 | header-y += dn.h | 54 | header-y += dn.h |
54 | header-y += dqblk_v1.h | 55 | header-y += dqblk_v1.h |
@@ -90,7 +91,6 @@ header-y += in6.h | |||
90 | header-y += in_route.h | 91 | header-y += in_route.h |
91 | header-y += ioctl.h | 92 | header-y += ioctl.h |
92 | header-y += ipmi_msgdefs.h | 93 | header-y += ipmi_msgdefs.h |
93 | header-y += ip_mp_alg.h | ||
94 | header-y += ipsec.h | 94 | header-y += ipsec.h |
95 | header-y += ipx.h | 95 | header-y += ipx.h |
96 | header-y += irda.h | 96 | header-y += irda.h |
@@ -225,6 +225,7 @@ unifdef-y += if_fddi.h | |||
225 | unifdef-y += if_frad.h | 225 | unifdef-y += if_frad.h |
226 | unifdef-y += if_ltalk.h | 226 | unifdef-y += if_ltalk.h |
227 | unifdef-y += if_link.h | 227 | unifdef-y += if_link.h |
228 | unifdef-y += if_pppol2tp.h | ||
228 | unifdef-y += if_pppox.h | 229 | unifdef-y += if_pppox.h |
229 | unifdef-y += if_shaper.h | 230 | unifdef-y += if_shaper.h |
230 | unifdef-y += if_tr.h | 231 | unifdef-y += if_tr.h |
diff --git a/include/linux/aer.h b/include/linux/aer.h index 402e178b38eb..509656286e53 100644 --- a/include/linux/aer.h +++ b/include/linux/aer.h | |||
@@ -13,11 +13,13 @@ extern int pci_enable_pcie_error_reporting(struct pci_dev *dev); | |||
13 | extern int pci_find_aer_capability(struct pci_dev *dev); | 13 | extern int pci_find_aer_capability(struct pci_dev *dev); |
14 | extern int pci_disable_pcie_error_reporting(struct pci_dev *dev); | 14 | extern int pci_disable_pcie_error_reporting(struct pci_dev *dev); |
15 | extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); | 15 | extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); |
16 | extern int pci_cleanup_aer_correct_error_status(struct pci_dev *dev); | ||
16 | #else | 17 | #else |
17 | #define pci_enable_pcie_error_reporting(dev) do { } while (0) | 18 | #define pci_enable_pcie_error_reporting(dev) (-EINVAL) |
18 | #define pci_find_aer_capability(dev) do { } while (0) | 19 | #define pci_find_aer_capability(dev) (0) |
19 | #define pci_disable_pcie_error_reporting(dev) do { } while (0) | 20 | #define pci_disable_pcie_error_reporting(dev) (-EINVAL) |
20 | #define pci_cleanup_aer_uncorrect_error_status(dev) do { } while (0) | 21 | #define pci_cleanup_aer_uncorrect_error_status(dev) (-EINVAL) |
22 | #define pci_cleanup_aer_correct_error_status(dev) (-EINVAL) | ||
21 | #endif | 23 | #endif |
22 | 24 | ||
23 | #endif //_AER_H_ | 25 | #endif //_AER_H_ |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 703febb2df31..b5a20162af32 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -126,6 +126,7 @@ enum { | |||
126 | ATA_REG_IRQ = ATA_REG_NSECT, | 126 | ATA_REG_IRQ = ATA_REG_NSECT, |
127 | 127 | ||
128 | /* ATA device commands */ | 128 | /* ATA device commands */ |
129 | ATA_CMD_DEV_RESET = 0x08, /* ATAPI device reset */ | ||
129 | ATA_CMD_CHK_POWER = 0xE5, /* check power mode */ | 130 | ATA_CMD_CHK_POWER = 0xE5, /* check power mode */ |
130 | ATA_CMD_STANDBY = 0xE2, /* place in standby power mode */ | 131 | ATA_CMD_STANDBY = 0xE2, /* place in standby power mode */ |
131 | ATA_CMD_IDLE = 0xE3, /* place in idle power mode */ | 132 | ATA_CMD_IDLE = 0xE3, /* place in idle power mode */ |
@@ -163,6 +164,8 @@ enum { | |||
163 | ATA_CMD_SET_MAX = 0xF9, | 164 | ATA_CMD_SET_MAX = 0xF9, |
164 | ATA_CMD_SET_MAX_EXT = 0x37, | 165 | ATA_CMD_SET_MAX_EXT = 0x37, |
165 | ATA_CMD_READ_LOG_EXT = 0x2f, | 166 | ATA_CMD_READ_LOG_EXT = 0x2f, |
167 | ATA_CMD_PMP_READ = 0xE4, | ||
168 | ATA_CMD_PMP_WRITE = 0xE8, | ||
166 | 169 | ||
167 | /* READ_LOG_EXT pages */ | 170 | /* READ_LOG_EXT pages */ |
168 | ATA_LOG_SATA_NCQ = 0x10, | 171 | ATA_LOG_SATA_NCQ = 0x10, |
@@ -211,6 +214,28 @@ enum { | |||
211 | 0=to device, 1=to host */ | 214 | 0=to device, 1=to host */ |
212 | ATAPI_CDB_LEN = 16, | 215 | ATAPI_CDB_LEN = 16, |
213 | 216 | ||
217 | /* PMP stuff */ | ||
218 | SATA_PMP_MAX_PORTS = 15, | ||
219 | SATA_PMP_CTRL_PORT = 15, | ||
220 | |||
221 | SATA_PMP_GSCR_DWORDS = 128, | ||
222 | SATA_PMP_GSCR_PROD_ID = 0, | ||
223 | SATA_PMP_GSCR_REV = 1, | ||
224 | SATA_PMP_GSCR_PORT_INFO = 2, | ||
225 | SATA_PMP_GSCR_ERROR = 32, | ||
226 | SATA_PMP_GSCR_ERROR_EN = 33, | ||
227 | SATA_PMP_GSCR_FEAT = 64, | ||
228 | SATA_PMP_GSCR_FEAT_EN = 96, | ||
229 | |||
230 | SATA_PMP_PSCR_STATUS = 0, | ||
231 | SATA_PMP_PSCR_ERROR = 1, | ||
232 | SATA_PMP_PSCR_CONTROL = 2, | ||
233 | |||
234 | SATA_PMP_FEAT_BIST = (1 << 0), | ||
235 | SATA_PMP_FEAT_PMREQ = (1 << 1), | ||
236 | SATA_PMP_FEAT_DYNSSC = (1 << 2), | ||
237 | SATA_PMP_FEAT_NOTIFY = (1 << 3), | ||
238 | |||
214 | /* cable types */ | 239 | /* cable types */ |
215 | ATA_CBL_NONE = 0, | 240 | ATA_CBL_NONE = 0, |
216 | ATA_CBL_PATA40 = 1, | 241 | ATA_CBL_PATA40 = 1, |
@@ -417,4 +442,9 @@ static inline int lba_48_ok(u64 block, u32 n_block) | |||
417 | return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536); | 442 | return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536); |
418 | } | 443 | } |
419 | 444 | ||
445 | #define sata_pmp_gscr_vendor(gscr) ((gscr)[SATA_PMP_GSCR_PROD_ID] & 0xffff) | ||
446 | #define sata_pmp_gscr_devid(gscr) ((gscr)[SATA_PMP_GSCR_PROD_ID] >> 16) | ||
447 | #define sata_pmp_gscr_rev(gscr) (((gscr)[SATA_PMP_GSCR_REV] >> 8) & 0xff) | ||
448 | #define sata_pmp_gscr_ports(gscr) ((gscr)[SATA_PMP_GSCR_PORT_INFO] & 0xf) | ||
449 | |||
420 | #endif /* __LINUX_ATA_H__ */ | 450 | #endif /* __LINUX_ATA_H__ */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index db5b00a792f5..fae138bd2207 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -868,11 +868,6 @@ void kblockd_flush_work(struct work_struct *work); | |||
868 | */ | 868 | */ |
869 | #define buffer_heads_over_limit 0 | 869 | #define buffer_heads_over_limit 0 |
870 | 870 | ||
871 | static inline long blk_congestion_wait(int rw, long timeout) | ||
872 | { | ||
873 | return io_schedule_timeout(timeout); | ||
874 | } | ||
875 | |||
876 | static inline long nr_blockdev_pages(void) | 871 | static inline long nr_blockdev_pages(void) |
877 | { | 872 | { |
878 | return 0; | 873 | return 0; |
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 5a9c49534d08..104e51e20e14 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
@@ -38,6 +38,9 @@ struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent, | |||
38 | 38 | ||
39 | void debugfs_remove(struct dentry *dentry); | 39 | void debugfs_remove(struct dentry *dentry); |
40 | 40 | ||
41 | struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, | ||
42 | struct dentry *new_dir, const char *new_name); | ||
43 | |||
41 | struct dentry *debugfs_create_u8(const char *name, mode_t mode, | 44 | struct dentry *debugfs_create_u8(const char *name, mode_t mode, |
42 | struct dentry *parent, u8 *value); | 45 | struct dentry *parent, u8 *value); |
43 | struct dentry *debugfs_create_u16(const char *name, mode_t mode, | 46 | struct dentry *debugfs_create_u16(const char *name, mode_t mode, |
@@ -85,6 +88,12 @@ static inline struct dentry *debugfs_create_symlink(const char *name, | |||
85 | static inline void debugfs_remove(struct dentry *dentry) | 88 | static inline void debugfs_remove(struct dentry *dentry) |
86 | { } | 89 | { } |
87 | 90 | ||
91 | static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, | ||
92 | struct dentry *new_dir, char *new_name) | ||
93 | { | ||
94 | return ERR_PTR(-ENODEV); | ||
95 | } | ||
96 | |||
88 | static inline struct dentry *debugfs_create_u8(const char *name, mode_t mode, | 97 | static inline struct dentry *debugfs_create_u8(const char *name, mode_t mode, |
89 | struct dentry *parent, | 98 | struct dentry *parent, |
90 | u8 *value) | 99 | u8 *value) |
diff --git a/include/linux/device.h b/include/linux/device.h index 2e1a2988b7e1..be2debed70d2 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -238,7 +238,6 @@ extern int __must_check class_device_create_file(struct class_device *, | |||
238 | * @devt: for internal use by the driver core only. | 238 | * @devt: for internal use by the driver core only. |
239 | * @node: for internal use by the driver core only. | 239 | * @node: for internal use by the driver core only. |
240 | * @kobj: for internal use by the driver core only. | 240 | * @kobj: for internal use by the driver core only. |
241 | * @devt_attr: for internal use by the driver core only. | ||
242 | * @groups: optional additional groups to be created | 241 | * @groups: optional additional groups to be created |
243 | * @dev: if set, a symlink to the struct device is created in the sysfs | 242 | * @dev: if set, a symlink to the struct device is created in the sysfs |
244 | * directory for this struct class device. | 243 | * directory for this struct class device. |
@@ -263,8 +262,6 @@ struct class_device { | |||
263 | struct kobject kobj; | 262 | struct kobject kobj; |
264 | struct class * class; /* required */ | 263 | struct class * class; /* required */ |
265 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 264 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
266 | struct class_device_attribute *devt_attr; | ||
267 | struct class_device_attribute uevent_attr; | ||
268 | struct device * dev; /* not necessary, but nice to have */ | 265 | struct device * dev; /* not necessary, but nice to have */ |
269 | void * class_data; /* class-specific data */ | 266 | void * class_data; /* class-specific data */ |
270 | struct class_device *parent; /* parent of this child device, if there is one */ | 267 | struct class_device *parent; /* parent of this child device, if there is one */ |
@@ -419,8 +416,6 @@ struct device { | |||
419 | struct device_type *type; | 416 | struct device_type *type; |
420 | unsigned is_registered:1; | 417 | unsigned is_registered:1; |
421 | unsigned uevent_suppress:1; | 418 | unsigned uevent_suppress:1; |
422 | struct device_attribute uevent_attr; | ||
423 | struct device_attribute *devt_attr; | ||
424 | 419 | ||
425 | struct semaphore sem; /* semaphore to synchronize calls to | 420 | struct semaphore sem; /* semaphore to synchronize calls to |
426 | * its driver. | 421 | * its driver. |
diff --git a/include/linux/dlm.h b/include/linux/dlm.h index 1b1dcb9a40bb..be9d278761e0 100644 --- a/include/linux/dlm.h +++ b/include/linux/dlm.h | |||
@@ -2,7 +2,7 @@ | |||
2 | ******************************************************************************* | 2 | ******************************************************************************* |
3 | ** | 3 | ** |
4 | ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | 4 | ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
5 | ** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. | 5 | ** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. |
6 | ** | 6 | ** |
7 | ** This copyrighted material is made available to anyone wishing to use, | 7 | ** This copyrighted material is made available to anyone wishing to use, |
8 | ** modify, copy, or redistribute it subject to the terms and conditions | 8 | ** modify, copy, or redistribute it subject to the terms and conditions |
@@ -85,7 +85,11 @@ | |||
85 | * Only relevant to locks originating in userspace. A persistent lock will not | 85 | * Only relevant to locks originating in userspace. A persistent lock will not |
86 | * be removed if the process holding the lock exits. | 86 | * be removed if the process holding the lock exits. |
87 | * | 87 | * |
88 | * DLM_LKF_NODLKWT | 88 | * DLM_LKF_NODLCKWT |
89 | * | ||
90 | * Do not cancel the lock if it gets into conversion deadlock. | ||
91 | * Exclude this lock from being monitored due to DLM_LSFL_TIMEWARN. | ||
92 | * | ||
89 | * DLM_LKF_NODLCKBLK | 93 | * DLM_LKF_NODLCKBLK |
90 | * | 94 | * |
91 | * net yet implemented | 95 | * net yet implemented |
@@ -149,6 +153,7 @@ | |||
149 | #define DLM_LKF_ALTPR 0x00008000 | 153 | #define DLM_LKF_ALTPR 0x00008000 |
150 | #define DLM_LKF_ALTCW 0x00010000 | 154 | #define DLM_LKF_ALTCW 0x00010000 |
151 | #define DLM_LKF_FORCEUNLOCK 0x00020000 | 155 | #define DLM_LKF_FORCEUNLOCK 0x00020000 |
156 | #define DLM_LKF_TIMEOUT 0x00040000 | ||
152 | 157 | ||
153 | /* | 158 | /* |
154 | * Some return codes that are not in errno.h | 159 | * Some return codes that are not in errno.h |
@@ -199,11 +204,12 @@ struct dlm_lksb { | |||
199 | char * sb_lvbptr; | 204 | char * sb_lvbptr; |
200 | }; | 205 | }; |
201 | 206 | ||
207 | #define DLM_LSFL_NODIR 0x00000001 | ||
208 | #define DLM_LSFL_TIMEWARN 0x00000002 | ||
209 | #define DLM_LSFL_FS 0x00000004 | ||
202 | 210 | ||
203 | #ifdef __KERNEL__ | 211 | #ifdef __KERNEL__ |
204 | 212 | ||
205 | #define DLM_LSFL_NODIR 0x00000001 | ||
206 | |||
207 | /* | 213 | /* |
208 | * dlm_new_lockspace | 214 | * dlm_new_lockspace |
209 | * | 215 | * |
diff --git a/include/linux/dlm_device.h b/include/linux/dlm_device.h index c2735cab2ebf..9642277a152a 100644 --- a/include/linux/dlm_device.h +++ b/include/linux/dlm_device.h | |||
@@ -2,7 +2,7 @@ | |||
2 | ******************************************************************************* | 2 | ******************************************************************************* |
3 | ** | 3 | ** |
4 | ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | 4 | ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
5 | ** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. | 5 | ** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. |
6 | ** | 6 | ** |
7 | ** This copyrighted material is made available to anyone wishing to use, | 7 | ** This copyrighted material is made available to anyone wishing to use, |
8 | ** modify, copy, or redistribute it subject to the terms and conditions | 8 | ** modify, copy, or redistribute it subject to the terms and conditions |
@@ -18,21 +18,24 @@ | |||
18 | #define DLM_USER_LVB_LEN 32 | 18 | #define DLM_USER_LVB_LEN 32 |
19 | 19 | ||
20 | /* Version of the device interface */ | 20 | /* Version of the device interface */ |
21 | #define DLM_DEVICE_VERSION_MAJOR 5 | 21 | #define DLM_DEVICE_VERSION_MAJOR 6 |
22 | #define DLM_DEVICE_VERSION_MINOR 1 | 22 | #define DLM_DEVICE_VERSION_MINOR 0 |
23 | #define DLM_DEVICE_VERSION_PATCH 0 | 23 | #define DLM_DEVICE_VERSION_PATCH 0 |
24 | 24 | ||
25 | /* struct passed to the lock write */ | 25 | /* struct passed to the lock write */ |
26 | struct dlm_lock_params { | 26 | struct dlm_lock_params { |
27 | __u8 mode; | 27 | __u8 mode; |
28 | __u8 namelen; | 28 | __u8 namelen; |
29 | __u16 flags; | 29 | __u16 unused; |
30 | __u32 flags; | ||
30 | __u32 lkid; | 31 | __u32 lkid; |
31 | __u32 parent; | 32 | __u32 parent; |
32 | void __user *castparam; | 33 | __u64 xid; |
34 | __u64 timeout; | ||
35 | void __user *castparam; | ||
33 | void __user *castaddr; | 36 | void __user *castaddr; |
34 | void __user *bastparam; | 37 | void __user *bastparam; |
35 | void __user *bastaddr; | 38 | void __user *bastaddr; |
36 | struct dlm_lksb __user *lksb; | 39 | struct dlm_lksb __user *lksb; |
37 | char lvb[DLM_USER_LVB_LEN]; | 40 | char lvb[DLM_USER_LVB_LEN]; |
38 | char name[0]; | 41 | char name[0]; |
@@ -62,9 +65,15 @@ struct dlm_write_request { | |||
62 | } i; | 65 | } i; |
63 | }; | 66 | }; |
64 | 67 | ||
68 | struct dlm_device_version { | ||
69 | __u32 version[3]; | ||
70 | }; | ||
71 | |||
65 | /* struct read from the "device" fd, | 72 | /* struct read from the "device" fd, |
66 | consists mainly of userspace pointers for the library to use */ | 73 | consists mainly of userspace pointers for the library to use */ |
74 | |||
67 | struct dlm_lock_result { | 75 | struct dlm_lock_result { |
76 | __u32 version[3]; | ||
68 | __u32 length; | 77 | __u32 length; |
69 | void __user * user_astaddr; | 78 | void __user * user_astaddr; |
70 | void __user * user_astparam; | 79 | void __user * user_astparam; |
@@ -83,6 +92,7 @@ struct dlm_lock_result { | |||
83 | #define DLM_USER_CREATE_LOCKSPACE 4 | 92 | #define DLM_USER_CREATE_LOCKSPACE 4 |
84 | #define DLM_USER_REMOVE_LOCKSPACE 5 | 93 | #define DLM_USER_REMOVE_LOCKSPACE 5 |
85 | #define DLM_USER_PURGE 6 | 94 | #define DLM_USER_PURGE 6 |
95 | #define DLM_USER_DEADLOCK 7 | ||
86 | 96 | ||
87 | /* Arbitrary length restriction */ | 97 | /* Arbitrary length restriction */ |
88 | #define MAX_LS_NAME_LEN 64 | 98 | #define MAX_LS_NAME_LEN 64 |
diff --git a/include/linux/dlm_netlink.h b/include/linux/dlm_netlink.h new file mode 100644 index 000000000000..19276332707a --- /dev/null +++ b/include/linux/dlm_netlink.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Red Hat, Inc. All rights reserved. | ||
3 | * | ||
4 | * This copyrighted material is made available to anyone wishing to use, | ||
5 | * modify, copy, or redistribute it subject to the terms and conditions | ||
6 | * of the GNU General Public License v.2. | ||
7 | */ | ||
8 | |||
9 | #ifndef _DLM_NETLINK_H | ||
10 | #define _DLM_NETLINK_H | ||
11 | |||
12 | enum { | ||
13 | DLM_STATUS_WAITING = 1, | ||
14 | DLM_STATUS_GRANTED = 2, | ||
15 | DLM_STATUS_CONVERT = 3, | ||
16 | }; | ||
17 | |||
18 | #define DLM_LOCK_DATA_VERSION 1 | ||
19 | |||
20 | struct dlm_lock_data { | ||
21 | uint16_t version; | ||
22 | uint32_t lockspace_id; | ||
23 | int nodeid; | ||
24 | int ownpid; | ||
25 | uint32_t id; | ||
26 | uint32_t remid; | ||
27 | uint64_t xid; | ||
28 | int8_t status; | ||
29 | int8_t grmode; | ||
30 | int8_t rqmode; | ||
31 | unsigned long timestamp; | ||
32 | int resource_namelen; | ||
33 | char resource_name[DLM_RESNAME_MAXLEN]; | ||
34 | }; | ||
35 | |||
36 | enum { | ||
37 | DLM_CMD_UNSPEC = 0, | ||
38 | DLM_CMD_HELLO, /* user->kernel */ | ||
39 | DLM_CMD_TIMEOUT, /* kernel->user */ | ||
40 | __DLM_CMD_MAX, | ||
41 | }; | ||
42 | |||
43 | #define DLM_CMD_MAX (__DLM_CMD_MAX - 1) | ||
44 | |||
45 | enum { | ||
46 | DLM_TYPE_UNSPEC = 0, | ||
47 | DLM_TYPE_LOCK, | ||
48 | __DLM_TYPE_MAX, | ||
49 | }; | ||
50 | |||
51 | #define DLM_TYPE_MAX (__DLM_TYPE_MAX - 1) | ||
52 | |||
53 | #define DLM_GENL_VERSION 0x1 | ||
54 | #define DLM_GENL_NAME "DLM" | ||
55 | |||
56 | #endif /* _DLM_NETLINK_H */ | ||
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index 904bf3d2d90b..b8ac7b01c45e 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -12,9 +12,17 @@ enum dmi_field { | |||
12 | DMI_PRODUCT_NAME, | 12 | DMI_PRODUCT_NAME, |
13 | DMI_PRODUCT_VERSION, | 13 | DMI_PRODUCT_VERSION, |
14 | DMI_PRODUCT_SERIAL, | 14 | DMI_PRODUCT_SERIAL, |
15 | DMI_PRODUCT_UUID, | ||
15 | DMI_BOARD_VENDOR, | 16 | DMI_BOARD_VENDOR, |
16 | DMI_BOARD_NAME, | 17 | DMI_BOARD_NAME, |
17 | DMI_BOARD_VERSION, | 18 | DMI_BOARD_VERSION, |
19 | DMI_BOARD_SERIAL, | ||
20 | DMI_BOARD_ASSET_TAG, | ||
21 | DMI_CHASSIS_VENDOR, | ||
22 | DMI_CHASSIS_TYPE, | ||
23 | DMI_CHASSIS_VERSION, | ||
24 | DMI_CHASSIS_SERIAL, | ||
25 | DMI_CHASSIS_ASSET_TAG, | ||
18 | DMI_STRING_MAX, | 26 | DMI_STRING_MAX, |
19 | }; | 27 | }; |
20 | 28 | ||
diff --git a/include/linux/edd.h b/include/linux/edd.h index b2b3e68aa512..7b647822d6dc 100644 --- a/include/linux/edd.h +++ b/include/linux/edd.h | |||
@@ -49,10 +49,6 @@ | |||
49 | #define EDD_MBR_SIG_MAX 16 /* max number of signatures to store */ | 49 | #define EDD_MBR_SIG_MAX 16 /* max number of signatures to store */ |
50 | #define EDD_MBR_SIG_NR_BUF 0x1ea /* addr of number of MBR signtaures at EDD_MBR_SIG_BUF | 50 | #define EDD_MBR_SIG_NR_BUF 0x1ea /* addr of number of MBR signtaures at EDD_MBR_SIG_BUF |
51 | in boot_params - treat this as 1 byte */ | 51 | in boot_params - treat this as 1 byte */ |
52 | #define EDD_CL_EQUALS 0x3d646465 /* "edd=" */ | ||
53 | #define EDD_CL_OFF 0x666f /* "of" for off */ | ||
54 | #define EDD_CL_SKIP 0x6b73 /* "sk" for skipmbr */ | ||
55 | #define EDD_CL_ON 0x6e6f /* "on" for on */ | ||
56 | 52 | ||
57 | #ifndef __ASSEMBLY__ | 53 | #ifndef __ASSEMBLY__ |
58 | 54 | ||
diff --git a/include/linux/eeprom_93cx6.h b/include/linux/eeprom_93cx6.h new file mode 100644 index 000000000000..d774b7778c91 --- /dev/null +++ b/include/linux/eeprom_93cx6.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | Copyright (C) 2004 - 2006 rt2x00 SourceForge Project | ||
3 | <http://rt2x00.serialmonkey.com> | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the | ||
17 | Free Software Foundation, Inc., | ||
18 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | /* | ||
22 | Module: eeprom_93cx6 | ||
23 | Abstract: EEPROM reader datastructures for 93cx6 chipsets. | ||
24 | Supported chipsets: 93c46 & 93c66. | ||
25 | */ | ||
26 | |||
27 | /* | ||
28 | * EEPROM operation defines. | ||
29 | */ | ||
30 | #define PCI_EEPROM_WIDTH_93C46 6 | ||
31 | #define PCI_EEPROM_WIDTH_93C66 8 | ||
32 | #define PCI_EEPROM_WIDTH_OPCODE 3 | ||
33 | #define PCI_EEPROM_WRITE_OPCODE 0x05 | ||
34 | #define PCI_EEPROM_READ_OPCODE 0x06 | ||
35 | #define PCI_EEPROM_EWDS_OPCODE 0x10 | ||
36 | #define PCI_EEPROM_EWEN_OPCODE 0x13 | ||
37 | |||
38 | /** | ||
39 | * struct eeprom_93cx6 - control structure for setting the commands | ||
40 | * for reading the eeprom data. | ||
41 | * @data: private pointer for the driver. | ||
42 | * @register_read(struct eeprom_93cx6 *eeprom): handler to | ||
43 | * read the eeprom register, this function should set all reg_* fields. | ||
44 | * @register_write(struct eeprom_93cx6 *eeprom): handler to | ||
45 | * write to the eeprom register by using all reg_* fields. | ||
46 | * @width: eeprom width, should be one of the PCI_EEPROM_WIDTH_* defines | ||
47 | * @reg_data_in: register field to indicate data input | ||
48 | * @reg_data_out: register field to indicate data output | ||
49 | * @reg_data_clock: register field to set the data clock | ||
50 | * @reg_chip_select: register field to set the chip select | ||
51 | * | ||
52 | * This structure is used for the communication between the driver | ||
53 | * and the eeprom_93cx6 handlers for reading the eeprom. | ||
54 | */ | ||
55 | struct eeprom_93cx6 { | ||
56 | void *data; | ||
57 | |||
58 | void (*register_read)(struct eeprom_93cx6 *eeprom); | ||
59 | void (*register_write)(struct eeprom_93cx6 *eeprom); | ||
60 | |||
61 | int width; | ||
62 | |||
63 | char reg_data_in; | ||
64 | char reg_data_out; | ||
65 | char reg_data_clock; | ||
66 | char reg_chip_select; | ||
67 | }; | ||
68 | |||
69 | extern void eeprom_93cx6_read(struct eeprom_93cx6 *eeprom, | ||
70 | const u8 word, u16 *data); | ||
71 | extern void eeprom_93cx6_multiread(struct eeprom_93cx6 *eeprom, | ||
72 | const u8 word, __le16 *data, const u16 words); | ||
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 071c67abed86..6cdb97365e47 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -39,13 +39,8 @@ extern void eth_header_cache_update(struct hh_cache *hh, struct net_device *dev | |||
39 | extern int eth_header_cache(struct neighbour *neigh, | 39 | extern int eth_header_cache(struct neighbour *neigh, |
40 | struct hh_cache *hh); | 40 | struct hh_cache *hh); |
41 | 41 | ||
42 | extern struct net_device *alloc_etherdev(int sizeof_priv); | 42 | extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count); |
43 | static inline void eth_copy_and_sum (struct sk_buff *dest, | 43 | #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) |
44 | const unsigned char *src, | ||
45 | int len, int base) | ||
46 | { | ||
47 | memcpy (dest->data, src, len); | ||
48 | } | ||
49 | 44 | ||
50 | /** | 45 | /** |
51 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. | 46 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. |
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index efbe1fda1a22..1a45d6f41b09 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
@@ -30,16 +30,38 @@ | |||
30 | #define FW_CDEV_EVENT_REQUEST 0x02 | 30 | #define FW_CDEV_EVENT_REQUEST 0x02 |
31 | #define FW_CDEV_EVENT_ISO_INTERRUPT 0x03 | 31 | #define FW_CDEV_EVENT_ISO_INTERRUPT 0x03 |
32 | 32 | ||
33 | /* The 'closure' fields are for user space to use. Data passed in the | 33 | /** |
34 | * 'closure' field for a request will be returned in the corresponding | 34 | * struct fw_cdev_event_common - Common part of all fw_cdev_event_ types |
35 | * event. It's a 64-bit type so that it's a fixed size type big | 35 | * @closure: For arbitrary use by userspace |
36 | * enough to hold a pointer on all platforms. */ | 36 | * @type: Discriminates the fw_cdev_event_ types |
37 | 37 | * | |
38 | * This struct may be used to access generic members of all fw_cdev_event_ | ||
39 | * types regardless of the specific type. | ||
40 | * | ||
41 | * Data passed in the @closure field for a request will be returned in the | ||
42 | * corresponding event. It is big enough to hold a pointer on all platforms. | ||
43 | * The ioctl used to set @closure depends on the @type of event. | ||
44 | */ | ||
38 | struct fw_cdev_event_common { | 45 | struct fw_cdev_event_common { |
39 | __u64 closure; | 46 | __u64 closure; |
40 | __u32 type; | 47 | __u32 type; |
41 | }; | 48 | }; |
42 | 49 | ||
50 | /** | ||
51 | * struct fw_cdev_event_bus_reset - Sent when a bus reset occurred | ||
52 | * @closure: See &fw_cdev_event_common; set by %FW_CDEV_IOC_GET_INFO ioctl | ||
53 | * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_BUS_RESET | ||
54 | * @node_id: New node ID of this node | ||
55 | * @local_node_id: Node ID of the local node, i.e. of the controller | ||
56 | * @bm_node_id: Node ID of the bus manager | ||
57 | * @irm_node_id: Node ID of the iso resource manager | ||
58 | * @root_node_id: Node ID of the root node | ||
59 | * @generation: New bus generation | ||
60 | * | ||
61 | * This event is sent when the bus the device belongs to goes through a bus | ||
62 | * reset. It provides information about the new bus configuration, such as | ||
63 | * new node ID for this device, new root ID, and others. | ||
64 | */ | ||
43 | struct fw_cdev_event_bus_reset { | 65 | struct fw_cdev_event_bus_reset { |
44 | __u64 closure; | 66 | __u64 closure; |
45 | __u32 type; | 67 | __u32 type; |
@@ -51,6 +73,20 @@ struct fw_cdev_event_bus_reset { | |||
51 | __u32 generation; | 73 | __u32 generation; |
52 | }; | 74 | }; |
53 | 75 | ||
76 | /** | ||
77 | * struct fw_cdev_event_response - Sent when a response packet was received | ||
78 | * @closure: See &fw_cdev_event_common; | ||
79 | * set by %FW_CDEV_IOC_SEND_REQUEST ioctl | ||
80 | * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_RESPONSE | ||
81 | * @rcode: Response code returned by the remote node | ||
82 | * @length: Data length, i.e. the response's payload size in bytes | ||
83 | * @data: Payload data, if any | ||
84 | * | ||
85 | * This event is sent when the stack receives a response to an outgoing request | ||
86 | * sent by %FW_CDEV_IOC_SEND_REQUEST ioctl. The payload data for responses | ||
87 | * carrying data (read and lock responses) follows immediately and can be | ||
88 | * accessed through the @data field. | ||
89 | */ | ||
54 | struct fw_cdev_event_response { | 90 | struct fw_cdev_event_response { |
55 | __u64 closure; | 91 | __u64 closure; |
56 | __u32 type; | 92 | __u32 type; |
@@ -59,6 +95,25 @@ struct fw_cdev_event_response { | |||
59 | __u32 data[0]; | 95 | __u32 data[0]; |
60 | }; | 96 | }; |
61 | 97 | ||
98 | /** | ||
99 | * struct fw_cdev_event_request - Sent on incoming request to an address region | ||
100 | * @closure: See &fw_cdev_event_common; set by %FW_CDEV_IOC_ALLOCATE ioctl | ||
101 | * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_REQUEST | ||
102 | * @tcode: Transaction code of the incoming request | ||
103 | * @offset: The offset into the 48-bit per-node address space | ||
104 | * @handle: Reference to the kernel-side pending request | ||
105 | * @length: Data length, i.e. the request's payload size in bytes | ||
106 | * @data: Incoming data, if any | ||
107 | * | ||
108 | * This event is sent when the stack receives an incoming request to an address | ||
109 | * region registered using the %FW_CDEV_IOC_ALLOCATE ioctl. The request is | ||
110 | * guaranteed to be completely contained in the specified region. Userspace is | ||
111 | * responsible for sending the response by %FW_CDEV_IOC_SEND_RESPONSE ioctl, | ||
112 | * using the same @handle. | ||
113 | * | ||
114 | * The payload data for requests carrying data (write and lock requests) | ||
115 | * follows immediately and can be accessed through the @data field. | ||
116 | */ | ||
62 | struct fw_cdev_event_request { | 117 | struct fw_cdev_event_request { |
63 | __u64 closure; | 118 | __u64 closure; |
64 | __u32 type; | 119 | __u32 type; |
@@ -69,14 +124,39 @@ struct fw_cdev_event_request { | |||
69 | __u32 data[0]; | 124 | __u32 data[0]; |
70 | }; | 125 | }; |
71 | 126 | ||
127 | /** | ||
128 | * struct fw_cdev_event_iso_interrupt - Sent when an iso packet was completed | ||
129 | * @closure: See &fw_cdev_event_common; | ||
130 | * set by %FW_CDEV_CREATE_ISO_CONTEXT ioctl | ||
131 | * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_ISO_INTERRUPT | ||
132 | * @cycle: Cycle counter of the interrupt packet | ||
133 | * @header_length: Total length of following headers, in bytes | ||
134 | * @header: Stripped headers, if any | ||
135 | * | ||
136 | * This event is sent when the controller has completed an &fw_cdev_iso_packet | ||
137 | * with the %FW_CDEV_ISO_INTERRUPT bit set. In the receive case, the headers | ||
138 | * stripped of all packets up until and including the interrupt packet are | ||
139 | * returned in the @header field. | ||
140 | */ | ||
72 | struct fw_cdev_event_iso_interrupt { | 141 | struct fw_cdev_event_iso_interrupt { |
73 | __u64 closure; | 142 | __u64 closure; |
74 | __u32 type; | 143 | __u32 type; |
75 | __u32 cycle; | 144 | __u32 cycle; |
76 | __u32 header_length; /* Length in bytes of following headers. */ | 145 | __u32 header_length; |
77 | __u32 header[0]; | 146 | __u32 header[0]; |
78 | }; | 147 | }; |
79 | 148 | ||
149 | /** | ||
150 | * union fw_cdev_event - Convenience union of fw_cdev_event_ types | ||
151 | * @common: Valid for all types | ||
152 | * @bus_reset: Valid if @common.type == %FW_CDEV_EVENT_BUS_RESET | ||
153 | * @response: Valid if @common.type == %FW_CDEV_EVENT_RESPONSE | ||
154 | * @request: Valid if @common.type == %FW_CDEV_EVENT_REQUEST | ||
155 | * @iso_interrupt: Valid if @common.type == %FW_CDEV_EVENT_ISO_INTERRUPT | ||
156 | * | ||
157 | * Convenience union for userspace use. Events could be read(2) into a char | ||
158 | * buffer and then cast to this union for further processing. | ||
159 | */ | ||
80 | union fw_cdev_event { | 160 | union fw_cdev_event { |
81 | struct fw_cdev_event_common common; | 161 | struct fw_cdev_event_common common; |
82 | struct fw_cdev_event_bus_reset bus_reset; | 162 | struct fw_cdev_event_bus_reset bus_reset; |
@@ -105,35 +185,47 @@ union fw_cdev_event { | |||
105 | */ | 185 | */ |
106 | #define FW_CDEV_VERSION 1 | 186 | #define FW_CDEV_VERSION 1 |
107 | 187 | ||
188 | /** | ||
189 | * struct fw_cdev_get_info - General purpose information ioctl | ||
190 | * @version: The version field is just a running serial number. | ||
191 | * We never break backwards compatibility, but may add more | ||
192 | * structs and ioctls in later revisions. | ||
193 | * @rom_length: If @rom is non-zero, at most rom_length bytes of configuration | ||
194 | * ROM will be copied into that user space address. In either | ||
195 | * case, @rom_length is updated with the actual length of the | ||
196 | * configuration ROM. | ||
197 | * @rom: If non-zero, address of a buffer to be filled by a copy of the | ||
198 | * local node's configuration ROM | ||
199 | * @bus_reset: If non-zero, address of a buffer to be filled by a | ||
200 | * &struct fw_cdev_event_bus_reset with the current state | ||
201 | * of the bus. This does not cause a bus reset to happen. | ||
202 | * @bus_reset_closure: Value of &closure in this and subsequent bus reset events | ||
203 | * @card: The index of the card this device belongs to | ||
204 | */ | ||
108 | struct fw_cdev_get_info { | 205 | struct fw_cdev_get_info { |
109 | /* The version field is just a running serial number. We | ||
110 | * never break backwards compatibility. Userspace passes in | ||
111 | * the version it expects and the kernel passes back the | ||
112 | * highest version it can provide. Even if the structs in | ||
113 | * this interface are extended in a later version, the kernel | ||
114 | * will not copy back more data than what was present in the | ||
115 | * interface version userspace expects. */ | ||
116 | __u32 version; | 206 | __u32 version; |
117 | |||
118 | /* If non-zero, at most rom_length bytes of config rom will be | ||
119 | * copied into that user space address. In either case, | ||
120 | * rom_length is updated with the actual length of the config | ||
121 | * rom. */ | ||
122 | __u32 rom_length; | 207 | __u32 rom_length; |
123 | __u64 rom; | 208 | __u64 rom; |
124 | |||
125 | /* If non-zero, a fw_cdev_event_bus_reset struct will be | ||
126 | * copied here with the current state of the bus. This does | ||
127 | * not cause a bus reset to happen. The value of closure in | ||
128 | * this and sub-sequent bus reset events is set to | ||
129 | * bus_reset_closure. */ | ||
130 | __u64 bus_reset; | 209 | __u64 bus_reset; |
131 | __u64 bus_reset_closure; | 210 | __u64 bus_reset_closure; |
132 | |||
133 | /* The index of the card this devices belongs to. */ | ||
134 | __u32 card; | 211 | __u32 card; |
135 | }; | 212 | }; |
136 | 213 | ||
214 | /** | ||
215 | * struct fw_cdev_send_request - Send an asynchronous request packet | ||
216 | * @tcode: Transaction code of the request | ||
217 | * @length: Length of outgoing payload, in bytes | ||
218 | * @offset: 48-bit offset at destination node | ||
219 | * @closure: Passed back to userspace in the response event | ||
220 | * @data: Userspace pointer to payload | ||
221 | * @generation: The bus generation where packet is valid | ||
222 | * | ||
223 | * Send a request to the device. This ioctl implements all outgoing requests. | ||
224 | * Both quadlet and block request specify the payload as a pointer to the data | ||
225 | * in the @data field. Once the transaction completes, the kernel writes an | ||
226 | * &fw_cdev_event_request event back. The @closure field is passed back to | ||
227 | * user space in the response event. | ||
228 | */ | ||
137 | struct fw_cdev_send_request { | 229 | struct fw_cdev_send_request { |
138 | __u32 tcode; | 230 | __u32 tcode; |
139 | __u32 length; | 231 | __u32 length; |
@@ -143,6 +235,19 @@ struct fw_cdev_send_request { | |||
143 | __u32 generation; | 235 | __u32 generation; |
144 | }; | 236 | }; |
145 | 237 | ||
238 | /** | ||
239 | * struct fw_cdev_send_response - Send an asynchronous response packet | ||
240 | * @rcode: Response code as determined by the userspace handler | ||
241 | * @length: Length of outgoing payload, in bytes | ||
242 | * @data: Userspace pointer to payload | ||
243 | * @handle: The handle from the &fw_cdev_event_request | ||
244 | * | ||
245 | * Send a response to an incoming request. By setting up an address range using | ||
246 | * the %FW_CDEV_IOC_ALLOCATE ioctl, userspace can listen for incoming requests. An | ||
247 | * incoming request will generate an %FW_CDEV_EVENT_REQUEST, and userspace must | ||
248 | * send a reply using this ioctl. The event has a handle to the kernel-side | ||
249 | * pending transaction, which should be used with this ioctl. | ||
250 | */ | ||
146 | struct fw_cdev_send_response { | 251 | struct fw_cdev_send_response { |
147 | __u32 rcode; | 252 | __u32 rcode; |
148 | __u32 length; | 253 | __u32 length; |
@@ -150,6 +255,21 @@ struct fw_cdev_send_response { | |||
150 | __u32 handle; | 255 | __u32 handle; |
151 | }; | 256 | }; |
152 | 257 | ||
258 | /** | ||
259 | * struct fw_cdev_allocate - Allocate a CSR address range | ||
260 | * @offset: Start offset of the address range | ||
261 | * @closure: To be passed back to userspace in request events | ||
262 | * @length: Length of the address range, in bytes | ||
263 | * @handle: Handle to the allocation, written by the kernel | ||
264 | * | ||
265 | * Allocate an address range in the 48-bit address space on the local node | ||
266 | * (the controller). This allows userspace to listen for requests with an | ||
267 | * offset within that address range. When the kernel receives a request | ||
268 | * within the range, an &fw_cdev_event_request event will be written back. | ||
269 | * The @closure field is passed back to userspace in the response event. | ||
270 | * The @handle field is an out parameter, returning a handle to the allocated | ||
271 | * range to be used for later deallocation of the range. | ||
272 | */ | ||
153 | struct fw_cdev_allocate { | 273 | struct fw_cdev_allocate { |
154 | __u64 offset; | 274 | __u64 offset; |
155 | __u64 closure; | 275 | __u64 closure; |
@@ -157,6 +277,11 @@ struct fw_cdev_allocate { | |||
157 | __u32 handle; | 277 | __u32 handle; |
158 | }; | 278 | }; |
159 | 279 | ||
280 | /** | ||
281 | * struct fw_cdev_deallocate - Free an address range allocation | ||
282 | * @handle: Handle to the address range, as returned by the kernel when the | ||
283 | * range was allocated | ||
284 | */ | ||
160 | struct fw_cdev_deallocate { | 285 | struct fw_cdev_deallocate { |
161 | __u32 handle; | 286 | __u32 handle; |
162 | }; | 287 | }; |
@@ -164,10 +289,41 @@ struct fw_cdev_deallocate { | |||
164 | #define FW_CDEV_LONG_RESET 0 | 289 | #define FW_CDEV_LONG_RESET 0 |
165 | #define FW_CDEV_SHORT_RESET 1 | 290 | #define FW_CDEV_SHORT_RESET 1 |
166 | 291 | ||
292 | /** | ||
293 | * struct fw_cdev_initiate_bus_reset - Initiate a bus reset | ||
294 | * @type: %FW_CDEV_SHORT_RESET or %FW_CDEV_LONG_RESET | ||
295 | * | ||
296 | * Initiate a bus reset for the bus this device is on. The bus reset can be | ||
297 | * either the original (long) bus reset or the arbitrated (short) bus reset | ||
298 | * introduced in 1394a-2000. | ||
299 | */ | ||
167 | struct fw_cdev_initiate_bus_reset { | 300 | struct fw_cdev_initiate_bus_reset { |
168 | __u32 type; | 301 | __u32 type; /* FW_CDEV_SHORT_RESET or FW_CDEV_LONG_RESET */ |
169 | }; | 302 | }; |
170 | 303 | ||
304 | /** | ||
305 | * struct fw_cdev_add_descriptor - Add contents to the local node's config ROM | ||
306 | * @immediate: If non-zero, immediate key to insert before pointer | ||
307 | * @key: Upper 8 bits of root directory pointer | ||
308 | * @data: Userspace pointer to contents of descriptor block | ||
309 | * @length: Length of descriptor block data, in bytes | ||
310 | * @handle: Handle to the descriptor, written by the kernel | ||
311 | * | ||
312 | * Add a descriptor block and optionally a preceding immediate key to the local | ||
313 | * node's configuration ROM. | ||
314 | * | ||
315 | * The @key field specifies the upper 8 bits of the descriptor root directory | ||
316 | * pointer and the @data and @length fields specify the contents. The @key | ||
317 | * should be of the form 0xXX000000. The offset part of the root directory entry | ||
318 | * will be filled in by the kernel. | ||
319 | * | ||
320 | * If not 0, the @immediate field specifies an immediate key which will be | ||
321 | * inserted before the root directory pointer. | ||
322 | * | ||
323 | * If successful, the kernel adds the descriptor and writes back a handle to the | ||
324 | * kernel-side object to be used for later removal of the descriptor block and | ||
325 | * immediate key. | ||
326 | */ | ||
171 | struct fw_cdev_add_descriptor { | 327 | struct fw_cdev_add_descriptor { |
172 | __u32 immediate; | 328 | __u32 immediate; |
173 | __u32 key; | 329 | __u32 key; |
@@ -176,6 +332,14 @@ struct fw_cdev_add_descriptor { | |||
176 | __u32 handle; | 332 | __u32 handle; |
177 | }; | 333 | }; |
178 | 334 | ||
335 | /** | ||
336 | * struct fw_cdev_remove_descriptor - Remove contents from the configuration ROM | ||
337 | * @handle: Handle to the descriptor, as returned by the kernel when the | ||
338 | * descriptor was added | ||
339 | * | ||
340 | * Remove a descriptor block and accompanying immediate key from the local | ||
341 | * node's configuration ROM. | ||
342 | */ | ||
179 | struct fw_cdev_remove_descriptor { | 343 | struct fw_cdev_remove_descriptor { |
180 | __u32 handle; | 344 | __u32 handle; |
181 | }; | 345 | }; |
@@ -183,12 +347,24 @@ struct fw_cdev_remove_descriptor { | |||
183 | #define FW_CDEV_ISO_CONTEXT_TRANSMIT 0 | 347 | #define FW_CDEV_ISO_CONTEXT_TRANSMIT 0 |
184 | #define FW_CDEV_ISO_CONTEXT_RECEIVE 1 | 348 | #define FW_CDEV_ISO_CONTEXT_RECEIVE 1 |
185 | 349 | ||
186 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG0 1 | 350 | /** |
187 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG1 2 | 351 | * struct fw_cdev_create_iso_context - Create a context for isochronous IO |
188 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG2 4 | 352 | * @type: %FW_CDEV_ISO_CONTEXT_TRANSMIT or %FW_CDEV_ISO_CONTEXT_RECEIVE |
189 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG3 8 | 353 | * @header_size: Header size to strip for receive contexts |
190 | #define FW_CDEV_ISO_CONTEXT_MATCH_ALL_TAGS 15 | 354 | * @channel: Channel to bind to |
191 | 355 | * @speed: Speed to transmit at | |
356 | * @closure: To be returned in &fw_cdev_event_iso_interrupt | ||
357 | * @handle: Handle to context, written back by kernel | ||
358 | * | ||
359 | * Prior to sending or receiving isochronous I/O, a context must be created. | ||
360 | * The context records information about the transmit or receive configuration | ||
361 | * and typically maps to an underlying hardware resource. A context is set up | ||
362 | * for either sending or receiving. It is bound to a specific isochronous | ||
363 | * channel. | ||
364 | * | ||
365 | * If a context was successfully created, the kernel writes back a handle to the | ||
366 | * context, which must be passed in for subsequent operations on that context. | ||
367 | */ | ||
192 | struct fw_cdev_create_iso_context { | 368 | struct fw_cdev_create_iso_context { |
193 | __u32 type; | 369 | __u32 type; |
194 | __u32 header_size; | 370 | __u32 header_size; |
@@ -201,15 +377,49 @@ struct fw_cdev_create_iso_context { | |||
201 | #define FW_CDEV_ISO_PAYLOAD_LENGTH(v) (v) | 377 | #define FW_CDEV_ISO_PAYLOAD_LENGTH(v) (v) |
202 | #define FW_CDEV_ISO_INTERRUPT (1 << 16) | 378 | #define FW_CDEV_ISO_INTERRUPT (1 << 16) |
203 | #define FW_CDEV_ISO_SKIP (1 << 17) | 379 | #define FW_CDEV_ISO_SKIP (1 << 17) |
380 | #define FW_CDEV_ISO_SYNC (1 << 17) | ||
204 | #define FW_CDEV_ISO_TAG(v) ((v) << 18) | 381 | #define FW_CDEV_ISO_TAG(v) ((v) << 18) |
205 | #define FW_CDEV_ISO_SY(v) ((v) << 20) | 382 | #define FW_CDEV_ISO_SY(v) ((v) << 20) |
206 | #define FW_CDEV_ISO_HEADER_LENGTH(v) ((v) << 24) | 383 | #define FW_CDEV_ISO_HEADER_LENGTH(v) ((v) << 24) |
207 | 384 | ||
385 | /** | ||
386 | * struct fw_cdev_iso_packet - Isochronous packet | ||
387 | * @control: Contains the header length (8 uppermost bits), the sy field | ||
388 | * (4 bits), the tag field (2 bits), a sync flag (1 bit), | ||
389 | * a skip flag (1 bit), an interrupt flag (1 bit), and the | ||
390 | * payload length (16 lowermost bits) | ||
391 | * @header: Header and payload | ||
392 | * | ||
393 | * &struct fw_cdev_iso_packet is used to describe isochronous packet queues. | ||
394 | * | ||
395 | * Use the FW_CDEV_ISO_ macros to fill in @control. The sy and tag fields are | ||
396 | * specified by IEEE 1394a and IEC 61883. | ||
397 | * | ||
398 | * FIXME - finish this documentation | ||
399 | */ | ||
208 | struct fw_cdev_iso_packet { | 400 | struct fw_cdev_iso_packet { |
209 | __u32 control; | 401 | __u32 control; |
210 | __u32 header[0]; | 402 | __u32 header[0]; |
211 | }; | 403 | }; |
212 | 404 | ||
405 | /** | ||
406 | * struct fw_cdev_queue_iso - Queue isochronous packets for I/O | ||
407 | * @packets: Userspace pointer to packet data | ||
408 | * @data: Pointer into mmap()'ed payload buffer | ||
409 | * @size: Size of packet data in bytes | ||
410 | * @handle: Isochronous context handle | ||
411 | * | ||
412 | * Queue a number of isochronous packets for reception or transmission. | ||
413 | * This ioctl takes a pointer to an array of &fw_cdev_iso_packet structs, | ||
414 | * which describe how to transmit from or receive into a contiguous region | ||
415 | * of a mmap()'ed payload buffer. As part of the packet descriptors, | ||
416 | * a series of headers can be supplied, which will be prepended to the | ||
417 | * payload during DMA. | ||
418 | * | ||
419 | * The kernel may or may not queue all packets, but will write back updated | ||
420 | * values of the @packets, @data and @size fields, so the ioctl can be | ||
421 | * resubmitted easily. | ||
422 | */ | ||
213 | struct fw_cdev_queue_iso { | 423 | struct fw_cdev_queue_iso { |
214 | __u64 packets; | 424 | __u64 packets; |
215 | __u64 data; | 425 | __u64 data; |
@@ -217,6 +427,23 @@ struct fw_cdev_queue_iso { | |||
217 | __u32 handle; | 427 | __u32 handle; |
218 | }; | 428 | }; |
219 | 429 | ||
430 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG0 1 | ||
431 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG1 2 | ||
432 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG2 4 | ||
433 | #define FW_CDEV_ISO_CONTEXT_MATCH_TAG3 8 | ||
434 | #define FW_CDEV_ISO_CONTEXT_MATCH_ALL_TAGS 15 | ||
435 | |||
436 | /** | ||
437 | * struct fw_cdev_start_iso - Start an isochronous transmission or reception | ||
438 | * @cycle: Cycle in which to start I/O. If @cycle is greater than or | ||
439 | * equal to 0, the I/O will start on that cycle. | ||
440 | * @sync: Determines the value to wait for for receive packets that have | ||
441 | * the %FW_CDEV_ISO_SYNC bit set | ||
442 | * @tags: Tag filter bit mask. Only valid for isochronous reception. | ||
443 | * Determines the tag values for which packets will be accepted. | ||
444 | * Use FW_CDEV_ISO_CONTEXT_MATCH_ macros to set @tags. | ||
445 | * @handle: Isochronous context handle within which to transmit or receive | ||
446 | */ | ||
220 | struct fw_cdev_start_iso { | 447 | struct fw_cdev_start_iso { |
221 | __s32 cycle; | 448 | __s32 cycle; |
222 | __u32 sync; | 449 | __u32 sync; |
@@ -224,6 +451,10 @@ struct fw_cdev_start_iso { | |||
224 | __u32 handle; | 451 | __u32 handle; |
225 | }; | 452 | }; |
226 | 453 | ||
454 | /** | ||
455 | * struct fw_cdev_stop_iso - Stop an isochronous transmission or reception | ||
456 | * @handle: Handle of isochronous context to stop | ||
457 | */ | ||
227 | struct fw_cdev_stop_iso { | 458 | struct fw_cdev_stop_iso { |
228 | __u32 handle; | 459 | __u32 handle; |
229 | }; | 460 | }; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 6a41f4cab14c..4f0b3bf5983c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1054,7 +1054,7 @@ struct block_device_operations { | |||
1054 | }; | 1054 | }; |
1055 | 1055 | ||
1056 | /* | 1056 | /* |
1057 | * "descriptor" for what we're up to with a read for sendfile(). | 1057 | * "descriptor" for what we're up to with a read. |
1058 | * This allows us to use the same read code yet | 1058 | * This allows us to use the same read code yet |
1059 | * have multiple different users of the data that | 1059 | * have multiple different users of the data that |
1060 | * we read from a file. | 1060 | * we read from a file. |
@@ -1105,7 +1105,6 @@ struct file_operations { | |||
1105 | int (*aio_fsync) (struct kiocb *, int datasync); | 1105 | int (*aio_fsync) (struct kiocb *, int datasync); |
1106 | int (*fasync) (int, struct file *, int); | 1106 | int (*fasync) (int, struct file *, int); |
1107 | int (*lock) (struct file *, int, struct file_lock *); | 1107 | int (*lock) (struct file *, int, struct file_lock *); |
1108 | ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void *); | ||
1109 | ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); | 1108 | ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); |
1110 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); | 1109 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); |
1111 | int (*check_flags)(int); | 1110 | int (*check_flags)(int); |
@@ -1762,7 +1761,6 @@ extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, | |||
1762 | unsigned long, loff_t, loff_t *, size_t, ssize_t); | 1761 | unsigned long, loff_t, loff_t *, size_t, ssize_t); |
1763 | extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); | 1762 | extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); |
1764 | extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); | 1763 | extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); |
1765 | extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *); | ||
1766 | extern void do_generic_mapping_read(struct address_space *mapping, | 1764 | extern void do_generic_mapping_read(struct address_space *mapping, |
1767 | struct file_ra_state *, struct file *, | 1765 | struct file_ra_state *, struct file *, |
1768 | loff_t *, read_descriptor_t *, read_actor_t); | 1766 | loff_t *, read_descriptor_t *, read_actor_t); |
@@ -1792,9 +1790,6 @@ extern int nonseekable_open(struct inode * inode, struct file * filp); | |||
1792 | #ifdef CONFIG_FS_XIP | 1790 | #ifdef CONFIG_FS_XIP |
1793 | extern ssize_t xip_file_read(struct file *filp, char __user *buf, size_t len, | 1791 | extern ssize_t xip_file_read(struct file *filp, char __user *buf, size_t len, |
1794 | loff_t *ppos); | 1792 | loff_t *ppos); |
1795 | extern ssize_t xip_file_sendfile(struct file *in_file, loff_t *ppos, | ||
1796 | size_t count, read_actor_t actor, | ||
1797 | void *target); | ||
1798 | extern int xip_file_mmap(struct file * file, struct vm_area_struct * vma); | 1793 | extern int xip_file_mmap(struct file * file, struct vm_area_struct * vma); |
1799 | extern ssize_t xip_file_write(struct file *filp, const char __user *buf, | 1794 | extern ssize_t xip_file_write(struct file *filp, const char __user *buf, |
1800 | size_t len, loff_t *ppos); | 1795 | size_t len, loff_t *ppos); |
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index 8b7e4c1e32ae..a44a6a078f0a 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h | |||
@@ -54,18 +54,6 @@ struct gfs2_inum { | |||
54 | __be64 no_addr; | 54 | __be64 no_addr; |
55 | }; | 55 | }; |
56 | 56 | ||
57 | struct gfs2_inum_host { | ||
58 | __u64 no_formal_ino; | ||
59 | __u64 no_addr; | ||
60 | }; | ||
61 | |||
62 | static inline int gfs2_inum_equal(const struct gfs2_inum_host *ino1, | ||
63 | const struct gfs2_inum_host *ino2) | ||
64 | { | ||
65 | return ino1->no_formal_ino == ino2->no_formal_ino && | ||
66 | ino1->no_addr == ino2->no_addr; | ||
67 | } | ||
68 | |||
69 | /* | 57 | /* |
70 | * Generic metadata head structure | 58 | * Generic metadata head structure |
71 | * Every inplace buffer logged in the journal must start with this. | 59 | * Every inplace buffer logged in the journal must start with this. |
@@ -94,12 +82,6 @@ struct gfs2_meta_header { | |||
94 | __be32 __pad1; /* Was incarnation number in gfs1 */ | 82 | __be32 __pad1; /* Was incarnation number in gfs1 */ |
95 | }; | 83 | }; |
96 | 84 | ||
97 | struct gfs2_meta_header_host { | ||
98 | __u32 mh_magic; | ||
99 | __u32 mh_type; | ||
100 | __u32 mh_format; | ||
101 | }; | ||
102 | |||
103 | /* | 85 | /* |
104 | * super-block structure | 86 | * super-block structure |
105 | * | 87 | * |
@@ -139,23 +121,6 @@ struct gfs2_sb { | |||
139 | /* In gfs1, quota and license dinodes followed */ | 121 | /* In gfs1, quota and license dinodes followed */ |
140 | }; | 122 | }; |
141 | 123 | ||
142 | struct gfs2_sb_host { | ||
143 | struct gfs2_meta_header_host sb_header; | ||
144 | |||
145 | __u32 sb_fs_format; | ||
146 | __u32 sb_multihost_format; | ||
147 | |||
148 | __u32 sb_bsize; | ||
149 | __u32 sb_bsize_shift; | ||
150 | |||
151 | struct gfs2_inum_host sb_master_dir; /* Was jindex dinode in gfs1 */ | ||
152 | struct gfs2_inum_host sb_root_dir; | ||
153 | |||
154 | char sb_lockproto[GFS2_LOCKNAME_LEN]; | ||
155 | char sb_locktable[GFS2_LOCKNAME_LEN]; | ||
156 | /* In gfs1, quota and license dinodes followed */ | ||
157 | }; | ||
158 | |||
159 | /* | 124 | /* |
160 | * resource index structure | 125 | * resource index structure |
161 | */ | 126 | */ |
@@ -173,14 +138,6 @@ struct gfs2_rindex { | |||
173 | __u8 ri_reserved[64]; | 138 | __u8 ri_reserved[64]; |
174 | }; | 139 | }; |
175 | 140 | ||
176 | struct gfs2_rindex_host { | ||
177 | __u64 ri_addr; /* grp block disk address */ | ||
178 | __u64 ri_data0; /* first data location */ | ||
179 | __u32 ri_length; /* length of rgrp header in fs blocks */ | ||
180 | __u32 ri_data; /* num of data blocks in rgrp */ | ||
181 | __u32 ri_bitbytes; /* number of bytes in data bitmaps */ | ||
182 | }; | ||
183 | |||
184 | /* | 141 | /* |
185 | * resource group header structure | 142 | * resource group header structure |
186 | */ | 143 | */ |
@@ -212,13 +169,6 @@ struct gfs2_rgrp { | |||
212 | __u8 rg_reserved[80]; /* Several fields from gfs1 now reserved */ | 169 | __u8 rg_reserved[80]; /* Several fields from gfs1 now reserved */ |
213 | }; | 170 | }; |
214 | 171 | ||
215 | struct gfs2_rgrp_host { | ||
216 | __u32 rg_flags; | ||
217 | __u32 rg_free; | ||
218 | __u32 rg_dinodes; | ||
219 | __u64 rg_igeneration; | ||
220 | }; | ||
221 | |||
222 | /* | 172 | /* |
223 | * quota structure | 173 | * quota structure |
224 | */ | 174 | */ |
@@ -230,12 +180,6 @@ struct gfs2_quota { | |||
230 | __u8 qu_reserved[64]; | 180 | __u8 qu_reserved[64]; |
231 | }; | 181 | }; |
232 | 182 | ||
233 | struct gfs2_quota_host { | ||
234 | __u64 qu_limit; | ||
235 | __u64 qu_warn; | ||
236 | __u64 qu_value; | ||
237 | }; | ||
238 | |||
239 | /* | 183 | /* |
240 | * dinode structure | 184 | * dinode structure |
241 | */ | 185 | */ |
@@ -315,29 +259,11 @@ struct gfs2_dinode { | |||
315 | struct gfs2_inum __pad4; /* Unused even in current gfs1 */ | 259 | struct gfs2_inum __pad4; /* Unused even in current gfs1 */ |
316 | 260 | ||
317 | __be64 di_eattr; /* extended attribute block number */ | 261 | __be64 di_eattr; /* extended attribute block number */ |
262 | __be32 di_atime_nsec; /* nsec portion of atime */ | ||
263 | __be32 di_mtime_nsec; /* nsec portion of mtime */ | ||
264 | __be32 di_ctime_nsec; /* nsec portion of ctime */ | ||
318 | 265 | ||
319 | __u8 di_reserved[56]; | 266 | __u8 di_reserved[44]; |
320 | }; | ||
321 | |||
322 | struct gfs2_dinode_host { | ||
323 | __u64 di_size; /* number of bytes in file */ | ||
324 | __u64 di_blocks; /* number of blocks in file */ | ||
325 | |||
326 | /* This section varies from gfs1. Padding added to align with | ||
327 | * remainder of dinode | ||
328 | */ | ||
329 | __u64 di_goal_meta; /* rgrp to alloc from next */ | ||
330 | __u64 di_goal_data; /* data block goal */ | ||
331 | __u64 di_generation; /* generation number for NFS */ | ||
332 | |||
333 | __u32 di_flags; /* GFS2_DIF_... */ | ||
334 | __u16 di_height; /* height of metadata */ | ||
335 | |||
336 | /* These only apply to directories */ | ||
337 | __u16 di_depth; /* Number of bits in the table */ | ||
338 | __u32 di_entries; /* The number of entries in the directory */ | ||
339 | |||
340 | __u64 di_eattr; /* extended attribute block number */ | ||
341 | }; | 267 | }; |
342 | 268 | ||
343 | /* | 269 | /* |
@@ -414,16 +340,6 @@ struct gfs2_log_header { | |||
414 | __be32 lh_hash; | 340 | __be32 lh_hash; |
415 | }; | 341 | }; |
416 | 342 | ||
417 | struct gfs2_log_header_host { | ||
418 | struct gfs2_meta_header_host lh_header; | ||
419 | |||
420 | __u64 lh_sequence; /* Sequence number of this transaction */ | ||
421 | __u32 lh_flags; /* GFS2_LOG_HEAD_... */ | ||
422 | __u32 lh_tail; /* Block number of log tail */ | ||
423 | __u32 lh_blkno; | ||
424 | __u32 lh_hash; | ||
425 | }; | ||
426 | |||
427 | /* | 343 | /* |
428 | * Log type descriptor | 344 | * Log type descriptor |
429 | */ | 345 | */ |
@@ -464,11 +380,6 @@ struct gfs2_inum_range { | |||
464 | __be64 ir_length; | 380 | __be64 ir_length; |
465 | }; | 381 | }; |
466 | 382 | ||
467 | struct gfs2_inum_range_host { | ||
468 | __u64 ir_start; | ||
469 | __u64 ir_length; | ||
470 | }; | ||
471 | |||
472 | /* | 383 | /* |
473 | * Statfs change | 384 | * Statfs change |
474 | * Describes an change to the pool of free and allocated | 385 | * Describes an change to the pool of free and allocated |
@@ -481,12 +392,6 @@ struct gfs2_statfs_change { | |||
481 | __be64 sc_dinodes; | 392 | __be64 sc_dinodes; |
482 | }; | 393 | }; |
483 | 394 | ||
484 | struct gfs2_statfs_change_host { | ||
485 | __u64 sc_total; | ||
486 | __u64 sc_free; | ||
487 | __u64 sc_dinodes; | ||
488 | }; | ||
489 | |||
490 | /* | 395 | /* |
491 | * Quota change | 396 | * Quota change |
492 | * Describes an allocation change for a particular | 397 | * Describes an allocation change for a particular |
@@ -501,39 +406,12 @@ struct gfs2_quota_change { | |||
501 | __be32 qc_id; | 406 | __be32 qc_id; |
502 | }; | 407 | }; |
503 | 408 | ||
504 | struct gfs2_quota_change_host { | 409 | struct gfs2_quota_lvb { |
505 | __u64 qc_change; | 410 | __be32 qb_magic; |
506 | __u32 qc_flags; /* GFS2_QCF_... */ | 411 | __u32 __pad; |
507 | __u32 qc_id; | 412 | __be64 qb_limit; /* Hard limit of # blocks to alloc */ |
413 | __be64 qb_warn; /* Warn user when alloc is above this # */ | ||
414 | __be64 qb_value; /* Current # blocks allocated */ | ||
508 | }; | 415 | }; |
509 | 416 | ||
510 | #ifdef __KERNEL__ | ||
511 | /* Translation functions */ | ||
512 | |||
513 | extern void gfs2_inum_in(struct gfs2_inum_host *no, const void *buf); | ||
514 | extern void gfs2_inum_out(const struct gfs2_inum_host *no, void *buf); | ||
515 | extern void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf); | ||
516 | extern void gfs2_rindex_in(struct gfs2_rindex_host *ri, const void *buf); | ||
517 | extern void gfs2_rindex_out(const struct gfs2_rindex_host *ri, void *buf); | ||
518 | extern void gfs2_rgrp_in(struct gfs2_rgrp_host *rg, const void *buf); | ||
519 | extern void gfs2_rgrp_out(const struct gfs2_rgrp_host *rg, void *buf); | ||
520 | extern void gfs2_quota_in(struct gfs2_quota_host *qu, const void *buf); | ||
521 | struct gfs2_inode; | ||
522 | extern void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf); | ||
523 | extern void gfs2_ea_header_in(struct gfs2_ea_header *ea, const void *buf); | ||
524 | extern void gfs2_ea_header_out(const struct gfs2_ea_header *ea, void *buf); | ||
525 | extern void gfs2_log_header_in(struct gfs2_log_header_host *lh, const void *buf); | ||
526 | extern void gfs2_inum_range_in(struct gfs2_inum_range_host *ir, const void *buf); | ||
527 | extern void gfs2_inum_range_out(const struct gfs2_inum_range_host *ir, void *buf); | ||
528 | extern void gfs2_statfs_change_in(struct gfs2_statfs_change_host *sc, const void *buf); | ||
529 | extern void gfs2_statfs_change_out(const struct gfs2_statfs_change_host *sc, void *buf); | ||
530 | extern void gfs2_quota_change_in(struct gfs2_quota_change_host *qc, const void *buf); | ||
531 | |||
532 | /* Printing functions */ | ||
533 | |||
534 | extern void gfs2_rindex_print(const struct gfs2_rindex_host *ri); | ||
535 | extern void gfs2_dinode_print(const struct gfs2_inode *ip); | ||
536 | |||
537 | #endif /* __KERNEL__ */ | ||
538 | |||
539 | #endif /* __GFS2_ONDISK_DOT_H__ */ | 417 | #endif /* __GFS2_ONDISK_DOT_H__ */ |
diff --git a/include/linux/gpio_mouse.h b/include/linux/gpio_mouse.h new file mode 100644 index 000000000000..44ed7aa14d85 --- /dev/null +++ b/include/linux/gpio_mouse.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * Driver for simulating a mouse on GPIO lines. | ||
3 | * | ||
4 | * Copyright (C) 2007 Atmel Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef _GPIO_MOUSE_H | ||
12 | #define _GPIO_MOUSE_H | ||
13 | |||
14 | #define GPIO_MOUSE_POLARITY_ACT_HIGH 0x00 | ||
15 | #define GPIO_MOUSE_POLARITY_ACT_LOW 0x01 | ||
16 | |||
17 | #define GPIO_MOUSE_PIN_UP 0 | ||
18 | #define GPIO_MOUSE_PIN_DOWN 1 | ||
19 | #define GPIO_MOUSE_PIN_LEFT 2 | ||
20 | #define GPIO_MOUSE_PIN_RIGHT 3 | ||
21 | #define GPIO_MOUSE_PIN_BLEFT 4 | ||
22 | #define GPIO_MOUSE_PIN_BMIDDLE 5 | ||
23 | #define GPIO_MOUSE_PIN_BRIGHT 6 | ||
24 | #define GPIO_MOUSE_PIN_MAX 7 | ||
25 | |||
26 | /** | ||
27 | * struct gpio_mouse_platform_data | ||
28 | * @scan_ms: integer in ms specifying the scan periode. | ||
29 | * @polarity: Pin polarity, active high or low. | ||
30 | * @up: GPIO line for up value. | ||
31 | * @down: GPIO line for down value. | ||
32 | * @left: GPIO line for left value. | ||
33 | * @right: GPIO line for right value. | ||
34 | * @bleft: GPIO line for left button. | ||
35 | * @bmiddle: GPIO line for middle button. | ||
36 | * @bright: GPIO line for right button. | ||
37 | * | ||
38 | * This struct must be added to the platform_device in the board code. | ||
39 | * It is used by the gpio_mouse driver to setup GPIO lines and to | ||
40 | * calculate mouse movement. | ||
41 | */ | ||
42 | struct gpio_mouse_platform_data { | ||
43 | int scan_ms; | ||
44 | int polarity; | ||
45 | |||
46 | union { | ||
47 | struct { | ||
48 | int up; | ||
49 | int down; | ||
50 | int left; | ||
51 | int right; | ||
52 | |||
53 | int bleft; | ||
54 | int bmiddle; | ||
55 | int bright; | ||
56 | }; | ||
57 | int pins[GPIO_MOUSE_PIN_MAX]; | ||
58 | }; | ||
59 | }; | ||
60 | |||
61 | #endif /* _GPIO_MOUSE_H */ | ||
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 7803014f3a11..8d302298a161 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -79,6 +79,19 @@ | |||
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | #ifdef CONFIG_PREEMPT | 81 | #ifdef CONFIG_PREEMPT |
82 | # define PREEMPT_CHECK_OFFSET 1 | ||
83 | #else | ||
84 | # define PREEMPT_CHECK_OFFSET 0 | ||
85 | #endif | ||
86 | |||
87 | /* | ||
88 | * Check whether we were atomic before we did preempt_disable(): | ||
89 | * (used by the scheduler) | ||
90 | */ | ||
91 | #define in_atomic_preempt_off() \ | ||
92 | ((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_CHECK_OFFSET) | ||
93 | |||
94 | #ifdef CONFIG_PREEMPT | ||
82 | # define preemptible() (preempt_count() == 0 && !irqs_disabled()) | 95 | # define preemptible() (preempt_count() == 0 && !irqs_disabled()) |
83 | # define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1) | 96 | # define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1) |
84 | #else | 97 | #else |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 827ee748fd4c..898103b401f1 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -263,19 +263,28 @@ struct hid_item { | |||
263 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x00000100 | 263 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x00000100 |
264 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x00000200 | 264 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x00000200 |
265 | #define HID_QUIRK_MIGHTYMOUSE 0x00000400 | 265 | #define HID_QUIRK_MIGHTYMOUSE 0x00000400 |
266 | #define HID_QUIRK_CYMOTION 0x00000800 | 266 | #define HID_QUIRK_POWERBOOK_HAS_FN 0x00000800 |
267 | #define HID_QUIRK_POWERBOOK_HAS_FN 0x00001000 | 267 | #define HID_QUIRK_POWERBOOK_FN_ON 0x00001000 |
268 | #define HID_QUIRK_POWERBOOK_FN_ON 0x00002000 | 268 | #define HID_QUIRK_INVERT_HWHEEL 0x00002000 |
269 | #define HID_QUIRK_INVERT_HWHEEL 0x00004000 | 269 | #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00004000 |
270 | #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00008000 | 270 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00008000 |
271 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 | 271 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 |
272 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 | 272 | #define HID_QUIRK_IGNORE_MOUSE 0x00020000 |
273 | #define HID_QUIRK_IGNORE_MOUSE 0x00040000 | 273 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00040000 |
274 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 | 274 | #define HID_QUIRK_DUPLICATE_USAGES 0x00080000 |
275 | #define HID_QUIRK_LOGITECH_DESCRIPTOR 0x00100000 | 275 | #define HID_QUIRK_RESET_LEDS 0x00100000 |
276 | #define HID_QUIRK_DUPLICATE_USAGES 0x00200000 | 276 | #define HID_QUIRK_HIDINPUT 0x00200000 |
277 | #define HID_QUIRK_RESET_LEDS 0x00400000 | 277 | #define HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL 0x00400000 |
278 | #define HID_QUIRK_SWAPPED_MIN_MAX 0x00800000 | 278 | #define HID_QUIRK_LOGITECH_EXPANDED_KEYMAP 0x00800000 |
279 | |||
280 | /* | ||
281 | * Separate quirks for runtime report descriptor fixup | ||
282 | */ | ||
283 | |||
284 | #define HID_QUIRK_RDESC_CYMOTION 0x00000001 | ||
285 | #define HID_QUIRK_RDESC_LOGITECH 0x00000002 | ||
286 | #define HID_QUIRK_RDESC_SWAPPED_MIN_MAX 0x00000004 | ||
287 | #define HID_QUIRK_RDESC_PETALYNX 0x00000008 | ||
279 | 288 | ||
280 | /* | 289 | /* |
281 | * This is the global environment of the parser. This information is | 290 | * This is the global environment of the parser. This information is |
@@ -488,6 +497,11 @@ struct hid_descriptor { | |||
488 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) | 497 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) |
489 | 498 | ||
490 | /* HID core API */ | 499 | /* HID core API */ |
500 | |||
501 | #ifdef CONFIG_HID_DEBUG | ||
502 | extern int hid_debug; | ||
503 | #endif | ||
504 | |||
491 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); | 505 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); |
492 | extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report); | 506 | extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report); |
493 | extern int hidinput_connect(struct hid_device *); | 507 | extern int hidinput_connect(struct hid_device *); |
@@ -506,6 +520,7 @@ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct); | |||
506 | int usbhid_modify_dquirk(const u16 idVendor, const u16 idProduct, const u32 quirks); | 520 | int usbhid_modify_dquirk(const u16 idVendor, const u16 idProduct, const u32 quirks); |
507 | int usbhid_quirks_init(char **quirks_param); | 521 | int usbhid_quirks_init(char **quirks_param); |
508 | void usbhid_quirks_exit(void); | 522 | void usbhid_quirks_exit(void); |
523 | void usbhid_fixup_report_descriptor(const u16, const u16, char *, unsigned, char **); | ||
509 | 524 | ||
510 | #ifdef CONFIG_HID_FF | 525 | #ifdef CONFIG_HID_FF |
511 | int hid_ff_init(struct hid_device *hid); | 526 | int hid_ff_init(struct hid_device *hid); |
@@ -523,14 +538,19 @@ static inline int hid_pidff_init(struct hid_device *hid) { return -ENODEV; } | |||
523 | #else | 538 | #else |
524 | static inline int hid_ff_init(struct hid_device *hid) { return -1; } | 539 | static inline int hid_ff_init(struct hid_device *hid) { return -1; } |
525 | #endif | 540 | #endif |
526 | #ifdef DEBUG | 541 | |
527 | #define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , \ | 542 | #ifdef CONFIG_HID_DEBUG |
528 | __FILE__ , ## arg) | 543 | #define dbg_hid(format, arg...) if (hid_debug) \ |
544 | printk(KERN_DEBUG "%s: " format ,\ | ||
545 | __FILE__ , ## arg) | ||
546 | #define dbg_hid_line(format, arg...) if (hid_debug) \ | ||
547 | printk(format, ## arg) | ||
529 | #else | 548 | #else |
530 | #define dbg(format, arg...) do {} while (0) | 549 | #define dbg_hid(format, arg...) do {} while (0) |
550 | #define dbg_hid_line dbg_hid | ||
531 | #endif | 551 | #endif |
532 | 552 | ||
533 | #define err(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ | 553 | #define err_hid(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ |
534 | __FILE__ , ## arg) | 554 | __FILE__ , ## arg) |
535 | #endif | 555 | #endif |
536 | 556 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index cae7d618030c..2eaba21b9b1a 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -90,7 +90,7 @@ extern s32 i2c_smbus_write_block_data(struct i2c_client * client, | |||
90 | const u8 *values); | 90 | const u8 *values); |
91 | /* Returns the number of read bytes */ | 91 | /* Returns the number of read bytes */ |
92 | extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, | 92 | extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, |
93 | u8 command, u8 *values); | 93 | u8 command, u8 length, u8 *values); |
94 | extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, | 94 | extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, |
95 | u8 command, u8 length, | 95 | u8 command, u8 length, |
96 | const u8 *values); | 96 | const u8 *values); |
@@ -150,15 +150,20 @@ struct i2c_driver { | |||
150 | 150 | ||
151 | /** | 151 | /** |
152 | * struct i2c_client - represent an I2C slave device | 152 | * struct i2c_client - represent an I2C slave device |
153 | * @flags: I2C_CLIENT_TEN indicates the device uses a ten bit chip address; | ||
154 | * I2C_CLIENT_PEC indicates it uses SMBus Packet Error Checking | ||
153 | * @addr: Address used on the I2C bus connected to the parent adapter. | 155 | * @addr: Address used on the I2C bus connected to the parent adapter. |
154 | * @name: Indicates the type of the device, usually a chip name that's | 156 | * @name: Indicates the type of the device, usually a chip name that's |
155 | * generic enough to hide second-sourcing and compatible revisions. | 157 | * generic enough to hide second-sourcing and compatible revisions. |
158 | * @adapter: manages the bus segment hosting this I2C device | ||
156 | * @dev: Driver model device node for the slave. | 159 | * @dev: Driver model device node for the slave. |
160 | * @irq: indicates the IRQ generated by this device (if any) | ||
157 | * @driver_name: Identifies new-style driver used with this device; also | 161 | * @driver_name: Identifies new-style driver used with this device; also |
158 | * used as the module name for hotplug/coldplug modprobe support. | 162 | * used as the module name for hotplug/coldplug modprobe support. |
159 | * | 163 | * |
160 | * An i2c_client identifies a single device (i.e. chip) connected to an | 164 | * An i2c_client identifies a single device (i.e. chip) connected to an |
161 | * i2c bus. The behaviour is defined by the routines of the driver. | 165 | * i2c bus. The behaviour exposed to Linux is defined by the driver |
166 | * managing the device. | ||
162 | */ | 167 | */ |
163 | struct i2c_client { | 168 | struct i2c_client { |
164 | unsigned short flags; /* div., see below */ | 169 | unsigned short flags; /* div., see below */ |
@@ -180,7 +185,8 @@ struct i2c_client { | |||
180 | 185 | ||
181 | static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) | 186 | static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) |
182 | { | 187 | { |
183 | return to_i2c_client(container_of(kobj, struct device, kobj)); | 188 | struct device * const dev = container_of(kobj, struct device, kobj); |
189 | return to_i2c_client(dev); | ||
184 | } | 190 | } |
185 | 191 | ||
186 | static inline void *i2c_get_clientdata (struct i2c_client *dev) | 192 | static inline void *i2c_get_clientdata (struct i2c_client *dev) |
@@ -201,7 +207,7 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data) | |||
201 | * @addr: stored in i2c_client.addr | 207 | * @addr: stored in i2c_client.addr |
202 | * @platform_data: stored in i2c_client.dev.platform_data | 208 | * @platform_data: stored in i2c_client.dev.platform_data |
203 | * @irq: stored in i2c_client.irq | 209 | * @irq: stored in i2c_client.irq |
204 | 210 | * | |
205 | * I2C doesn't actually support hardware probing, although controllers and | 211 | * I2C doesn't actually support hardware probing, although controllers and |
206 | * devices may be able to use I2C_SMBUS_QUICK to tell whether or not there's | 212 | * devices may be able to use I2C_SMBUS_QUICK to tell whether or not there's |
207 | * a device at a given address. Drivers commonly need more information than | 213 | * a device at a given address. Drivers commonly need more information than |
@@ -210,7 +216,7 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data) | |||
210 | * i2c_board_info is used to build tables of information listing I2C devices | 216 | * i2c_board_info is used to build tables of information listing I2C devices |
211 | * that are present. This information is used to grow the driver model tree | 217 | * that are present. This information is used to grow the driver model tree |
212 | * for "new style" I2C drivers. For mainboards this is done statically using | 218 | * for "new style" I2C drivers. For mainboards this is done statically using |
213 | * i2c_register_board_info(), where @bus_num represents an adapter that isn't | 219 | * i2c_register_board_info(); bus numbers identify adapters that aren't |
214 | * yet available. For add-on boards, i2c_new_device() does this dynamically | 220 | * yet available. For add-on boards, i2c_new_device() does this dynamically |
215 | * with the adapter already known. | 221 | * with the adapter already known. |
216 | */ | 222 | */ |
@@ -518,8 +524,9 @@ union i2c_smbus_data { | |||
518 | #define I2C_SMBUS_WORD_DATA 3 | 524 | #define I2C_SMBUS_WORD_DATA 3 |
519 | #define I2C_SMBUS_PROC_CALL 4 | 525 | #define I2C_SMBUS_PROC_CALL 4 |
520 | #define I2C_SMBUS_BLOCK_DATA 5 | 526 | #define I2C_SMBUS_BLOCK_DATA 5 |
521 | #define I2C_SMBUS_I2C_BLOCK_DATA 6 | 527 | #define I2C_SMBUS_I2C_BLOCK_BROKEN 6 |
522 | #define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */ | 528 | #define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */ |
529 | #define I2C_SMBUS_I2C_BLOCK_DATA 8 | ||
523 | 530 | ||
524 | 531 | ||
525 | /* ----- commands for the ioctl like i2c_command call: | 532 | /* ----- commands for the ioctl like i2c_command call: |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 1e365acdd369..19ab25804056 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <asm/system.h> | 25 | #include <asm/system.h> |
26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
27 | #include <asm/semaphore.h> | 27 | #include <asm/semaphore.h> |
28 | #include <asm/mutex.h> | ||
28 | 29 | ||
29 | /****************************************************************************** | 30 | /****************************************************************************** |
30 | * IDE driver configuration options (play with these as desired): | 31 | * IDE driver configuration options (play with these as desired): |
@@ -685,6 +686,8 @@ typedef struct hwif_s { | |||
685 | u8 mwdma_mask; | 686 | u8 mwdma_mask; |
686 | u8 swdma_mask; | 687 | u8 swdma_mask; |
687 | 688 | ||
689 | u8 cbl; /* cable type */ | ||
690 | |||
688 | hwif_chipset_t chipset; /* sub-module for tuning.. */ | 691 | hwif_chipset_t chipset; /* sub-module for tuning.. */ |
689 | 692 | ||
690 | struct pci_dev *pci_dev; /* for pci chipsets */ | 693 | struct pci_dev *pci_dev; /* for pci chipsets */ |
@@ -735,8 +738,8 @@ typedef struct hwif_s { | |||
735 | void (*ide_dma_clear_irq)(ide_drive_t *drive); | 738 | void (*ide_dma_clear_irq)(ide_drive_t *drive); |
736 | void (*dma_host_on)(ide_drive_t *drive); | 739 | void (*dma_host_on)(ide_drive_t *drive); |
737 | void (*dma_host_off)(ide_drive_t *drive); | 740 | void (*dma_host_off)(ide_drive_t *drive); |
738 | int (*ide_dma_lostirq)(ide_drive_t *drive); | 741 | void (*dma_lost_irq)(ide_drive_t *drive); |
739 | int (*ide_dma_timeout)(ide_drive_t *drive); | 742 | void (*dma_timeout)(ide_drive_t *drive); |
740 | 743 | ||
741 | void (*OUTB)(u8 addr, unsigned long port); | 744 | void (*OUTB)(u8 addr, unsigned long port); |
742 | void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); | 745 | void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); |
@@ -791,7 +794,6 @@ typedef struct hwif_s { | |||
791 | unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */ | 794 | unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */ |
792 | unsigned reset : 1; /* reset after probe */ | 795 | unsigned reset : 1; /* reset after probe */ |
793 | unsigned autodma : 1; /* auto-attempt using DMA at boot */ | 796 | unsigned autodma : 1; /* auto-attempt using DMA at boot */ |
794 | unsigned udma_four : 1; /* 1=ATA-66 capable, 0=default */ | ||
795 | unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */ | 797 | unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */ |
796 | unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */ | 798 | unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */ |
797 | unsigned auto_poll : 1; /* supports nop auto-poll */ | 799 | unsigned auto_poll : 1; /* supports nop auto-poll */ |
@@ -863,7 +865,7 @@ typedef struct hwgroup_s { | |||
863 | 865 | ||
864 | typedef struct ide_driver_s ide_driver_t; | 866 | typedef struct ide_driver_s ide_driver_t; |
865 | 867 | ||
866 | extern struct semaphore ide_setting_sem; | 868 | extern struct mutex ide_setting_mtx; |
867 | 869 | ||
868 | int set_io_32bit(ide_drive_t *, int); | 870 | int set_io_32bit(ide_drive_t *, int); |
869 | int set_pio_mode(ide_drive_t *, int); | 871 | int set_pio_mode(ide_drive_t *, int); |
@@ -1304,8 +1306,8 @@ extern int __ide_dma_check(ide_drive_t *); | |||
1304 | extern int ide_dma_setup(ide_drive_t *); | 1306 | extern int ide_dma_setup(ide_drive_t *); |
1305 | extern void ide_dma_start(ide_drive_t *); | 1307 | extern void ide_dma_start(ide_drive_t *); |
1306 | extern int __ide_dma_end(ide_drive_t *); | 1308 | extern int __ide_dma_end(ide_drive_t *); |
1307 | extern int __ide_dma_lostirq(ide_drive_t *); | 1309 | extern void ide_dma_lost_irq(ide_drive_t *); |
1308 | extern int __ide_dma_timeout(ide_drive_t *); | 1310 | extern void ide_dma_timeout(ide_drive_t *); |
1309 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ | 1311 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ |
1310 | 1312 | ||
1311 | #else | 1313 | #else |
@@ -1382,11 +1384,11 @@ extern const ide_pio_timings_t ide_pio_timings[6]; | |||
1382 | 1384 | ||
1383 | 1385 | ||
1384 | extern spinlock_t ide_lock; | 1386 | extern spinlock_t ide_lock; |
1385 | extern struct semaphore ide_cfg_sem; | 1387 | extern struct mutex ide_cfg_mtx; |
1386 | /* | 1388 | /* |
1387 | * Structure locking: | 1389 | * Structure locking: |
1388 | * | 1390 | * |
1389 | * ide_cfg_sem and ide_lock together protect changes to | 1391 | * ide_cfg_mtx and ide_lock together protect changes to |
1390 | * ide_hwif_t->{next,hwgroup} | 1392 | * ide_hwif_t->{next,hwgroup} |
1391 | * ide_drive_t->next | 1393 | * ide_drive_t->next |
1392 | * | 1394 | * |
diff --git a/include/linux/idr.h b/include/linux/idr.h index 826803449db7..915572fa030b 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -83,4 +83,33 @@ void idr_remove(struct idr *idp, int id); | |||
83 | void idr_destroy(struct idr *idp); | 83 | void idr_destroy(struct idr *idp); |
84 | void idr_init(struct idr *idp); | 84 | void idr_init(struct idr *idp); |
85 | 85 | ||
86 | |||
87 | /* | ||
88 | * IDA - IDR based id allocator, use when translation from id to | ||
89 | * pointer isn't necessary. | ||
90 | */ | ||
91 | #define IDA_CHUNK_SIZE 128 /* 128 bytes per chunk */ | ||
92 | #define IDA_BITMAP_LONGS (128 / sizeof(long) - 1) | ||
93 | #define IDA_BITMAP_BITS (IDA_BITMAP_LONGS * sizeof(long) * 8) | ||
94 | |||
95 | struct ida_bitmap { | ||
96 | long nr_busy; | ||
97 | unsigned long bitmap[IDA_BITMAP_LONGS]; | ||
98 | }; | ||
99 | |||
100 | struct ida { | ||
101 | struct idr idr; | ||
102 | struct ida_bitmap *free_bitmap; | ||
103 | }; | ||
104 | |||
105 | #define IDA_INIT(name) { .idr = IDR_INIT(name), .free_bitmap = NULL, } | ||
106 | #define DEFINE_IDA(name) struct ida name = IDA_INIT(name) | ||
107 | |||
108 | int ida_pre_get(struct ida *ida, gfp_t gfp_mask); | ||
109 | int ida_get_new_above(struct ida *ida, int starting_id, int *p_id); | ||
110 | int ida_get_new(struct ida *ida, int *p_id); | ||
111 | void ida_remove(struct ida *ida, int id); | ||
112 | void ida_destroy(struct ida *ida); | ||
113 | void ida_init(struct ida *ida); | ||
114 | |||
86 | #endif /* __IDR_H__ */ | 115 | #endif /* __IDR_H__ */ |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 604c2434f71c..422084d18ce1 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -76,6 +76,8 @@ enum | |||
76 | #define IFLA_WEIGHT IFLA_WEIGHT | 76 | #define IFLA_WEIGHT IFLA_WEIGHT |
77 | IFLA_OPERSTATE, | 77 | IFLA_OPERSTATE, |
78 | IFLA_LINKMODE, | 78 | IFLA_LINKMODE, |
79 | IFLA_LINKINFO, | ||
80 | #define IFLA_LINKINFO IFLA_LINKINFO | ||
79 | __IFLA_MAX | 81 | __IFLA_MAX |
80 | }; | 82 | }; |
81 | 83 | ||
@@ -140,4 +142,49 @@ struct ifla_cacheinfo | |||
140 | __u32 retrans_time; | 142 | __u32 retrans_time; |
141 | }; | 143 | }; |
142 | 144 | ||
145 | enum | ||
146 | { | ||
147 | IFLA_INFO_UNSPEC, | ||
148 | IFLA_INFO_KIND, | ||
149 | IFLA_INFO_DATA, | ||
150 | IFLA_INFO_XSTATS, | ||
151 | __IFLA_INFO_MAX, | ||
152 | }; | ||
153 | |||
154 | #define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1) | ||
155 | |||
156 | /* VLAN section */ | ||
157 | |||
158 | enum | ||
159 | { | ||
160 | IFLA_VLAN_UNSPEC, | ||
161 | IFLA_VLAN_ID, | ||
162 | IFLA_VLAN_FLAGS, | ||
163 | IFLA_VLAN_EGRESS_QOS, | ||
164 | IFLA_VLAN_INGRESS_QOS, | ||
165 | __IFLA_VLAN_MAX, | ||
166 | }; | ||
167 | |||
168 | #define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1) | ||
169 | |||
170 | struct ifla_vlan_flags { | ||
171 | __u32 flags; | ||
172 | __u32 mask; | ||
173 | }; | ||
174 | |||
175 | enum | ||
176 | { | ||
177 | IFLA_VLAN_QOS_UNSPEC, | ||
178 | IFLA_VLAN_QOS_MAPPING, | ||
179 | __IFLA_VLAN_QOS_MAX | ||
180 | }; | ||
181 | |||
182 | #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1) | ||
183 | |||
184 | struct ifla_vlan_qos_mapping | ||
185 | { | ||
186 | __u32 from; | ||
187 | __u32 to; | ||
188 | }; | ||
189 | |||
143 | #endif /* _LINUX_IF_LINK_H */ | 190 | #endif /* _LINUX_IF_LINK_H */ |
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h index 768372f07caa..0f2f70d4e48c 100644 --- a/include/linux/if_ppp.h +++ b/include/linux/if_ppp.h | |||
@@ -110,6 +110,21 @@ struct ifpppcstatsreq { | |||
110 | struct ppp_comp_stats stats; | 110 | struct ppp_comp_stats stats; |
111 | }; | 111 | }; |
112 | 112 | ||
113 | /* For PPPIOCGL2TPSTATS */ | ||
114 | struct pppol2tp_ioc_stats { | ||
115 | __u16 tunnel_id; /* redundant */ | ||
116 | __u16 session_id; /* if zero, get tunnel stats */ | ||
117 | __u32 using_ipsec:1; /* valid only for session_id == 0 */ | ||
118 | aligned_u64 tx_packets; | ||
119 | aligned_u64 tx_bytes; | ||
120 | aligned_u64 tx_errors; | ||
121 | aligned_u64 rx_packets; | ||
122 | aligned_u64 rx_bytes; | ||
123 | aligned_u64 rx_seq_discards; | ||
124 | aligned_u64 rx_oos_packets; | ||
125 | aligned_u64 rx_errors; | ||
126 | }; | ||
127 | |||
113 | #define ifr__name b.ifr_ifrn.ifrn_name | 128 | #define ifr__name b.ifr_ifrn.ifrn_name |
114 | #define stats_ptr b.ifr_ifru.ifru_data | 129 | #define stats_ptr b.ifr_ifru.ifru_data |
115 | 130 | ||
@@ -146,6 +161,7 @@ struct ifpppcstatsreq { | |||
146 | #define PPPIOCDISCONN _IO('t', 57) /* disconnect channel */ | 161 | #define PPPIOCDISCONN _IO('t', 57) /* disconnect channel */ |
147 | #define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */ | 162 | #define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */ |
148 | #define PPPIOCGCHAN _IOR('t', 55, int) /* get ppp channel number */ | 163 | #define PPPIOCGCHAN _IOR('t', 55, int) /* get ppp channel number */ |
164 | #define PPPIOCGL2TPSTATS _IOR('t', 54, struct pppol2tp_ioc_stats) | ||
149 | 165 | ||
150 | #define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0) | 166 | #define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0) |
151 | #define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */ | 167 | #define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */ |
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h new file mode 100644 index 000000000000..516203b6fdeb --- /dev/null +++ b/include/linux/if_pppol2tp.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /*************************************************************************** | ||
2 | * Linux PPP over L2TP (PPPoL2TP) Socket Implementation (RFC 2661) | ||
3 | * | ||
4 | * This file supplies definitions required by the PPP over L2TP driver | ||
5 | * (pppol2tp.c). All version information wrt this file is located in pppol2tp.c | ||
6 | * | ||
7 | * License: | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version | ||
11 | * 2 of the License, or (at your option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef __LINUX_IF_PPPOL2TP_H | ||
16 | #define __LINUX_IF_PPPOL2TP_H | ||
17 | |||
18 | #include <asm/types.h> | ||
19 | |||
20 | #ifdef __KERNEL__ | ||
21 | #include <linux/in.h> | ||
22 | #endif | ||
23 | |||
24 | /* Structure used to connect() the socket to a particular tunnel UDP | ||
25 | * socket. | ||
26 | */ | ||
27 | struct pppol2tp_addr | ||
28 | { | ||
29 | pid_t pid; /* pid that owns the fd. | ||
30 | * 0 => current */ | ||
31 | int fd; /* FD of UDP socket to use */ | ||
32 | |||
33 | struct sockaddr_in addr; /* IP address and port to send to */ | ||
34 | |||
35 | __be16 s_tunnel, s_session; /* For matching incoming packets */ | ||
36 | __be16 d_tunnel, d_session; /* For sending outgoing packets */ | ||
37 | }; | ||
38 | |||
39 | /* Socket options: | ||
40 | * DEBUG - bitmask of debug message categories | ||
41 | * SENDSEQ - 0 => don't send packets with sequence numbers | ||
42 | * 1 => send packets with sequence numbers | ||
43 | * RECVSEQ - 0 => receive packet sequence numbers are optional | ||
44 | * 1 => drop receive packets without sequence numbers | ||
45 | * LNSMODE - 0 => act as LAC. | ||
46 | * 1 => act as LNS. | ||
47 | * REORDERTO - reorder timeout (in millisecs). If 0, don't try to reorder. | ||
48 | */ | ||
49 | enum { | ||
50 | PPPOL2TP_SO_DEBUG = 1, | ||
51 | PPPOL2TP_SO_RECVSEQ = 2, | ||
52 | PPPOL2TP_SO_SENDSEQ = 3, | ||
53 | PPPOL2TP_SO_LNSMODE = 4, | ||
54 | PPPOL2TP_SO_REORDERTO = 5, | ||
55 | }; | ||
56 | |||
57 | /* Debug message categories for the DEBUG socket option */ | ||
58 | enum { | ||
59 | PPPOL2TP_MSG_DEBUG = (1 << 0), /* verbose debug (if | ||
60 | * compiled in) */ | ||
61 | PPPOL2TP_MSG_CONTROL = (1 << 1), /* userspace - kernel | ||
62 | * interface */ | ||
63 | PPPOL2TP_MSG_SEQ = (1 << 2), /* sequence numbers */ | ||
64 | PPPOL2TP_MSG_DATA = (1 << 3), /* data packets */ | ||
65 | }; | ||
66 | |||
67 | |||
68 | |||
69 | #endif | ||
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 6f987be60fe2..25652545ba6e 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/semaphore.h> | 27 | #include <asm/semaphore.h> |
28 | #include <linux/ppp_channel.h> | 28 | #include <linux/ppp_channel.h> |
29 | #endif /* __KERNEL__ */ | 29 | #endif /* __KERNEL__ */ |
30 | #include <linux/if_pppol2tp.h> | ||
30 | 31 | ||
31 | /* For user-space programs to pick up these definitions | 32 | /* For user-space programs to pick up these definitions |
32 | * which they wouldn't get otherwise without defining __KERNEL__ | 33 | * which they wouldn't get otherwise without defining __KERNEL__ |
@@ -50,8 +51,9 @@ struct pppoe_addr{ | |||
50 | * Protocols supported by AF_PPPOX | 51 | * Protocols supported by AF_PPPOX |
51 | */ | 52 | */ |
52 | #define PX_PROTO_OE 0 /* Currently just PPPoE */ | 53 | #define PX_PROTO_OE 0 /* Currently just PPPoE */ |
53 | #define PX_MAX_PROTO 1 | 54 | #define PX_PROTO_OL2TP 1 /* Now L2TP also */ |
54 | 55 | #define PX_MAX_PROTO 2 | |
56 | |||
55 | struct sockaddr_pppox { | 57 | struct sockaddr_pppox { |
56 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 58 | sa_family_t sa_family; /* address family, AF_PPPOX */ |
57 | unsigned int sa_protocol; /* protocol identifier */ | 59 | unsigned int sa_protocol; /* protocol identifier */ |
@@ -60,6 +62,16 @@ struct sockaddr_pppox { | |||
60 | }sa_addr; | 62 | }sa_addr; |
61 | }__attribute__ ((packed)); | 63 | }__attribute__ ((packed)); |
62 | 64 | ||
65 | /* The use of the above union isn't viable because the size of this | ||
66 | * struct must stay fixed over time -- applications use sizeof(struct | ||
67 | * sockaddr_pppox) to fill it. We use a protocol specific sockaddr | ||
68 | * type instead. | ||
69 | */ | ||
70 | struct sockaddr_pppol2tp { | ||
71 | sa_family_t sa_family; /* address family, AF_PPPOX */ | ||
72 | unsigned int sa_protocol; /* protocol identifier */ | ||
73 | struct pppol2tp_addr pppol2tp; | ||
74 | }__attribute__ ((packed)); | ||
63 | 75 | ||
64 | /********************************************************************* | 76 | /********************************************************************* |
65 | * | 77 | * |
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 88aef7b86ef4..42eb6945b93e 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -36,6 +36,7 @@ struct tun_struct { | |||
36 | unsigned long flags; | 36 | unsigned long flags; |
37 | int attached; | 37 | int attached; |
38 | uid_t owner; | 38 | uid_t owner; |
39 | gid_t group; | ||
39 | 40 | ||
40 | wait_queue_head_t read_wait; | 41 | wait_queue_head_t read_wait; |
41 | struct sk_buff_head readq; | 42 | struct sk_buff_head readq; |
@@ -78,6 +79,7 @@ struct tun_struct { | |||
78 | #define TUNSETPERSIST _IOW('T', 203, int) | 79 | #define TUNSETPERSIST _IOW('T', 203, int) |
79 | #define TUNSETOWNER _IOW('T', 204, int) | 80 | #define TUNSETOWNER _IOW('T', 204, int) |
80 | #define TUNSETLINK _IOW('T', 205, int) | 81 | #define TUNSETLINK _IOW('T', 205, int) |
82 | #define TUNSETGROUP _IOW('T', 206, int) | ||
81 | 83 | ||
82 | /* TUNSETIFF ifr flags */ | 84 | /* TUNSETIFF ifr flags */ |
83 | #define IFF_TUN 0x0001 | 85 | #define IFF_TUN 0x0001 |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 81e9bc93569b..61a57dc2ac99 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -99,7 +99,7 @@ static inline void vlan_group_set_device(struct vlan_group *vg, int vlan_id, | |||
99 | } | 99 | } |
100 | 100 | ||
101 | struct vlan_priority_tci_mapping { | 101 | struct vlan_priority_tci_mapping { |
102 | unsigned long priority; | 102 | u32 priority; |
103 | unsigned short vlan_qos; /* This should be shifted when first set, so we only do it | 103 | unsigned short vlan_qos; /* This should be shifted when first set, so we only do it |
104 | * at provisioning time. | 104 | * at provisioning time. |
105 | * ((skb->priority << 13) & 0xE000) | 105 | * ((skb->priority << 13) & 0xE000) |
@@ -112,7 +112,10 @@ struct vlan_dev_info { | |||
112 | /** This will be the mapping that correlates skb->priority to | 112 | /** This will be the mapping that correlates skb->priority to |
113 | * 3 bits of VLAN QOS tags... | 113 | * 3 bits of VLAN QOS tags... |
114 | */ | 114 | */ |
115 | unsigned long ingress_priority_map[8]; | 115 | unsigned int nr_ingress_mappings; |
116 | u32 ingress_priority_map[8]; | ||
117 | |||
118 | unsigned int nr_egress_mappings; | ||
116 | struct vlan_priority_tci_mapping *egress_priority_map[16]; /* hash table */ | 119 | struct vlan_priority_tci_mapping *egress_priority_map[16]; /* hash table */ |
117 | 120 | ||
118 | unsigned short vlan_id; /* The VLAN Identifier for this interface. */ | 121 | unsigned short vlan_id; /* The VLAN Identifier for this interface. */ |
@@ -132,6 +135,7 @@ struct vlan_dev_info { | |||
132 | int old_allmulti; /* similar to above. */ | 135 | int old_allmulti; /* similar to above. */ |
133 | int old_promiscuity; /* similar to above. */ | 136 | int old_promiscuity; /* similar to above. */ |
134 | struct net_device *real_dev; /* the underlying device/interface */ | 137 | struct net_device *real_dev; /* the underlying device/interface */ |
138 | unsigned char real_dev_addr[ETH_ALEN]; | ||
135 | struct proc_dir_entry *dent; /* Holds the proc data */ | 139 | struct proc_dir_entry *dent; /* Holds the proc data */ |
136 | unsigned long cnt_inc_headroom_on_tx; /* How many times did we have to grow the skb on TX. */ | 140 | unsigned long cnt_inc_headroom_on_tx; /* How many times did we have to grow the skb on TX. */ |
137 | unsigned long cnt_encap_on_xmit; /* How many times did we have to encapsulate the skb on TX. */ | 141 | unsigned long cnt_encap_on_xmit; /* How many times did we have to encapsulate the skb on TX. */ |
@@ -395,6 +399,10 @@ enum vlan_ioctl_cmds { | |||
395 | GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */ | 399 | GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */ |
396 | }; | 400 | }; |
397 | 401 | ||
402 | enum vlan_flags { | ||
403 | VLAN_FLAG_REORDER_HDR = 0x1, | ||
404 | }; | ||
405 | |||
398 | enum vlan_name_types { | 406 | enum vlan_name_types { |
399 | VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */ | 407 | VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */ |
400 | VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */ | 408 | VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */ |
diff --git a/include/linux/input.h b/include/linux/input.h index d8521c72f69f..18c98b543030 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -981,15 +981,15 @@ struct input_dev { | |||
981 | struct mutex mutex; /* serializes open and close operations */ | 981 | struct mutex mutex; /* serializes open and close operations */ |
982 | unsigned int users; | 982 | unsigned int users; |
983 | 983 | ||
984 | struct class_device cdev; | 984 | struct device dev; |
985 | union { /* temporarily so while we switching to struct device */ | 985 | union { /* temporarily so while we switching to struct device */ |
986 | struct device *parent; | 986 | struct device *dev; |
987 | } dev; | 987 | } cdev; |
988 | 988 | ||
989 | struct list_head h_list; | 989 | struct list_head h_list; |
990 | struct list_head node; | 990 | struct list_head node; |
991 | }; | 991 | }; |
992 | #define to_input_dev(d) container_of(d, struct input_dev, cdev) | 992 | #define to_input_dev(d) container_of(d, struct input_dev, dev) |
993 | 993 | ||
994 | /* | 994 | /* |
995 | * Verify that we are in sync with input_device_id mod_devicetable.h #defines | 995 | * Verify that we are in sync with input_device_id mod_devicetable.h #defines |
@@ -1096,22 +1096,22 @@ struct input_handle { | |||
1096 | struct list_head h_node; | 1096 | struct list_head h_node; |
1097 | }; | 1097 | }; |
1098 | 1098 | ||
1099 | #define to_dev(n) container_of(n,struct input_dev,node) | 1099 | #define to_dev(n) container_of(n, struct input_dev, node) |
1100 | #define to_handler(n) container_of(n,struct input_handler,node) | 1100 | #define to_handler(n) container_of(n, struct input_handler, node) |
1101 | #define to_handle(n) container_of(n,struct input_handle,d_node) | 1101 | #define to_handle(n) container_of(n, struct input_handle, d_node) |
1102 | #define to_handle_h(n) container_of(n,struct input_handle,h_node) | 1102 | #define to_handle_h(n) container_of(n, struct input_handle, h_node) |
1103 | 1103 | ||
1104 | struct input_dev *input_allocate_device(void); | 1104 | struct input_dev *input_allocate_device(void); |
1105 | void input_free_device(struct input_dev *dev); | 1105 | void input_free_device(struct input_dev *dev); |
1106 | 1106 | ||
1107 | static inline struct input_dev *input_get_device(struct input_dev *dev) | 1107 | static inline struct input_dev *input_get_device(struct input_dev *dev) |
1108 | { | 1108 | { |
1109 | return to_input_dev(class_device_get(&dev->cdev)); | 1109 | return to_input_dev(get_device(&dev->dev)); |
1110 | } | 1110 | } |
1111 | 1111 | ||
1112 | static inline void input_put_device(struct input_dev *dev) | 1112 | static inline void input_put_device(struct input_dev *dev) |
1113 | { | 1113 | { |
1114 | class_device_put(&dev->cdev); | 1114 | put_device(&dev->dev); |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | static inline void *input_get_drvdata(struct input_dev *dev) | 1117 | static inline void *input_get_drvdata(struct input_dev *dev) |
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h index 8e2042b9d471..2eaa142cd061 100644 --- a/include/linux/ioprio.h +++ b/include/linux/ioprio.h | |||
@@ -47,8 +47,10 @@ enum { | |||
47 | #define IOPRIO_NORM (4) | 47 | #define IOPRIO_NORM (4) |
48 | static inline int task_ioprio(struct task_struct *task) | 48 | static inline int task_ioprio(struct task_struct *task) |
49 | { | 49 | { |
50 | WARN_ON(!ioprio_valid(task->ioprio)); | 50 | if (ioprio_valid(task->ioprio)) |
51 | return IOPRIO_PRIO_DATA(task->ioprio); | 51 | return IOPRIO_PRIO_DATA(task->ioprio); |
52 | |||
53 | return IOPRIO_NORM; | ||
52 | } | 54 | } |
53 | 55 | ||
54 | static inline int task_nice_ioprio(struct task_struct *task) | 56 | static inline int task_nice_ioprio(struct task_struct *task) |
diff --git a/include/linux/ip_mp_alg.h b/include/linux/ip_mp_alg.h deleted file mode 100644 index e234e2008f5d..000000000000 --- a/include/linux/ip_mp_alg.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* ip_mp_alg.h: IPV4 multipath algorithm support, user-visible values. | ||
2 | * | ||
3 | * Copyright (C) 2004, 2005 Einar Lueck <elueck@de.ibm.com> | ||
4 | * Copyright (C) 2005 David S. Miller <davem@davemloft.net> | ||
5 | */ | ||
6 | |||
7 | #ifndef _LINUX_IP_MP_ALG_H | ||
8 | #define _LINUX_IP_MP_ALG_H | ||
9 | |||
10 | enum ip_mp_alg { | ||
11 | IP_MP_ALG_NONE, | ||
12 | IP_MP_ALG_RR, | ||
13 | IP_MP_ALG_DRR, | ||
14 | IP_MP_ALG_RANDOM, | ||
15 | IP_MP_ALG_WRANDOM, | ||
16 | __IP_MP_ALG_MAX | ||
17 | }; | ||
18 | |||
19 | #define IP_MP_ALG_MAX (__IP_MP_ALG_MAX - 1) | ||
20 | |||
21 | #endif /* _LINUX_IP_MP_ALG_H */ | ||
22 | |||
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 648bd1f0912d..97983dc9df13 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -27,8 +27,8 @@ struct in6_ifreq { | |||
27 | int ifr6_ifindex; | 27 | int ifr6_ifindex; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | #define IPV6_SRCRT_STRICT 0x01 /* this hop must be a neighbor */ | 30 | #define IPV6_SRCRT_STRICT 0x01 /* Deprecated; will be removed */ |
31 | #define IPV6_SRCRT_TYPE_0 0 /* IPv6 type 0 Routing Header */ | 31 | #define IPV6_SRCRT_TYPE_0 0 /* Deprecated; will be removed */ |
32 | #define IPV6_SRCRT_TYPE_2 2 /* IPv6 type 2 Routing Header */ | 32 | #define IPV6_SRCRT_TYPE_2 2 /* IPv6 type 2 Routing Header */ |
33 | 33 | ||
34 | /* | 34 | /* |
@@ -247,7 +247,7 @@ struct inet6_skb_parm { | |||
247 | __u16 lastopt; | 247 | __u16 lastopt; |
248 | __u32 nhoff; | 248 | __u32 nhoff; |
249 | __u16 flags; | 249 | __u16 flags; |
250 | #ifdef CONFIG_IPV6_MIP6 | 250 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) |
251 | __u16 dsthao; | 251 | __u16 dsthao; |
252 | #endif | 252 | #endif |
253 | 253 | ||
@@ -299,8 +299,8 @@ struct ipv6_pinfo { | |||
299 | /* pktoption flags */ | 299 | /* pktoption flags */ |
300 | union { | 300 | union { |
301 | struct { | 301 | struct { |
302 | __u16 srcrt:2, | 302 | __u16 srcrt:1, |
303 | osrcrt:2, | 303 | osrcrt:1, |
304 | rxinfo:1, | 304 | rxinfo:1, |
305 | rxoinfo:1, | 305 | rxoinfo:1, |
306 | rxhlim:1, | 306 | rxhlim:1, |
diff --git a/include/linux/irda.h b/include/linux/irda.h index 945ba3110874..8e3735714c1c 100644 --- a/include/linux/irda.h +++ b/include/linux/irda.h | |||
@@ -216,6 +216,34 @@ struct if_irda_req { | |||
216 | #define ifr_dtr ifr_ifru.ifru_line.dtr | 216 | #define ifr_dtr ifr_ifru.ifru_line.dtr |
217 | #define ifr_rts ifr_ifru.ifru_line.rts | 217 | #define ifr_rts ifr_ifru.ifru_line.rts |
218 | 218 | ||
219 | |||
220 | /* IrDA netlink definitions */ | ||
221 | #define IRDA_NL_NAME "irda" | ||
222 | #define IRDA_NL_VERSION 1 | ||
223 | |||
224 | enum irda_nl_commands { | ||
225 | IRDA_NL_CMD_UNSPEC, | ||
226 | IRDA_NL_CMD_SET_MODE, | ||
227 | IRDA_NL_CMD_GET_MODE, | ||
228 | |||
229 | __IRDA_NL_CMD_AFTER_LAST | ||
230 | }; | ||
231 | #define IRDA_NL_CMD_MAX (__IRDA_NL_CMD_AFTER_LAST - 1) | ||
232 | |||
233 | enum nl80211_attrs { | ||
234 | IRDA_NL_ATTR_UNSPEC, | ||
235 | IRDA_NL_ATTR_IFNAME, | ||
236 | IRDA_NL_ATTR_MODE, | ||
237 | |||
238 | __IRDA_NL_ATTR_AFTER_LAST | ||
239 | }; | ||
240 | #define IRDA_NL_ATTR_MAX (__IRDA_NL_ATTR_AFTER_LAST - 1) | ||
241 | |||
242 | /* IrDA modes */ | ||
243 | #define IRDA_MODE_PRIMARY 0x1 | ||
244 | #define IRDA_MODE_SECONDARY 0x2 | ||
245 | #define IRDA_MODE_MONITOR 0x4 | ||
246 | |||
219 | #endif /* KERNEL_IRDA_H */ | 247 | #endif /* KERNEL_IRDA_H */ |
220 | 248 | ||
221 | 249 | ||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index c288e41ba331..06cbf41d32d2 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -55,7 +55,7 @@ struct kobject { | |||
55 | struct kobject * parent; | 55 | struct kobject * parent; |
56 | struct kset * kset; | 56 | struct kset * kset; |
57 | struct kobj_type * ktype; | 57 | struct kobj_type * ktype; |
58 | struct dentry * dentry; | 58 | struct sysfs_dirent * sd; |
59 | wait_queue_head_t poll; | 59 | wait_queue_head_t poll; |
60 | }; | 60 | }; |
61 | 61 | ||
@@ -71,13 +71,14 @@ extern void kobject_init(struct kobject *); | |||
71 | extern void kobject_cleanup(struct kobject *); | 71 | extern void kobject_cleanup(struct kobject *); |
72 | 72 | ||
73 | extern int __must_check kobject_add(struct kobject *); | 73 | extern int __must_check kobject_add(struct kobject *); |
74 | extern int __must_check kobject_shadow_add(struct kobject *, struct dentry *); | 74 | extern int __must_check kobject_shadow_add(struct kobject *kobj, |
75 | struct sysfs_dirent *shadow_parent); | ||
75 | extern void kobject_del(struct kobject *); | 76 | extern void kobject_del(struct kobject *); |
76 | 77 | ||
77 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); | 78 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); |
78 | extern int __must_check kobject_shadow_rename(struct kobject *kobj, | 79 | extern int __must_check kobject_shadow_rename(struct kobject *kobj, |
79 | struct dentry *new_parent, | 80 | struct sysfs_dirent *new_parent, |
80 | const char *new_name); | 81 | const char *new_name); |
81 | extern int __must_check kobject_move(struct kobject *, struct kobject *); | 82 | extern int __must_check kobject_move(struct kobject *, struct kobject *); |
82 | 83 | ||
83 | extern int __must_check kobject_register(struct kobject *); | 84 | extern int __must_check kobject_register(struct kobject *); |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 2b139f66027f..dae7143644fe 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -279,6 +279,16 @@ static inline s64 ktime_to_us(const ktime_t kt) | |||
279 | return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec; | 279 | return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec; |
280 | } | 280 | } |
281 | 281 | ||
282 | static inline s64 ktime_us_delta(const ktime_t later, const ktime_t earlier) | ||
283 | { | ||
284 | return ktime_to_us(ktime_sub(later, earlier)); | ||
285 | } | ||
286 | |||
287 | static inline ktime_t ktime_add_us(const ktime_t kt, const u64 usec) | ||
288 | { | ||
289 | return ktime_add_ns(kt, usec * 1000); | ||
290 | } | ||
291 | |||
282 | /* | 292 | /* |
283 | * The resolution of the clocks. The resolution value is returned in | 293 | * The resolution of the clocks. The resolution value is returned in |
284 | * the clock_getres() system call to give application programmers an | 294 | * the clock_getres() system call to give application programmers an |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 620da7be07b7..47cd2a1c5544 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -116,6 +116,7 @@ static inline struct device *pci_dev_to_dev(struct pci_dev *pdev) | |||
116 | enum { | 116 | enum { |
117 | /* various global constants */ | 117 | /* various global constants */ |
118 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, | 118 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, |
119 | LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */ | ||
119 | ATA_MAX_PORTS = 8, | 120 | ATA_MAX_PORTS = 8, |
120 | ATA_DEF_QUEUE = 1, | 121 | ATA_DEF_QUEUE = 1, |
121 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ | 122 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ |
@@ -136,6 +137,8 @@ enum { | |||
136 | ATA_DFLAG_CDB_INTR = (1 << 2), /* device asserts INTRQ when ready for CDB */ | 137 | ATA_DFLAG_CDB_INTR = (1 << 2), /* device asserts INTRQ when ready for CDB */ |
137 | ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */ | 138 | ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */ |
138 | ATA_DFLAG_FLUSH_EXT = (1 << 4), /* do FLUSH_EXT instead of FLUSH */ | 139 | ATA_DFLAG_FLUSH_EXT = (1 << 4), /* do FLUSH_EXT instead of FLUSH */ |
140 | ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */ | ||
141 | ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */ | ||
139 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, | 142 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, |
140 | 143 | ||
141 | ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */ | 144 | ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */ |
@@ -193,9 +196,9 @@ enum { | |||
193 | ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ | 196 | ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ |
194 | ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */ | 197 | ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */ |
195 | 198 | ||
196 | ATA_PFLAG_FLUSH_PORT_TASK = (1 << 16), /* flush port task */ | ||
197 | ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ | 199 | ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ |
198 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ | 200 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ |
201 | ATA_PFLAG_GTM_VALID = (1 << 19), /* acpi_gtm data valid */ | ||
199 | 202 | ||
200 | /* struct ata_queued_cmd flags */ | 203 | /* struct ata_queued_cmd flags */ |
201 | ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ | 204 | ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ |
@@ -363,6 +366,9 @@ struct ata_host { | |||
363 | void *private_data; | 366 | void *private_data; |
364 | const struct ata_port_operations *ops; | 367 | const struct ata_port_operations *ops; |
365 | unsigned long flags; | 368 | unsigned long flags; |
369 | #ifdef CONFIG_ATA_ACPI | ||
370 | acpi_handle acpi_handle; | ||
371 | #endif | ||
366 | struct ata_port *simplex_claimed; /* channel owning the DMA */ | 372 | struct ata_port *simplex_claimed; /* channel owning the DMA */ |
367 | struct ata_port *ports[0]; | 373 | struct ata_port *ports[0]; |
368 | }; | 374 | }; |
@@ -428,7 +434,11 @@ struct ata_device { | |||
428 | struct ata_port *ap; | 434 | struct ata_port *ap; |
429 | unsigned int devno; /* 0 or 1 */ | 435 | unsigned int devno; /* 0 or 1 */ |
430 | unsigned long flags; /* ATA_DFLAG_xxx */ | 436 | unsigned long flags; /* ATA_DFLAG_xxx */ |
437 | unsigned int horkage; /* List of broken features */ | ||
431 | struct scsi_device *sdev; /* attached SCSI device */ | 438 | struct scsi_device *sdev; /* attached SCSI device */ |
439 | #ifdef CONFIG_ATA_ACPI | ||
440 | acpi_handle acpi_handle; | ||
441 | #endif | ||
432 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ | 442 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ |
433 | u64 n_sectors; /* size of device, if ATA */ | 443 | u64 n_sectors; /* size of device, if ATA */ |
434 | unsigned int class; /* ATA_DEV_xxx */ | 444 | unsigned int class; /* ATA_DEV_xxx */ |
@@ -456,11 +466,6 @@ struct ata_device { | |||
456 | /* error history */ | 466 | /* error history */ |
457 | struct ata_ering ering; | 467 | struct ata_ering ering; |
458 | int spdn_cnt; | 468 | int spdn_cnt; |
459 | unsigned int horkage; /* List of broken features */ | ||
460 | #ifdef CONFIG_ATA_ACPI | ||
461 | /* ACPI objects info */ | ||
462 | acpi_handle obj_handle; | ||
463 | #endif | ||
464 | }; | 469 | }; |
465 | 470 | ||
466 | /* Offset into struct ata_device. Fields above it are maintained | 471 | /* Offset into struct ata_device. Fields above it are maintained |
@@ -489,6 +494,17 @@ struct ata_eh_context { | |||
489 | unsigned int did_probe_mask; | 494 | unsigned int did_probe_mask; |
490 | }; | 495 | }; |
491 | 496 | ||
497 | struct ata_acpi_drive | ||
498 | { | ||
499 | u32 pio; | ||
500 | u32 dma; | ||
501 | } __packed; | ||
502 | |||
503 | struct ata_acpi_gtm { | ||
504 | struct ata_acpi_drive drive[2]; | ||
505 | u32 flags; | ||
506 | } __packed; | ||
507 | |||
492 | struct ata_port { | 508 | struct ata_port { |
493 | struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ | 509 | struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ |
494 | const struct ata_port_operations *ops; | 510 | const struct ata_port_operations *ops; |
@@ -549,6 +565,10 @@ struct ata_port { | |||
549 | 565 | ||
550 | void *private_data; | 566 | void *private_data; |
551 | 567 | ||
568 | #ifdef CONFIG_ATA_ACPI | ||
569 | acpi_handle acpi_handle; | ||
570 | struct ata_acpi_gtm acpi_gtm; | ||
571 | #endif | ||
552 | u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ | 572 | u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ |
553 | }; | 573 | }; |
554 | 574 | ||
@@ -758,6 +778,7 @@ extern void ata_data_xfer(struct ata_device *adev, unsigned char *buf, | |||
758 | unsigned int buflen, int write_data); | 778 | unsigned int buflen, int write_data); |
759 | extern void ata_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, | 779 | extern void ata_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, |
760 | unsigned int buflen, int write_data); | 780 | unsigned int buflen, int write_data); |
781 | extern void ata_dumb_qc_prep(struct ata_queued_cmd *qc); | ||
761 | extern void ata_qc_prep(struct ata_queued_cmd *qc); | 782 | extern void ata_qc_prep(struct ata_queued_cmd *qc); |
762 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); | 783 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); |
763 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); | 784 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); |
@@ -772,7 +793,6 @@ extern void ata_id_string(const u16 *id, unsigned char *s, | |||
772 | extern void ata_id_c_string(const u16 *id, unsigned char *s, | 793 | extern void ata_id_c_string(const u16 *id, unsigned char *s, |
773 | unsigned int ofs, unsigned int len); | 794 | unsigned int ofs, unsigned int len); |
774 | extern void ata_id_to_dma_mode(struct ata_device *dev, u8 unknown); | 795 | extern void ata_id_to_dma_mode(struct ata_device *dev, u8 unknown); |
775 | extern unsigned long ata_device_blacklisted(const struct ata_device *dev); | ||
776 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); | 796 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); |
777 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); | 797 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); |
778 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 798 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |
@@ -849,11 +869,11 @@ struct pci_bits { | |||
849 | unsigned long val; | 869 | unsigned long val; |
850 | }; | 870 | }; |
851 | 871 | ||
852 | extern int ata_pci_init_native_host(struct ata_host *host); | 872 | extern int ata_pci_init_sff_host(struct ata_host *host); |
853 | extern int ata_pci_init_bmdma(struct ata_host *host); | 873 | extern int ata_pci_init_bmdma(struct ata_host *host); |
854 | extern int ata_pci_prepare_native_host(struct pci_dev *pdev, | 874 | extern int ata_pci_prepare_sff_host(struct pci_dev *pdev, |
855 | const struct ata_port_info * const * ppi, | 875 | const struct ata_port_info * const * ppi, |
856 | struct ata_host **r_host); | 876 | struct ata_host **r_host); |
857 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 877 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |
858 | extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long); | 878 | extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long); |
859 | #endif /* CONFIG_PCI */ | 879 | #endif /* CONFIG_PCI */ |
diff --git a/include/linux/lzo.h b/include/linux/lzo.h new file mode 100644 index 000000000000..582d8b711a13 --- /dev/null +++ b/include/linux/lzo.h | |||
@@ -0,0 +1,44 @@ | |||
1 | #ifndef __LZO_H__ | ||
2 | #define __LZO_H__ | ||
3 | /* | ||
4 | * LZO Public Kernel Interface | ||
5 | * A mini subset of the LZO real-time data compression library | ||
6 | * | ||
7 | * Copyright (C) 1996-2005 Markus F.X.J. Oberhumer <markus@oberhumer.com> | ||
8 | * | ||
9 | * The full LZO package can be found at: | ||
10 | * http://www.oberhumer.com/opensource/lzo/ | ||
11 | * | ||
12 | * Changed for kernel use by: | ||
13 | * Nitin Gupta <nitingupta910@gmail.com> | ||
14 | * Richard Purdie <rpurdie@openedhand.com> | ||
15 | */ | ||
16 | |||
17 | #define LZO1X_MEM_COMPRESS (16384 * sizeof(unsigned char *)) | ||
18 | #define LZO1X_1_MEM_COMPRESS LZO1X_MEM_COMPRESS | ||
19 | |||
20 | #define lzo1x_worst_compress(x) (x + (x / 64) + 16 + 3) | ||
21 | |||
22 | /* This requires 'workmem' of size LZO1X_1_MEM_COMPRESS */ | ||
23 | int lzo1x_1_compress(const unsigned char *src, size_t src_len, | ||
24 | unsigned char *dst, size_t *dst_len, void *wrkmem); | ||
25 | |||
26 | /* safe decompression with overrun testing */ | ||
27 | int lzo1x_decompress_safe(const unsigned char *src, size_t src_len, | ||
28 | unsigned char *dst, size_t *dst_len); | ||
29 | |||
30 | /* | ||
31 | * Return values (< 0 = Error) | ||
32 | */ | ||
33 | #define LZO_E_OK 0 | ||
34 | #define LZO_E_ERROR (-1) | ||
35 | #define LZO_E_OUT_OF_MEMORY (-2) | ||
36 | #define LZO_E_NOT_COMPRESSIBLE (-3) | ||
37 | #define LZO_E_INPUT_OVERRUN (-4) | ||
38 | #define LZO_E_OUTPUT_OVERRUN (-5) | ||
39 | #define LZO_E_LOOKBEHIND_OVERRUN (-6) | ||
40 | #define LZO_E_EOF_NOT_FOUND (-7) | ||
41 | #define LZO_E_INPUT_NOT_CONSUMED (-8) | ||
42 | #define LZO_E_NOT_YET_IMPLEMENTED (-9) | ||
43 | |||
44 | #endif | ||
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index b372f5910fc1..cfb78fb2c046 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -172,6 +172,7 @@ struct mlx4_caps { | |||
172 | int num_pds; | 172 | int num_pds; |
173 | int reserved_pds; | 173 | int reserved_pds; |
174 | int mtt_entry_sz; | 174 | int mtt_entry_sz; |
175 | u32 max_msg_sz; | ||
175 | u32 page_size_cap; | 176 | u32 page_size_cap; |
176 | u32 flags; | 177 | u32 flags; |
177 | u16 stat_rate_support; | 178 | u16 stat_rate_support; |
@@ -322,6 +323,7 @@ int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, struct mlx4_mtt *mtt, | |||
322 | u64 db_rec, struct mlx4_srq *srq); | 323 | u64 db_rec, struct mlx4_srq *srq); |
323 | void mlx4_srq_free(struct mlx4_dev *dev, struct mlx4_srq *srq); | 324 | void mlx4_srq_free(struct mlx4_dev *dev, struct mlx4_srq *srq); |
324 | int mlx4_srq_arm(struct mlx4_dev *dev, struct mlx4_srq *srq, int limit_watermark); | 325 | int mlx4_srq_arm(struct mlx4_dev *dev, struct mlx4_srq *srq, int limit_watermark); |
326 | int mlx4_srq_query(struct mlx4_dev *dev, struct mlx4_srq *srq, int *limit_watermark); | ||
325 | 327 | ||
326 | int mlx4_INIT_PORT(struct mlx4_dev *dev, int port); | 328 | int mlx4_INIT_PORT(struct mlx4_dev *dev, int port); |
327 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); | 329 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 10c57d279144..3968b943259a 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -282,6 +282,9 @@ int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | |||
282 | struct mlx4_qp_context *context, enum mlx4_qp_optpar optpar, | 282 | struct mlx4_qp_context *context, enum mlx4_qp_optpar optpar, |
283 | int sqd_event, struct mlx4_qp *qp); | 283 | int sqd_event, struct mlx4_qp *qp); |
284 | 284 | ||
285 | int mlx4_qp_query(struct mlx4_dev *dev, struct mlx4_qp *qp, | ||
286 | struct mlx4_qp_context *context); | ||
287 | |||
285 | static inline struct mlx4_qp *__mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn) | 288 | static inline struct mlx4_qp *__mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn) |
286 | { | 289 | { |
287 | return radix_tree_lookup(&dev->qp_table_tree, qpn & (dev->caps.num_qps - 1)); | 290 | return radix_tree_lookup(&dev->qp_table_tree, qpn & (dev->caps.num_qps - 1)); |
diff --git a/include/linux/mv643xx.h b/include/linux/mv643xx.h index c6d4ab86b83c..b021b3a2b65a 100644 --- a/include/linux/mv643xx.h +++ b/include/linux/mv643xx.h | |||
@@ -13,10 +13,6 @@ | |||
13 | #ifndef __ASM_MV643XX_H | 13 | #ifndef __ASM_MV643XX_H |
14 | #define __ASM_MV643XX_H | 14 | #define __ASM_MV643XX_H |
15 | 15 | ||
16 | #ifdef __mips__ | ||
17 | #include <asm/addrspace.h> | ||
18 | #include <asm/marvell.h> | ||
19 | #endif | ||
20 | #include <asm/types.h> | 16 | #include <asm/types.h> |
21 | 17 | ||
22 | /****************************************/ | 18 | /****************************************/ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 3a70f553b28f..79cc3dab4be7 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -108,6 +108,14 @@ struct wireless_dev; | |||
108 | #define MAX_HEADER (LL_MAX_HEADER + 48) | 108 | #define MAX_HEADER (LL_MAX_HEADER + 48) |
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | struct net_device_subqueue | ||
112 | { | ||
113 | /* Give a control state for each queue. This struct may contain | ||
114 | * per-queue locks in the future. | ||
115 | */ | ||
116 | unsigned long state; | ||
117 | }; | ||
118 | |||
111 | /* | 119 | /* |
112 | * Network device statistics. Akin to the 2.0 ether stats but | 120 | * Network device statistics. Akin to the 2.0 ether stats but |
113 | * with byte counters. | 121 | * with byte counters. |
@@ -177,19 +185,24 @@ struct netif_rx_stats | |||
177 | 185 | ||
178 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); | 186 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); |
179 | 187 | ||
188 | struct dev_addr_list | ||
189 | { | ||
190 | struct dev_addr_list *next; | ||
191 | u8 da_addr[MAX_ADDR_LEN]; | ||
192 | u8 da_addrlen; | ||
193 | int da_users; | ||
194 | int da_gusers; | ||
195 | }; | ||
180 | 196 | ||
181 | /* | 197 | /* |
182 | * We tag multicasts with these structures. | 198 | * We tag multicasts with these structures. |
183 | */ | 199 | */ |
184 | 200 | ||
185 | struct dev_mc_list | 201 | #define dev_mc_list dev_addr_list |
186 | { | 202 | #define dmi_addr da_addr |
187 | struct dev_mc_list *next; | 203 | #define dmi_addrlen da_addrlen |
188 | __u8 dmi_addr[MAX_ADDR_LEN]; | 204 | #define dmi_users da_users |
189 | unsigned char dmi_addrlen; | 205 | #define dmi_gusers da_gusers |
190 | int dmi_users; | ||
191 | int dmi_gusers; | ||
192 | }; | ||
193 | 206 | ||
194 | struct hh_cache | 207 | struct hh_cache |
195 | { | 208 | { |
@@ -248,6 +261,8 @@ enum netdev_state_t | |||
248 | __LINK_STATE_LINKWATCH_PENDING, | 261 | __LINK_STATE_LINKWATCH_PENDING, |
249 | __LINK_STATE_DORMANT, | 262 | __LINK_STATE_DORMANT, |
250 | __LINK_STATE_QDISC_RUNNING, | 263 | __LINK_STATE_QDISC_RUNNING, |
264 | /* Set by the netpoll NAPI code */ | ||
265 | __LINK_STATE_POLL_LIST_FROZEN, | ||
251 | }; | 266 | }; |
252 | 267 | ||
253 | 268 | ||
@@ -314,9 +329,10 @@ struct net_device | |||
314 | /* Net device features */ | 329 | /* Net device features */ |
315 | unsigned long features; | 330 | unsigned long features; |
316 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ | 331 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ |
317 | #define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ | 332 | #define NETIF_F_IP_CSUM 2 /* Can checksum TCP/UDP over IPv4. */ |
318 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ | 333 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ |
319 | #define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ | 334 | #define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ |
335 | #define NETIF_F_IPV6_CSUM 16 /* Can checksum TCP/UDP over IPV6 */ | ||
320 | #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ | 336 | #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ |
321 | #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ | 337 | #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ |
322 | #define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ | 338 | #define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ |
@@ -325,6 +341,7 @@ struct net_device | |||
325 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ | 341 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ |
326 | #define NETIF_F_GSO 2048 /* Enable software GSO. */ | 342 | #define NETIF_F_GSO 2048 /* Enable software GSO. */ |
327 | #define NETIF_F_LLTX 4096 /* LockLess TX */ | 343 | #define NETIF_F_LLTX 4096 /* LockLess TX */ |
344 | #define NETIF_F_MULTI_QUEUE 16384 /* Has multiple TX/RX queues */ | ||
328 | 345 | ||
329 | /* Segmentation offload features */ | 346 | /* Segmentation offload features */ |
330 | #define NETIF_F_GSO_SHIFT 16 | 347 | #define NETIF_F_GSO_SHIFT 16 |
@@ -338,8 +355,11 @@ struct net_device | |||
338 | /* List of features with software fallbacks. */ | 355 | /* List of features with software fallbacks. */ |
339 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) | 356 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) |
340 | 357 | ||
358 | |||
341 | #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) | 359 | #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) |
342 | #define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) | 360 | #define NETIF_F_V4_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IP_CSUM) |
361 | #define NETIF_F_V6_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM) | ||
362 | #define NETIF_F_ALL_CSUM (NETIF_F_V4_CSUM | NETIF_F_V6_CSUM) | ||
343 | 363 | ||
344 | struct net_device *next_sched; | 364 | struct net_device *next_sched; |
345 | 365 | ||
@@ -388,7 +408,10 @@ struct net_device | |||
388 | unsigned char addr_len; /* hardware address length */ | 408 | unsigned char addr_len; /* hardware address length */ |
389 | unsigned short dev_id; /* for shared network cards */ | 409 | unsigned short dev_id; /* for shared network cards */ |
390 | 410 | ||
391 | struct dev_mc_list *mc_list; /* Multicast mac addresses */ | 411 | struct dev_addr_list *uc_list; /* Secondary unicast mac addresses */ |
412 | int uc_count; /* Number of installed ucasts */ | ||
413 | int uc_promisc; | ||
414 | struct dev_addr_list *mc_list; /* Multicast mac addresses */ | ||
392 | int mc_count; /* Number of installed mcasts */ | 415 | int mc_count; /* Number of installed mcasts */ |
393 | int promiscuity; | 416 | int promiscuity; |
394 | int allmulti; | 417 | int allmulti; |
@@ -493,6 +516,8 @@ struct net_device | |||
493 | void *saddr, | 516 | void *saddr, |
494 | unsigned len); | 517 | unsigned len); |
495 | int (*rebuild_header)(struct sk_buff *skb); | 518 | int (*rebuild_header)(struct sk_buff *skb); |
519 | #define HAVE_SET_RX_MODE | ||
520 | void (*set_rx_mode)(struct net_device *dev); | ||
496 | #define HAVE_MULTICAST | 521 | #define HAVE_MULTICAST |
497 | void (*set_multicast_list)(struct net_device *dev); | 522 | void (*set_multicast_list)(struct net_device *dev); |
498 | #define HAVE_SET_MAC_ADDR | 523 | #define HAVE_SET_MAC_ADDR |
@@ -540,17 +565,22 @@ struct net_device | |||
540 | struct device dev; | 565 | struct device dev; |
541 | /* space for optional statistics and wireless sysfs groups */ | 566 | /* space for optional statistics and wireless sysfs groups */ |
542 | struct attribute_group *sysfs_groups[3]; | 567 | struct attribute_group *sysfs_groups[3]; |
568 | |||
569 | /* rtnetlink link ops */ | ||
570 | const struct rtnl_link_ops *rtnl_link_ops; | ||
571 | |||
572 | /* The TX queue control structures */ | ||
573 | unsigned int egress_subqueue_count; | ||
574 | struct net_device_subqueue egress_subqueue[0]; | ||
543 | }; | 575 | }; |
544 | #define to_net_dev(d) container_of(d, struct net_device, dev) | 576 | #define to_net_dev(d) container_of(d, struct net_device, dev) |
545 | 577 | ||
546 | #define NETDEV_ALIGN 32 | 578 | #define NETDEV_ALIGN 32 |
547 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) | 579 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) |
548 | 580 | ||
549 | static inline void *netdev_priv(struct net_device *dev) | 581 | static inline void *netdev_priv(const struct net_device *dev) |
550 | { | 582 | { |
551 | return (char *)dev + ((sizeof(struct net_device) | 583 | return dev->priv; |
552 | + NETDEV_ALIGN_CONST) | ||
553 | & ~NETDEV_ALIGN_CONST); | ||
554 | } | 584 | } |
555 | 585 | ||
556 | #define SET_MODULE_OWNER(dev) do { } while (0) | 586 | #define SET_MODULE_OWNER(dev) do { } while (0) |
@@ -702,6 +732,62 @@ static inline int netif_running(const struct net_device *dev) | |||
702 | return test_bit(__LINK_STATE_START, &dev->state); | 732 | return test_bit(__LINK_STATE_START, &dev->state); |
703 | } | 733 | } |
704 | 734 | ||
735 | /* | ||
736 | * Routines to manage the subqueues on a device. We only need start | ||
737 | * stop, and a check if it's stopped. All other device management is | ||
738 | * done at the overall netdevice level. | ||
739 | * Also test the device if we're multiqueue. | ||
740 | */ | ||
741 | static inline void netif_start_subqueue(struct net_device *dev, u16 queue_index) | ||
742 | { | ||
743 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
744 | clear_bit(__LINK_STATE_XOFF, &dev->egress_subqueue[queue_index].state); | ||
745 | #endif | ||
746 | } | ||
747 | |||
748 | static inline void netif_stop_subqueue(struct net_device *dev, u16 queue_index) | ||
749 | { | ||
750 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
751 | #ifdef CONFIG_NETPOLL_TRAP | ||
752 | if (netpoll_trap()) | ||
753 | return; | ||
754 | #endif | ||
755 | set_bit(__LINK_STATE_XOFF, &dev->egress_subqueue[queue_index].state); | ||
756 | #endif | ||
757 | } | ||
758 | |||
759 | static inline int netif_subqueue_stopped(const struct net_device *dev, | ||
760 | u16 queue_index) | ||
761 | { | ||
762 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
763 | return test_bit(__LINK_STATE_XOFF, | ||
764 | &dev->egress_subqueue[queue_index].state); | ||
765 | #else | ||
766 | return 0; | ||
767 | #endif | ||
768 | } | ||
769 | |||
770 | static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index) | ||
771 | { | ||
772 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
773 | #ifdef CONFIG_NETPOLL_TRAP | ||
774 | if (netpoll_trap()) | ||
775 | return; | ||
776 | #endif | ||
777 | if (test_and_clear_bit(__LINK_STATE_XOFF, | ||
778 | &dev->egress_subqueue[queue_index].state)) | ||
779 | __netif_schedule(dev); | ||
780 | #endif | ||
781 | } | ||
782 | |||
783 | static inline int netif_is_multiqueue(const struct net_device *dev) | ||
784 | { | ||
785 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
786 | return (!!(NETIF_F_MULTI_QUEUE & dev->features)); | ||
787 | #else | ||
788 | return 0; | ||
789 | #endif | ||
790 | } | ||
705 | 791 | ||
706 | /* Use this variant when it is known for sure that it | 792 | /* Use this variant when it is known for sure that it |
707 | * is executing from interrupt context. | 793 | * is executing from interrupt context. |
@@ -930,6 +1016,14 @@ static inline void netif_rx_complete(struct net_device *dev) | |||
930 | { | 1016 | { |
931 | unsigned long flags; | 1017 | unsigned long flags; |
932 | 1018 | ||
1019 | #ifdef CONFIG_NETPOLL | ||
1020 | /* Prevent race with netpoll - yes, this is a kludge. | ||
1021 | * But at least it doesn't penalize the non-netpoll | ||
1022 | * code path. */ | ||
1023 | if (test_bit(__LINK_STATE_POLL_LIST_FROZEN, &dev->state)) | ||
1024 | return; | ||
1025 | #endif | ||
1026 | |||
933 | local_irq_save(flags); | 1027 | local_irq_save(flags); |
934 | __netif_rx_complete(dev); | 1028 | __netif_rx_complete(dev); |
935 | local_irq_restore(flags); | 1029 | local_irq_restore(flags); |
@@ -992,15 +1086,24 @@ static inline void netif_tx_disable(struct net_device *dev) | |||
992 | extern void ether_setup(struct net_device *dev); | 1086 | extern void ether_setup(struct net_device *dev); |
993 | 1087 | ||
994 | /* Support for loadable net-drivers */ | 1088 | /* Support for loadable net-drivers */ |
995 | extern struct net_device *alloc_netdev(int sizeof_priv, const char *name, | 1089 | extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, |
996 | void (*setup)(struct net_device *)); | 1090 | void (*setup)(struct net_device *), |
1091 | unsigned int queue_count); | ||
1092 | #define alloc_netdev(sizeof_priv, name, setup) \ | ||
1093 | alloc_netdev_mq(sizeof_priv, name, setup, 1) | ||
997 | extern int register_netdev(struct net_device *dev); | 1094 | extern int register_netdev(struct net_device *dev); |
998 | extern void unregister_netdev(struct net_device *dev); | 1095 | extern void unregister_netdev(struct net_device *dev); |
999 | /* Functions used for multicast support */ | 1096 | /* Functions used for secondary unicast and multicast support */ |
1000 | extern void dev_mc_upload(struct net_device *dev); | 1097 | extern void dev_set_rx_mode(struct net_device *dev); |
1098 | extern void __dev_set_rx_mode(struct net_device *dev); | ||
1099 | extern int dev_unicast_delete(struct net_device *dev, void *addr, int alen); | ||
1100 | extern int dev_unicast_add(struct net_device *dev, void *addr, int alen); | ||
1001 | extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); | 1101 | extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); |
1002 | extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); | 1102 | extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); |
1003 | extern void dev_mc_discard(struct net_device *dev); | 1103 | extern void dev_mc_discard(struct net_device *dev); |
1104 | extern int __dev_addr_delete(struct dev_addr_list **list, int *count, void *addr, int alen, int all); | ||
1105 | extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly); | ||
1106 | extern void __dev_addr_discard(struct dev_addr_list **list); | ||
1004 | extern void dev_set_promiscuity(struct net_device *dev, int inc); | 1107 | extern void dev_set_promiscuity(struct net_device *dev, int inc); |
1005 | extern void dev_set_allmulti(struct net_device *dev, int inc); | 1108 | extern void dev_set_allmulti(struct net_device *dev, int inc); |
1006 | extern void netdev_state_change(struct net_device *dev); | 1109 | extern void netdev_state_change(struct net_device *dev); |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 10b5c6275706..0eed0b7ab2df 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -275,7 +275,8 @@ struct nf_queue_handler { | |||
275 | }; | 275 | }; |
276 | extern int nf_register_queue_handler(int pf, | 276 | extern int nf_register_queue_handler(int pf, |
277 | struct nf_queue_handler *qh); | 277 | struct nf_queue_handler *qh); |
278 | extern int nf_unregister_queue_handler(int pf); | 278 | extern int nf_unregister_queue_handler(int pf, |
279 | struct nf_queue_handler *qh); | ||
279 | extern void nf_unregister_queue_handlers(struct nf_queue_handler *qh); | 280 | extern void nf_unregister_queue_handlers(struct nf_queue_handler *qh); |
280 | extern void nf_reinject(struct sk_buff *skb, | 281 | extern void nf_reinject(struct sk_buff *skb, |
281 | struct nf_info *info, | 282 | struct nf_info *info, |
diff --git a/include/linux/netfilter/nf_conntrack_pptp.h b/include/linux/netfilter/nf_conntrack_pptp.h index 9d8144a488cd..c93061f33144 100644 --- a/include/linux/netfilter/nf_conntrack_pptp.h +++ b/include/linux/netfilter/nf_conntrack_pptp.h | |||
@@ -4,6 +4,8 @@ | |||
4 | 4 | ||
5 | #include <linux/netfilter/nf_conntrack_common.h> | 5 | #include <linux/netfilter/nf_conntrack_common.h> |
6 | 6 | ||
7 | extern const char *pptp_msg_name[]; | ||
8 | |||
7 | /* state of the control session */ | 9 | /* state of the control session */ |
8 | enum pptp_ctrlsess_state { | 10 | enum pptp_ctrlsess_state { |
9 | PPTP_SESSION_NONE, /* no session present */ | 11 | PPTP_SESSION_NONE, /* no session present */ |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 7e733a6ba4f6..64f425a855bb 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -141,22 +141,22 @@ struct xt_match | |||
141 | /* Arguments changed since 2.6.9, as this must now handle | 141 | /* Arguments changed since 2.6.9, as this must now handle |
142 | non-linear skb, using skb_header_pointer and | 142 | non-linear skb, using skb_header_pointer and |
143 | skb_ip_make_writable. */ | 143 | skb_ip_make_writable. */ |
144 | int (*match)(const struct sk_buff *skb, | 144 | bool (*match)(const struct sk_buff *skb, |
145 | const struct net_device *in, | 145 | const struct net_device *in, |
146 | const struct net_device *out, | 146 | const struct net_device *out, |
147 | const struct xt_match *match, | 147 | const struct xt_match *match, |
148 | const void *matchinfo, | 148 | const void *matchinfo, |
149 | int offset, | 149 | int offset, |
150 | unsigned int protoff, | 150 | unsigned int protoff, |
151 | int *hotdrop); | 151 | bool *hotdrop); |
152 | 152 | ||
153 | /* Called when user tries to insert an entry of this type. */ | 153 | /* Called when user tries to insert an entry of this type. */ |
154 | /* Should return true or false. */ | 154 | /* Should return true or false. */ |
155 | int (*checkentry)(const char *tablename, | 155 | bool (*checkentry)(const char *tablename, |
156 | const void *ip, | 156 | const void *ip, |
157 | const struct xt_match *match, | 157 | const struct xt_match *match, |
158 | void *matchinfo, | 158 | void *matchinfo, |
159 | unsigned int hook_mask); | 159 | unsigned int hook_mask); |
160 | 160 | ||
161 | /* Called when entry of this type deleted. */ | 161 | /* Called when entry of this type deleted. */ |
162 | void (*destroy)(const struct xt_match *match, void *matchinfo); | 162 | void (*destroy)(const struct xt_match *match, void *matchinfo); |
@@ -202,11 +202,11 @@ struct xt_target | |||
202 | hook_mask is a bitmask of hooks from which it can be | 202 | hook_mask is a bitmask of hooks from which it can be |
203 | called. */ | 203 | called. */ |
204 | /* Should return true or false. */ | 204 | /* Should return true or false. */ |
205 | int (*checkentry)(const char *tablename, | 205 | bool (*checkentry)(const char *tablename, |
206 | const void *entry, | 206 | const void *entry, |
207 | const struct xt_target *target, | 207 | const struct xt_target *target, |
208 | void *targinfo, | 208 | void *targinfo, |
209 | unsigned int hook_mask); | 209 | unsigned int hook_mask); |
210 | 210 | ||
211 | /* Called when entry of this type deleted. */ | 211 | /* Called when entry of this type deleted. */ |
212 | void (*destroy)(const struct xt_target *target, void *targinfo); | 212 | void (*destroy)(const struct xt_target *target, void *targinfo); |
diff --git a/include/linux/netfilter/xt_u32.h b/include/linux/netfilter/xt_u32.h new file mode 100644 index 000000000000..9947f56cdbdd --- /dev/null +++ b/include/linux/netfilter/xt_u32.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef _XT_U32_H | ||
2 | #define _XT_U32_H 1 | ||
3 | |||
4 | enum xt_u32_ops { | ||
5 | XT_U32_AND, | ||
6 | XT_U32_LEFTSH, | ||
7 | XT_U32_RIGHTSH, | ||
8 | XT_U32_AT, | ||
9 | }; | ||
10 | |||
11 | struct xt_u32_location_element { | ||
12 | u_int32_t number; | ||
13 | u_int8_t nextop; | ||
14 | }; | ||
15 | |||
16 | struct xt_u32_value_element { | ||
17 | u_int32_t min; | ||
18 | u_int32_t max; | ||
19 | }; | ||
20 | |||
21 | /* | ||
22 | * Any way to allow for an arbitrary number of elements? | ||
23 | * For now, I settle with a limit of 10 each. | ||
24 | */ | ||
25 | #define XT_U32_MAXSIZE 10 | ||
26 | |||
27 | struct xt_u32_test { | ||
28 | struct xt_u32_location_element location[XT_U32_MAXSIZE+1]; | ||
29 | struct xt_u32_value_element value[XT_U32_MAXSIZE+1]; | ||
30 | u_int8_t nnums; | ||
31 | u_int8_t nvalues; | ||
32 | }; | ||
33 | |||
34 | struct xt_u32 { | ||
35 | struct xt_u32_test tests[XT_U32_MAXSIZE+1]; | ||
36 | u_int8_t ntests; | ||
37 | u_int8_t invert; | ||
38 | }; | ||
39 | |||
40 | #endif /* _XT_U32_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h b/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h index d9bceedfb3dc..daf50be22c9d 100644 --- a/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h +++ b/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h | |||
@@ -18,13 +18,13 @@ struct clusterip_config; | |||
18 | struct ipt_clusterip_tgt_info { | 18 | struct ipt_clusterip_tgt_info { |
19 | 19 | ||
20 | u_int32_t flags; | 20 | u_int32_t flags; |
21 | 21 | ||
22 | /* only relevant for new ones */ | 22 | /* only relevant for new ones */ |
23 | u_int8_t clustermac[6]; | 23 | u_int8_t clustermac[6]; |
24 | u_int16_t num_total_nodes; | 24 | u_int16_t num_total_nodes; |
25 | u_int16_t num_local_nodes; | 25 | u_int16_t num_local_nodes; |
26 | u_int16_t local_nodes[CLUSTERIP_MAX_NODES]; | 26 | u_int16_t local_nodes[CLUSTERIP_MAX_NODES]; |
27 | enum clusterip_hashmode hash_mode; | 27 | u_int32_t hash_mode; |
28 | u_int32_t hash_initval; | 28 | u_int32_t hash_initval; |
29 | 29 | ||
30 | struct clusterip_config *config; | 30 | struct clusterip_config *config; |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 4686f8342cbd..9a720f05888f 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -44,8 +44,14 @@ struct ip6t_ip6 { | |||
44 | char iniface[IFNAMSIZ], outiface[IFNAMSIZ]; | 44 | char iniface[IFNAMSIZ], outiface[IFNAMSIZ]; |
45 | unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; | 45 | unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; |
46 | 46 | ||
47 | /* ARGH, HopByHop uses 0, so can't do 0 = ANY, | 47 | /* Upper protocol number |
48 | instead IP6T_F_NOPROTO must be set */ | 48 | * - The allowed value is 0 (any) or protocol number of last parsable |
49 | * header, which is 50 (ESP), 59 (No Next Header), 135 (MH), or | ||
50 | * the non IPv6 extension headers. | ||
51 | * - The protocol numbers of IPv6 extension headers except of ESP and | ||
52 | * MH do not match any packets. | ||
53 | * - You also need to set IP6T_FLAGS_PROTO to "flags" to check protocol. | ||
54 | */ | ||
49 | u_int16_t proto; | 55 | u_int16_t proto; |
50 | /* TOS to match iff flags & IP6T_F_TOS */ | 56 | /* TOS to match iff flags & IP6T_F_TOS */ |
51 | u_int8_t tos; | 57 | u_int8_t tos; |
diff --git a/include/linux/pata_platform.h b/include/linux/pata_platform.h index 2d5fd647e0e9..5799e8d50623 100644 --- a/include/linux/pata_platform.h +++ b/include/linux/pata_platform.h | |||
@@ -8,6 +8,11 @@ struct pata_platform_info { | |||
8 | * spacing used by ata_std_ports(). | 8 | * spacing used by ata_std_ports(). |
9 | */ | 9 | */ |
10 | unsigned int ioport_shift; | 10 | unsigned int ioport_shift; |
11 | /* | ||
12 | * Indicate platform specific irq types and initial | ||
13 | * IRQ flags when call request_irq() | ||
14 | */ | ||
15 | unsigned int irq_flags; | ||
11 | }; | 16 | }; |
12 | 17 | ||
13 | #endif /* __LINUX_PATA_PLATFORM_H */ | 18 | #endif /* __LINUX_PATA_PLATFORM_H */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 086a0e5a6318..37a71580ad8a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -111,7 +111,8 @@ enum pcie_reset_state { | |||
111 | 111 | ||
112 | typedef unsigned short __bitwise pci_bus_flags_t; | 112 | typedef unsigned short __bitwise pci_bus_flags_t; |
113 | enum pci_bus_flags { | 113 | enum pci_bus_flags { |
114 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, | 114 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, |
115 | PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2, | ||
115 | }; | 116 | }; |
116 | 117 | ||
117 | struct pci_cap_saved_state { | 118 | struct pci_cap_saved_state { |
@@ -138,6 +139,7 @@ struct pci_dev { | |||
138 | unsigned short subsystem_vendor; | 139 | unsigned short subsystem_vendor; |
139 | unsigned short subsystem_device; | 140 | unsigned short subsystem_device; |
140 | unsigned int class; /* 3 bytes: (base,sub,prog-if) */ | 141 | unsigned int class; /* 3 bytes: (base,sub,prog-if) */ |
142 | u8 revision; /* PCI revision, low byte of class word */ | ||
141 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ | 143 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ |
142 | u8 rom_base_reg; /* which config register controls the ROM */ | 144 | u8 rom_base_reg; /* which config register controls the ROM */ |
143 | u8 pin; /* which interrupt pin this device uses */ | 145 | u8 pin; /* which interrupt pin this device uses */ |
@@ -313,7 +315,7 @@ struct pci_dynids { | |||
313 | 315 | ||
314 | /* ---------------------------------------------------------------- */ | 316 | /* ---------------------------------------------------------------- */ |
315 | /** PCI Error Recovery System (PCI-ERS). If a PCI device driver provides | 317 | /** PCI Error Recovery System (PCI-ERS). If a PCI device driver provides |
316 | * a set fof callbacks in struct pci_error_handlers, then that device driver | 318 | * a set of callbacks in struct pci_error_handlers, then that device driver |
317 | * will be notified of PCI bus errors, and will be driven to recovery | 319 | * will be notified of PCI bus errors, and will be driven to recovery |
318 | * when an error occurs. | 320 | * when an error occurs. |
319 | */ | 321 | */ |
@@ -370,7 +372,6 @@ struct pci_driver { | |||
370 | int (*suspend_late) (struct pci_dev *dev, pm_message_t state); | 372 | int (*suspend_late) (struct pci_dev *dev, pm_message_t state); |
371 | int (*resume_early) (struct pci_dev *dev); | 373 | int (*resume_early) (struct pci_dev *dev); |
372 | int (*resume) (struct pci_dev *dev); /* Device woken up */ | 374 | int (*resume) (struct pci_dev *dev); /* Device woken up */ |
373 | int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */ | ||
374 | void (*shutdown) (struct pci_dev *dev); | 375 | void (*shutdown) (struct pci_dev *dev); |
375 | 376 | ||
376 | struct pci_error_handlers *err_handler; | 377 | struct pci_error_handlers *err_handler; |
@@ -475,7 +476,7 @@ extern void pci_sort_breadthfirst(void); | |||
475 | /* Generic PCI functions exported to card drivers */ | 476 | /* Generic PCI functions exported to card drivers */ |
476 | 477 | ||
477 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); | 478 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); |
478 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | 479 | struct pci_dev __deprecated *pci_find_slot (unsigned int bus, unsigned int devfn); |
479 | int pci_find_capability (struct pci_dev *dev, int cap); | 480 | int pci_find_capability (struct pci_dev *dev, int cap); |
480 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 481 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |
481 | int pci_find_ext_capability (struct pci_dev *dev, int cap); | 482 | int pci_find_ext_capability (struct pci_dev *dev, int cap); |
@@ -544,11 +545,16 @@ void pci_set_master(struct pci_dev *dev); | |||
544 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); | 545 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); |
545 | #define HAVE_PCI_SET_MWI | 546 | #define HAVE_PCI_SET_MWI |
546 | int __must_check pci_set_mwi(struct pci_dev *dev); | 547 | int __must_check pci_set_mwi(struct pci_dev *dev); |
548 | int pci_try_set_mwi(struct pci_dev *dev); | ||
547 | void pci_clear_mwi(struct pci_dev *dev); | 549 | void pci_clear_mwi(struct pci_dev *dev); |
548 | void pci_intx(struct pci_dev *dev, int enable); | 550 | void pci_intx(struct pci_dev *dev, int enable); |
549 | void pci_msi_off(struct pci_dev *dev); | 551 | void pci_msi_off(struct pci_dev *dev); |
550 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); | 552 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); |
551 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | 553 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); |
554 | int pcix_get_max_mmrbc(struct pci_dev *dev); | ||
555 | int pcix_get_mmrbc(struct pci_dev *dev); | ||
556 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); | ||
557 | int pcie_set_readrq(struct pci_dev *dev, int rq); | ||
552 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | 558 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); |
553 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 559 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
554 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); | 560 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); |
@@ -560,6 +566,7 @@ void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); | |||
560 | void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size); | 566 | void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size); |
561 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); | 567 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); |
562 | void pci_remove_rom(struct pci_dev *pdev); | 568 | void pci_remove_rom(struct pci_dev *pdev); |
569 | size_t pci_get_rom_size(void __iomem *rom, size_t size); | ||
563 | 570 | ||
564 | /* Power management related routines */ | 571 | /* Power management related routines */ |
565 | int pci_save_state(struct pci_dev *dev); | 572 | int pci_save_state(struct pci_dev *dev); |
@@ -876,5 +883,7 @@ extern int pci_pci_problems; | |||
876 | extern unsigned long pci_cardbus_io_size; | 883 | extern unsigned long pci_cardbus_io_size; |
877 | extern unsigned long pci_cardbus_mem_size; | 884 | extern unsigned long pci_cardbus_mem_size; |
878 | 885 | ||
886 | extern int pcibios_add_platform_entries(struct pci_dev *dev); | ||
887 | |||
879 | #endif /* __KERNEL__ */ | 888 | #endif /* __KERNEL__ */ |
880 | #endif /* LINUX_PCI_H */ | 889 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 0275f6917c8e..2c7add169539 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -133,6 +133,9 @@ | |||
133 | 133 | ||
134 | /* Vendors and devices. Sort key: vendor first, device next. */ | 134 | /* Vendors and devices. Sort key: vendor first, device next. */ |
135 | 135 | ||
136 | #define PCI_VENDOR_ID_TTTECH 0x0357 | ||
137 | #define PCI_DEVICE_ID_TTTECH_MC322 0x000a | ||
138 | |||
136 | #define PCI_VENDOR_ID_DYNALINK 0x0675 | 139 | #define PCI_VENDOR_ID_DYNALINK 0x0675 |
137 | #define PCI_DEVICE_ID_DYNALINK_IS64PH 0x1702 | 140 | #define PCI_DEVICE_ID_DYNALINK_IS64PH 0x1702 |
138 | 141 | ||
@@ -371,6 +374,7 @@ | |||
371 | #define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 | 374 | #define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 |
372 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c | 375 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c |
373 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 | 376 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 |
377 | #define PCI_DEVICE_ID_ATI_IXP700_SMBUS 0x4395 | ||
374 | #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c | 378 | #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c |
375 | 379 | ||
376 | #define PCI_VENDOR_ID_VLSI 0x1004 | 380 | #define PCI_VENDOR_ID_VLSI 0x1004 |
@@ -735,7 +739,6 @@ | |||
735 | #define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 | 739 | #define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 |
736 | #define PCI_DEVICE_ID_ELSA_QS3000 0x3000 | 740 | #define PCI_DEVICE_ID_ELSA_QS3000 0x3000 |
737 | 741 | ||
738 | |||
739 | #define PCI_VENDOR_ID_BUSLOGIC 0x104B | 742 | #define PCI_VENDOR_ID_BUSLOGIC 0x104B |
740 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 | 743 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 |
741 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040 | 744 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040 |
@@ -781,7 +784,6 @@ | |||
781 | 784 | ||
782 | #define PCI_VENDOR_ID_SONY 0x104d | 785 | #define PCI_VENDOR_ID_SONY 0x104d |
783 | 786 | ||
784 | |||
785 | /* Winbond have two vendor IDs! See 0x10ad as well */ | 787 | /* Winbond have two vendor IDs! See 0x10ad as well */ |
786 | #define PCI_VENDOR_ID_WINBOND2 0x1050 | 788 | #define PCI_VENDOR_ID_WINBOND2 0x1050 |
787 | #define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a | 789 | #define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a |
@@ -819,7 +821,6 @@ | |||
819 | #define PCI_DEVICE_ID_PROMISE_20276 0x5275 | 821 | #define PCI_DEVICE_ID_PROMISE_20276 0x5275 |
820 | #define PCI_DEVICE_ID_PROMISE_20277 0x7275 | 822 | #define PCI_DEVICE_ID_PROMISE_20277 0x7275 |
821 | 823 | ||
822 | |||
823 | #define PCI_VENDOR_ID_UMC 0x1060 | 824 | #define PCI_VENDOR_ID_UMC 0x1060 |
824 | #define PCI_DEVICE_ID_UMC_UM8673F 0x0101 | 825 | #define PCI_DEVICE_ID_UMC_UM8673F 0x0101 |
825 | #define PCI_DEVICE_ID_UMC_UM8886BF 0x673a | 826 | #define PCI_DEVICE_ID_UMC_UM8886BF 0x673a |
@@ -835,7 +836,6 @@ | |||
835 | #define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 | 836 | #define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 |
836 | #define PCI_DEVICE_ID_MYLEX_DAC960_GEM 0xB166 | 837 | #define PCI_DEVICE_ID_MYLEX_DAC960_GEM 0xB166 |
837 | 838 | ||
838 | |||
839 | #define PCI_VENDOR_ID_APPLE 0x106b | 839 | #define PCI_VENDOR_ID_APPLE 0x106b |
840 | #define PCI_DEVICE_ID_APPLE_BANDIT 0x0001 | 840 | #define PCI_DEVICE_ID_APPLE_BANDIT 0x0001 |
841 | #define PCI_DEVICE_ID_APPLE_HYDRA 0x000e | 841 | #define PCI_DEVICE_ID_APPLE_HYDRA 0x000e |
@@ -871,7 +871,6 @@ | |||
871 | #define PCI_DEVICE_ID_YAMAHA_744 0x0010 | 871 | #define PCI_DEVICE_ID_YAMAHA_744 0x0010 |
872 | #define PCI_DEVICE_ID_YAMAHA_754 0x0012 | 872 | #define PCI_DEVICE_ID_YAMAHA_754 0x0012 |
873 | 873 | ||
874 | |||
875 | #define PCI_VENDOR_ID_QLOGIC 0x1077 | 874 | #define PCI_VENDOR_ID_QLOGIC 0x1077 |
876 | #define PCI_DEVICE_ID_QLOGIC_ISP10160 0x1016 | 875 | #define PCI_DEVICE_ID_QLOGIC_ISP10160 0x1016 |
877 | #define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 | 876 | #define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 |
@@ -902,12 +901,9 @@ | |||
902 | #define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103 | 901 | #define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103 |
903 | #define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104 | 902 | #define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104 |
904 | 903 | ||
905 | |||
906 | |||
907 | #define PCI_VENDOR_ID_CONTAQ 0x1080 | 904 | #define PCI_VENDOR_ID_CONTAQ 0x1080 |
908 | #define PCI_DEVICE_ID_CONTAQ_82C693 0xc693 | 905 | #define PCI_DEVICE_ID_CONTAQ_82C693 0xc693 |
909 | 906 | ||
910 | |||
911 | #define PCI_VENDOR_ID_OLICOM 0x108d | 907 | #define PCI_VENDOR_ID_OLICOM 0x108d |
912 | #define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 | 908 | #define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 |
913 | #define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 | 909 | #define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 |
@@ -939,23 +935,19 @@ | |||
939 | #define PCI_DEVICE_ID_SII_3112 0x3112 | 935 | #define PCI_DEVICE_ID_SII_3112 0x3112 |
940 | #define PCI_DEVICE_ID_SII_1210SA 0x0240 | 936 | #define PCI_DEVICE_ID_SII_1210SA 0x0240 |
941 | 937 | ||
942 | |||
943 | #define PCI_VENDOR_ID_BROOKTREE 0x109e | 938 | #define PCI_VENDOR_ID_BROOKTREE 0x109e |
944 | #define PCI_DEVICE_ID_BROOKTREE_878 0x0878 | 939 | #define PCI_DEVICE_ID_BROOKTREE_878 0x0878 |
945 | #define PCI_DEVICE_ID_BROOKTREE_879 0x0879 | 940 | #define PCI_DEVICE_ID_BROOKTREE_879 0x0879 |
946 | 941 | ||
947 | |||
948 | #define PCI_VENDOR_ID_SGI 0x10a9 | 942 | #define PCI_VENDOR_ID_SGI 0x10a9 |
949 | #define PCI_DEVICE_ID_SGI_IOC3 0x0003 | 943 | #define PCI_DEVICE_ID_SGI_IOC3 0x0003 |
944 | #define PCI_DEVICE_ID_SGI_LITHIUM 0x1002 | ||
950 | #define PCI_DEVICE_ID_SGI_IOC4 0x100a | 945 | #define PCI_DEVICE_ID_SGI_IOC4 0x100a |
951 | #define PCI_VENDOR_ID_SGI_LITHIUM 0x1002 | ||
952 | |||
953 | 946 | ||
954 | #define PCI_VENDOR_ID_WINBOND 0x10ad | 947 | #define PCI_VENDOR_ID_WINBOND 0x10ad |
955 | #define PCI_DEVICE_ID_WINBOND_82C105 0x0105 | 948 | #define PCI_DEVICE_ID_WINBOND_82C105 0x0105 |
956 | #define PCI_DEVICE_ID_WINBOND_83C553 0x0565 | 949 | #define PCI_DEVICE_ID_WINBOND_83C553 0x0565 |
957 | 950 | ||
958 | |||
959 | #define PCI_VENDOR_ID_PLX 0x10b5 | 951 | #define PCI_VENDOR_ID_PLX 0x10b5 |
960 | #define PCI_DEVICE_ID_PLX_R685 0x1030 | 952 | #define PCI_DEVICE_ID_PLX_R685 0x1030 |
961 | #define PCI_DEVICE_ID_PLX_ROMULUS 0x106a | 953 | #define PCI_DEVICE_ID_PLX_ROMULUS 0x106a |
@@ -989,7 +981,6 @@ | |||
989 | #define PCI_DEVICE_ID_3COM_3CR990SVR97 0x9909 | 981 | #define PCI_DEVICE_ID_3COM_3CR990SVR97 0x9909 |
990 | #define PCI_DEVICE_ID_3COM_3CR990SVR 0x990a | 982 | #define PCI_DEVICE_ID_3COM_3CR990SVR 0x990a |
991 | 983 | ||
992 | |||
993 | #define PCI_VENDOR_ID_AL 0x10b9 | 984 | #define PCI_VENDOR_ID_AL 0x10b9 |
994 | #define PCI_DEVICE_ID_AL_M1533 0x1533 | 985 | #define PCI_DEVICE_ID_AL_M1533 0x1533 |
995 | #define PCI_DEVICE_ID_AL_M1535 0x1535 | 986 | #define PCI_DEVICE_ID_AL_M1535 0x1535 |
@@ -1012,18 +1003,14 @@ | |||
1012 | #define PCI_DEVICE_ID_AL_M5451 0x5451 | 1003 | #define PCI_DEVICE_ID_AL_M5451 0x5451 |
1013 | #define PCI_DEVICE_ID_AL_M7101 0x7101 | 1004 | #define PCI_DEVICE_ID_AL_M7101 0x7101 |
1014 | 1005 | ||
1015 | |||
1016 | |||
1017 | #define PCI_VENDOR_ID_NEOMAGIC 0x10c8 | 1006 | #define PCI_VENDOR_ID_NEOMAGIC 0x10c8 |
1018 | #define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005 | 1007 | #define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005 |
1019 | #define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006 | 1008 | #define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006 |
1020 | #define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016 | 1009 | #define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016 |
1021 | 1010 | ||
1022 | |||
1023 | #define PCI_VENDOR_ID_TCONRAD 0x10da | 1011 | #define PCI_VENDOR_ID_TCONRAD 0x10da |
1024 | #define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508 | 1012 | #define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508 |
1025 | 1013 | ||
1026 | |||
1027 | #define PCI_VENDOR_ID_NVIDIA 0x10de | 1014 | #define PCI_VENDOR_ID_NVIDIA 0x10de |
1028 | #define PCI_DEVICE_ID_NVIDIA_TNT 0x0020 | 1015 | #define PCI_DEVICE_ID_NVIDIA_TNT 0x0020 |
1029 | #define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028 | 1016 | #define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028 |
@@ -1244,9 +1231,6 @@ | |||
1244 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 | 1231 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 |
1245 | #define PCI_DEVICE_ID_IMS_TT3D 0x9135 | 1232 | #define PCI_DEVICE_ID_IMS_TT3D 0x9135 |
1246 | 1233 | ||
1247 | |||
1248 | |||
1249 | |||
1250 | #define PCI_VENDOR_ID_INTERG 0x10ea | 1234 | #define PCI_VENDOR_ID_INTERG 0x10ea |
1251 | #define PCI_DEVICE_ID_INTERG_1682 0x1682 | 1235 | #define PCI_DEVICE_ID_INTERG_1682 0x1682 |
1252 | #define PCI_DEVICE_ID_INTERG_2000 0x2000 | 1236 | #define PCI_DEVICE_ID_INTERG_2000 0x2000 |
@@ -1265,7 +1249,6 @@ | |||
1265 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP 0x3fc5 | 1249 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP 0x3fc5 |
1266 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI 0x3fc6 | 1250 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI 0x3fc6 |
1267 | 1251 | ||
1268 | |||
1269 | #define PCI_VENDOR_ID_INIT 0x1101 | 1252 | #define PCI_VENDOR_ID_INIT 0x1101 |
1270 | 1253 | ||
1271 | #define PCI_VENDOR_ID_CREATIVE 0x1102 /* duplicate: ECTIVA */ | 1254 | #define PCI_VENDOR_ID_CREATIVE 0x1102 /* duplicate: ECTIVA */ |
@@ -1360,7 +1343,6 @@ | |||
1360 | #define PCI_VENDOR_ID_SIEMENS 0x110A | 1343 | #define PCI_VENDOR_ID_SIEMENS 0x110A |
1361 | #define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 | 1344 | #define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 |
1362 | 1345 | ||
1363 | |||
1364 | #define PCI_VENDOR_ID_VORTEX 0x1119 | 1346 | #define PCI_VENDOR_ID_VORTEX 0x1119 |
1365 | #define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000 | 1347 | #define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000 |
1366 | #define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001 | 1348 | #define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001 |
@@ -1386,8 +1368,8 @@ | |||
1386 | #define PCI_VENDOR_ID_EF 0x111a | 1368 | #define PCI_VENDOR_ID_EF 0x111a |
1387 | #define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 | 1369 | #define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 |
1388 | #define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 | 1370 | #define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 |
1389 | #define PCI_VENDOR_ID_EF_ATM_LANAI2 0x0003 | 1371 | #define PCI_DEVICE_ID_EF_ATM_LANAI2 0x0003 |
1390 | #define PCI_VENDOR_ID_EF_ATM_LANAIHB 0x0005 | 1372 | #define PCI_DEVICE_ID_EF_ATM_LANAIHB 0x0005 |
1391 | 1373 | ||
1392 | #define PCI_VENDOR_ID_IDT 0x111d | 1374 | #define PCI_VENDOR_ID_IDT 0x111d |
1393 | #define PCI_DEVICE_ID_IDT_IDT77201 0x0001 | 1375 | #define PCI_DEVICE_ID_IDT_IDT77201 0x0001 |
@@ -1395,7 +1377,6 @@ | |||
1395 | #define PCI_VENDOR_ID_FORE 0x1127 | 1377 | #define PCI_VENDOR_ID_FORE 0x1127 |
1396 | #define PCI_DEVICE_ID_FORE_PCA200E 0x0300 | 1378 | #define PCI_DEVICE_ID_FORE_PCA200E 0x0300 |
1397 | 1379 | ||
1398 | |||
1399 | #define PCI_VENDOR_ID_PHILIPS 0x1131 | 1380 | #define PCI_VENDOR_ID_PHILIPS 0x1131 |
1400 | #define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146 | 1381 | #define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146 |
1401 | #define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730 | 1382 | #define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730 |
@@ -1414,7 +1395,6 @@ | |||
1414 | #define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550 | 1395 | #define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550 |
1415 | 1396 | ||
1416 | 1397 | ||
1417 | |||
1418 | #define PCI_VENDOR_ID_SYSKONNECT 0x1148 | 1398 | #define PCI_VENDOR_ID_SYSKONNECT 0x1148 |
1419 | #define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200 | 1399 | #define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200 |
1420 | #define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300 | 1400 | #define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300 |
@@ -1422,7 +1402,6 @@ | |||
1422 | #define PCI_DEVICE_ID_SYSKONNECT_9DXX 0x4400 | 1402 | #define PCI_DEVICE_ID_SYSKONNECT_9DXX 0x4400 |
1423 | #define PCI_DEVICE_ID_SYSKONNECT_9MXX 0x4500 | 1403 | #define PCI_DEVICE_ID_SYSKONNECT_9MXX 0x4500 |
1424 | 1404 | ||
1425 | |||
1426 | #define PCI_VENDOR_ID_DIGI 0x114f | 1405 | #define PCI_VENDOR_ID_DIGI 0x114f |
1427 | #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070 | 1406 | #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070 |
1428 | #define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 | 1407 | #define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 |
@@ -1433,12 +1412,10 @@ | |||
1433 | #define PCI_DEVICE_ID_NEO_2RJ45 0x00CA | 1412 | #define PCI_DEVICE_ID_NEO_2RJ45 0x00CA |
1434 | #define PCI_DEVICE_ID_NEO_2RJ45PRI 0x00CB | 1413 | #define PCI_DEVICE_ID_NEO_2RJ45PRI 0x00CB |
1435 | 1414 | ||
1436 | |||
1437 | #define PCI_VENDOR_ID_XIRCOM 0x115d | 1415 | #define PCI_VENDOR_ID_XIRCOM 0x115d |
1438 | #define PCI_DEVICE_ID_XIRCOM_RBM56G 0x0101 | 1416 | #define PCI_DEVICE_ID_XIRCOM_RBM56G 0x0101 |
1439 | #define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103 | 1417 | #define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103 |
1440 | 1418 | ||
1441 | |||
1442 | #define PCI_VENDOR_ID_SERVERWORKS 0x1166 | 1419 | #define PCI_VENDOR_ID_SERVERWORKS 0x1166 |
1443 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 | 1420 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 |
1444 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 | 1421 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 |
@@ -1507,7 +1484,6 @@ | |||
1507 | #define PCI_DEVICE_ID_ZEITNET_1221 0x0001 | 1484 | #define PCI_DEVICE_ID_ZEITNET_1221 0x0001 |
1508 | #define PCI_DEVICE_ID_ZEITNET_1225 0x0002 | 1485 | #define PCI_DEVICE_ID_ZEITNET_1225 0x0002 |
1509 | 1486 | ||
1510 | |||
1511 | #define PCI_VENDOR_ID_FUJITSU_ME 0x119e | 1487 | #define PCI_VENDOR_ID_FUJITSU_ME 0x119e |
1512 | #define PCI_DEVICE_ID_FUJITSU_FS155 0x0001 | 1488 | #define PCI_DEVICE_ID_FUJITSU_FS155 0x0001 |
1513 | #define PCI_DEVICE_ID_FUJITSU_FS50 0x0003 | 1489 | #define PCI_DEVICE_ID_FUJITSU_FS50 0x0003 |
@@ -1525,28 +1501,23 @@ | |||
1525 | #define PCI_DEVICE_ID_V3_V960 0x0001 | 1501 | #define PCI_DEVICE_ID_V3_V960 0x0001 |
1526 | #define PCI_DEVICE_ID_V3_V351 0x0002 | 1502 | #define PCI_DEVICE_ID_V3_V351 0x0002 |
1527 | 1503 | ||
1528 | |||
1529 | #define PCI_VENDOR_ID_ATT 0x11c1 | 1504 | #define PCI_VENDOR_ID_ATT 0x11c1 |
1530 | #define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480 | 1505 | #define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480 |
1531 | 1506 | ||
1532 | |||
1533 | #define PCI_VENDOR_ID_SPECIALIX 0x11cb | 1507 | #define PCI_VENDOR_ID_SPECIALIX 0x11cb |
1534 | #define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000 | 1508 | #define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000 |
1535 | #define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 | 1509 | #define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 |
1536 | #define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004 | 1510 | #define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004 |
1537 | 1511 | ||
1538 | |||
1539 | #define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 | 1512 | #define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 |
1540 | #define PCI_DEVICE_ID_AD1889JS 0x1889 | 1513 | #define PCI_DEVICE_ID_AD1889JS 0x1889 |
1541 | 1514 | ||
1542 | |||
1543 | #define PCI_DEVICE_ID_SEGA_BBA 0x1234 | 1515 | #define PCI_DEVICE_ID_SEGA_BBA 0x1234 |
1544 | 1516 | ||
1545 | #define PCI_VENDOR_ID_ZORAN 0x11de | 1517 | #define PCI_VENDOR_ID_ZORAN 0x11de |
1546 | #define PCI_DEVICE_ID_ZORAN_36057 0x6057 | 1518 | #define PCI_DEVICE_ID_ZORAN_36057 0x6057 |
1547 | #define PCI_DEVICE_ID_ZORAN_36120 0x6120 | 1519 | #define PCI_DEVICE_ID_ZORAN_36120 0x6120 |
1548 | 1520 | ||
1549 | |||
1550 | #define PCI_VENDOR_ID_COMPEX 0x11f6 | 1521 | #define PCI_VENDOR_ID_COMPEX 0x11f6 |
1551 | #define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 | 1522 | #define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 |
1552 | 1523 | ||
@@ -1605,8 +1576,6 @@ | |||
1605 | #define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005 | 1576 | #define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005 |
1606 | #define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009 | 1577 | #define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009 |
1607 | 1578 | ||
1608 | |||
1609 | |||
1610 | #define PCI_VENDOR_ID_AVM 0x1244 | 1579 | #define PCI_VENDOR_ID_AVM 0x1244 |
1611 | #define PCI_DEVICE_ID_AVM_B1 0x0700 | 1580 | #define PCI_DEVICE_ID_AVM_B1 0x0700 |
1612 | #define PCI_DEVICE_ID_AVM_C4 0x0800 | 1581 | #define PCI_DEVICE_ID_AVM_C4 0x0800 |
@@ -1615,7 +1584,6 @@ | |||
1615 | #define PCI_DEVICE_ID_AVM_C2 0x1100 | 1584 | #define PCI_DEVICE_ID_AVM_C2 0x1100 |
1616 | #define PCI_DEVICE_ID_AVM_T1 0x1200 | 1585 | #define PCI_DEVICE_ID_AVM_T1 0x1200 |
1617 | 1586 | ||
1618 | |||
1619 | #define PCI_VENDOR_ID_STALLION 0x124d | 1587 | #define PCI_VENDOR_ID_STALLION 0x124d |
1620 | 1588 | ||
1621 | /* Allied Telesyn */ | 1589 | /* Allied Telesyn */ |
@@ -1638,7 +1606,6 @@ | |||
1638 | #define PCI_VENDOR_ID_SATSAGEM 0x1267 | 1606 | #define PCI_VENDOR_ID_SATSAGEM 0x1267 |
1639 | #define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 | 1607 | #define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 |
1640 | 1608 | ||
1641 | |||
1642 | #define PCI_VENDOR_ID_ENSONIQ 0x1274 | 1609 | #define PCI_VENDOR_ID_ENSONIQ 0x1274 |
1643 | #define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 | 1610 | #define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 |
1644 | #define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 | 1611 | #define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 |
@@ -1661,7 +1628,6 @@ | |||
1661 | 1628 | ||
1662 | #define PCI_VENDOR_ID_ALTEON 0x12ae | 1629 | #define PCI_VENDOR_ID_ALTEON 0x12ae |
1663 | 1630 | ||
1664 | |||
1665 | #define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4 | 1631 | #define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4 |
1666 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001 | 1632 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001 |
1667 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002 | 1633 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002 |
@@ -1692,7 +1658,6 @@ | |||
1692 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485 0x0331 | 1658 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485 0x0331 |
1693 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485 0x0332 | 1659 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485 0x0332 |
1694 | 1660 | ||
1695 | |||
1696 | #define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 | 1661 | #define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 |
1697 | #define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018 | 1662 | #define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018 |
1698 | 1663 | ||
@@ -1802,7 +1767,6 @@ | |||
1802 | #define PCI_DEVICE_ID_LMC_SSI 0x0005 | 1767 | #define PCI_DEVICE_ID_LMC_SSI 0x0005 |
1803 | #define PCI_DEVICE_ID_LMC_T1 0x0006 | 1768 | #define PCI_DEVICE_ID_LMC_T1 0x0006 |
1804 | 1769 | ||
1805 | |||
1806 | #define PCI_VENDOR_ID_NETGEAR 0x1385 | 1770 | #define PCI_VENDOR_ID_NETGEAR 0x1385 |
1807 | #define PCI_DEVICE_ID_NETGEAR_GA620 0x620a | 1771 | #define PCI_DEVICE_ID_NETGEAR_GA620 0x620a |
1808 | 1772 | ||
@@ -1905,6 +1869,8 @@ | |||
1905 | #define PCI_DEVICE_ID_OXSEMI_16PCI952 0x9521 | 1869 | #define PCI_DEVICE_ID_OXSEMI_16PCI952 0x9521 |
1906 | #define PCI_DEVICE_ID_OXSEMI_16PCI952PP 0x9523 | 1870 | #define PCI_DEVICE_ID_OXSEMI_16PCI952PP 0x9523 |
1907 | 1871 | ||
1872 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | ||
1873 | |||
1908 | #define PCI_VENDOR_ID_SAMSUNG 0x144d | 1874 | #define PCI_VENDOR_ID_SAMSUNG 0x144d |
1909 | 1875 | ||
1910 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 | 1876 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 |
@@ -2003,6 +1969,7 @@ | |||
2003 | 1969 | ||
2004 | #define PCI_VENDOR_ID_ENE 0x1524 | 1970 | #define PCI_VENDOR_ID_ENE 0x1524 |
2005 | #define PCI_DEVICE_ID_ENE_CB712_SD 0x0550 | 1971 | #define PCI_DEVICE_ID_ENE_CB712_SD 0x0550 |
1972 | #define PCI_DEVICE_ID_ENE_CB712_SD_2 0x0551 | ||
2006 | #define PCI_DEVICE_ID_ENE_1211 0x1211 | 1973 | #define PCI_DEVICE_ID_ENE_1211 0x1211 |
2007 | #define PCI_DEVICE_ID_ENE_1225 0x1225 | 1974 | #define PCI_DEVICE_ID_ENE_1225 0x1225 |
2008 | #define PCI_DEVICE_ID_ENE_1410 0x1410 | 1975 | #define PCI_DEVICE_ID_ENE_1410 0x1410 |
@@ -2012,13 +1979,10 @@ | |||
2012 | #define PCI_DEVICE_ID_ENE_720 0x1421 | 1979 | #define PCI_DEVICE_ID_ENE_720 0x1421 |
2013 | #define PCI_DEVICE_ID_ENE_722 0x1422 | 1980 | #define PCI_DEVICE_ID_ENE_722 0x1422 |
2014 | 1981 | ||
2015 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | ||
2016 | |||
2017 | #define PCI_SUBVENDOR_ID_PERLE 0x155f | 1982 | #define PCI_SUBVENDOR_ID_PERLE 0x155f |
2018 | #define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 | 1983 | #define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 |
2019 | #define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 | 1984 | #define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 |
2020 | 1985 | ||
2021 | |||
2022 | #define PCI_VENDOR_ID_SYBA 0x1592 | 1986 | #define PCI_VENDOR_ID_SYBA 0x1592 |
2023 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 | 1987 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 |
2024 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 | 1988 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 |
@@ -2037,8 +2001,10 @@ | |||
2037 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c | 2001 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c |
2038 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 | 2002 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 |
2039 | 2003 | ||
2040 | #define PCI_VENDOR_ID_PDC 0x15e9 | 2004 | #define PCI_VENDOR_ID_QUICKNET 0x15e2 |
2005 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 | ||
2041 | 2006 | ||
2007 | #define PCI_VENDOR_ID_PDC 0x15e9 | ||
2042 | 2008 | ||
2043 | #define PCI_VENDOR_ID_FARSITE 0x1619 | 2009 | #define PCI_VENDOR_ID_FARSITE 0x1619 |
2044 | #define PCI_DEVICE_ID_FARSITE_T2P 0x0400 | 2010 | #define PCI_DEVICE_ID_FARSITE_T2P 0x0400 |
@@ -2055,6 +2021,8 @@ | |||
2055 | #define PCI_DEVICE_ID_BCM1250_PCI 0x0001 | 2021 | #define PCI_DEVICE_ID_BCM1250_PCI 0x0001 |
2056 | #define PCI_DEVICE_ID_BCM1250_HT 0x0002 | 2022 | #define PCI_DEVICE_ID_BCM1250_HT 0x0002 |
2057 | 2023 | ||
2024 | #define PCI_VENDOR_ID_ATHEROS 0x168c | ||
2025 | |||
2058 | #define PCI_VENDOR_ID_NETCELL 0x169c | 2026 | #define PCI_VENDOR_ID_NETCELL 0x169c |
2059 | #define PCI_DEVICE_ID_REVOLUTION 0x0044 | 2027 | #define PCI_DEVICE_ID_REVOLUTION 0x0044 |
2060 | 2028 | ||
@@ -2093,7 +2061,6 @@ | |||
2093 | #define PCI_DEVICE_ID_HERC_WIN 0x5732 | 2061 | #define PCI_DEVICE_ID_HERC_WIN 0x5732 |
2094 | #define PCI_DEVICE_ID_HERC_UNI 0x5832 | 2062 | #define PCI_DEVICE_ID_HERC_UNI 0x5832 |
2095 | 2063 | ||
2096 | |||
2097 | #define PCI_VENDOR_ID_SITECOM 0x182d | 2064 | #define PCI_VENDOR_ID_SITECOM 0x182d |
2098 | #define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069 | 2065 | #define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069 |
2099 | 2066 | ||
@@ -2129,12 +2096,9 @@ | |||
2129 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 | 2096 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 |
2130 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 | 2097 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 |
2131 | 2098 | ||
2132 | |||
2133 | #define PCI_VENDOR_ID_AKS 0x416c | 2099 | #define PCI_VENDOR_ID_AKS 0x416c |
2134 | #define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 | 2100 | #define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 |
2135 | 2101 | ||
2136 | |||
2137 | |||
2138 | #define PCI_VENDOR_ID_S3 0x5333 | 2102 | #define PCI_VENDOR_ID_S3 0x5333 |
2139 | #define PCI_DEVICE_ID_S3_TRIO 0x8811 | 2103 | #define PCI_DEVICE_ID_S3_TRIO 0x8811 |
2140 | #define PCI_DEVICE_ID_S3_868 0x8880 | 2104 | #define PCI_DEVICE_ID_S3_868 0x8880 |
@@ -2146,7 +2110,6 @@ | |||
2146 | #define PCI_VENDOR_ID_DUNORD 0x5544 | 2110 | #define PCI_VENDOR_ID_DUNORD 0x5544 |
2147 | #define PCI_DEVICE_ID_DUNORD_I3000 0x0001 | 2111 | #define PCI_DEVICE_ID_DUNORD_I3000 0x0001 |
2148 | 2112 | ||
2149 | |||
2150 | #define PCI_VENDOR_ID_DCI 0x6666 | 2113 | #define PCI_VENDOR_ID_DCI 0x6666 |
2151 | #define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 | 2114 | #define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 |
2152 | #define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 | 2115 | #define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 |
@@ -2390,7 +2353,6 @@ | |||
2390 | #define PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN 0x0500 | 2353 | #define PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN 0x0500 |
2391 | #define PCI_DEVICE_ID_ADAPTEC2_SCAMP 0x0503 | 2354 | #define PCI_DEVICE_ID_ADAPTEC2_SCAMP 0x0503 |
2392 | 2355 | ||
2393 | |||
2394 | #define PCI_VENDOR_ID_HOLTEK 0x9412 | 2356 | #define PCI_VENDOR_ID_HOLTEK 0x9412 |
2395 | #define PCI_DEVICE_ID_HOLTEK_6565 0x6565 | 2357 | #define PCI_DEVICE_ID_HOLTEK_6565 0x6565 |
2396 | 2358 | ||
@@ -2406,6 +2368,8 @@ | |||
2406 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 | 2368 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 |
2407 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 | 2369 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 |
2408 | 2370 | ||
2371 | #define PCI_VENDOR_ID_3COM_2 0xa727 | ||
2372 | |||
2409 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d | 2373 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d |
2410 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 | 2374 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 |
2411 | #define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055 | 2375 | #define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055 |
@@ -2414,13 +2378,7 @@ | |||
2414 | #define PCI_DEVICE_ID_TIGERJET_300 0x0001 | 2378 | #define PCI_DEVICE_ID_TIGERJET_300 0x0001 |
2415 | #define PCI_DEVICE_ID_TIGERJET_100 0x0002 | 2379 | #define PCI_DEVICE_ID_TIGERJET_100 0x0002 |
2416 | 2380 | ||
2417 | #define PCI_VENDOR_ID_TTTECH 0x0357 | ||
2418 | #define PCI_DEVICE_ID_TTTECH_MC322 0x000A | ||
2419 | |||
2420 | #define PCI_VENDOR_ID_XILINX_RME 0xea60 | 2381 | #define PCI_VENDOR_ID_XILINX_RME 0xea60 |
2421 | #define PCI_DEVICE_ID_RME_DIGI32 0x9896 | 2382 | #define PCI_DEVICE_ID_RME_DIGI32 0x9896 |
2422 | #define PCI_DEVICE_ID_RME_DIGI32_PRO 0x9897 | 2383 | #define PCI_DEVICE_ID_RME_DIGI32_PRO 0x9897 |
2423 | #define PCI_DEVICE_ID_RME_DIGI32_8 0x9898 | 2384 | #define PCI_DEVICE_ID_RME_DIGI32_8 0x9898 |
2424 | |||
2425 | #define PCI_VENDOR_ID_QUICKNET 0x15E2 | ||
2426 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 | ||
diff --git a/include/linux/pda_power.h b/include/linux/pda_power.h new file mode 100644 index 000000000000..1375f15797e7 --- /dev/null +++ b/include/linux/pda_power.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * Common power driver for PDAs and phones with one or two external | ||
3 | * power supplies (AC/USB) connected to main and backup batteries, | ||
4 | * and optional builtin charger. | ||
5 | * | ||
6 | * Copyright © 2007 Anton Vorontsov <cbou@mail.ru> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __PDA_POWER_H__ | ||
14 | #define __PDA_POWER_H__ | ||
15 | |||
16 | #define PDA_POWER_CHARGE_AC (1 << 0) | ||
17 | #define PDA_POWER_CHARGE_USB (1 << 1) | ||
18 | |||
19 | struct pda_power_pdata { | ||
20 | int (*is_ac_online)(void); | ||
21 | int (*is_usb_online)(void); | ||
22 | void (*set_charge)(int flags); | ||
23 | |||
24 | char **supplied_to; | ||
25 | size_t num_supplicants; | ||
26 | |||
27 | unsigned int wait_for_status; /* msecs, default is 500 */ | ||
28 | unsigned int wait_for_charger; /* msecs, default is 500 */ | ||
29 | }; | ||
30 | |||
31 | #endif /* __PDA_POWER_H__ */ | ||
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index c8884f971228..8e4120285f72 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -9,13 +9,39 @@ | |||
9 | #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */ | 9 | #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */ |
10 | #define PIPE_BUF_FLAG_GIFT 0x04 /* page is a gift */ | 10 | #define PIPE_BUF_FLAG_GIFT 0x04 /* page is a gift */ |
11 | 11 | ||
12 | /** | ||
13 | * struct pipe_buffer - a linux kernel pipe buffer | ||
14 | * @page: the page containing the data for the pipe buffer | ||
15 | * @offset: offset of data inside the @page | ||
16 | * @len: length of data inside the @page | ||
17 | * @ops: operations associated with this buffer. See @pipe_buf_operations. | ||
18 | * @flags: pipe buffer flags. See above. | ||
19 | * @private: private data owned by the ops. | ||
20 | **/ | ||
12 | struct pipe_buffer { | 21 | struct pipe_buffer { |
13 | struct page *page; | 22 | struct page *page; |
14 | unsigned int offset, len; | 23 | unsigned int offset, len; |
15 | const struct pipe_buf_operations *ops; | 24 | const struct pipe_buf_operations *ops; |
16 | unsigned int flags; | 25 | unsigned int flags; |
26 | unsigned long private; | ||
17 | }; | 27 | }; |
18 | 28 | ||
29 | /** | ||
30 | * struct pipe_inode_info - a linux kernel pipe | ||
31 | * @wait: reader/writer wait point in case of empty/full pipe | ||
32 | * @nrbufs: the number of non-empty pipe buffers in this pipe | ||
33 | * @curbuf: the current pipe buffer entry | ||
34 | * @tmp_page: cached released page | ||
35 | * @readers: number of current readers of this pipe | ||
36 | * @writers: number of current writers of this pipe | ||
37 | * @waiting_writers: number of writers blocked waiting for room | ||
38 | * @r_counter: reader counter | ||
39 | * @w_counter: writer counter | ||
40 | * @fasync_readers: reader side fasync | ||
41 | * @fasync_writers: writer side fasync | ||
42 | * @inode: inode this pipe is attached to | ||
43 | * @bufs: the circular array of pipe buffers | ||
44 | **/ | ||
19 | struct pipe_inode_info { | 45 | struct pipe_inode_info { |
20 | wait_queue_head_t wait; | 46 | wait_queue_head_t wait; |
21 | unsigned int nrbufs, curbuf; | 47 | unsigned int nrbufs, curbuf; |
@@ -34,22 +60,73 @@ struct pipe_inode_info { | |||
34 | /* | 60 | /* |
35 | * Note on the nesting of these functions: | 61 | * Note on the nesting of these functions: |
36 | * | 62 | * |
37 | * ->pin() | 63 | * ->confirm() |
38 | * ->steal() | 64 | * ->steal() |
39 | * ... | 65 | * ... |
40 | * ->map() | 66 | * ->map() |
41 | * ... | 67 | * ... |
42 | * ->unmap() | 68 | * ->unmap() |
43 | * | 69 | * |
44 | * That is, ->map() must be called on a pinned buffer, same goes for ->steal(). | 70 | * That is, ->map() must be called on a confirmed buffer, |
71 | * same goes for ->steal(). See below for the meaning of each | ||
72 | * operation. Also see kerneldoc in fs/pipe.c for the pipe | ||
73 | * and generic variants of these hooks. | ||
45 | */ | 74 | */ |
46 | struct pipe_buf_operations { | 75 | struct pipe_buf_operations { |
76 | /* | ||
77 | * This is set to 1, if the generic pipe read/write may coalesce | ||
78 | * data into an existing buffer. If this is set to 0, a new pipe | ||
79 | * page segment is always used for new data. | ||
80 | */ | ||
47 | int can_merge; | 81 | int can_merge; |
82 | |||
83 | /* | ||
84 | * ->map() returns a virtual address mapping of the pipe buffer. | ||
85 | * The last integer flag reflects whether this should be an atomic | ||
86 | * mapping or not. The atomic map is faster, however you can't take | ||
87 | * page faults before calling ->unmap() again. So if you need to eg | ||
88 | * access user data through copy_to/from_user(), then you must get | ||
89 | * a non-atomic map. ->map() uses the KM_USER0 atomic slot for | ||
90 | * atomic maps, so you can't map more than one pipe_buffer at once | ||
91 | * and you have to be careful if mapping another page as source | ||
92 | * or destination for a copy (IOW, it has to use something else | ||
93 | * than KM_USER0). | ||
94 | */ | ||
48 | void * (*map)(struct pipe_inode_info *, struct pipe_buffer *, int); | 95 | void * (*map)(struct pipe_inode_info *, struct pipe_buffer *, int); |
96 | |||
97 | /* | ||
98 | * Undoes ->map(), finishes the virtual mapping of the pipe buffer. | ||
99 | */ | ||
49 | void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *, void *); | 100 | void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *, void *); |
50 | int (*pin)(struct pipe_inode_info *, struct pipe_buffer *); | 101 | |
102 | /* | ||
103 | * ->confirm() verifies that the data in the pipe buffer is there | ||
104 | * and that the contents are good. If the pages in the pipe belong | ||
105 | * to a file system, we may need to wait for IO completion in this | ||
106 | * hook. Returns 0 for good, or a negative error value in case of | ||
107 | * error. | ||
108 | */ | ||
109 | int (*confirm)(struct pipe_inode_info *, struct pipe_buffer *); | ||
110 | |||
111 | /* | ||
112 | * When the contents of this pipe buffer has been completely | ||
113 | * consumed by a reader, ->release() is called. | ||
114 | */ | ||
51 | void (*release)(struct pipe_inode_info *, struct pipe_buffer *); | 115 | void (*release)(struct pipe_inode_info *, struct pipe_buffer *); |
116 | |||
117 | /* | ||
118 | * Attempt to take ownership of the pipe buffer and its contents. | ||
119 | * ->steal() returns 0 for success, in which case the contents | ||
120 | * of the pipe (the buf->page) is locked and now completely owned | ||
121 | * by the caller. The page may then be transferred to a different | ||
122 | * mapping, the most often used case is insertion into different | ||
123 | * file address space cache. | ||
124 | */ | ||
52 | int (*steal)(struct pipe_inode_info *, struct pipe_buffer *); | 125 | int (*steal)(struct pipe_inode_info *, struct pipe_buffer *); |
126 | |||
127 | /* | ||
128 | * Get a reference to the pipe buffer. | ||
129 | */ | ||
53 | void (*get)(struct pipe_inode_info *, struct pipe_buffer *); | 130 | void (*get)(struct pipe_inode_info *, struct pipe_buffer *); |
54 | }; | 131 | }; |
55 | 132 | ||
@@ -68,39 +145,7 @@ void __free_pipe_info(struct pipe_inode_info *); | |||
68 | void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int); | 145 | void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int); |
69 | void generic_pipe_buf_unmap(struct pipe_inode_info *, struct pipe_buffer *, void *); | 146 | void generic_pipe_buf_unmap(struct pipe_inode_info *, struct pipe_buffer *, void *); |
70 | void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *); | 147 | void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *); |
71 | int generic_pipe_buf_pin(struct pipe_inode_info *, struct pipe_buffer *); | 148 | int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *); |
72 | int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); | 149 | int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); |
73 | 150 | ||
74 | /* | ||
75 | * splice is tied to pipes as a transport (at least for now), so we'll just | ||
76 | * add the splice flags here. | ||
77 | */ | ||
78 | #define SPLICE_F_MOVE (0x01) /* move pages instead of copying */ | ||
79 | #define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */ | ||
80 | /* we may still block on the fd we splice */ | ||
81 | /* from/to, of course */ | ||
82 | #define SPLICE_F_MORE (0x04) /* expect more data */ | ||
83 | #define SPLICE_F_GIFT (0x08) /* pages passed in are a gift */ | ||
84 | |||
85 | /* | ||
86 | * Passed to the actors | ||
87 | */ | ||
88 | struct splice_desc { | ||
89 | unsigned int len, total_len; /* current and remaining length */ | ||
90 | unsigned int flags; /* splice flags */ | ||
91 | struct file *file; /* file to read/write */ | ||
92 | loff_t pos; /* file position */ | ||
93 | }; | ||
94 | |||
95 | typedef int (splice_actor)(struct pipe_inode_info *, struct pipe_buffer *, | ||
96 | struct splice_desc *); | ||
97 | |||
98 | extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *, | ||
99 | loff_t *, size_t, unsigned int, | ||
100 | splice_actor *); | ||
101 | |||
102 | extern ssize_t __splice_from_pipe(struct pipe_inode_info *, struct file *, | ||
103 | loff_t *, size_t, unsigned int, | ||
104 | splice_actor *); | ||
105 | |||
106 | #endif | 151 | #endif |
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index c3f01b3085a4..30b8571e6b34 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h | |||
@@ -403,16 +403,13 @@ enum | |||
403 | * 1..32767 Reserved for ematches inside kernel tree | 403 | * 1..32767 Reserved for ematches inside kernel tree |
404 | * 32768..65535 Free to use, not reliable | 404 | * 32768..65535 Free to use, not reliable |
405 | */ | 405 | */ |
406 | enum | 406 | #define TCF_EM_CONTAINER 0 |
407 | { | 407 | #define TCF_EM_CMP 1 |
408 | TCF_EM_CONTAINER, | 408 | #define TCF_EM_NBYTE 2 |
409 | TCF_EM_CMP, | 409 | #define TCF_EM_U32 3 |
410 | TCF_EM_NBYTE, | 410 | #define TCF_EM_META 4 |
411 | TCF_EM_U32, | 411 | #define TCF_EM_TEXT 5 |
412 | TCF_EM_META, | 412 | #define TCF_EM_MAX 5 |
413 | TCF_EM_TEXT, | ||
414 | __TCF_EM_MAX | ||
415 | }; | ||
416 | 413 | ||
417 | enum | 414 | enum |
418 | { | 415 | { |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index d10f35338507..268c51599eb8 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -101,6 +101,15 @@ struct tc_prio_qopt | |||
101 | __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ | 101 | __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ |
102 | }; | 102 | }; |
103 | 103 | ||
104 | enum | ||
105 | { | ||
106 | TCA_PRIO_UNSPEC, | ||
107 | TCA_PRIO_MQ, | ||
108 | __TCA_PRIO_MAX | ||
109 | }; | ||
110 | |||
111 | #define TCA_PRIO_MAX (__TCA_PRIO_MAX - 1) | ||
112 | |||
104 | /* TBF section */ | 113 | /* TBF section */ |
105 | 114 | ||
106 | struct tc_tbf_qopt | 115 | struct tc_tbf_qopt |
diff --git a/include/linux/pm.h b/include/linux/pm.h index b2c4fde4e994..273781c82e4d 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -267,15 +267,10 @@ struct dev_pm_info { | |||
267 | unsigned can_wakeup:1; | 267 | unsigned can_wakeup:1; |
268 | #ifdef CONFIG_PM | 268 | #ifdef CONFIG_PM |
269 | unsigned should_wakeup:1; | 269 | unsigned should_wakeup:1; |
270 | pm_message_t prev_state; | ||
271 | void * saved_state; | ||
272 | struct device * pm_parent; | ||
273 | struct list_head entry; | 270 | struct list_head entry; |
274 | #endif | 271 | #endif |
275 | }; | 272 | }; |
276 | 273 | ||
277 | extern void device_pm_set_parent(struct device * dev, struct device * parent); | ||
278 | |||
279 | extern int device_power_down(pm_message_t state); | 274 | extern int device_power_down(pm_message_t state); |
280 | extern void device_power_up(void); | 275 | extern void device_power_up(void); |
281 | extern void device_resume(void); | 276 | extern void device_resume(void); |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h new file mode 100644 index 000000000000..606c0957997f --- /dev/null +++ b/include/linux/power_supply.h | |||
@@ -0,0 +1,180 @@ | |||
1 | /* | ||
2 | * Universal power supply monitor class | ||
3 | * | ||
4 | * Copyright © 2007 Anton Vorontsov <cbou@mail.ru> | ||
5 | * Copyright © 2004 Szabolcs Gyurko | ||
6 | * Copyright © 2003 Ian Molton <spyro@f2s.com> | ||
7 | * | ||
8 | * Modified: 2004, Oct Szabolcs Gyurko | ||
9 | * | ||
10 | * You may use this code as per GPL version 2 | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_POWER_SUPPLY_H__ | ||
14 | #define __LINUX_POWER_SUPPLY_H__ | ||
15 | |||
16 | #include <linux/device.h> | ||
17 | #include <linux/workqueue.h> | ||
18 | #include <linux/leds.h> | ||
19 | |||
20 | /* | ||
21 | * All voltages, currents, charges, energies, time and temperatures in uV, | ||
22 | * µA, µAh, µWh, seconds and tenths of degree Celsius unless otherwise | ||
23 | * stated. It's driver's job to convert its raw values to units in which | ||
24 | * this class operates. | ||
25 | */ | ||
26 | |||
27 | /* | ||
28 | * For systems where the charger determines the maximum battery capacity | ||
29 | * the min and max fields should be used to present these values to user | ||
30 | * space. Unused/unknown fields will not appear in sysfs. | ||
31 | */ | ||
32 | |||
33 | enum { | ||
34 | POWER_SUPPLY_STATUS_UNKNOWN = 0, | ||
35 | POWER_SUPPLY_STATUS_CHARGING, | ||
36 | POWER_SUPPLY_STATUS_DISCHARGING, | ||
37 | POWER_SUPPLY_STATUS_NOT_CHARGING, | ||
38 | POWER_SUPPLY_STATUS_FULL, | ||
39 | }; | ||
40 | |||
41 | enum { | ||
42 | POWER_SUPPLY_HEALTH_UNKNOWN = 0, | ||
43 | POWER_SUPPLY_HEALTH_GOOD, | ||
44 | POWER_SUPPLY_HEALTH_OVERHEAT, | ||
45 | POWER_SUPPLY_HEALTH_DEAD, | ||
46 | POWER_SUPPLY_HEALTH_OVERVOLTAGE, | ||
47 | POWER_SUPPLY_HEALTH_UNSPEC_FAILURE, | ||
48 | }; | ||
49 | |||
50 | enum { | ||
51 | POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0, | ||
52 | POWER_SUPPLY_TECHNOLOGY_NiMH, | ||
53 | POWER_SUPPLY_TECHNOLOGY_LION, | ||
54 | POWER_SUPPLY_TECHNOLOGY_LIPO, | ||
55 | POWER_SUPPLY_TECHNOLOGY_LiFe, | ||
56 | POWER_SUPPLY_TECHNOLOGY_NiCd, | ||
57 | }; | ||
58 | |||
59 | enum { | ||
60 | POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN = 0, | ||
61 | POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL, | ||
62 | POWER_SUPPLY_CAPACITY_LEVEL_LOW, | ||
63 | POWER_SUPPLY_CAPACITY_LEVEL_NORMAL, | ||
64 | POWER_SUPPLY_CAPACITY_LEVEL_HIGH, | ||
65 | POWER_SUPPLY_CAPACITY_LEVEL_FULL, | ||
66 | }; | ||
67 | |||
68 | enum power_supply_property { | ||
69 | /* Properties of type `int' */ | ||
70 | POWER_SUPPLY_PROP_STATUS = 0, | ||
71 | POWER_SUPPLY_PROP_HEALTH, | ||
72 | POWER_SUPPLY_PROP_PRESENT, | ||
73 | POWER_SUPPLY_PROP_ONLINE, | ||
74 | POWER_SUPPLY_PROP_TECHNOLOGY, | ||
75 | POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, | ||
76 | POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, | ||
77 | POWER_SUPPLY_PROP_VOLTAGE_NOW, | ||
78 | POWER_SUPPLY_PROP_VOLTAGE_AVG, | ||
79 | POWER_SUPPLY_PROP_CURRENT_NOW, | ||
80 | POWER_SUPPLY_PROP_CURRENT_AVG, | ||
81 | POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, | ||
82 | POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN, | ||
83 | POWER_SUPPLY_PROP_CHARGE_FULL, | ||
84 | POWER_SUPPLY_PROP_CHARGE_EMPTY, | ||
85 | POWER_SUPPLY_PROP_CHARGE_NOW, | ||
86 | POWER_SUPPLY_PROP_CHARGE_AVG, | ||
87 | POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN, | ||
88 | POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN, | ||
89 | POWER_SUPPLY_PROP_ENERGY_FULL, | ||
90 | POWER_SUPPLY_PROP_ENERGY_EMPTY, | ||
91 | POWER_SUPPLY_PROP_ENERGY_NOW, | ||
92 | POWER_SUPPLY_PROP_ENERGY_AVG, | ||
93 | POWER_SUPPLY_PROP_CAPACITY, /* in percents! */ | ||
94 | POWER_SUPPLY_PROP_CAPACITY_LEVEL, | ||
95 | POWER_SUPPLY_PROP_TEMP, | ||
96 | POWER_SUPPLY_PROP_TEMP_AMBIENT, | ||
97 | POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW, | ||
98 | POWER_SUPPLY_PROP_TIME_TO_EMPTY_AVG, | ||
99 | POWER_SUPPLY_PROP_TIME_TO_FULL_NOW, | ||
100 | POWER_SUPPLY_PROP_TIME_TO_FULL_AVG, | ||
101 | /* Properties of type `const char *' */ | ||
102 | POWER_SUPPLY_PROP_MODEL_NAME, | ||
103 | POWER_SUPPLY_PROP_MANUFACTURER, | ||
104 | }; | ||
105 | |||
106 | enum power_supply_type { | ||
107 | POWER_SUPPLY_TYPE_BATTERY = 0, | ||
108 | POWER_SUPPLY_TYPE_UPS, | ||
109 | POWER_SUPPLY_TYPE_MAINS, | ||
110 | POWER_SUPPLY_TYPE_USB, | ||
111 | }; | ||
112 | |||
113 | union power_supply_propval { | ||
114 | int intval; | ||
115 | const char *strval; | ||
116 | }; | ||
117 | |||
118 | struct power_supply { | ||
119 | const char *name; | ||
120 | enum power_supply_type type; | ||
121 | enum power_supply_property *properties; | ||
122 | size_t num_properties; | ||
123 | |||
124 | char **supplied_to; | ||
125 | size_t num_supplicants; | ||
126 | |||
127 | int (*get_property)(struct power_supply *psy, | ||
128 | enum power_supply_property psp, | ||
129 | union power_supply_propval *val); | ||
130 | void (*external_power_changed)(struct power_supply *psy); | ||
131 | |||
132 | /* For APM emulation, think legacy userspace. */ | ||
133 | int use_for_apm; | ||
134 | |||
135 | /* private */ | ||
136 | struct device *dev; | ||
137 | struct work_struct changed_work; | ||
138 | |||
139 | #ifdef CONFIG_LEDS_TRIGGERS | ||
140 | struct led_trigger *charging_full_trig; | ||
141 | char *charging_full_trig_name; | ||
142 | struct led_trigger *charging_trig; | ||
143 | char *charging_trig_name; | ||
144 | struct led_trigger *full_trig; | ||
145 | char *full_trig_name; | ||
146 | struct led_trigger *online_trig; | ||
147 | char *online_trig_name; | ||
148 | #endif | ||
149 | }; | ||
150 | |||
151 | /* | ||
152 | * This is recommended structure to specify static power supply parameters. | ||
153 | * Generic one, parametrizable for different power supplies. Power supply | ||
154 | * class itself does not use it, but that's what implementing most platform | ||
155 | * drivers, should try reuse for consistency. | ||
156 | */ | ||
157 | |||
158 | struct power_supply_info { | ||
159 | const char *name; | ||
160 | int technology; | ||
161 | int voltage_max_design; | ||
162 | int voltage_min_design; | ||
163 | int charge_full_design; | ||
164 | int charge_empty_design; | ||
165 | int energy_full_design; | ||
166 | int energy_empty_design; | ||
167 | int use_for_apm; | ||
168 | }; | ||
169 | |||
170 | extern void power_supply_changed(struct power_supply *psy); | ||
171 | extern int power_supply_am_i_supplied(struct power_supply *psy); | ||
172 | |||
173 | extern int power_supply_register(struct device *parent, | ||
174 | struct power_supply *psy); | ||
175 | extern void power_supply_unregister(struct power_supply *psy); | ||
176 | |||
177 | /* For APM emulation, think legacy userspace. */ | ||
178 | extern struct class *power_supply_class; | ||
179 | |||
180 | #endif /* __LINUX_POWER_SUPPLY_H__ */ | ||
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 1fae30af91f3..c91476ce314a 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -261,7 +261,7 @@ enum rtattr_type_t | |||
261 | RTA_FLOW, | 261 | RTA_FLOW, |
262 | RTA_CACHEINFO, | 262 | RTA_CACHEINFO, |
263 | RTA_SESSION, | 263 | RTA_SESSION, |
264 | RTA_MP_ALGO, | 264 | RTA_MP_ALGO, /* no longer used */ |
265 | RTA_TABLE, | 265 | RTA_TABLE, |
266 | __RTA_MAX | 266 | __RTA_MAX |
267 | }; | 267 | }; |
@@ -570,10 +570,16 @@ static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) | |||
570 | } | 570 | } |
571 | 571 | ||
572 | extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len); | 572 | extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len); |
573 | extern int __rtattr_parse_nested_compat(struct rtattr *tb[], int maxattr, | ||
574 | struct rtattr *rta, int len); | ||
573 | 575 | ||
574 | #define rtattr_parse_nested(tb, max, rta) \ | 576 | #define rtattr_parse_nested(tb, max, rta) \ |
575 | rtattr_parse((tb), (max), RTA_DATA((rta)), RTA_PAYLOAD((rta))) | 577 | rtattr_parse((tb), (max), RTA_DATA((rta)), RTA_PAYLOAD((rta))) |
576 | 578 | ||
579 | #define rtattr_parse_nested_compat(tb, max, rta, data, len) \ | ||
580 | ({ data = RTA_PAYLOAD(rta) >= len ? RTA_DATA(rta) : NULL; \ | ||
581 | __rtattr_parse_nested_compat(tb, max, rta, len); }) | ||
582 | |||
577 | extern int rtnetlink_send(struct sk_buff *skb, u32 pid, u32 group, int echo); | 583 | extern int rtnetlink_send(struct sk_buff *skb, u32 pid, u32 group, int echo); |
578 | extern int rtnl_unicast(struct sk_buff *skb, u32 pid); | 584 | extern int rtnl_unicast(struct sk_buff *skb, u32 pid); |
579 | extern int rtnl_notify(struct sk_buff *skb, u32 pid, u32 group, | 585 | extern int rtnl_notify(struct sk_buff *skb, u32 pid, u32 group, |
@@ -638,6 +644,18 @@ extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const voi | |||
638 | ({ (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \ | 644 | ({ (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \ |
639 | (skb)->len; }) | 645 | (skb)->len; }) |
640 | 646 | ||
647 | #define RTA_NEST_COMPAT(skb, type, attrlen, data) \ | ||
648 | ({ struct rtattr *__start = (struct rtattr *)skb_tail_pointer(skb); \ | ||
649 | RTA_PUT(skb, type, attrlen, data); \ | ||
650 | RTA_NEST(skb, type); \ | ||
651 | __start; }) | ||
652 | |||
653 | #define RTA_NEST_COMPAT_END(skb, start) \ | ||
654 | ({ struct rtattr *__nest = (void *)(start) + NLMSG_ALIGN((start)->rta_len); \ | ||
655 | (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \ | ||
656 | RTA_NEST_END(skb, __nest); \ | ||
657 | (skb)->len; }) | ||
658 | |||
641 | #define RTA_NEST_CANCEL(skb, start) \ | 659 | #define RTA_NEST_CANCEL(skb, start) \ |
642 | ({ if (start) \ | 660 | ({ if (start) \ |
643 | skb_trim(skb, (unsigned char *) (start) - (skb)->data); \ | 661 | skb_trim(skb, (unsigned char *) (start) - (skb)->data); \ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 693f0e6c54d4..cfb680585ab8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -34,6 +34,8 @@ | |||
34 | #define SCHED_FIFO 1 | 34 | #define SCHED_FIFO 1 |
35 | #define SCHED_RR 2 | 35 | #define SCHED_RR 2 |
36 | #define SCHED_BATCH 3 | 36 | #define SCHED_BATCH 3 |
37 | /* SCHED_ISO: reserved but not implemented yet */ | ||
38 | #define SCHED_IDLE 5 | ||
37 | 39 | ||
38 | #ifdef __KERNEL__ | 40 | #ifdef __KERNEL__ |
39 | 41 | ||
@@ -130,6 +132,26 @@ extern unsigned long nr_active(void); | |||
130 | extern unsigned long nr_iowait(void); | 132 | extern unsigned long nr_iowait(void); |
131 | extern unsigned long weighted_cpuload(const int cpu); | 133 | extern unsigned long weighted_cpuload(const int cpu); |
132 | 134 | ||
135 | struct seq_file; | ||
136 | struct cfs_rq; | ||
137 | #ifdef CONFIG_SCHED_DEBUG | ||
138 | extern void proc_sched_show_task(struct task_struct *p, struct seq_file *m); | ||
139 | extern void proc_sched_set_task(struct task_struct *p); | ||
140 | extern void | ||
141 | print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq, u64 now); | ||
142 | #else | ||
143 | static inline void | ||
144 | proc_sched_show_task(struct task_struct *p, struct seq_file *m) | ||
145 | { | ||
146 | } | ||
147 | static inline void proc_sched_set_task(struct task_struct *p) | ||
148 | { | ||
149 | } | ||
150 | static inline void | ||
151 | print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq, u64 now) | ||
152 | { | ||
153 | } | ||
154 | #endif | ||
133 | 155 | ||
134 | /* | 156 | /* |
135 | * Task state bitmask. NOTE! These bits are also | 157 | * Task state bitmask. NOTE! These bits are also |
@@ -193,6 +215,7 @@ struct task_struct; | |||
193 | extern void sched_init(void); | 215 | extern void sched_init(void); |
194 | extern void sched_init_smp(void); | 216 | extern void sched_init_smp(void); |
195 | extern void init_idle(struct task_struct *idle, int cpu); | 217 | extern void init_idle(struct task_struct *idle, int cpu); |
218 | extern void init_idle_bootup_task(struct task_struct *idle); | ||
196 | 219 | ||
197 | extern cpumask_t nohz_cpu_mask; | 220 | extern cpumask_t nohz_cpu_mask; |
198 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | 221 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) |
@@ -479,7 +502,7 @@ struct signal_struct { | |||
479 | * from jiffies_to_ns(utime + stime) if sched_clock uses something | 502 | * from jiffies_to_ns(utime + stime) if sched_clock uses something |
480 | * other than jiffies.) | 503 | * other than jiffies.) |
481 | */ | 504 | */ |
482 | unsigned long long sched_time; | 505 | unsigned long long sum_sched_runtime; |
483 | 506 | ||
484 | /* | 507 | /* |
485 | * We don't bother to synchronize most readers of this at all, | 508 | * We don't bother to synchronize most readers of this at all, |
@@ -521,31 +544,6 @@ struct signal_struct { | |||
521 | #define SIGNAL_STOP_CONTINUED 0x00000004 /* SIGCONT since WCONTINUED reap */ | 544 | #define SIGNAL_STOP_CONTINUED 0x00000004 /* SIGCONT since WCONTINUED reap */ |
522 | #define SIGNAL_GROUP_EXIT 0x00000008 /* group exit in progress */ | 545 | #define SIGNAL_GROUP_EXIT 0x00000008 /* group exit in progress */ |
523 | 546 | ||
524 | |||
525 | /* | ||
526 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT | ||
527 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH | ||
528 | * tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority | ||
529 | * values are inverted: lower p->prio value means higher priority. | ||
530 | * | ||
531 | * The MAX_USER_RT_PRIO value allows the actual maximum | ||
532 | * RT priority to be separate from the value exported to | ||
533 | * user-space. This allows kernel threads to set their | ||
534 | * priority to a value higher than any user task. Note: | ||
535 | * MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO. | ||
536 | */ | ||
537 | |||
538 | #define MAX_USER_RT_PRIO 100 | ||
539 | #define MAX_RT_PRIO MAX_USER_RT_PRIO | ||
540 | |||
541 | #define MAX_PRIO (MAX_RT_PRIO + 40) | ||
542 | |||
543 | #define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO) | ||
544 | #define rt_task(p) rt_prio((p)->prio) | ||
545 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) | ||
546 | #define is_rt_policy(p) ((p) != SCHED_NORMAL && (p) != SCHED_BATCH) | ||
547 | #define has_rt_policy(p) unlikely(is_rt_policy((p)->policy)) | ||
548 | |||
549 | /* | 547 | /* |
550 | * Some day this will be a full-fledged user tracking system.. | 548 | * Some day this will be a full-fledged user tracking system.. |
551 | */ | 549 | */ |
@@ -583,13 +581,13 @@ struct reclaim_state; | |||
583 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) | 581 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
584 | struct sched_info { | 582 | struct sched_info { |
585 | /* cumulative counters */ | 583 | /* cumulative counters */ |
586 | unsigned long cpu_time, /* time spent on the cpu */ | 584 | unsigned long pcnt; /* # of times run on this cpu */ |
587 | run_delay, /* time spent waiting on a runqueue */ | 585 | unsigned long long cpu_time, /* time spent on the cpu */ |
588 | pcnt; /* # of timeslices run on this cpu */ | 586 | run_delay; /* time spent waiting on a runqueue */ |
589 | 587 | ||
590 | /* timestamps */ | 588 | /* timestamps */ |
591 | unsigned long last_arrival, /* when we last ran on a cpu */ | 589 | unsigned long long last_arrival,/* when we last ran on a cpu */ |
592 | last_queued; /* when we were last queued to run */ | 590 | last_queued; /* when we were last queued to run */ |
593 | }; | 591 | }; |
594 | #endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ | 592 | #endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ |
595 | 593 | ||
@@ -639,18 +637,24 @@ static inline int sched_info_on(void) | |||
639 | #endif | 637 | #endif |
640 | } | 638 | } |
641 | 639 | ||
642 | enum idle_type | 640 | enum cpu_idle_type { |
643 | { | 641 | CPU_IDLE, |
644 | SCHED_IDLE, | 642 | CPU_NOT_IDLE, |
645 | NOT_IDLE, | 643 | CPU_NEWLY_IDLE, |
646 | NEWLY_IDLE, | 644 | CPU_MAX_IDLE_TYPES |
647 | MAX_IDLE_TYPES | ||
648 | }; | 645 | }; |
649 | 646 | ||
650 | /* | 647 | /* |
651 | * sched-domains (multiprocessor balancing) declarations: | 648 | * sched-domains (multiprocessor balancing) declarations: |
652 | */ | 649 | */ |
653 | #define SCHED_LOAD_SCALE 128UL /* increase resolution of load */ | 650 | |
651 | /* | ||
652 | * Increase resolution of nice-level calculations: | ||
653 | */ | ||
654 | #define SCHED_LOAD_SHIFT 10 | ||
655 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) | ||
656 | |||
657 | #define SCHED_LOAD_SCALE_FUZZ (SCHED_LOAD_SCALE >> 5) | ||
654 | 658 | ||
655 | #ifdef CONFIG_SMP | 659 | #ifdef CONFIG_SMP |
656 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ | 660 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ |
@@ -719,14 +723,14 @@ struct sched_domain { | |||
719 | 723 | ||
720 | #ifdef CONFIG_SCHEDSTATS | 724 | #ifdef CONFIG_SCHEDSTATS |
721 | /* load_balance() stats */ | 725 | /* load_balance() stats */ |
722 | unsigned long lb_cnt[MAX_IDLE_TYPES]; | 726 | unsigned long lb_cnt[CPU_MAX_IDLE_TYPES]; |
723 | unsigned long lb_failed[MAX_IDLE_TYPES]; | 727 | unsigned long lb_failed[CPU_MAX_IDLE_TYPES]; |
724 | unsigned long lb_balanced[MAX_IDLE_TYPES]; | 728 | unsigned long lb_balanced[CPU_MAX_IDLE_TYPES]; |
725 | unsigned long lb_imbalance[MAX_IDLE_TYPES]; | 729 | unsigned long lb_imbalance[CPU_MAX_IDLE_TYPES]; |
726 | unsigned long lb_gained[MAX_IDLE_TYPES]; | 730 | unsigned long lb_gained[CPU_MAX_IDLE_TYPES]; |
727 | unsigned long lb_hot_gained[MAX_IDLE_TYPES]; | 731 | unsigned long lb_hot_gained[CPU_MAX_IDLE_TYPES]; |
728 | unsigned long lb_nobusyg[MAX_IDLE_TYPES]; | 732 | unsigned long lb_nobusyg[CPU_MAX_IDLE_TYPES]; |
729 | unsigned long lb_nobusyq[MAX_IDLE_TYPES]; | 733 | unsigned long lb_nobusyq[CPU_MAX_IDLE_TYPES]; |
730 | 734 | ||
731 | /* Active load balancing */ | 735 | /* Active load balancing */ |
732 | unsigned long alb_cnt; | 736 | unsigned long alb_cnt; |
@@ -753,12 +757,6 @@ struct sched_domain { | |||
753 | extern int partition_sched_domains(cpumask_t *partition1, | 757 | extern int partition_sched_domains(cpumask_t *partition1, |
754 | cpumask_t *partition2); | 758 | cpumask_t *partition2); |
755 | 759 | ||
756 | /* | ||
757 | * Maximum cache size the migration-costs auto-tuning code will | ||
758 | * search from: | ||
759 | */ | ||
760 | extern unsigned int max_cache_size; | ||
761 | |||
762 | #endif /* CONFIG_SMP */ | 760 | #endif /* CONFIG_SMP */ |
763 | 761 | ||
764 | 762 | ||
@@ -809,14 +807,86 @@ struct mempolicy; | |||
809 | struct pipe_inode_info; | 807 | struct pipe_inode_info; |
810 | struct uts_namespace; | 808 | struct uts_namespace; |
811 | 809 | ||
812 | enum sleep_type { | 810 | struct rq; |
813 | SLEEP_NORMAL, | 811 | struct sched_domain; |
814 | SLEEP_NONINTERACTIVE, | 812 | |
815 | SLEEP_INTERACTIVE, | 813 | struct sched_class { |
816 | SLEEP_INTERRUPTED, | 814 | struct sched_class *next; |
815 | |||
816 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, | ||
817 | int wakeup, u64 now); | ||
818 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, | ||
819 | int sleep, u64 now); | ||
820 | void (*yield_task) (struct rq *rq, struct task_struct *p); | ||
821 | |||
822 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p); | ||
823 | |||
824 | struct task_struct * (*pick_next_task) (struct rq *rq, u64 now); | ||
825 | void (*put_prev_task) (struct rq *rq, struct task_struct *p, u64 now); | ||
826 | |||
827 | int (*load_balance) (struct rq *this_rq, int this_cpu, | ||
828 | struct rq *busiest, | ||
829 | unsigned long max_nr_move, unsigned long max_load_move, | ||
830 | struct sched_domain *sd, enum cpu_idle_type idle, | ||
831 | int *all_pinned, unsigned long *total_load_moved); | ||
832 | |||
833 | void (*set_curr_task) (struct rq *rq); | ||
834 | void (*task_tick) (struct rq *rq, struct task_struct *p); | ||
835 | void (*task_new) (struct rq *rq, struct task_struct *p); | ||
817 | }; | 836 | }; |
818 | 837 | ||
819 | struct prio_array; | 838 | struct load_weight { |
839 | unsigned long weight, inv_weight; | ||
840 | }; | ||
841 | |||
842 | /* | ||
843 | * CFS stats for a schedulable entity (task, task-group etc) | ||
844 | * | ||
845 | * Current field usage histogram: | ||
846 | * | ||
847 | * 4 se->block_start | ||
848 | * 4 se->run_node | ||
849 | * 4 se->sleep_start | ||
850 | * 4 se->sleep_start_fair | ||
851 | * 6 se->load.weight | ||
852 | * 7 se->delta_fair | ||
853 | * 15 se->wait_runtime | ||
854 | */ | ||
855 | struct sched_entity { | ||
856 | long wait_runtime; | ||
857 | unsigned long delta_fair_run; | ||
858 | unsigned long delta_fair_sleep; | ||
859 | unsigned long delta_exec; | ||
860 | s64 fair_key; | ||
861 | struct load_weight load; /* for load-balancing */ | ||
862 | struct rb_node run_node; | ||
863 | unsigned int on_rq; | ||
864 | |||
865 | u64 wait_start_fair; | ||
866 | u64 wait_start; | ||
867 | u64 exec_start; | ||
868 | u64 sleep_start; | ||
869 | u64 sleep_start_fair; | ||
870 | u64 block_start; | ||
871 | u64 sleep_max; | ||
872 | u64 block_max; | ||
873 | u64 exec_max; | ||
874 | u64 wait_max; | ||
875 | u64 last_ran; | ||
876 | |||
877 | u64 sum_exec_runtime; | ||
878 | s64 sum_wait_runtime; | ||
879 | s64 sum_sleep_runtime; | ||
880 | unsigned long wait_runtime_overruns; | ||
881 | unsigned long wait_runtime_underruns; | ||
882 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
883 | struct sched_entity *parent; | ||
884 | /* rq on which this entity is (to be) queued: */ | ||
885 | struct cfs_rq *cfs_rq; | ||
886 | /* rq "owned" by this entity/group: */ | ||
887 | struct cfs_rq *my_q; | ||
888 | #endif | ||
889 | }; | ||
820 | 890 | ||
821 | struct task_struct { | 891 | struct task_struct { |
822 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ | 892 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ |
@@ -832,23 +902,20 @@ struct task_struct { | |||
832 | int oncpu; | 902 | int oncpu; |
833 | #endif | 903 | #endif |
834 | #endif | 904 | #endif |
835 | int load_weight; /* for niceness load balancing purposes */ | 905 | |
836 | int prio, static_prio, normal_prio; | 906 | int prio, static_prio, normal_prio; |
837 | struct list_head run_list; | 907 | struct list_head run_list; |
838 | struct prio_array *array; | 908 | struct sched_class *sched_class; |
909 | struct sched_entity se; | ||
839 | 910 | ||
840 | unsigned short ioprio; | 911 | unsigned short ioprio; |
841 | #ifdef CONFIG_BLK_DEV_IO_TRACE | 912 | #ifdef CONFIG_BLK_DEV_IO_TRACE |
842 | unsigned int btrace_seq; | 913 | unsigned int btrace_seq; |
843 | #endif | 914 | #endif |
844 | unsigned long sleep_avg; | ||
845 | unsigned long long timestamp, last_ran; | ||
846 | unsigned long long sched_time; /* sched_clock time spent running */ | ||
847 | enum sleep_type sleep_type; | ||
848 | 915 | ||
849 | unsigned int policy; | 916 | unsigned int policy; |
850 | cpumask_t cpus_allowed; | 917 | cpumask_t cpus_allowed; |
851 | unsigned int time_slice, first_time_slice; | 918 | unsigned int time_slice; |
852 | 919 | ||
853 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) | 920 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
854 | struct sched_info sched_info; | 921 | struct sched_info sched_info; |
@@ -1078,6 +1145,37 @@ struct task_struct { | |||
1078 | #endif | 1145 | #endif |
1079 | }; | 1146 | }; |
1080 | 1147 | ||
1148 | /* | ||
1149 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT | ||
1150 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH | ||
1151 | * tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority | ||
1152 | * values are inverted: lower p->prio value means higher priority. | ||
1153 | * | ||
1154 | * The MAX_USER_RT_PRIO value allows the actual maximum | ||
1155 | * RT priority to be separate from the value exported to | ||
1156 | * user-space. This allows kernel threads to set their | ||
1157 | * priority to a value higher than any user task. Note: | ||
1158 | * MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO. | ||
1159 | */ | ||
1160 | |||
1161 | #define MAX_USER_RT_PRIO 100 | ||
1162 | #define MAX_RT_PRIO MAX_USER_RT_PRIO | ||
1163 | |||
1164 | #define MAX_PRIO (MAX_RT_PRIO + 40) | ||
1165 | #define DEFAULT_PRIO (MAX_RT_PRIO + 20) | ||
1166 | |||
1167 | static inline int rt_prio(int prio) | ||
1168 | { | ||
1169 | if (unlikely(prio < MAX_RT_PRIO)) | ||
1170 | return 1; | ||
1171 | return 0; | ||
1172 | } | ||
1173 | |||
1174 | static inline int rt_task(struct task_struct *p) | ||
1175 | { | ||
1176 | return rt_prio(p->prio); | ||
1177 | } | ||
1178 | |||
1081 | static inline pid_t process_group(struct task_struct *tsk) | 1179 | static inline pid_t process_group(struct task_struct *tsk) |
1082 | { | 1180 | { |
1083 | return tsk->signal->pgrp; | 1181 | return tsk->signal->pgrp; |
@@ -1223,7 +1321,7 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | |||
1223 | 1321 | ||
1224 | extern unsigned long long sched_clock(void); | 1322 | extern unsigned long long sched_clock(void); |
1225 | extern unsigned long long | 1323 | extern unsigned long long |
1226 | current_sched_time(const struct task_struct *current_task); | 1324 | task_sched_runtime(struct task_struct *task); |
1227 | 1325 | ||
1228 | /* sched_exec is called by processes performing an exec */ | 1326 | /* sched_exec is called by processes performing an exec */ |
1229 | #ifdef CONFIG_SMP | 1327 | #ifdef CONFIG_SMP |
@@ -1232,6 +1330,8 @@ extern void sched_exec(void); | |||
1232 | #define sched_exec() {} | 1330 | #define sched_exec() {} |
1233 | #endif | 1331 | #endif |
1234 | 1332 | ||
1333 | extern void sched_clock_unstable_event(void); | ||
1334 | |||
1235 | #ifdef CONFIG_HOTPLUG_CPU | 1335 | #ifdef CONFIG_HOTPLUG_CPU |
1236 | extern void idle_task_exit(void); | 1336 | extern void idle_task_exit(void); |
1237 | #else | 1337 | #else |
@@ -1240,6 +1340,14 @@ static inline void idle_task_exit(void) {} | |||
1240 | 1340 | ||
1241 | extern void sched_idle_next(void); | 1341 | extern void sched_idle_next(void); |
1242 | 1342 | ||
1343 | extern unsigned int sysctl_sched_granularity; | ||
1344 | extern unsigned int sysctl_sched_wakeup_granularity; | ||
1345 | extern unsigned int sysctl_sched_batch_wakeup_granularity; | ||
1346 | extern unsigned int sysctl_sched_stat_granularity; | ||
1347 | extern unsigned int sysctl_sched_runtime_limit; | ||
1348 | extern unsigned int sysctl_sched_child_runs_first; | ||
1349 | extern unsigned int sysctl_sched_features; | ||
1350 | |||
1243 | #ifdef CONFIG_RT_MUTEXES | 1351 | #ifdef CONFIG_RT_MUTEXES |
1244 | extern int rt_mutex_getprio(struct task_struct *p); | 1352 | extern int rt_mutex_getprio(struct task_struct *p); |
1245 | extern void rt_mutex_setprio(struct task_struct *p, int prio); | 1353 | extern void rt_mutex_setprio(struct task_struct *p, int prio); |
@@ -1317,8 +1425,8 @@ extern void FASTCALL(wake_up_new_task(struct task_struct * tsk, | |||
1317 | #else | 1425 | #else |
1318 | static inline void kick_process(struct task_struct *tsk) { } | 1426 | static inline void kick_process(struct task_struct *tsk) { } |
1319 | #endif | 1427 | #endif |
1320 | extern void FASTCALL(sched_fork(struct task_struct * p, int clone_flags)); | 1428 | extern void sched_fork(struct task_struct *p, int clone_flags); |
1321 | extern void FASTCALL(sched_exit(struct task_struct * p)); | 1429 | extern void sched_dead(struct task_struct *p); |
1322 | 1430 | ||
1323 | extern int in_group_p(gid_t); | 1431 | extern int in_group_p(gid_t); |
1324 | extern int in_egroup_p(gid_t); | 1432 | extern int in_egroup_p(gid_t); |
@@ -1406,7 +1514,7 @@ extern struct mm_struct * mm_alloc(void); | |||
1406 | extern void FASTCALL(__mmdrop(struct mm_struct *)); | 1514 | extern void FASTCALL(__mmdrop(struct mm_struct *)); |
1407 | static inline void mmdrop(struct mm_struct * mm) | 1515 | static inline void mmdrop(struct mm_struct * mm) |
1408 | { | 1516 | { |
1409 | if (atomic_dec_and_test(&mm->mm_count)) | 1517 | if (unlikely(atomic_dec_and_test(&mm->mm_count))) |
1410 | __mmdrop(mm); | 1518 | __mmdrop(mm); |
1411 | } | 1519 | } |
1412 | 1520 | ||
@@ -1638,10 +1746,7 @@ static inline unsigned int task_cpu(const struct task_struct *p) | |||
1638 | return task_thread_info(p)->cpu; | 1746 | return task_thread_info(p)->cpu; |
1639 | } | 1747 | } |
1640 | 1748 | ||
1641 | static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) | 1749 | extern void set_task_cpu(struct task_struct *p, unsigned int cpu); |
1642 | { | ||
1643 | task_thread_info(p)->cpu = cpu; | ||
1644 | } | ||
1645 | 1750 | ||
1646 | #else | 1751 | #else |
1647 | 1752 | ||
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h index b02308ee7667..3ee412bc00ec 100644 --- a/include/linux/screen_info.h +++ b/include/linux/screen_info.h | |||
@@ -10,7 +10,7 @@ | |||
10 | struct screen_info { | 10 | struct screen_info { |
11 | u8 orig_x; /* 0x00 */ | 11 | u8 orig_x; /* 0x00 */ |
12 | u8 orig_y; /* 0x01 */ | 12 | u8 orig_y; /* 0x01 */ |
13 | u16 dontuse1; /* 0x02 -- EXT_MEM_K sits here */ | 13 | u16 ext_mem_k; /* 0x02 */ |
14 | u16 orig_video_page; /* 0x04 */ | 14 | u16 orig_video_page; /* 0x04 */ |
15 | u8 orig_video_mode; /* 0x06 */ | 15 | u8 orig_video_mode; /* 0x06 */ |
16 | u8 orig_video_cols; /* 0x07 */ | 16 | u8 orig_video_cols; /* 0x07 */ |
@@ -27,7 +27,7 @@ struct screen_info { | |||
27 | u16 lfb_depth; /* 0x16 */ | 27 | u16 lfb_depth; /* 0x16 */ |
28 | u32 lfb_base; /* 0x18 */ | 28 | u32 lfb_base; /* 0x18 */ |
29 | u32 lfb_size; /* 0x1c */ | 29 | u32 lfb_size; /* 0x1c */ |
30 | u16 dontuse2, dontuse3; /* 0x20 -- CL_MAGIC and CL_OFFSET here */ | 30 | u16 cl_magic, cl_offset; /* 0x20 */ |
31 | u16 lfb_linelength; /* 0x24 */ | 31 | u16 lfb_linelength; /* 0x24 */ |
32 | u8 red_size; /* 0x26 */ | 32 | u8 red_size; /* 0x26 */ |
33 | u8 red_pos; /* 0x27 */ | 33 | u8 red_pos; /* 0x27 */ |
@@ -42,9 +42,8 @@ struct screen_info { | |||
42 | u16 pages; /* 0x32 */ | 42 | u16 pages; /* 0x32 */ |
43 | u16 vesa_attributes; /* 0x34 */ | 43 | u16 vesa_attributes; /* 0x34 */ |
44 | u32 capabilities; /* 0x36 */ | 44 | u32 capabilities; /* 0x36 */ |
45 | /* 0x3a -- 0x3b reserved for future expansion */ | 45 | u8 _reserved[6]; /* 0x3a */ |
46 | /* 0x3c -- 0x3f micro stack for relocatable kernels */ | 46 | } __attribute__((packed)); |
47 | }; | ||
48 | 47 | ||
49 | extern struct screen_info screen_info; | 48 | extern struct screen_info screen_info; |
50 | 49 | ||
diff --git a/include/linux/security.h b/include/linux/security.h index 9eb9e0fe0331..c11dc8aa0351 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -71,6 +71,7 @@ struct xfrm_user_sec_ctx; | |||
71 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); | 71 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); |
72 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); | 72 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); |
73 | 73 | ||
74 | extern unsigned long mmap_min_addr; | ||
74 | /* | 75 | /* |
75 | * Values used in the task_security_ops calls | 76 | * Values used in the task_security_ops calls |
76 | */ | 77 | */ |
@@ -1241,8 +1242,9 @@ struct security_operations { | |||
1241 | int (*file_ioctl) (struct file * file, unsigned int cmd, | 1242 | int (*file_ioctl) (struct file * file, unsigned int cmd, |
1242 | unsigned long arg); | 1243 | unsigned long arg); |
1243 | int (*file_mmap) (struct file * file, | 1244 | int (*file_mmap) (struct file * file, |
1244 | unsigned long reqprot, | 1245 | unsigned long reqprot, unsigned long prot, |
1245 | unsigned long prot, unsigned long flags); | 1246 | unsigned long flags, unsigned long addr, |
1247 | unsigned long addr_only); | ||
1246 | int (*file_mprotect) (struct vm_area_struct * vma, | 1248 | int (*file_mprotect) (struct vm_area_struct * vma, |
1247 | unsigned long reqprot, | 1249 | unsigned long reqprot, |
1248 | unsigned long prot); | 1250 | unsigned long prot); |
@@ -1814,9 +1816,12 @@ static inline int security_file_ioctl (struct file *file, unsigned int cmd, | |||
1814 | 1816 | ||
1815 | static inline int security_file_mmap (struct file *file, unsigned long reqprot, | 1817 | static inline int security_file_mmap (struct file *file, unsigned long reqprot, |
1816 | unsigned long prot, | 1818 | unsigned long prot, |
1817 | unsigned long flags) | 1819 | unsigned long flags, |
1820 | unsigned long addr, | ||
1821 | unsigned long addr_only) | ||
1818 | { | 1822 | { |
1819 | return security_ops->file_mmap (file, reqprot, prot, flags); | 1823 | return security_ops->file_mmap (file, reqprot, prot, flags, addr, |
1824 | addr_only); | ||
1820 | } | 1825 | } |
1821 | 1826 | ||
1822 | static inline int security_file_mprotect (struct vm_area_struct *vma, | 1827 | static inline int security_file_mprotect (struct vm_area_struct *vma, |
@@ -2489,7 +2494,9 @@ static inline int security_file_ioctl (struct file *file, unsigned int cmd, | |||
2489 | 2494 | ||
2490 | static inline int security_file_mmap (struct file *file, unsigned long reqprot, | 2495 | static inline int security_file_mmap (struct file *file, unsigned long reqprot, |
2491 | unsigned long prot, | 2496 | unsigned long prot, |
2492 | unsigned long flags) | 2497 | unsigned long flags, |
2498 | unsigned long addr, | ||
2499 | unsigned long addr_only) | ||
2493 | { | 2500 | { |
2494 | return 0; | 2501 | return 0; |
2495 | } | 2502 | } |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 3e3cccbb1cac..83783ab0f552 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -50,5 +50,16 @@ int seq_release_private(struct inode *, struct file *); | |||
50 | 50 | ||
51 | #define SEQ_START_TOKEN ((void *)1) | 51 | #define SEQ_START_TOKEN ((void *)1) |
52 | 52 | ||
53 | /* | ||
54 | * Helpers for iteration over list_head-s in seq_files | ||
55 | */ | ||
56 | |||
57 | extern struct list_head *seq_list_start(struct list_head *head, | ||
58 | loff_t pos); | ||
59 | extern struct list_head *seq_list_start_head(struct list_head *head, | ||
60 | loff_t pos); | ||
61 | extern struct list_head *seq_list_next(void *v, struct list_head *head, | ||
62 | loff_t *ppos); | ||
63 | |||
53 | #endif | 64 | #endif |
54 | #endif | 65 | #endif |
diff --git a/include/linux/serio.h b/include/linux/serio.h index 1ebf0455e224..d9377ce9ffd1 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -209,5 +209,6 @@ static inline void serio_unpin_driver(struct serio *serio) | |||
209 | #define SERIO_PENMOUNT 0x31 | 209 | #define SERIO_PENMOUNT 0x31 |
210 | #define SERIO_TOUCHRIGHT 0x32 | 210 | #define SERIO_TOUCHRIGHT 0x32 |
211 | #define SERIO_TOUCHWIN 0x33 | 211 | #define SERIO_TOUCHWIN 0x33 |
212 | #define SERIO_TAOSEVM 0x34 | ||
212 | 213 | ||
213 | #endif | 214 | #endif |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 6f0b2f7d0010..9391e4a4c344 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -65,13 +65,20 @@ | |||
65 | * is able to produce some skb->csum, it MUST use COMPLETE, | 65 | * is able to produce some skb->csum, it MUST use COMPLETE, |
66 | * not UNNECESSARY. | 66 | * not UNNECESSARY. |
67 | * | 67 | * |
68 | * PARTIAL: identical to the case for output below. This may occur | ||
69 | * on a packet received directly from another Linux OS, e.g., | ||
70 | * a virtualised Linux kernel on the same host. The packet can | ||
71 | * be treated in the same way as UNNECESSARY except that on | ||
72 | * output (i.e., forwarding) the checksum must be filled in | ||
73 | * by the OS or the hardware. | ||
74 | * | ||
68 | * B. Checksumming on output. | 75 | * B. Checksumming on output. |
69 | * | 76 | * |
70 | * NONE: skb is checksummed by protocol or csum is not required. | 77 | * NONE: skb is checksummed by protocol or csum is not required. |
71 | * | 78 | * |
72 | * PARTIAL: device is required to csum packet as seen by hard_start_xmit | 79 | * PARTIAL: device is required to csum packet as seen by hard_start_xmit |
73 | * from skb->transport_header to the end and to record the checksum | 80 | * from skb->csum_start to the end and to record the checksum |
74 | * at skb->transport_header + skb->csum. | 81 | * at skb->csum_start + skb->csum_offset. |
75 | * | 82 | * |
76 | * Device must show its capabilities in dev->features, set | 83 | * Device must show its capabilities in dev->features, set |
77 | * at device setup time. | 84 | * at device setup time. |
@@ -82,6 +89,7 @@ | |||
82 | * TCP/UDP over IPv4. Sigh. Vendors like this | 89 | * TCP/UDP over IPv4. Sigh. Vendors like this |
83 | * way by an unknown reason. Though, see comment above | 90 | * way by an unknown reason. Though, see comment above |
84 | * about CHECKSUM_UNNECESSARY. 8) | 91 | * about CHECKSUM_UNNECESSARY. 8) |
92 | * NETIF_F_IPV6_CSUM about as dumb as the last one but does IPv6 instead. | ||
85 | * | 93 | * |
86 | * Any questions? No questions, good. --ANK | 94 | * Any questions? No questions, good. --ANK |
87 | */ | 95 | */ |
@@ -147,8 +155,8 @@ struct skb_shared_info { | |||
147 | 155 | ||
148 | /* We divide dataref into two halves. The higher 16 bits hold references | 156 | /* We divide dataref into two halves. The higher 16 bits hold references |
149 | * to the payload part of skb->data. The lower 16 bits hold references to | 157 | * to the payload part of skb->data. The lower 16 bits hold references to |
150 | * the entire skb->data. It is up to the users of the skb to agree on | 158 | * the entire skb->data. A clone of a headerless skb holds the length of |
151 | * where the payload starts. | 159 | * the header in skb->hdr_len. |
152 | * | 160 | * |
153 | * All users must obey the rule that the skb->data reference count must be | 161 | * All users must obey the rule that the skb->data reference count must be |
154 | * greater than or equal to the payload reference count. | 162 | * greater than or equal to the payload reference count. |
@@ -196,7 +204,6 @@ typedef unsigned char *sk_buff_data_t; | |||
196 | * @sk: Socket we are owned by | 204 | * @sk: Socket we are owned by |
197 | * @tstamp: Time we arrived | 205 | * @tstamp: Time we arrived |
198 | * @dev: Device we arrived on/are leaving by | 206 | * @dev: Device we arrived on/are leaving by |
199 | * @iif: ifindex of device we arrived on | ||
200 | * @transport_header: Transport layer header | 207 | * @transport_header: Transport layer header |
201 | * @network_header: Network layer header | 208 | * @network_header: Network layer header |
202 | * @mac_header: Link layer header | 209 | * @mac_header: Link layer header |
@@ -206,6 +213,7 @@ typedef unsigned char *sk_buff_data_t; | |||
206 | * @len: Length of actual data | 213 | * @len: Length of actual data |
207 | * @data_len: Data length | 214 | * @data_len: Data length |
208 | * @mac_len: Length of link layer header | 215 | * @mac_len: Length of link layer header |
216 | * @hdr_len: writable header length of cloned skb | ||
209 | * @csum: Checksum (must include start/offset pair) | 217 | * @csum: Checksum (must include start/offset pair) |
210 | * @csum_start: Offset from skb->head where checksumming should start | 218 | * @csum_start: Offset from skb->head where checksumming should start |
211 | * @csum_offset: Offset from csum_start where checksum should be stored | 219 | * @csum_offset: Offset from csum_start where checksum should be stored |
@@ -227,9 +235,12 @@ typedef unsigned char *sk_buff_data_t; | |||
227 | * @mark: Generic packet mark | 235 | * @mark: Generic packet mark |
228 | * @nfct: Associated connection, if any | 236 | * @nfct: Associated connection, if any |
229 | * @ipvs_property: skbuff is owned by ipvs | 237 | * @ipvs_property: skbuff is owned by ipvs |
238 | * @nf_trace: netfilter packet trace flag | ||
230 | * @nfctinfo: Relationship of this skb to the connection | 239 | * @nfctinfo: Relationship of this skb to the connection |
231 | * @nfct_reasm: netfilter conntrack re-assembly pointer | 240 | * @nfct_reasm: netfilter conntrack re-assembly pointer |
232 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c | 241 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c |
242 | * @iif: ifindex of device we arrived on | ||
243 | * @queue_mapping: Queue mapping for multiqueue devices | ||
233 | * @tc_index: Traffic control index | 244 | * @tc_index: Traffic control index |
234 | * @tc_verd: traffic control verdict | 245 | * @tc_verd: traffic control verdict |
235 | * @dma_cookie: a cookie to one of several possible DMA operations | 246 | * @dma_cookie: a cookie to one of several possible DMA operations |
@@ -245,8 +256,6 @@ struct sk_buff { | |||
245 | struct sock *sk; | 256 | struct sock *sk; |
246 | ktime_t tstamp; | 257 | ktime_t tstamp; |
247 | struct net_device *dev; | 258 | struct net_device *dev; |
248 | int iif; | ||
249 | /* 4 byte hole on 64 bit*/ | ||
250 | 259 | ||
251 | struct dst_entry *dst; | 260 | struct dst_entry *dst; |
252 | struct sec_path *sp; | 261 | struct sec_path *sp; |
@@ -260,8 +269,9 @@ struct sk_buff { | |||
260 | char cb[48]; | 269 | char cb[48]; |
261 | 270 | ||
262 | unsigned int len, | 271 | unsigned int len, |
263 | data_len, | 272 | data_len; |
264 | mac_len; | 273 | __u16 mac_len, |
274 | hdr_len; | ||
265 | union { | 275 | union { |
266 | __wsum csum; | 276 | __wsum csum; |
267 | struct { | 277 | struct { |
@@ -277,7 +287,8 @@ struct sk_buff { | |||
277 | nfctinfo:3; | 287 | nfctinfo:3; |
278 | __u8 pkt_type:3, | 288 | __u8 pkt_type:3, |
279 | fclone:2, | 289 | fclone:2, |
280 | ipvs_property:1; | 290 | ipvs_property:1, |
291 | nf_trace:1; | ||
281 | __be16 protocol; | 292 | __be16 protocol; |
282 | 293 | ||
283 | void (*destructor)(struct sk_buff *skb); | 294 | void (*destructor)(struct sk_buff *skb); |
@@ -288,12 +299,18 @@ struct sk_buff { | |||
288 | #ifdef CONFIG_BRIDGE_NETFILTER | 299 | #ifdef CONFIG_BRIDGE_NETFILTER |
289 | struct nf_bridge_info *nf_bridge; | 300 | struct nf_bridge_info *nf_bridge; |
290 | #endif | 301 | #endif |
302 | |||
303 | int iif; | ||
304 | __u16 queue_mapping; | ||
305 | |||
291 | #ifdef CONFIG_NET_SCHED | 306 | #ifdef CONFIG_NET_SCHED |
292 | __u16 tc_index; /* traffic control index */ | 307 | __u16 tc_index; /* traffic control index */ |
293 | #ifdef CONFIG_NET_CLS_ACT | 308 | #ifdef CONFIG_NET_CLS_ACT |
294 | __u16 tc_verd; /* traffic control verdict */ | 309 | __u16 tc_verd; /* traffic control verdict */ |
295 | #endif | 310 | #endif |
296 | #endif | 311 | #endif |
312 | /* 2 byte hole */ | ||
313 | |||
297 | #ifdef CONFIG_NET_DMA | 314 | #ifdef CONFIG_NET_DMA |
298 | dma_cookie_t dma_cookie; | 315 | dma_cookie_t dma_cookie; |
299 | #endif | 316 | #endif |
@@ -1322,6 +1339,20 @@ static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev, | |||
1322 | } | 1339 | } |
1323 | 1340 | ||
1324 | /** | 1341 | /** |
1342 | * skb_clone_writable - is the header of a clone writable | ||
1343 | * @skb: buffer to check | ||
1344 | * @len: length up to which to write | ||
1345 | * | ||
1346 | * Returns true if modifying the header part of the cloned buffer | ||
1347 | * does not requires the data to be copied. | ||
1348 | */ | ||
1349 | static inline int skb_clone_writable(struct sk_buff *skb, int len) | ||
1350 | { | ||
1351 | return !skb_header_cloned(skb) && | ||
1352 | skb_headroom(skb) + len <= skb->hdr_len; | ||
1353 | } | ||
1354 | |||
1355 | /** | ||
1325 | * skb_cow - copy header of skb when it is required | 1356 | * skb_cow - copy header of skb when it is required |
1326 | * @skb: buffer to cow | 1357 | * @skb: buffer to cow |
1327 | * @headroom: needed headroom | 1358 | * @headroom: needed headroom |
@@ -1709,6 +1740,20 @@ static inline void skb_init_secmark(struct sk_buff *skb) | |||
1709 | { } | 1740 | { } |
1710 | #endif | 1741 | #endif |
1711 | 1742 | ||
1743 | static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping) | ||
1744 | { | ||
1745 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
1746 | skb->queue_mapping = queue_mapping; | ||
1747 | #endif | ||
1748 | } | ||
1749 | |||
1750 | static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_buff *from) | ||
1751 | { | ||
1752 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
1753 | to->queue_mapping = from->queue_mapping; | ||
1754 | #endif | ||
1755 | } | ||
1756 | |||
1712 | static inline int skb_is_gso(const struct sk_buff *skb) | 1757 | static inline int skb_is_gso(const struct sk_buff *skb) |
1713 | { | 1758 | { |
1714 | return skb_shinfo(skb)->gso_size; | 1759 | return skb_shinfo(skb)->gso_size; |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 6e7c9483a6a6..fe195c97a89d 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -287,6 +287,7 @@ struct ucred { | |||
287 | #define SOL_NETLINK 270 | 287 | #define SOL_NETLINK 270 |
288 | #define SOL_TIPC 271 | 288 | #define SOL_TIPC 271 |
289 | #define SOL_RXRPC 272 | 289 | #define SOL_RXRPC 272 |
290 | #define SOL_PPPOL2TP 273 | ||
290 | 291 | ||
291 | /* IPX options */ | 292 | /* IPX options */ |
292 | #define IPX_TYPE 1 | 293 | #define IPX_TYPE 1 |
diff --git a/include/linux/splice.h b/include/linux/splice.h new file mode 100644 index 000000000000..33e447f98a54 --- /dev/null +++ b/include/linux/splice.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /* | ||
2 | * Function declerations and data structures related to the splice | ||
3 | * implementation. | ||
4 | * | ||
5 | * Copyright (C) 2007 Jens Axboe <jens.axboe@oracle.com> | ||
6 | * | ||
7 | */ | ||
8 | #ifndef SPLICE_H | ||
9 | #define SPLICE_H | ||
10 | |||
11 | #include <linux/pipe_fs_i.h> | ||
12 | |||
13 | /* | ||
14 | * splice is tied to pipes as a transport (at least for now), so we'll just | ||
15 | * add the splice flags here. | ||
16 | */ | ||
17 | #define SPLICE_F_MOVE (0x01) /* move pages instead of copying */ | ||
18 | #define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */ | ||
19 | /* we may still block on the fd we splice */ | ||
20 | /* from/to, of course */ | ||
21 | #define SPLICE_F_MORE (0x04) /* expect more data */ | ||
22 | #define SPLICE_F_GIFT (0x08) /* pages passed in are a gift */ | ||
23 | |||
24 | /* | ||
25 | * Passed to the actors | ||
26 | */ | ||
27 | struct splice_desc { | ||
28 | unsigned int len, total_len; /* current and remaining length */ | ||
29 | unsigned int flags; /* splice flags */ | ||
30 | /* | ||
31 | * actor() private data | ||
32 | */ | ||
33 | union { | ||
34 | void __user *userptr; /* memory to write to */ | ||
35 | struct file *file; /* file to read/write */ | ||
36 | void *data; /* cookie */ | ||
37 | } u; | ||
38 | loff_t pos; /* file position */ | ||
39 | }; | ||
40 | |||
41 | struct partial_page { | ||
42 | unsigned int offset; | ||
43 | unsigned int len; | ||
44 | unsigned long private; | ||
45 | }; | ||
46 | |||
47 | /* | ||
48 | * Passed to splice_to_pipe | ||
49 | */ | ||
50 | struct splice_pipe_desc { | ||
51 | struct page **pages; /* page map */ | ||
52 | struct partial_page *partial; /* pages[] may not be contig */ | ||
53 | int nr_pages; /* number of pages in map */ | ||
54 | unsigned int flags; /* splice flags */ | ||
55 | const struct pipe_buf_operations *ops;/* ops associated with output pipe */ | ||
56 | }; | ||
57 | |||
58 | typedef int (splice_actor)(struct pipe_inode_info *, struct pipe_buffer *, | ||
59 | struct splice_desc *); | ||
60 | typedef int (splice_direct_actor)(struct pipe_inode_info *, | ||
61 | struct splice_desc *); | ||
62 | |||
63 | extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *, | ||
64 | loff_t *, size_t, unsigned int, | ||
65 | splice_actor *); | ||
66 | extern ssize_t __splice_from_pipe(struct pipe_inode_info *, | ||
67 | struct splice_desc *, splice_actor *); | ||
68 | extern ssize_t splice_to_pipe(struct pipe_inode_info *, | ||
69 | struct splice_pipe_desc *); | ||
70 | extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *, | ||
71 | splice_direct_actor *); | ||
72 | |||
73 | #endif | ||
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 4a7ae8ab6eb8..129d50f2225c 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -253,7 +253,7 @@ struct svc_rqst { | |||
253 | * determine what device number | 253 | * determine what device number |
254 | * to report (real or virtual) | 254 | * to report (real or virtual) |
255 | */ | 255 | */ |
256 | int rq_sendfile_ok; /* turned off in gss privacy | 256 | int rq_splice_ok; /* turned off in gss privacy |
257 | * to prevent encrypting page | 257 | * to prevent encrypting page |
258 | * cache pages */ | 258 | * cache pages */ |
259 | wait_queue_head_t rq_wait; /* synchronization */ | 259 | wait_queue_head_t rq_wait; /* synchronization */ |
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index e699ab279c2c..e285746588d6 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -101,8 +101,7 @@ struct sysdev_attribute { | |||
101 | 101 | ||
102 | #define _SYSDEV_ATTR(_name,_mode,_show,_store) \ | 102 | #define _SYSDEV_ATTR(_name,_mode,_show,_store) \ |
103 | { \ | 103 | { \ |
104 | .attr = { .name = __stringify(_name), .mode = _mode, \ | 104 | .attr = { .name = __stringify(_name), .mode = _mode }, \ |
105 | .owner = THIS_MODULE }, \ | ||
106 | .show = _show, \ | 105 | .show = _show, \ |
107 | .store = _store, \ | 106 | .store = _store, \ |
108 | } | 107 | } |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 7d5d1ec95c2e..be8228e50a27 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -19,10 +19,15 @@ struct kobject; | |||
19 | struct module; | 19 | struct module; |
20 | struct nameidata; | 20 | struct nameidata; |
21 | struct dentry; | 21 | struct dentry; |
22 | struct sysfs_dirent; | ||
22 | 23 | ||
24 | /* FIXME | ||
25 | * The *owner field is no longer used, but leave around | ||
26 | * until the tree gets cleaned up fully. | ||
27 | */ | ||
23 | struct attribute { | 28 | struct attribute { |
24 | const char * name; | 29 | const char * name; |
25 | struct module * owner; | 30 | struct module * owner; |
26 | mode_t mode; | 31 | mode_t mode; |
27 | }; | 32 | }; |
28 | 33 | ||
@@ -39,14 +44,14 @@ struct attribute_group { | |||
39 | */ | 44 | */ |
40 | 45 | ||
41 | #define __ATTR(_name,_mode,_show,_store) { \ | 46 | #define __ATTR(_name,_mode,_show,_store) { \ |
42 | .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, \ | 47 | .attr = {.name = __stringify(_name), .mode = _mode }, \ |
43 | .show = _show, \ | 48 | .show = _show, \ |
44 | .store = _store, \ | 49 | .store = _store, \ |
45 | } | 50 | } |
46 | 51 | ||
47 | #define __ATTR_RO(_name) { \ | 52 | #define __ATTR_RO(_name) { \ |
48 | .attr = { .name = __stringify(_name), .mode = 0444, .owner = THIS_MODULE }, \ | 53 | .attr = { .name = __stringify(_name), .mode = 0444 }, \ |
49 | .show = _name##_show, \ | 54 | .show = _name##_show, \ |
50 | } | 55 | } |
51 | 56 | ||
52 | #define __ATTR_NULL { .attr = { .name = NULL } } | 57 | #define __ATTR_NULL { .attr = { .name = NULL } } |
@@ -59,8 +64,10 @@ struct bin_attribute { | |||
59 | struct attribute attr; | 64 | struct attribute attr; |
60 | size_t size; | 65 | size_t size; |
61 | void *private; | 66 | void *private; |
62 | ssize_t (*read)(struct kobject *, char *, loff_t, size_t); | 67 | ssize_t (*read)(struct kobject *, struct bin_attribute *, |
63 | ssize_t (*write)(struct kobject *, char *, loff_t, size_t); | 68 | char *, loff_t, size_t); |
69 | ssize_t (*write)(struct kobject *, struct bin_attribute *, | ||
70 | char *, loff_t, size_t); | ||
64 | int (*mmap)(struct kobject *, struct bin_attribute *attr, | 71 | int (*mmap)(struct kobject *, struct bin_attribute *attr, |
65 | struct vm_area_struct *vma); | 72 | struct vm_area_struct *vma); |
66 | }; | 73 | }; |
@@ -70,12 +77,16 @@ struct sysfs_ops { | |||
70 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); | 77 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); |
71 | }; | 78 | }; |
72 | 79 | ||
80 | #define SYSFS_TYPE_MASK 0x00ff | ||
73 | #define SYSFS_ROOT 0x0001 | 81 | #define SYSFS_ROOT 0x0001 |
74 | #define SYSFS_DIR 0x0002 | 82 | #define SYSFS_DIR 0x0002 |
75 | #define SYSFS_KOBJ_ATTR 0x0004 | 83 | #define SYSFS_KOBJ_ATTR 0x0004 |
76 | #define SYSFS_KOBJ_BIN_ATTR 0x0008 | 84 | #define SYSFS_KOBJ_BIN_ATTR 0x0008 |
77 | #define SYSFS_KOBJ_LINK 0x0020 | 85 | #define SYSFS_KOBJ_LINK 0x0020 |
78 | #define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_LINK) | 86 | #define SYSFS_COPY_NAME (SYSFS_DIR | SYSFS_KOBJ_LINK) |
87 | |||
88 | #define SYSFS_FLAG_MASK ~SYSFS_TYPE_MASK | ||
89 | #define SYSFS_FLAG_REMOVED 0x0100 | ||
79 | 90 | ||
80 | #ifdef CONFIG_SYSFS | 91 | #ifdef CONFIG_SYSFS |
81 | 92 | ||
@@ -83,13 +94,14 @@ extern int sysfs_schedule_callback(struct kobject *kobj, | |||
83 | void (*func)(void *), void *data, struct module *owner); | 94 | void (*func)(void *), void *data, struct module *owner); |
84 | 95 | ||
85 | extern int __must_check | 96 | extern int __must_check |
86 | sysfs_create_dir(struct kobject *, struct dentry *); | 97 | sysfs_create_dir(struct kobject *kobj, struct sysfs_dirent *shadow_parent_sd); |
87 | 98 | ||
88 | extern void | 99 | extern void |
89 | sysfs_remove_dir(struct kobject *); | 100 | sysfs_remove_dir(struct kobject *); |
90 | 101 | ||
91 | extern int __must_check | 102 | extern int __must_check |
92 | sysfs_rename_dir(struct kobject *, struct dentry *, const char *new_name); | 103 | sysfs_rename_dir(struct kobject *kobj, struct sysfs_dirent *new_parent_sd, |
104 | const char *new_name); | ||
93 | 105 | ||
94 | extern int __must_check | 106 | extern int __must_check |
95 | sysfs_move_dir(struct kobject *, struct kobject *); | 107 | sysfs_move_dir(struct kobject *, struct kobject *); |
@@ -129,8 +141,8 @@ void sysfs_notify(struct kobject * k, char *dir, char *attr); | |||
129 | 141 | ||
130 | extern int sysfs_make_shadowed_dir(struct kobject *kobj, | 142 | extern int sysfs_make_shadowed_dir(struct kobject *kobj, |
131 | void * (*follow_link)(struct dentry *, struct nameidata *)); | 143 | void * (*follow_link)(struct dentry *, struct nameidata *)); |
132 | extern struct dentry *sysfs_create_shadow_dir(struct kobject *kobj); | 144 | extern struct sysfs_dirent *sysfs_create_shadow_dir(struct kobject *kobj); |
133 | extern void sysfs_remove_shadow_dir(struct dentry *dir); | 145 | extern void sysfs_remove_shadow_dir(struct sysfs_dirent *shadow_sd); |
134 | 146 | ||
135 | extern int __must_check sysfs_init(void); | 147 | extern int __must_check sysfs_init(void); |
136 | 148 | ||
@@ -142,7 +154,8 @@ static inline int sysfs_schedule_callback(struct kobject *kobj, | |||
142 | return -ENOSYS; | 154 | return -ENOSYS; |
143 | } | 155 | } |
144 | 156 | ||
145 | static inline int sysfs_create_dir(struct kobject * k, struct dentry *shadow) | 157 | static inline int sysfs_create_dir(struct kobject *kobj, |
158 | struct sysfs_dirent *shadow_parent_sd) | ||
146 | { | 159 | { |
147 | return 0; | 160 | return 0; |
148 | } | 161 | } |
@@ -152,9 +165,9 @@ static inline void sysfs_remove_dir(struct kobject * k) | |||
152 | ; | 165 | ; |
153 | } | 166 | } |
154 | 167 | ||
155 | static inline int sysfs_rename_dir(struct kobject * k, | 168 | static inline int sysfs_rename_dir(struct kobject *kobj, |
156 | struct dentry *new_parent, | 169 | struct sysfs_dirent *new_parent_sd, |
157 | const char *new_name) | 170 | const char *new_name) |
158 | { | 171 | { |
159 | return 0; | 172 | return 0; |
160 | } | 173 | } |
diff --git a/include/linux/topology.h b/include/linux/topology.h index a9d1f049cc15..d0890a7e5bab 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -50,10 +50,10 @@ | |||
50 | for_each_online_node(node) \ | 50 | for_each_online_node(node) \ |
51 | if (nr_cpus_node(node)) | 51 | if (nr_cpus_node(node)) |
52 | 52 | ||
53 | #ifndef node_distance | ||
54 | /* Conform to ACPI 2.0 SLIT distance definitions */ | 53 | /* Conform to ACPI 2.0 SLIT distance definitions */ |
55 | #define LOCAL_DISTANCE 10 | 54 | #define LOCAL_DISTANCE 10 |
56 | #define REMOTE_DISTANCE 20 | 55 | #define REMOTE_DISTANCE 20 |
56 | #ifndef node_distance | ||
57 | #define node_distance(from,to) ((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE) | 57 | #define node_distance(from,to) ((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE) |
58 | #endif | 58 | #endif |
59 | #ifndef RECLAIM_DISTANCE | 59 | #ifndef RECLAIM_DISTANCE |
@@ -98,7 +98,7 @@ | |||
98 | .cache_nice_tries = 0, \ | 98 | .cache_nice_tries = 0, \ |
99 | .busy_idx = 0, \ | 99 | .busy_idx = 0, \ |
100 | .idle_idx = 0, \ | 100 | .idle_idx = 0, \ |
101 | .newidle_idx = 1, \ | 101 | .newidle_idx = 0, \ |
102 | .wake_idx = 0, \ | 102 | .wake_idx = 0, \ |
103 | .forkexec_idx = 0, \ | 103 | .forkexec_idx = 0, \ |
104 | .flags = SD_LOAD_BALANCE \ | 104 | .flags = SD_LOAD_BALANCE \ |
@@ -128,14 +128,15 @@ | |||
128 | .imbalance_pct = 125, \ | 128 | .imbalance_pct = 125, \ |
129 | .cache_nice_tries = 1, \ | 129 | .cache_nice_tries = 1, \ |
130 | .busy_idx = 2, \ | 130 | .busy_idx = 2, \ |
131 | .idle_idx = 1, \ | 131 | .idle_idx = 0, \ |
132 | .newidle_idx = 2, \ | 132 | .newidle_idx = 0, \ |
133 | .wake_idx = 1, \ | 133 | .wake_idx = 1, \ |
134 | .forkexec_idx = 1, \ | 134 | .forkexec_idx = 1, \ |
135 | .flags = SD_LOAD_BALANCE \ | 135 | .flags = SD_LOAD_BALANCE \ |
136 | | SD_BALANCE_NEWIDLE \ | 136 | | SD_BALANCE_NEWIDLE \ |
137 | | SD_BALANCE_EXEC \ | 137 | | SD_BALANCE_EXEC \ |
138 | | SD_WAKE_AFFINE \ | 138 | | SD_WAKE_AFFINE \ |
139 | | SD_WAKE_IDLE \ | ||
139 | | SD_SHARE_PKG_RESOURCES\ | 140 | | SD_SHARE_PKG_RESOURCES\ |
140 | | BALANCE_FOR_MC_POWER, \ | 141 | | BALANCE_FOR_MC_POWER, \ |
141 | .last_balance = jiffies, \ | 142 | .last_balance = jiffies, \ |
@@ -158,14 +159,15 @@ | |||
158 | .imbalance_pct = 125, \ | 159 | .imbalance_pct = 125, \ |
159 | .cache_nice_tries = 1, \ | 160 | .cache_nice_tries = 1, \ |
160 | .busy_idx = 2, \ | 161 | .busy_idx = 2, \ |
161 | .idle_idx = 1, \ | 162 | .idle_idx = 0, \ |
162 | .newidle_idx = 2, \ | 163 | .newidle_idx = 0, \ |
163 | .wake_idx = 1, \ | 164 | .wake_idx = 1, \ |
164 | .forkexec_idx = 1, \ | 165 | .forkexec_idx = 1, \ |
165 | .flags = SD_LOAD_BALANCE \ | 166 | .flags = SD_LOAD_BALANCE \ |
166 | | SD_BALANCE_NEWIDLE \ | 167 | | SD_BALANCE_NEWIDLE \ |
167 | | SD_BALANCE_EXEC \ | 168 | | SD_BALANCE_EXEC \ |
168 | | SD_WAKE_AFFINE \ | 169 | | SD_WAKE_AFFINE \ |
170 | | SD_WAKE_IDLE \ | ||
169 | | BALANCE_FOR_PKG_POWER,\ | 171 | | BALANCE_FOR_PKG_POWER,\ |
170 | .last_balance = jiffies, \ | 172 | .last_balance = jiffies, \ |
171 | .balance_interval = 1, \ | 173 | .balance_interval = 1, \ |
diff --git a/include/linux/udp.h b/include/linux/udp.h index 6de445c31a64..8ec703f462da 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h | |||
@@ -42,6 +42,7 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb) | |||
42 | /* UDP encapsulation types */ | 42 | /* UDP encapsulation types */ |
43 | #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ | 43 | #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ |
44 | #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ | 44 | #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ |
45 | #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ | ||
45 | 46 | ||
46 | #ifdef __KERNEL__ | 47 | #ifdef __KERNEL__ |
47 | #include <linux/types.h> | 48 | #include <linux/types.h> |
@@ -70,6 +71,11 @@ struct udp_sock { | |||
70 | #define UDPLITE_SEND_CC 0x2 /* set via udplite setsockopt */ | 71 | #define UDPLITE_SEND_CC 0x2 /* set via udplite setsockopt */ |
71 | #define UDPLITE_RECV_CC 0x4 /* set via udplite setsocktopt */ | 72 | #define UDPLITE_RECV_CC 0x4 /* set via udplite setsocktopt */ |
72 | __u8 pcflag; /* marks socket as UDP-Lite if > 0 */ | 73 | __u8 pcflag; /* marks socket as UDP-Lite if > 0 */ |
74 | __u8 unused[3]; | ||
75 | /* | ||
76 | * For encapsulation sockets. | ||
77 | */ | ||
78 | int (*encap_rcv)(struct sock *sk, struct sk_buff *skb); | ||
73 | }; | 79 | }; |
74 | 80 | ||
75 | static inline struct udp_sock *udp_sk(const struct sock *sk) | 81 | static inline struct udp_sock *udp_sk(const struct sock *sk) |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 94bd38a6d947..7a60946df3b6 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -146,6 +146,10 @@ struct usb_interface { | |||
146 | * active alternate setting */ | 146 | * active alternate setting */ |
147 | unsigned num_altsetting; /* number of alternate settings */ | 147 | unsigned num_altsetting; /* number of alternate settings */ |
148 | 148 | ||
149 | /* If there is an interface association descriptor then it will list | ||
150 | * the associated interfaces */ | ||
151 | struct usb_interface_assoc_descriptor *intf_assoc; | ||
152 | |||
149 | int minor; /* minor number this interface is | 153 | int minor; /* minor number this interface is |
150 | * bound to */ | 154 | * bound to */ |
151 | enum usb_interface_condition condition; /* state of binding */ | 155 | enum usb_interface_condition condition; /* state of binding */ |
@@ -175,6 +179,7 @@ void usb_put_intf(struct usb_interface *intf); | |||
175 | 179 | ||
176 | /* this maximum is arbitrary */ | 180 | /* this maximum is arbitrary */ |
177 | #define USB_MAXINTERFACES 32 | 181 | #define USB_MAXINTERFACES 32 |
182 | #define USB_MAXIADS USB_MAXINTERFACES/2 | ||
178 | 183 | ||
179 | /** | 184 | /** |
180 | * struct usb_interface_cache - long-term representation of a device interface | 185 | * struct usb_interface_cache - long-term representation of a device interface |
@@ -245,6 +250,11 @@ struct usb_host_config { | |||
245 | struct usb_config_descriptor desc; | 250 | struct usb_config_descriptor desc; |
246 | 251 | ||
247 | char *string; /* iConfiguration string, if present */ | 252 | char *string; /* iConfiguration string, if present */ |
253 | |||
254 | /* List of any Interface Association Descriptors in this | ||
255 | * configuration. */ | ||
256 | struct usb_interface_assoc_descriptor *intf_assoc[USB_MAXIADS]; | ||
257 | |||
248 | /* the interfaces associated with this configuration, | 258 | /* the interfaces associated with this configuration, |
249 | * stored in no particular order */ | 259 | * stored in no particular order */ |
250 | struct usb_interface *interface[USB_MAXINTERFACES]; | 260 | struct usb_interface *interface[USB_MAXINTERFACES]; |
@@ -403,6 +413,8 @@ struct usb_device { | |||
403 | 413 | ||
404 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | 414 | unsigned auto_pm:1; /* autosuspend/resume in progress */ |
405 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ | 415 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ |
416 | unsigned reset_resume:1; /* needs reset instead of resume */ | ||
417 | unsigned persist_enabled:1; /* USB_PERSIST enabled for this dev */ | ||
406 | unsigned autosuspend_disabled:1; /* autosuspend and autoresume */ | 418 | unsigned autosuspend_disabled:1; /* autosuspend and autoresume */ |
407 | unsigned autoresume_disabled:1; /* disabled by the user */ | 419 | unsigned autoresume_disabled:1; /* disabled by the user */ |
408 | #endif | 420 | #endif |
@@ -729,6 +741,22 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor | |||
729 | .bcdDevice_lo = (lo), .bcdDevice_hi = (hi) | 741 | .bcdDevice_lo = (lo), .bcdDevice_hi = (hi) |
730 | 742 | ||
731 | /** | 743 | /** |
744 | * USB_DEVICE_INTERFACE_PROTOCOL - macro used to describe a usb | ||
745 | * device with a specific interface protocol | ||
746 | * @vend: the 16 bit USB Vendor ID | ||
747 | * @prod: the 16 bit USB Product ID | ||
748 | * @pr: bInterfaceProtocol value | ||
749 | * | ||
750 | * This macro is used to create a struct usb_device_id that matches a | ||
751 | * specific interface protocol of devices. | ||
752 | */ | ||
753 | #define USB_DEVICE_INTERFACE_PROTOCOL(vend,prod,pr) \ | ||
754 | .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_PROTOCOL, \ | ||
755 | .idVendor = (vend), \ | ||
756 | .idProduct = (prod), \ | ||
757 | .bInterfaceProtocol = (pr) | ||
758 | |||
759 | /** | ||
732 | * USB_DEVICE_INFO - macro used to describe a class of usb devices | 760 | * USB_DEVICE_INFO - macro used to describe a class of usb devices |
733 | * @cl: bDeviceClass value | 761 | * @cl: bDeviceClass value |
734 | * @sc: bDeviceSubClass value | 762 | * @sc: bDeviceSubClass value |
@@ -754,6 +782,28 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor | |||
754 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), \ | 782 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), \ |
755 | .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) | 783 | .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) |
756 | 784 | ||
785 | /** | ||
786 | * USB_DEVICE_AND_INTERFACE_INFO - macro used to describe a specific usb device | ||
787 | * with a class of usb interfaces | ||
788 | * @vend: the 16 bit USB Vendor ID | ||
789 | * @prod: the 16 bit USB Product ID | ||
790 | * @cl: bInterfaceClass value | ||
791 | * @sc: bInterfaceSubClass value | ||
792 | * @pr: bInterfaceProtocol value | ||
793 | * | ||
794 | * This macro is used to create a struct usb_device_id that matches a | ||
795 | * specific device with a specific class of interfaces. | ||
796 | * | ||
797 | * This is especially useful when explicitly matching devices that have | ||
798 | * vendor specific bDeviceClass values, but standards-compliant interfaces. | ||
799 | */ | ||
800 | #define USB_DEVICE_AND_INTERFACE_INFO(vend,prod,cl,sc,pr) \ | ||
801 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \ | ||
802 | | USB_DEVICE_ID_MATCH_DEVICE, \ | ||
803 | .idVendor = (vend), .idProduct = (prod), \ | ||
804 | .bInterfaceClass = (cl), \ | ||
805 | .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) | ||
806 | |||
757 | /* ----------------------------------------------------------------------- */ | 807 | /* ----------------------------------------------------------------------- */ |
758 | 808 | ||
759 | /* Stuff for dynamic usb ids */ | 809 | /* Stuff for dynamic usb ids */ |
@@ -800,10 +850,15 @@ struct usbdrv_wrap { | |||
800 | * do (or don't) show up otherwise in the filesystem. | 850 | * do (or don't) show up otherwise in the filesystem. |
801 | * @suspend: Called when the device is going to be suspended by the system. | 851 | * @suspend: Called when the device is going to be suspended by the system. |
802 | * @resume: Called when the device is being resumed by the system. | 852 | * @resume: Called when the device is being resumed by the system. |
853 | * @reset_resume: Called when the suspended device has been reset instead | ||
854 | * of being resumed. | ||
803 | * @pre_reset: Called by usb_reset_composite_device() when the device | 855 | * @pre_reset: Called by usb_reset_composite_device() when the device |
804 | * is about to be reset. | 856 | * is about to be reset. |
805 | * @post_reset: Called by usb_reset_composite_device() after the device | 857 | * @post_reset: Called by usb_reset_composite_device() after the device |
806 | * has been reset. | 858 | * has been reset, or in lieu of @resume following a reset-resume |
859 | * (i.e., the device is reset instead of being resumed, as might | ||
860 | * happen if power was lost). The second argument tells which is | ||
861 | * the reason. | ||
807 | * @id_table: USB drivers use ID table to support hotplugging. | 862 | * @id_table: USB drivers use ID table to support hotplugging. |
808 | * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set | 863 | * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set |
809 | * or your driver's probe function will never get called. | 864 | * or your driver's probe function will never get called. |
@@ -843,9 +898,10 @@ struct usb_driver { | |||
843 | 898 | ||
844 | int (*suspend) (struct usb_interface *intf, pm_message_t message); | 899 | int (*suspend) (struct usb_interface *intf, pm_message_t message); |
845 | int (*resume) (struct usb_interface *intf); | 900 | int (*resume) (struct usb_interface *intf); |
901 | int (*reset_resume)(struct usb_interface *intf); | ||
846 | 902 | ||
847 | void (*pre_reset) (struct usb_interface *intf); | 903 | int (*pre_reset)(struct usb_interface *intf); |
848 | void (*post_reset) (struct usb_interface *intf); | 904 | int (*post_reset)(struct usb_interface *intf); |
849 | 905 | ||
850 | const struct usb_device_id *id_table; | 906 | const struct usb_device_id *id_table; |
851 | 907 | ||
@@ -948,6 +1004,7 @@ extern int usb_disabled(void); | |||
948 | #define URB_ZERO_PACKET 0x0040 /* Finish bulk OUT with short packet */ | 1004 | #define URB_ZERO_PACKET 0x0040 /* Finish bulk OUT with short packet */ |
949 | #define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt | 1005 | #define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt |
950 | * needed */ | 1006 | * needed */ |
1007 | #define URB_FREE_BUFFER 0x0100 /* Free transfer buffer with the URB */ | ||
951 | 1008 | ||
952 | struct usb_iso_packet_descriptor { | 1009 | struct usb_iso_packet_descriptor { |
953 | unsigned int offset; | 1010 | unsigned int offset; |
@@ -958,11 +1015,26 @@ struct usb_iso_packet_descriptor { | |||
958 | 1015 | ||
959 | struct urb; | 1016 | struct urb; |
960 | 1017 | ||
1018 | struct usb_anchor { | ||
1019 | struct list_head urb_list; | ||
1020 | wait_queue_head_t wait; | ||
1021 | spinlock_t lock; | ||
1022 | }; | ||
1023 | |||
1024 | static inline void init_usb_anchor(struct usb_anchor *anchor) | ||
1025 | { | ||
1026 | INIT_LIST_HEAD(&anchor->urb_list); | ||
1027 | init_waitqueue_head(&anchor->wait); | ||
1028 | spin_lock_init(&anchor->lock); | ||
1029 | } | ||
1030 | |||
961 | typedef void (*usb_complete_t)(struct urb *); | 1031 | typedef void (*usb_complete_t)(struct urb *); |
962 | 1032 | ||
963 | /** | 1033 | /** |
964 | * struct urb - USB Request Block | 1034 | * struct urb - USB Request Block |
965 | * @urb_list: For use by current owner of the URB. | 1035 | * @urb_list: For use by current owner of the URB. |
1036 | * @anchor_list: membership in the list of an anchor | ||
1037 | * @anchor: to anchor URBs to a common mooring | ||
966 | * @pipe: Holds endpoint number, direction, type, and more. | 1038 | * @pipe: Holds endpoint number, direction, type, and more. |
967 | * Create these values with the eight macros available; | 1039 | * Create these values with the eight macros available; |
968 | * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the TYPE is "ctrl" | 1040 | * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the TYPE is "ctrl" |
@@ -1135,6 +1207,8 @@ struct urb | |||
1135 | /* public: documented fields in the urb that can be used by drivers */ | 1207 | /* public: documented fields in the urb that can be used by drivers */ |
1136 | struct list_head urb_list; /* list head for use by the urb's | 1208 | struct list_head urb_list; /* list head for use by the urb's |
1137 | * current owner */ | 1209 | * current owner */ |
1210 | struct list_head anchor_list; /* the URB may be anchored by the driver */ | ||
1211 | struct usb_anchor *anchor; | ||
1138 | struct usb_device *dev; /* (in) pointer to associated device */ | 1212 | struct usb_device *dev; /* (in) pointer to associated device */ |
1139 | unsigned int pipe; /* (in) pipe information */ | 1213 | unsigned int pipe; /* (in) pipe information */ |
1140 | int status; /* (return) non-ISO status */ | 1214 | int status; /* (return) non-ISO status */ |
@@ -1270,6 +1344,11 @@ extern struct urb *usb_get_urb(struct urb *urb); | |||
1270 | extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags); | 1344 | extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags); |
1271 | extern int usb_unlink_urb(struct urb *urb); | 1345 | extern int usb_unlink_urb(struct urb *urb); |
1272 | extern void usb_kill_urb(struct urb *urb); | 1346 | extern void usb_kill_urb(struct urb *urb); |
1347 | extern void usb_kill_anchored_urbs(struct usb_anchor *anchor); | ||
1348 | extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor); | ||
1349 | extern void usb_unanchor_urb(struct urb *urb); | ||
1350 | extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, | ||
1351 | unsigned int timeout); | ||
1273 | 1352 | ||
1274 | void *usb_buffer_alloc (struct usb_device *dev, size_t size, | 1353 | void *usb_buffer_alloc (struct usb_device *dev, size_t size, |
1275 | gfp_t mem_flags, dma_addr_t *dma); | 1354 | gfp_t mem_flags, dma_addr_t *dma); |
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild index 43f160cfe003..6ce42bf9f743 100644 --- a/include/linux/usb/Kbuild +++ b/include/linux/usb/Kbuild | |||
@@ -1,5 +1,6 @@ | |||
1 | unifdef-y += audio.h | 1 | unifdef-y += audio.h |
2 | unifdef-y += cdc.h | 2 | unifdef-y += cdc.h |
3 | unifdef-y += ch9.h | 3 | unifdef-y += ch9.h |
4 | unifdef-y += gadgetfs.h | ||
4 | unifdef-y += midi.h | 5 | unifdef-y += midi.h |
5 | 6 | ||
diff --git a/include/linux/usb_gadgetfs.h b/include/linux/usb/gadgetfs.h index 8086d5a9b94e..e8654c338729 100644 --- a/include/linux/usb_gadgetfs.h +++ b/include/linux/usb/gadgetfs.h | |||
@@ -1,3 +1,5 @@ | |||
1 | #ifndef __LINUX_USB_GADGETFS_H | ||
2 | #define __LINUX_USB_GADGETFS_H | ||
1 | 3 | ||
2 | #include <asm/types.h> | 4 | #include <asm/types.h> |
3 | #include <asm/ioctl.h> | 5 | #include <asm/ioctl.h> |
@@ -7,11 +9,12 @@ | |||
7 | /* | 9 | /* |
8 | * Filesystem based user-mode API to USB Gadget controller hardware | 10 | * Filesystem based user-mode API to USB Gadget controller hardware |
9 | * | 11 | * |
10 | * Almost everything can be done with only read and write operations, | 12 | * Other than ep0 operations, most things are done by read() and write() |
11 | * on endpoint files found in one directory. They are configured by | 13 | * on endpoint files found in one directory. They are configured by |
12 | * writing descriptors, and then may be used for normal stream style | 14 | * writing descriptors, and then may be used for normal stream style |
13 | * i/o requests. When ep0 is configured, the device can enumerate; | 15 | * i/o requests. When ep0 is configured, the device can enumerate; |
14 | * when it's closed, the device disconnects from usb. | 16 | * when it's closed, the device disconnects from usb. Operations on |
17 | * ep0 require ioctl() operations. | ||
15 | * | 18 | * |
16 | * Configuration and device descriptors get written to /dev/gadget/$CHIP, | 19 | * Configuration and device descriptors get written to /dev/gadget/$CHIP, |
17 | * which may then be used to read usb_gadgetfs_event structs. The driver | 20 | * which may then be used to read usb_gadgetfs_event structs. The driver |
@@ -21,9 +24,9 @@ | |||
21 | */ | 24 | */ |
22 | 25 | ||
23 | /* | 26 | /* |
24 | * Events are delivered on the ep0 file descriptor, if the user mode driver | 27 | * Events are delivered on the ep0 file descriptor, when the user mode driver |
25 | * reads from this file descriptor after writing the descriptors. Don't | 28 | * reads from this file descriptor after writing the descriptors. Don't |
26 | * stop polling this descriptor, if you write that kind of driver. | 29 | * stop polling this descriptor. |
27 | */ | 30 | */ |
28 | 31 | ||
29 | enum usb_gadgetfs_event_type { | 32 | enum usb_gadgetfs_event_type { |
@@ -36,8 +39,10 @@ enum usb_gadgetfs_event_type { | |||
36 | // and likely more ! | 39 | // and likely more ! |
37 | }; | 40 | }; |
38 | 41 | ||
42 | /* NOTE: this structure must stay the same size and layout on | ||
43 | * both 32-bit and 64-bit kernels. | ||
44 | */ | ||
39 | struct usb_gadgetfs_event { | 45 | struct usb_gadgetfs_event { |
40 | enum usb_gadgetfs_event_type type; | ||
41 | union { | 46 | union { |
42 | // NOP, DISCONNECT, SUSPEND: nothing | 47 | // NOP, DISCONNECT, SUSPEND: nothing |
43 | // ... some hardware can't report disconnection | 48 | // ... some hardware can't report disconnection |
@@ -46,19 +51,20 @@ struct usb_gadgetfs_event { | |||
46 | enum usb_device_speed speed; | 51 | enum usb_device_speed speed; |
47 | 52 | ||
48 | // SETUP: packet; DATA phase i/o precedes next event | 53 | // SETUP: packet; DATA phase i/o precedes next event |
49 | // (setup.bmRequestType & USB_DIR_IN) flags direction | 54 | // (setup.bmRequestType & USB_DIR_IN) flags direction |
50 | // ... includes SET_CONFIGURATION, SET_INTERFACE | 55 | // ... includes SET_CONFIGURATION, SET_INTERFACE |
51 | struct usb_ctrlrequest setup; | 56 | struct usb_ctrlrequest setup; |
52 | } u; | 57 | } u; |
58 | enum usb_gadgetfs_event_type type; | ||
53 | }; | 59 | }; |
54 | 60 | ||
55 | 61 | ||
56 | /* endpoint ioctls */ | 62 | /* endpoint ioctls */ |
57 | 63 | ||
58 | /* IN transfers may be reported to the gadget driver as complete | 64 | /* IN transfers may be reported to the gadget driver as complete |
59 | * when the fifo is loaded, before the host reads the data; | 65 | * when the fifo is loaded, before the host reads the data; |
60 | * OUT transfers may be reported to the host's "client" driver as | 66 | * OUT transfers may be reported to the host's "client" driver as |
61 | * complete when they're sitting in the FIFO unread. | 67 | * complete when they're sitting in the FIFO unread. |
62 | * THIS returns how many bytes are "unclaimed" in the endpoint fifo | 68 | * THIS returns how many bytes are "unclaimed" in the endpoint fifo |
63 | * (needed for precise fault handling, when the hardware allows it) | 69 | * (needed for precise fault handling, when the hardware allows it) |
64 | */ | 70 | */ |
@@ -72,4 +78,4 @@ struct usb_gadgetfs_event { | |||
72 | */ | 78 | */ |
73 | #define GADGETFS_CLEAR_HALT _IO('g',3) | 79 | #define GADGETFS_CLEAR_HALT _IO('g',3) |
74 | 80 | ||
75 | 81 | #endif /* __LINUX_USB_GADGETFS_H */ | |
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index 6bac8faacbc6..8da374caf582 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h | |||
@@ -9,3 +9,6 @@ | |||
9 | 9 | ||
10 | /* string descriptors must not be fetched using a 255-byte read */ | 10 | /* string descriptors must not be fetched using a 255-byte read */ |
11 | #define USB_QUIRK_STRING_FETCH_255 0x00000002 | 11 | #define USB_QUIRK_STRING_FETCH_255 0x00000002 |
12 | |||
13 | /* device can't resume correctly so reset it instead */ | ||
14 | #define USB_QUIRK_RESET_RESUME 0x00000004 | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 32acbae28d24..e8b8928232c8 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -221,6 +221,9 @@ struct usb_serial_driver { | |||
221 | int (*port_probe) (struct usb_serial_port *port); | 221 | int (*port_probe) (struct usb_serial_port *port); |
222 | int (*port_remove) (struct usb_serial_port *port); | 222 | int (*port_remove) (struct usb_serial_port *port); |
223 | 223 | ||
224 | int (*suspend) (struct usb_serial *serial, pm_message_t message); | ||
225 | int (*resume) (struct usb_serial *serial); | ||
226 | |||
224 | /* serial function calls */ | 227 | /* serial function calls */ |
225 | int (*open) (struct usb_serial_port *port, struct file * filp); | 228 | int (*open) (struct usb_serial_port *port, struct file * filp); |
226 | void (*close) (struct usb_serial_port *port, struct file * filp); | 229 | void (*close) (struct usb_serial_port *port, struct file * filp); |
@@ -249,6 +252,9 @@ extern void usb_serial_port_softint(struct usb_serial_port *port); | |||
249 | extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id); | 252 | extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id); |
250 | extern void usb_serial_disconnect(struct usb_interface *iface); | 253 | extern void usb_serial_disconnect(struct usb_interface *iface); |
251 | 254 | ||
255 | extern int usb_serial_suspend(struct usb_interface *intf, pm_message_t message); | ||
256 | extern int usb_serial_resume(struct usb_interface *intf); | ||
257 | |||
252 | extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest); | 258 | extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest); |
253 | extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit); | 259 | extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit); |
254 | 260 | ||
@@ -269,6 +275,7 @@ extern void usb_serial_put(struct usb_serial *serial); | |||
269 | extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp); | 275 | extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp); |
270 | extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count); | 276 | extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count); |
271 | extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp); | 277 | extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp); |
278 | extern int usb_serial_generic_resume (struct usb_serial *serial); | ||
272 | extern int usb_serial_generic_write_room (struct usb_serial_port *port); | 279 | extern int usb_serial_generic_write_room (struct usb_serial_port *port); |
273 | extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port); | 280 | extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port); |
274 | extern void usb_serial_generic_read_bulk_callback (struct urb *urb); | 281 | extern void usb_serial_generic_read_bulk_callback (struct urb *urb); |
diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h index e17186dbcdca..4f59b2aa8a9e 100644 --- a/include/linux/usb_gadget.h +++ b/include/linux/usb_gadget.h | |||
@@ -110,13 +110,6 @@ struct usb_ep_ops { | |||
110 | gfp_t gfp_flags); | 110 | gfp_t gfp_flags); |
111 | void (*free_request) (struct usb_ep *ep, struct usb_request *req); | 111 | void (*free_request) (struct usb_ep *ep, struct usb_request *req); |
112 | 112 | ||
113 | void *(*alloc_buffer) (struct usb_ep *ep, unsigned bytes, | ||
114 | dma_addr_t *dma, gfp_t gfp_flags); | ||
115 | void (*free_buffer) (struct usb_ep *ep, void *buf, dma_addr_t dma, | ||
116 | unsigned bytes); | ||
117 | // NOTE: on 2.6, drivers may also use dma_map() and | ||
118 | // dma_sync_single_*() to directly manage dma overhead. | ||
119 | |||
120 | int (*queue) (struct usb_ep *ep, struct usb_request *req, | 113 | int (*queue) (struct usb_ep *ep, struct usb_request *req, |
121 | gfp_t gfp_flags); | 114 | gfp_t gfp_flags); |
122 | int (*dequeue) (struct usb_ep *ep, struct usb_request *req); | 115 | int (*dequeue) (struct usb_ep *ep, struct usb_request *req); |
@@ -235,47 +228,6 @@ usb_ep_free_request (struct usb_ep *ep, struct usb_request *req) | |||
235 | } | 228 | } |
236 | 229 | ||
237 | /** | 230 | /** |
238 | * usb_ep_alloc_buffer - allocate an I/O buffer | ||
239 | * @ep:the endpoint associated with the buffer | ||
240 | * @len:length of the desired buffer | ||
241 | * @dma:pointer to the buffer's DMA address; must be valid | ||
242 | * @gfp_flags:GFP_* flags to use | ||
243 | * | ||
244 | * Returns a new buffer, or null if one could not be allocated. | ||
245 | * The buffer is suitably aligned for dma, if that endpoint uses DMA, | ||
246 | * and the caller won't have to care about dma-inconsistency | ||
247 | * or any hidden "bounce buffer" mechanism. No additional per-request | ||
248 | * DMA mapping will be required for such buffers. | ||
249 | * Free it later with usb_ep_free_buffer(). | ||
250 | * | ||
251 | * You don't need to use this call to allocate I/O buffers unless you | ||
252 | * want to make sure drivers don't incur costs for such "bounce buffer" | ||
253 | * copies or per-request DMA mappings. | ||
254 | */ | ||
255 | static inline void * | ||
256 | usb_ep_alloc_buffer (struct usb_ep *ep, unsigned len, dma_addr_t *dma, | ||
257 | gfp_t gfp_flags) | ||
258 | { | ||
259 | return ep->ops->alloc_buffer (ep, len, dma, gfp_flags); | ||
260 | } | ||
261 | |||
262 | /** | ||
263 | * usb_ep_free_buffer - frees an i/o buffer | ||
264 | * @ep:the endpoint associated with the buffer | ||
265 | * @buf:CPU view address of the buffer | ||
266 | * @dma:the buffer's DMA address | ||
267 | * @len:length of the buffer | ||
268 | * | ||
269 | * reverses the effect of usb_ep_alloc_buffer(). | ||
270 | * caller guarantees the buffer will no longer be accessed | ||
271 | */ | ||
272 | static inline void | ||
273 | usb_ep_free_buffer (struct usb_ep *ep, void *buf, dma_addr_t dma, unsigned len) | ||
274 | { | ||
275 | ep->ops->free_buffer (ep, buf, dma, len); | ||
276 | } | ||
277 | |||
278 | /** | ||
279 | * usb_ep_queue - queues (submits) an I/O request to an endpoint. | 231 | * usb_ep_queue - queues (submits) an I/O request to an endpoint. |
280 | * @ep:the endpoint associated with the request | 232 | * @ep:the endpoint associated with the request |
281 | * @req:the request being submitted | 233 | * @req:the request being submitted |
diff --git a/include/linux/wait.h b/include/linux/wait.h index e820d00e1383..0e686280450b 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -366,15 +366,15 @@ static inline void remove_wait_queue_locked(wait_queue_head_t *q, | |||
366 | 366 | ||
367 | /* | 367 | /* |
368 | * These are the old interfaces to sleep waiting for an event. | 368 | * These are the old interfaces to sleep waiting for an event. |
369 | * They are racy. DO NOT use them, use the wait_event* interfaces above. | 369 | * They are racy. DO NOT use them, use the wait_event* interfaces above. |
370 | * We plan to remove these interfaces during 2.7. | 370 | * We plan to remove these interfaces. |
371 | */ | 371 | */ |
372 | extern void FASTCALL(sleep_on(wait_queue_head_t *q)); | 372 | extern void sleep_on(wait_queue_head_t *q); |
373 | extern long FASTCALL(sleep_on_timeout(wait_queue_head_t *q, | 373 | extern long sleep_on_timeout(wait_queue_head_t *q, |
374 | signed long timeout)); | 374 | signed long timeout); |
375 | extern void FASTCALL(interruptible_sleep_on(wait_queue_head_t *q)); | 375 | extern void interruptible_sleep_on(wait_queue_head_t *q); |
376 | extern long FASTCALL(interruptible_sleep_on_timeout(wait_queue_head_t *q, | 376 | extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, |
377 | signed long timeout)); | 377 | signed long timeout); |
378 | 378 | ||
379 | /* | 379 | /* |
380 | * Waitqueues which are removed from the waitqueue_head at wakeup time | 380 | * Waitqueues which are removed from the waitqueue_head at wakeup time |