summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-06-19 22:45:37 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-06-19 22:45:37 +0000
commit6d403070f28cd44860fdb3a53be5da0275c65cf4 (patch)
tree0d0e7fe7b5fb7568d19e11d7d862b77a866ce081 /include/linux
parentecf1bf5f6c2e668d03b0a9fb026db7aa41e292e1 (diff)
Merge with 2.4.0-test1-ac21 + pile of MIPS cleanups to make merging
possible. Chainsawed RM200 kernel to compile again. Jazz machine status unknown.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ac97_codec.h7
-rw-r--r--include/linux/affs_fs.h2
-rw-r--r--include/linux/agp_backend.h1
-rw-r--r--include/linux/awe_voice.h8
-rw-r--r--include/linux/bitops.h8
-rw-r--r--include/linux/capability.h12
-rw-r--r--include/linux/cdrom.h50
-rw-r--r--include/linux/coda.h3
-rw-r--r--include/linux/coda_cache.h43
-rw-r--r--include/linux/coda_fs_i.h14
-rw-r--r--include/linux/coda_linux.h31
-rw-r--r--include/linux/coda_opstats.h94
-rw-r--r--include/linux/coda_proc.h4
-rw-r--r--include/linux/elevator.h2
-rw-r--r--include/linux/ext2_fs.h6
-rw-r--r--include/linux/fb.h1
-rw-r--r--include/linux/file.h18
-rw-r--r--include/linux/fs.h125
-rw-r--r--include/linux/genhd.h1
-rw-r--r--include/linux/ide.h44
-rw-r--r--include/linux/input.h65
-rw-r--r--include/linux/interrupt.h16
-rw-r--r--include/linux/joystick.h3
-rw-r--r--include/linux/kernel.h1
-rw-r--r--include/linux/linkage.h2
-rw-r--r--include/linux/list.h43
-rw-r--r--include/linux/major.h2
-rw-r--r--include/linux/minix_fs.h2
-rw-r--r--include/linux/miscdevice.h1
-rw-r--r--include/linux/mm.h18
-rw-r--r--include/linux/module.h1
-rw-r--r--include/linux/mount.h1
-rw-r--r--include/linux/msdos_fs.h4
-rw-r--r--include/linux/ncp_fs_i.h3
-rw-r--r--include/linux/netdevice.h53
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_core.h3
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_tuple.h24
-rw-r--r--include/linux/netfilter_ipv6/ip6t_LOG.h15
-rw-r--r--include/linux/netfilter_ipv6/ip6t_MARK.h8
-rw-r--r--include/linux/netfilter_ipv6/ip6t_REJECT.h16
-rw-r--r--include/linux/netfilter_ipv6/ip6t_limit.h21
-rw-r--r--include/linux/netfilter_ipv6/ip6t_mac.h8
-rw-r--r--include/linux/netfilter_ipv6/ip6t_mark.h9
-rw-r--r--include/linux/netfilter_ipv6/ip6t_multiport.h21
-rw-r--r--include/linux/netfilter_ipv6/ip6t_owner.h18
-rw-r--r--include/linux/notifier.h65
-rw-r--r--include/linux/pci_ids.h21
-rw-r--r--include/linux/poll.h1
-rw-r--r--include/linux/proc_fs.h2
-rw-r--r--include/linux/qnx4_fs.h2
-rw-r--r--include/linux/raid/md.h1
-rw-r--r--include/linux/raid/md_k.h12
-rw-r--r--include/linux/raid/raid1.h19
-rw-r--r--include/linux/raid1.h49
-rw-r--r--include/linux/raid5.h110
-rw-r--r--include/linux/reboot.h1
-rw-r--r--include/linux/sched.h12
-rw-r--r--include/linux/serial.h20
-rw-r--r--include/linux/serialP.h10
-rw-r--r--include/linux/serial_reg.h49
-rw-r--r--include/linux/shm.h2
-rw-r--r--include/linux/skbuff.h106
-rw-r--r--include/linux/socket.h4
-rw-r--r--include/linux/sunrpc/clnt.h2
-rw-r--r--include/linux/sunrpc/debug.h4
-rw-r--r--include/linux/swap.h14
-rw-r--r--include/linux/sysctl.h7
-rw-r--r--include/linux/sysv_fs.h4
-rw-r--r--include/linux/timer.h7
-rw-r--r--include/linux/tqueue.h4
-rw-r--r--include/linux/types.h3
-rw-r--r--include/linux/ufs_fs.h3
-rw-r--r--include/linux/umsdos_fs.p2
-rw-r--r--include/linux/usb.h31
-rw-r--r--include/linux/usbdevice_fs.h33
-rw-r--r--include/linux/wrapper.h3
76 files changed, 789 insertions, 646 deletions
diff --git a/include/linux/ac97_codec.h b/include/linux/ac97_codec.h
index 81f463cd5..f4468611e 100644
--- a/include/linux/ac97_codec.h
+++ b/include/linux/ac97_codec.h
@@ -32,7 +32,7 @@
#define AC97_PCM_FRONT_DAC_RATE 0x002C /* PCM Front DAC Rate */
#define AC97_PCM_SURR_DAC_RATE 0x002E /* PCM Surround DAC Rate */
#define AC97_PCM_LFE_DAC_RATE 0x0030 /* PCM LFE DAC Rate */
-#define AC97_PCM_LR_ADC_RATE 0x0032 /* PCM LR ADC Rate */
+#define AC97_PCM_LR_DAC_RATE 0x0032 /* PCM LR DAC Rate */
#define AC97_PCM_MIC_ADC_RATE 0x0034 /* PCM MIC ADC Rate */
#define AC97_CENTER_LFE_MASTER 0x0036 /* Center + LFE Master Volume */
#define AC97_SURROUND_MASTER 0x0038 /* Surround (Rear) Master Volume */
@@ -133,7 +133,7 @@
SOUND_MASK_LINE1| SOUND_MASK_LINE|\
SOUND_MASK_PHONEIN)
-#define supported_mixer(CODEC,FOO) ( CODEC->supported_mixers & (1<<FOO) )
+#define supported_mixer(CODEC,FOO) ((CODEC)->supported_mixers & (1<<FOO) )
struct ac97_codec {
/* AC97 controller connected with */
@@ -150,6 +150,9 @@ struct ac97_codec {
u16 (*codec_read) (struct ac97_codec *codec, u8 reg);
void (*codec_write) (struct ac97_codec *codec, u8 reg, u16 val);
+ /* Wait for codec-ready. Ok to sleep here. */
+ void (*codec_wait) (struct ac97_codec *codec);
+
/* OSS mixer masks */
int modcnt;
int supported_mixers;
diff --git a/include/linux/affs_fs.h b/include/linux/affs_fs.h
index 60af0d40c..8a09cd72d 100644
--- a/include/linux/affs_fs.h
+++ b/include/linux/affs_fs.h
@@ -84,7 +84,7 @@ extern int affs_add_entry(struct inode *dir, struct inode *link,
extern void affs_put_inode(struct inode *inode);
extern void affs_delete_inode(struct inode *inode);
extern void affs_read_inode(struct inode *inode);
-extern void affs_write_inode(struct inode *inode);
+extern void affs_write_inode(struct inode *inode, int);
/* super.c */
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h
index 3c8c7e01f..698a6f262 100644
--- a/include/linux/agp_backend.h
+++ b/include/linux/agp_backend.h
@@ -45,6 +45,7 @@ enum chipset_type {
INTEL_BX,
INTEL_GX,
INTEL_I810,
+ INTEL_I840,
VIA_GENERIC,
VIA_VP3,
VIA_MVP3,
diff --git a/include/linux/awe_voice.h b/include/linux/awe_voice.h
index 9ca80334f..da0e27de7 100644
--- a/include/linux/awe_voice.h
+++ b/include/linux/awe_voice.h
@@ -173,10 +173,10 @@ typedef struct _awe_voice_info {
short root; /* midi root key */
short tune; /* pitch tuning (in cents) */
- char low, high; /* key note range */
- char vellow, velhigh; /* velocity range */
- char fixkey, fixvel; /* fixed key, velocity */
- char pan, fixpan; /* panning, fixed panning */
+ signed char low, high; /* key note range */
+ signed char vellow, velhigh; /* velocity range */
+ signed char fixkey, fixvel; /* fixed key, velocity */
+ signed char pan, fixpan; /* panning, fixed panning */
short exclusiveClass; /* exclusive class (0 = none) */
unsigned char amplitude; /* sample volume (127 max) */
unsigned char attenuation; /* attenuation (0.375dB) */
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index ddb84dd62..b155b7796 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -8,7 +8,7 @@
* differs in spirit from the above ffz (man ffs).
*/
-extern __inline__ int generic_ffs(int x)
+static inline int generic_ffs(int x)
{
int r = 1;
@@ -42,7 +42,7 @@ extern __inline__ int generic_ffs(int x)
* of bits set) of a N-bit word
*/
-extern __inline__ unsigned int generic_hweight32(unsigned int w)
+static inline unsigned int generic_hweight32(unsigned int w)
{
unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555);
res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
@@ -51,7 +51,7 @@ extern __inline__ unsigned int generic_hweight32(unsigned int w)
return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF);
}
-extern __inline__ unsigned int generic_hweight16(unsigned int w)
+static inline unsigned int generic_hweight16(unsigned int w)
{
unsigned int res = (w & 0x5555) + ((w >> 1) & 0x5555);
res = (res & 0x3333) + ((res >> 2) & 0x3333);
@@ -59,7 +59,7 @@ extern __inline__ unsigned int generic_hweight16(unsigned int w)
return (res & 0x00FF) + ((res >> 8) & 0x00FF);
}
-extern __inline__ unsigned int generic_hweight8(unsigned int w)
+static inline unsigned int generic_hweight8(unsigned int w)
{
unsigned int res = (w & 0x55) + ((w >> 1) & 0x55);
res = (res & 0x33) + ((res >> 2) & 0x33);
diff --git a/include/linux/capability.h b/include/linux/capability.h
index 394c96bfa..a1e9dc3d4 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -4,6 +4,10 @@
* Andrew G. Morgan <morgan@transmeta.com>
* Alexander Kjeldaas <astor@guardian.no>
* with help from Aleph1, Roland Buresund and Andrew Main.
+ *
+ * See here for the libcap library ("POSIX draft" compliance):
+ *
+ * ftp://linux.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.2/
*/
#ifndef _LINUX_CAPABILITY_H
@@ -170,8 +174,8 @@ typedef __u32 kernel_cap_t;
#define CAP_IPC_OWNER 15
-/* Insert and remove kernel modules */
-
+/* Insert and remove kernel modules - modify kernel without limit */
+/* Modify cap_bset */
#define CAP_SYS_MODULE 16
/* Allow ioperm/iopl access */
@@ -294,12 +298,12 @@ extern kernel_cap_t cap_bset;
#define CAP_EMPTY_SET to_cap_t(0)
#define CAP_FULL_SET to_cap_t(~0)
#define CAP_INIT_EFF_SET to_cap_t(~0 & ~CAP_TO_MASK(CAP_SETPCAP))
-#define CAP_INIT_INH_SET to_cap_t(~0 & ~CAP_TO_MASK(CAP_SETPCAP))
+#define CAP_INIT_INH_SET to_cap_t(0)
#define CAP_TO_MASK(x) (1 << (x))
#define cap_raise(c, flag) (cap_t(c) |= CAP_TO_MASK(flag))
#define cap_lower(c, flag) (cap_t(c) &= ~CAP_TO_MASK(flag))
-#define cap_raised(c, flag) (cap_t(c) & CAP_TO_MASK(flag) & cap_bset)
+#define cap_raised(c, flag) (cap_t(c) & CAP_TO_MASK(flag))
static inline kernel_cap_t cap_combine(kernel_cap_t a, kernel_cap_t b)
{
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h
index 00c3df0cc..77808a7a3 100644
--- a/include/linux/cdrom.h
+++ b/include/linux/cdrom.h
@@ -437,6 +437,7 @@ struct cdrom_generic_command
#define GPCMD_PAUSE_RESUME 0x4b
#define GPCMD_PLAY_AUDIO_10 0x45
#define GPCMD_PLAY_AUDIO_MSF 0x47
+#define GPCMD_PLAY_AUDIO_TI 0x48
#define GPCMD_PLAY_CD 0xbc
#define GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e
#define GPCMD_READ_10 0x28
@@ -477,16 +478,11 @@ struct cdrom_generic_command
/* This seems to be a SCSI specific CD-ROM opcode
* to play data at track/index */
#define GPCMD_PLAYAUDIO_TI 0x48
-
-/* Is this really used by anything? I couldn't find these...*/
-#if 0
-/* MMC2/MTFuji Opcodes */
-#define ERASE 0x2c
-#define READ_BUFFER 0x3c
-#endif
-
-
-
+/*
+ * From MS Media Status Notification Support Specification. For
+ * older drives only.
+ */
+#define GPCMD_GET_MEDIA_STATUS 0xda
/* Mode page codes for mode sense/set */
#define GPMODE_R_W_ERROR_PAGE 0x01
@@ -998,6 +994,40 @@ typedef struct {
__u8 subhdr3;
} __attribute__((packed)) write_param_page;
+struct modesel_head
+{
+ __u8 reserved1;
+ __u8 medium;
+ __u8 reserved2;
+ __u8 block_desc_length;
+ __u8 density;
+ __u8 number_of_blocks_hi;
+ __u8 number_of_blocks_med;
+ __u8 number_of_blocks_lo;
+ __u8 reserved3;
+ __u8 block_length_hi;
+ __u8 block_length_med;
+ __u8 block_length_lo;
+};
+
+typedef struct {
+ __u16 report_key_length;
+ __u8 reserved1;
+ __u8 reserved2;
+#if defined(__BIG_ENDIAN_BITFIELD)
+ __u8 type_code : 2;
+ __u8 vra : 3;
+ __u8 ucca : 3;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 ucca : 3;
+ __u8 vra : 3;
+ __u8 type_code : 2;
+#endif
+ __u8 region_mask;
+ __u8 rpc_scheme;
+ __u8 reserved3;
+} rpc_state_t;
+
#endif /* End of kernel only stuff */
#endif /* _LINUX_CDROM_H */
diff --git a/include/linux/coda.h b/include/linux/coda.h
index cbd042242..a08558628 100644
--- a/include/linux/coda.h
+++ b/include/linux/coda.h
@@ -331,9 +331,8 @@ struct coda_statfs {
#if 0
#define CODA_KERNEL_VERSION 0 /* don't care about kernel version number */
#define CODA_KERNEL_VERSION 1 /* The old venus 4.6 compatible interface */
-#define CODA_KERNEL_VERSION 2 /* venus_lookup gets an extra parameter */
#endif
-#define CODA_KERNEL_VERSION 3 /* added CODA_MAKE_CINODE downcall */
+#define CODA_KERNEL_VERSION 2 /* venus_lookup gets an extra parameter */
/*
* Venus <-> Coda RPC arguments
diff --git a/include/linux/coda_cache.h b/include/linux/coda_cache.h
index e549b02e7..fe3b2f40c 100644
--- a/include/linux/coda_cache.h
+++ b/include/linux/coda_cache.h
@@ -29,49 +29,6 @@ void coda_cache_clear_cred(struct super_block *sb, struct coda_cred *cred);
int coda_cache_check(struct inode *inode, int mask);
/* for downcalls and attributes and lookups */
-void coda_flag_inode(struct inode *inode, int flag);
void coda_flag_inode_children(struct inode *inode, int flag);
-
-/*
- * Structure to contain statistics on the cache usage
- */
-
-struct cfsnc_statistics {
- unsigned hits;
- unsigned misses;
- unsigned enters;
- unsigned dbl_enters;
- unsigned long_name_enters;
- unsigned long_name_lookups;
- unsigned long_remove;
- unsigned lru_rm;
- unsigned zapPfids;
- unsigned zapFids;
- unsigned zapFile;
- unsigned zapUsers;
- unsigned Flushes;
- unsigned Sum_bucket_len;
- unsigned Sum2_bucket_len;
- unsigned Max_bucket_len;
- unsigned Num_zero_len;
- unsigned Search_len;
-};
-
-
-#define CFSNC_FIND ((u_long) 1)
-#define CFSNC_REMOVE ((u_long) 2)
-#define CFSNC_INIT ((u_long) 3)
-#define CFSNC_ENTER ((u_long) 4)
-#define CFSNC_LOOKUP ((u_long) 5)
-#define CFSNC_ZAPPFID ((u_long) 6)
-#define CFSNC_ZAPFID ((u_long) 7)
-#define CFSNC_ZAPVNODE ((u_long) 8)
-#define CFSNC_ZAPFILE ((u_long) 9)
-#define CFSNC_PURGEUSER ((u_long) 10)
-#define CFSNC_FLUSH ((u_long) 11)
-#define CFSNC_PRINTCFSNC ((u_long) 12)
-#define CFSNC_PRINTSTATS ((u_long) 13)
-#define CFSNC_REPLACE ((u_long) 14)
-
#endif _CFSNC_HEADER_
diff --git a/include/linux/coda_fs_i.h b/include/linux/coda_fs_i.h
index 302a715b9..ac14c8e7f 100644
--- a/include/linux/coda_fs_i.h
+++ b/include/linux/coda_fs_i.h
@@ -13,8 +13,6 @@
#include <linux/list.h>
#include <linux/coda.h>
-
-
#define CODA_CNODE_MAGIC 0x47114711
/*
* coda fs inode data
@@ -22,10 +20,6 @@
struct coda_inode_info {
struct ViceFid c_fid; /* Coda identifier */
u_short c_flags; /* flags (see below) */
- u_short c_ocount; /* count of openers */
- u_short c_owrite; /* count of open for write */
- u_short c_mmcount; /* count of mmappers */
- struct inode *c_ovp; /* open inode pointer */
struct list_head c_cnhead; /* head of cache entries */
struct list_head c_volrootlist; /* list of volroot cnoddes */
struct inode *c_vnode; /* inode associated with cnode */
@@ -34,14 +28,10 @@ struct coda_inode_info {
/* flags */
#define C_VATTR 0x1 /* Validity of vattr in inode */
-#define C_PURGE 0x8
-#define C_ZAPDIR 0x10
-#define C_DYING 0x4 /* from venus (which died) */
-#define C_INITED 0x20
#define C_FLUSH 0x2 /* used after a flush */
+#define C_DYING 0x4 /* from venus (which died) */
+#define C_PURGE 0x8
-struct inode *coda_iget(struct super_block * sb, ViceFid * fid,
- struct coda_vattr * attr);
int coda_cnode_make(struct inode **, struct ViceFid *, struct super_block *);
int coda_cnode_makectl(struct inode **inode, struct super_block *sb);
struct inode *coda_fid_to_inode(ViceFid *fid, struct super_block *sb);
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h
index 08ccef4c4..556d1b60e 100644
--- a/include/linux/coda_linux.h
+++ b/include/linux/coda_linux.h
@@ -48,6 +48,8 @@ extern int coda_access_cache;
/* this file: heloers */
static __inline__ struct ViceFid *coda_i2f(struct inode *);
+static __inline__ char *coda_i2s(struct inode *);
+static __inline__ void coda_flag_inode(struct inode *, int flag);
char *coda_f2s(ViceFid *f);
char *coda_f2s2(ViceFid *f);
int coda_isroot(struct inode *i);
@@ -56,7 +58,6 @@ int coda_fid_is_weird(struct ViceFid *fid);
int coda_iscontrol(const char *name, size_t length);
void coda_load_creds(struct coda_cred *cred);
-int coda_mycred(struct coda_cred *);
void coda_vattr_to_iattr(struct inode *, struct coda_vattr *);
void coda_iattr_to_vattr(struct iattr *, struct coda_vattr *);
unsigned short coda_flags_to_cflags(unsigned short);
@@ -64,16 +65,6 @@ void print_vattr( struct coda_vattr *attr );
int coda_cred_ok(struct coda_cred *cred);
int coda_cred_eq(struct coda_cred *cred1, struct coda_cred *cred2);
-/* defined in file.c */
-void coda_prepare_openfile(struct inode *coda_inode, struct file *coda_file,
- struct inode *open_inode, struct file *open_file,
- struct dentry *open_dentry);
-void coda_restore_codafile(struct inode *coda_inode, struct file *coda_file,
- struct inode *open_inode, struct file *open_file);
-int coda_inode_grab(dev_t dev, ino_t ino, struct inode **ind);
-
-#define NB_SFS_SIZ 0x895440
-
/* cache.c */
void coda_purge_children(struct inode *, int);
void coda_purge_dentries(struct inode *);
@@ -110,8 +101,6 @@ void coda_sysctl_clean(void);
#define EXIT \
if(coda_print_entry) printk("Process %d leaving %s\n",current->pid,__FUNCTION__)
-#define CHECK_CNODE(c) do { } while (0);
-
#define CODA_ALLOC(ptr, cast, size) \
do { \
if (size < 3000) { \
@@ -129,18 +118,24 @@ do { \
#define CODA_FREE(ptr,size) do {if (size < 3000) { kfree_s((ptr), (size)); CDEBUG(D_MALLOC, "kfreed: %lx at %p.\n", (long) size, ptr); } else { vfree((ptr)); CDEBUG(D_MALLOC, "vfreed: %lx at %p.\n", (long) size, ptr);} } while (0)
-/* inode to cnode */
+/* inode to cnode access functions */
static __inline__ struct ViceFid *coda_i2f(struct inode *inode)
{
return &(inode->u.coda_i.c_fid);
}
-#define ITOC(inode) (&((inode)->u.coda_i))
-
-
-
+static __inline__ char *coda_i2s(struct inode *inode)
+{
+ return coda_f2s(&(inode->u.coda_i.c_fid));
+}
+/* this will not zap the inode away */
+static __inline__ void coda_flag_inode(struct inode *inode, int flag)
+{
+ inode->u.coda_i.c_flags |= flag;
+}
+#define ITOC(inode) (&((inode)->u.coda_i))
#endif
diff --git a/include/linux/coda_opstats.h b/include/linux/coda_opstats.h
deleted file mode 100644
index fdf3fac42..000000000
--- a/include/linux/coda_opstats.h
+++ /dev/null
@@ -1,94 +0,0 @@
-
-/*
- * Operation statistics for Coda.
- * Copyright (C) 1997 Carnegie Mellon University
- *
- * Carnegie Mellon University encourages users of this software
- * to contribute improvements to the Coda project. Contact Peter Braam
- * <coda@coda.cs.cmu.edu>.
- */
-
-
-
-#define CFS_MOUNT_STATS 0
-#define CFS_UMOUNT_STATS 1
-#define CFS_ROOT_STATS 2
-#define CFS_STATFS_STATS 3
-#define CFS_SYNC_STATS 4
-#define CFS_VGET_STATS 5
-#define CFS_VFSOPS_SIZE 6
-
-/* vnodeops:
- * open: all to venus
- * close: all to venus
- * rdrw: bogus. Maybe redirected to UFS.
- * May call open/close for internal opens/closes
- * (Does exec not call open?)
- * ioctl: causes a lookupname
- * passes through
- * select: can't get there from here.
- * getattr: can be satsified by cache
- * setattr: all go through
- * access: can be satisfied by cache
- * readlink: can be satisfied by cache
- * fsync: passes through
- * inactive: passes through
- * lookup: can be satisfied by cache
- * create: passes through
- * remove: passes through
- * link: passes through
- * rename: passes through
- * mkdir: passes through
- * rmdir: passes through
- * symlink: passes through
- * readdir: may be redirected to UFS
- * may cause an "internal" open/close
- */
-
-#define CFS_OPEN_STATS 0
-#define CFS_CLOSE_STATS 1
-#define CFS_RDWR_STATS 2
-#define CFS_IOCTL_STATS 3
-#define CFS_SELECT_STATS 4
-#define CFS_GETATTR_STATS 5
-#define CFS_SETATTR_STATS 6
-#define CFS_ACCESS_STATS 7
-#define CFS_READLINK_STATS 8
-#define CFS_FSYNC_STATS 9
-#define CFS_INACTIVE_STATS 10
-#define CFS_LOOKUP_STATS 11
-#define CFS_CREATE_STATS 12
-#define CFS_REMOVE_STATS 13
-#define CFS_LINK_STATS 14
-#define CFS_RENAME_STATS 15
-#define CFS_MKDIR_STATS 16
-#define CFS_RMDIR_STATS 17
-#define CFS_SYMLINK_STATS 18
-#define CFS_READDIR_STATS 19
-#define CFS_VNODEOPS_SIZE 20
-
-
-/*
- * I propose the following structres:
- */
-
-
-struct cfs_op_stats {
- int opcode; /* vfs opcode */
- long entries; /* number of times call attempted */
- long sat_intrn; /* number of times call satisfied by cache */
- long unsat_intrn; /* number of times call failed in cache, but
- was not bounced to venus proper. */
- long gen_intrn; /* number of times call generated internally */
- /* (do we need that?) */
-};
-
-
-/*
- * With each call to the minicache, we'll bump the counters whenver
- * a call is satisfied internally (through the cache or through a
- * redirect), and whenever an operation is caused internally.
- * Then, we can add the total operations caught by the minicache
- * to the world-wide totals, and leave a caveat for the specific
- * graphs later.
- */
diff --git a/include/linux/coda_proc.h b/include/linux/coda_proc.h
index 99cee973f..37dfad86a 100644
--- a/include/linux/coda_proc.h
+++ b/include/linux/coda_proc.h
@@ -39,9 +39,6 @@ void coda_upcall_stats(int opcode, unsigned long jiffies);
struct coda_vfs_stats
{
/* file operations */
- int file_read;
- int file_write;
- int file_mmap;
int open;
int release;
int fsync;
@@ -59,7 +56,6 @@ struct coda_vfs_stats
int rmdir;
int rename;
int permission;
- int readpage;
/* symlink operatoins*/
int follow_link;
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 88d3770b9..988862534 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -32,7 +32,7 @@ struct elevator_s
\
128, /* read_latency */ \
8192, /* write_latency */ \
- 4, /* max_bomb_segments */ \
+ 32, /* max_bomb_segments */ \
\
0, /* nr_segments */ \
0, /* read_pendings */ \
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h
index 25178b66b..4bd6a5d72 100644
--- a/include/linux/ext2_fs.h
+++ b/include/linux/ext2_fs.h
@@ -548,7 +548,9 @@ extern int ext2_read (struct inode *, struct file *, char *, int);
extern int ext2_write (struct inode *, struct file *, char *, int);
/* fsync.c */
-extern int ext2_sync_file (struct file *, struct dentry *);
+extern int ext2_fsync_file (struct file *, struct dentry *, int);
+extern int ext2_fsync_inode (struct inode *, int);
+extern int ext2_osync_inode (struct inode *, int);
/* ialloc.c */
extern struct inode * ext2_new_inode (const struct inode *, int, int *);
@@ -562,7 +564,7 @@ extern struct buffer_head * ext2_getblk (struct inode *, long, int, int *);
extern struct buffer_head * ext2_bread (struct inode *, int, int, int *);
extern void ext2_read_inode (struct inode *);
-extern void ext2_write_inode (struct inode *);
+extern void ext2_write_inode (struct inode *, int);
extern void ext2_put_inode (struct inode *);
extern void ext2_delete_inode (struct inode *);
extern int ext2_sync_inode (struct inode *);
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 733f7fb00..4147f05ad 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -260,6 +260,7 @@ struct file;
struct fb_ops {
/* open/release and usage marking */
+ struct module *owner;
int (*fb_open)(struct fb_info *info, int user);
int (*fb_release)(struct fb_info *info, int user);
/* get non settable parameters */
diff --git a/include/linux/file.h b/include/linux/file.h
index 8ac96f574..268fd27a1 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -74,6 +74,24 @@ static inline void fput(struct file * file)
}
extern void put_filp(struct file *);
+extern int get_unused_fd(void);
+
+static inline void __put_unused_fd(struct files_struct *files, unsigned int fd)
+{
+ FD_CLR(fd, files->open_fds);
+ if (fd < files->next_fd)
+ files->next_fd = fd;
+}
+
+static inline void put_unused_fd(unsigned int fd)
+{
+ struct files_struct *files = current->files;
+
+ write_lock(&files->file_lock);
+ __put_unused_fd(files, fd);
+ write_unlock(&files->file_lock);
+}
+
/*
* Install a file pointer in the fd array.
*
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e40c8fe2d..3eafb9a55 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -47,7 +47,12 @@ struct poll_table_struct;
#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
/* And dynamically-tunable limits and defaults: */
-extern int max_files, nr_files, nr_free_files;
+struct files_stat_struct {
+ int nr_files; /* read only */
+ int nr_free_files; /* read only */
+ int max_files; /* tunable */
+};
+extern struct files_stat_struct files_stat;
extern int max_super_blocks, nr_super_blocks;
#define NR_FILE 8192 /* this can well be larger on a larger system */
@@ -236,6 +241,9 @@ struct buffer_head {
unsigned long b_rsector; /* Real buffer location on disk */
wait_queue_head_t b_wait;
struct kiobuf * b_kiobuf; /* kiobuf which owns this IO */
+
+ struct inode * b_inode;
+ struct list_head b_inode_buffers; /* doubly linked list of inode dirty buffers */
};
typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate);
@@ -375,8 +383,10 @@ struct inode {
struct list_head i_list;
struct list_head i_dentry;
+ struct list_head i_dirty_buffers;
+
unsigned long i_ino;
- unsigned int i_count;
+ atomic_t i_count;
kdev_t i_dev;
umode_t i_mode;
nlink_t i_nlink;
@@ -441,16 +451,24 @@ struct inode {
};
/* Inode state bits.. */
-#define I_DIRTY 1
-#define I_LOCK 2
-#define I_FREEING 4
-#define I_CLEAR 8
+#define I_DIRTY_SYNC 1 /* Not dirty enough for O_DATASYNC */
+#define I_DIRTY_DATASYNC 2 /* Data-related inode changes pending */
+#define I_LOCK 4
+#define I_FREEING 8
+#define I_CLEAR 16
+
+#define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC)
-extern void __mark_inode_dirty(struct inode *);
+extern void __mark_inode_dirty(struct inode *, int);
static inline void mark_inode_dirty(struct inode *inode)
{
- if (!(inode->i_state & I_DIRTY))
- __mark_inode_dirty(inode);
+ if ((inode->i_state & I_DIRTY) != I_DIRTY)
+ __mark_inode_dirty(inode, I_DIRTY);
+}
+static inline void mark_inode_dirty_sync(struct inode *inode)
+{
+ if (!(inode->i_state & I_DIRTY_SYNC))
+ __mark_inode_dirty(inode, I_DIRTY_SYNC);
}
struct fown_struct {
@@ -504,10 +522,8 @@ typedef struct files_struct *fl_owner_t;
struct file_lock {
struct file_lock *fl_next; /* singly linked list for this inode */
- struct file_lock *fl_nextlink; /* doubly linked list of all locks */
- struct file_lock *fl_prevlink; /* used to simplify lock removal */
- struct file_lock *fl_nextblock; /* circular list of blocked processes */
- struct file_lock *fl_prevblock;
+ struct list_head fl_link; /* doubly linked list of all locks */
+ struct list_head fl_block; /* circular list of blocked processes */
fl_owner_t fl_owner;
unsigned int fl_pid;
wait_queue_head_t fl_wait;
@@ -532,7 +548,7 @@ struct file_lock {
#define OFFSET_MAX INT_LIMIT(loff_t)
#endif
-extern struct file_lock *file_lock_table;
+extern struct list_head file_lock_list;
#include <linux/fcntl.h>
@@ -554,6 +570,15 @@ struct fasync_struct {
struct file *fa_file;
};
+#define FASYNC_MAGIC 0x4601
+
+/* SMP safe fasync helpers: */
+extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
+/* can be called from interrupts */
+extern void kill_fasync(struct fasync_struct **, int, int);
+/* only for net: no internal synchronization */
+extern void __kill_fasync(struct fasync_struct *, int, int);
+
struct nameidata {
struct dentry *dentry;
struct vfsmount *mnt;
@@ -562,10 +587,6 @@ struct nameidata {
int last_type;
};
-#define FASYNC_MAGIC 0x4601
-
-extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
-
#define DQUOT_USR_ENABLED 0x01 /* User diskquotas enabled */
#define DQUOT_GRP_ENABLED 0x02 /* Group diskquotas enabled */
@@ -705,6 +726,7 @@ struct block_device_operations {
* without the big kernel lock held in all filesystems.
*/
struct file_operations {
+ struct module *owner;
loff_t (*llseek) (struct file *, loff_t, int);
ssize_t (*read) (struct file *, char *, size_t, loff_t *);
ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
@@ -715,7 +737,7 @@ struct file_operations {
int (*open) (struct inode *, struct file *);
int (*flush) (struct file *);
int (*release) (struct inode *, struct file *);
- int (*fsync) (struct file *, struct dentry *);
+ int (*fsync) (struct file *, struct dentry *, int datasync);
int (*fasync) (int, struct file *, int);
int (*lock) (struct file *, int, struct file_lock *);
ssize_t (*readv) (struct file *, const struct iovec *, unsigned long, loff_t *);
@@ -748,7 +770,7 @@ struct inode_operations {
*/
struct super_operations {
void (*read_inode) (struct inode *);
- void (*write_inode) (struct inode *);
+ void (*write_inode) (struct inode *, int);
void (*put_inode) (struct inode *);
void (*delete_inode) (struct inode *);
void (*put_super) (struct super_block *);
@@ -789,6 +811,18 @@ struct file_system_type var = { \
#define DECLARE_FSTYPE_DEV(var,type,read) \
DECLARE_FSTYPE(var,type,read,FS_REQUIRES_DEV)
+/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
+#define fops_get(fops) \
+ (((fops) && (fops)->owner) \
+ ? __MOD_INC_USE_COUNT((fops)->owner), (fops) \
+ : (fops))
+
+#define fops_put(fops) \
+do { \
+ if ((fops) && (fops)->owner) \
+ __MOD_DEC_USE_COUNT((fops)->owner); \
+} while(0)
+
extern int register_filesystem(struct file_system_type *);
extern int unregister_filesystem(struct file_system_type *);
extern struct vfsmount *kern_mount(struct file_system_type *);
@@ -841,8 +875,8 @@ static inline int locks_verify_truncate(struct inode *inode,
return locks_mandatory_area(
FLOCK_VERIFY_WRITE, inode, filp,
size < inode->i_size ? size : inode->i_size,
- abs(inode->i_size - size)
- );
+ size < inode->i_size ? inode->i_size - size
+ : size - inode->i_size);
return 0;
}
@@ -853,9 +887,6 @@ asmlinkage long sys_open(const char *, int, int);
asmlinkage long sys_close(unsigned int); /* yes, it's really unsigned */
extern int do_close(unsigned int, int); /* yes, it's really unsigned */
extern int do_truncate(struct dentry *, loff_t start);
-extern int get_unused_fd(void);
-extern void __put_unused_fd(struct files_struct *, unsigned int); /* locked outside */
-extern void put_unused_fd(unsigned int); /* locked inside */
extern struct file *filp_open(const char *, int, int);
extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
@@ -865,7 +896,6 @@ extern char * getname(const char *);
#define putname(name) free_page((unsigned long)(name))
enum {BDEV_FILE, BDEV_SWAP, BDEV_FS, BDEV_RAW};
-extern void kill_fasync(struct fasync_struct *, int, int);
extern int register_blkdev(unsigned int, const char *, struct block_device_operations *);
extern int unregister_blkdev(unsigned int, const char *);
extern struct block_device *bdget(dev_t);
@@ -967,23 +997,44 @@ static inline void buffer_IO_error(struct buffer_head * bh)
bh->b_end_io(bh, 0);
}
+extern void buffer_insert_inode_queue(struct buffer_head *, struct inode *);
+static inline void mark_buffer_dirty_inode(struct buffer_head *bh, int flag, struct inode *inode)
+{
+ mark_buffer_dirty(bh, flag);
+ buffer_insert_inode_queue(bh, inode);
+}
+
extern void balance_dirty(kdev_t);
extern int check_disk_change(kdev_t);
extern int invalidate_inodes(struct super_block *);
extern void invalidate_inode_pages(struct inode *);
+extern void invalidate_inode_buffers(struct inode *);
#define invalidate_buffers(dev) __invalidate_buffers((dev), 0)
#define destroy_buffers(dev) __invalidate_buffers((dev), 1)
extern void __invalidate_buffers(kdev_t dev, int);
extern void sync_inodes(kdev_t);
-extern void write_inode_now(struct inode *);
+extern void write_inode_now(struct inode *, int);
extern void sync_dev(kdev_t);
extern int fsync_dev(kdev_t);
+extern int fsync_inode_buffers(struct inode *);
+extern int osync_inode_buffers(struct inode *);
+extern int generic_osync_inode(struct inode *, int);
+extern int inode_has_buffers(struct inode *);
extern void sync_supers(kdev_t);
extern int bmap(struct inode *, int);
extern int notify_change(struct dentry *, struct iattr *);
extern int permission(struct inode *, int);
extern int get_write_access(struct inode *);
-extern void put_write_access(struct inode *);
+extern int deny_write_access(struct file *);
+static inline void put_write_access(struct inode * inode)
+{
+ atomic_dec(&inode->i_writecount);
+}
+static inline void allow_write_access(struct file *file)
+{
+ if (file)
+ atomic_inc(&file->f_dentry->d_inode->i_writecount);
+}
extern int do_pipe(int *);
extern int open_namei(const char *, int, int, struct nameidata *);
@@ -1058,6 +1109,7 @@ extern struct dentry * lookup_hash(struct qstr *, struct dentry *);
#define user_path_walk_link(name,nd) __user_walk(name, LOOKUP_POSITIVE, nd)
extern void iput(struct inode *);
+extern void force_delete(struct inode *);
extern struct inode * igrab(struct inode *);
extern ino_t iunique(struct super_block *, ino_t);
@@ -1104,6 +1156,7 @@ typedef int (get_block_t)(struct inode*,long,struct buffer_head*,int);
/* Generic buffer handling for block filesystems.. */
extern int block_flushpage(struct page *, unsigned long);
+extern void block_destroy_buffers(struct page *);
extern int block_symlink(struct inode *, const char *, int);
extern int block_write_full_page(struct page*, get_block_t*);
extern int block_read_full_page(struct page*, get_block_t*);
@@ -1157,7 +1210,7 @@ extern int read_ahead[];
extern ssize_t char_write(struct file *, const char *, size_t, loff_t *);
extern ssize_t block_write(struct file *, const char *, size_t, loff_t *);
-extern int file_fsync(struct file *, struct dentry *);
+extern int file_fsync(struct file *, struct dentry *, int);
extern int generic_buffer_fdatasync(struct inode *inode, unsigned long start_idx, unsigned long end_idx);
extern int inode_change_ok(struct inode *, struct iattr *);
@@ -1171,20 +1224,6 @@ extern void inode_setattr(struct inode *, struct iattr *);
*/
/*
- * We need to do a check-parent every time
- * after we have locked the parent - to verify
- * that the parent is still our parent and
- * that we are still hashed onto it..
- *
- * This is required in case two processes race
- * on removing (or moving) the same entry: the
- * parent lock will serialize them, but the
- * other process will be too late..
- */
-#define check_parent(dir, dentry) \
- ((dir) == (dentry)->d_parent && !d_unhashed(dentry))
-
-/*
* Locking the parent is needed to:
* - serialize directory operations
* - make sure the parent doesn't change from
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index c07a473d1..c0f69dbb4 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -50,7 +50,6 @@ struct partition {
struct hd_struct {
long start_sect;
long nr_sects;
- int type; /* currently RAID or normal */
devfs_handle_t de; /* primary (master) devfs entry */
};
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 8804c9777..13876daf5 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -58,6 +58,10 @@ void cmd640_dump_regs (void);
#endif
#endif /* CONFIG_BLK_DEV_CMD640 */
+#ifndef DISABLE_IRQ_NOSYNC
+#define DISABLE_IRQ_NOSYNC 0
+#endif
+
/*
* IDE_DRIVE_CMD is used to implement many features of the hdparm utility
*/
@@ -181,6 +185,32 @@ typedef unsigned char byte; /* used everywhere */
OUT_BYTE((drive)->select.all, hwif->io_ports[IDE_SELECT_OFFSET]); \
}
+#define SELECT_INTERRUPT(hwif,drive) \
+{ \
+ if (hwif->intrproc) \
+ hwif->intrproc(drive); \
+ else \
+ OUT_BYTE((drive)->ctl|2, hwif->io_ports[IDE_CONTROL_OFFSET]); \
+}
+
+#define SELECT_MASK(hwif,drive,mask) \
+{ \
+ if (hwif->maskproc) \
+ hwif->maskproc(drive,mask); \
+}
+
+#define SELECT_READ_WRITE(hwif,drive,func) \
+{ \
+ if (hwif->rwproc) \
+ hwif->rwproc(drive,func); \
+}
+
+#define QUIRK_LIST(hwif,drive) \
+{ \
+ if (hwif->quirkproc) \
+ (drive)->quirk_list = hwif->quirkproc(drive); \
+}
+
/*
* Check for an interrupt and acknowledge the interrupt status
*/
@@ -309,6 +339,8 @@ typedef struct ide_drive_s {
int last_lun; /* last logical unit */
int forced_lun; /* if hdxlun was given at boot */
int lun; /* logical unit */
+ int crc_count; /* crc counter to reduce drive speed */
+ byte quirk_list; /* drive is considered quirky if set for a specific host */
byte init_speed; /* transfer rate set at boot */
byte current_speed; /* current transfer rate set */
byte dn; /* now wide spread use */
@@ -354,6 +386,10 @@ typedef int (ide_speedproc_t) (ide_drive_t *, byte);
*/
typedef void (ide_selectproc_t) (ide_drive_t *);
typedef void (ide_resetproc_t) (ide_drive_t *);
+typedef int (ide_quirkproc_t) (ide_drive_t *);
+typedef void (ide_intrproc_t) (ide_drive_t *);
+typedef void (ide_maskproc_t) (ide_drive_t *, int);
+typedef void (ide_rw_proc_t) (ide_drive_t *, ide_dma_action_t);
/*
* hwif_chipset_t is used to keep track of the specific hardware
@@ -388,6 +424,10 @@ typedef struct hwif_s {
ide_speedproc_t *speedproc; /* routine to retune DMA modes for drives */
ide_selectproc_t *selectproc; /* tweaks hardware to select drive */
ide_resetproc_t *resetproc; /* routine to reset controller after a disk reset */
+ ide_intrproc_t *intrproc; /* special interrupt handling for shared pci interrupts */
+ ide_maskproc_t *maskproc; /* special host masking for drive selection */
+ ide_quirkproc_t *quirkproc; /* check host's drive quirk list */
+ ide_rw_proc_t *rwproc; /* adjust timing based upon rq->cmd direction */
ide_dmaproc_t *dmaproc; /* dma read/write/abort routine */
unsigned int *dmatable_cpu; /* dma physical region descriptor table (cpu view) */
dma_addr_t dmatable_dma; /* dma physical region descriptor table (dma view) */
@@ -424,6 +464,7 @@ typedef struct hwif_s {
void *hwif_data; /* extra hwif data */
} ide_hwif_t;
+
/*
* Status returned from various ide_ functions
*/
@@ -614,12 +655,14 @@ void ide_end_request(byte uptodate, ide_hwgroup_t *hwgroup);
/*
* This is used for (nearly) all data transfers from/to the IDE interface
+ * FIXME for 2.5, to a pointer pass verses memcpy........
*/
void ide_input_data (ide_drive_t *drive, void *buffer, unsigned int wcount);
void ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount);
/*
* This is used for (nearly) all ATAPI data transfers from/to the IDE interface
+ * FIXME for 2.5, to a pointer pass verses memcpy........
*/
void atapi_input_bytes (ide_drive_t *drive, void *buffer, unsigned int bytecount);
void atapi_output_bytes (ide_drive_t *drive, void *buffer, unsigned int bytecount);
@@ -750,6 +793,7 @@ byte ide_auto_reduce_xfer (ide_drive_t *drive);
int ide_driveid_update (ide_drive_t *drive);
int ide_ata66_check (ide_drive_t *drive, byte cmd, byte nsect, byte feature);
int ide_config_drive_speed (ide_drive_t *drive, byte speed);
+byte eighty_ninty_three (ide_drive_t *drive);
int set_transfer (ide_drive_t *drive, byte cmd, byte nsect, byte feature);
/*
diff --git a/include/linux/input.h b/include/linux/input.h
index d43d1e5a7..6d19fc2a9 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -2,9 +2,9 @@
#define _INPUT_H
/*
- * input.h Version 0.1
+ * $Id: input.h,v 1.13 2000/05/29 10:54:53 vojtech Exp $
*
- * Copyright (c) 1999 Vojtech Pavlik
+ * Copyright (c) 1999-2000 Vojtech Pavlik
*
* Sponsored by SuSE
*/
@@ -33,6 +33,7 @@
#include <linux/time.h>
#else
#include <sys/time.h>
+#include <sys/ioctl.h>
#endif
/*
@@ -47,16 +48,6 @@ struct input_event {
};
/*
- * The device ID structure;
- */
-
-struct input_id {
- __u16 bus;
- __u16 vendor;
- __u16 product;
-};
-
-/*
* Protocol version.
*/
@@ -66,14 +57,17 @@ struct input_id {
* IOCTLs (0x00 - 0x7f)
*/
-#define EVIOCGVERSION _IOR('E', 0x01, __u32) /* get driver version */
-#define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */
+#define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */
+#define EVIOCGID _IOR('E', 0x02, short[4]) /* get device ID */
#define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */
#define EVIOCSREP _IOW('E', 0x03, int[2]) /* get repeat settings */
-#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x03, len) /* get device name */
+#define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */
+#define EVIOCSKEYCODE _IOW('E', 0x04, int[2]) /* set keycode */
+#define EVIOCGKEY _IOR('E', 0x05, int[2]) /* get key value */
+#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */
+
#define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */
-#define EVIOCGABSLIM(num) _IOR('E', 0x40 + num, int[4]) /* get abs event limits */
-#define EVIOCGABS(num) _IOR('E', 0x80 + num, int) /* get abs value */
+#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, int[5]) /* get abs value/limits */
/*
* Event types
@@ -308,6 +302,7 @@ struct input_id {
#define BTN_BASE3 0x128
#define BTN_BASE4 0x129
#define BTN_BASE5 0x12a
+#define BTN_BASE6 0x12b
#define BTN_GAMEPAD 0x130
#define BTN_A 0x130
@@ -364,6 +359,8 @@ struct input_id {
#define ABS_RZ 0x05
#define ABS_THROTTLE 0x06
#define ABS_RUDDER 0x07
+#define ABS_TL 0x08
+#define ABS_TR 0x09
#define ABS_HAT0X 0x10
#define ABS_HAT0Y 0x11
#define ABS_HAT1X 0x12
@@ -406,6 +403,27 @@ struct input_id {
#define SND_BELL 0x01
#define SND_MAX 0x07
+/*
+ * IDs.
+ */
+
+#define ID_BUS 0
+#define ID_VENDOR 1
+#define ID_PRODUCT 2
+#define ID_VERSION 3
+
+#define BUS_PCI 0x01
+#define BUS_ISAPNP 0x02
+#define BUS_USB 0x03
+
+#define BUS_ISA 0x10
+#define BUS_I8042 0x11
+#define BUS_XTKBD 0x12
+#define BUS_RS232 0x13
+#define BUS_GAMEPORT 0x14
+#define BUS_PARPORT 0x15
+#define BUS_AMIGA 0x16
+
#ifdef __KERNEL__
/*
@@ -425,7 +443,10 @@ struct input_dev {
int number;
char *name;
- struct input_id id;
+ unsigned short idbus;
+ unsigned short idvendor;
+ unsigned short idproduct;
+ unsigned short idversion;
unsigned long evbit[NBITS(EV_MAX)];
unsigned long keybit[NBITS(KEY_MAX)];
@@ -434,7 +455,10 @@ struct input_dev {
unsigned long ledbit[NBITS(LED_MAX)];
unsigned long sndbit[NBITS(SND_MAX)];
- unsigned char *keycode;
+ unsigned int keycodemax;
+ unsigned int keycodesize;
+ void *keycode;
+
unsigned int repeat_key;
struct timer_list timer;
@@ -500,8 +524,7 @@ void input_unregister_minor(devfs_handle_t handle);
void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
-#define input_report_key(a,b,c) input_event(a, EV_KEY, b, c)
-#define input_report_btn(a,b,c) input_event(a, EV_KEY, b, !!(c))
+#define input_report_key(a,b,c) input_event(a, EV_KEY, b, !!(c))
#define input_report_rel(a,b,c) input_event(a, EV_REL, b, c)
#define input_report_abs(a,b,c) input_event(a, EV_ABS, b, c)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 2995d563d..8eb171810 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -85,14 +85,14 @@ struct softirq_action
asmlinkage void do_softirq(void);
extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data);
-extern __inline__ void __cpu_raise_softirq(int cpu, int nr)
+static inline void __cpu_raise_softirq(int cpu, int nr)
{
softirq_state[cpu].active |= (1<<nr);
}
/* I do not want to use atomic variables now, so that cli/sti */
-extern __inline__ void raise_softirq(int nr)
+static inline void raise_softirq(int nr)
{
unsigned long flags;
@@ -165,7 +165,7 @@ extern struct tasklet_head tasklet_hi_vec[NR_CPUS];
#define tasklet_unlock(t) do { } while (0)
#endif
-extern __inline__ void tasklet_schedule(struct tasklet_struct *t)
+static inline void tasklet_schedule(struct tasklet_struct *t)
{
if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) {
int cpu = smp_processor_id();
@@ -179,7 +179,7 @@ extern __inline__ void tasklet_schedule(struct tasklet_struct *t)
}
}
-extern __inline__ void tasklet_hi_schedule(struct tasklet_struct *t)
+static inline void tasklet_hi_schedule(struct tasklet_struct *t)
{
if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) {
int cpu = smp_processor_id();
@@ -194,18 +194,18 @@ extern __inline__ void tasklet_hi_schedule(struct tasklet_struct *t)
}
-extern __inline__ void tasklet_disable_nosync(struct tasklet_struct *t)
+static inline void tasklet_disable_nosync(struct tasklet_struct *t)
{
atomic_inc(&t->count);
}
-extern __inline__ void tasklet_disable(struct tasklet_struct *t)
+static inline void tasklet_disable(struct tasklet_struct *t)
{
tasklet_disable_nosync(t);
tasklet_unlock_wait(t);
}
-extern __inline__ void tasklet_enable(struct tasklet_struct *t)
+static inline void tasklet_enable(struct tasklet_struct *t)
{
atomic_dec(&t->count);
}
@@ -240,7 +240,7 @@ extern struct tasklet_struct bh_task_vec[];
/* It is exported _ONLY_ for wait_on_irq(). */
extern spinlock_t global_bh_lock;
-extern __inline__ void mark_bh(int nr)
+static inline void mark_bh(int nr)
{
tasklet_hi_schedule(bh_task_vec+nr);
}
diff --git a/include/linux/joystick.h b/include/linux/joystick.h
index 8cd5cbccb..c0e148171 100644
--- a/include/linux/joystick.h
+++ b/include/linux/joystick.h
@@ -219,6 +219,7 @@ struct js_dev {
int num_buttons;
char *name;
devfs_handle_t devfs_handle;
+ struct module *owner;
};
struct js_list {
@@ -251,7 +252,7 @@ extern struct js_port *js_register_port(struct js_port *port, void *info,
extern struct js_port *js_unregister_port(struct js_port *port);
extern int js_register_device(struct js_port *port, int number, int axes,
- int buttons, char *name, js_ops_func open, js_ops_func close);
+ int buttons, char *name, struct module *owner, js_ops_func open, js_ops_func close);
extern void js_unregister_device(struct js_dev *dev);
/*
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index a8d79a50e..ac6f029b9 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -55,6 +55,7 @@ extern int sprintf(char * buf, const char * fmt, ...);
extern int vsprintf(char *buf, const char *, va_list);
extern int get_option(char **str, int *pint);
extern char *get_options(char *str, int nints, int *ints);
+extern unsigned long memparse(char *ptr, char **retptr);
extern int session_of_pgrp(int pgrp);
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index aaf6edf02..d1f1c2861 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -9,7 +9,7 @@
#define CPP_ASMLINKAGE
#endif
-#if defined __i386__ && (__GNUC__ > 2 || __GNUC_MINOR__ > 7)
+#if defined __i386__ && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 7)
#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
#elif defined __ia64__
#define asmlinkage CPP_ASMLINKAGE __attribute__((syscall_linkage))
diff --git a/include/linux/list.h b/include/linux/list.h
index a3900e53c..4fbe523ab 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -42,16 +42,26 @@ static __inline__ void __list_add(struct list_head * new,
prev->next = new;
}
-/*
- * Insert a new entry after the specified head..
+/**
+ * list_add - add a new entry
+ * @new: new entry to be added
+ * @head: list head to add it after
+ *
+ * Insert a new entry after the specified head.
+ * This is good for implementing stacks.
*/
static __inline__ void list_add(struct list_head *new, struct list_head *head)
{
__list_add(new, head, head->next);
}
-/*
- * Insert a new entry before the specified head..
+/**
+ * list_add_tail - add a new entry
+ * @new: new entry to be added
+ * @head: list head to add it before
+ *
+ * Insert a new entry before the specified head.
+ * This is useful for implementing queues.
*/
static __inline__ void list_add_tail(struct list_head *new, struct list_head *head)
{
@@ -72,18 +82,28 @@ static __inline__ void __list_del(struct list_head * prev,
prev->next = next;
}
+/**
+ * list_del - deletes entry from list.
+ * @entry: the element to delete from the list.
+ */
static __inline__ void list_del(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
}
+/**
+ * list_empty - tests whether a list is empty
+ * @head: the list to test.
+ */
static __inline__ int list_empty(struct list_head *head)
{
return head->next == head;
}
-/*
- * Splice in "list" into "head"
+/**
+ * list_splice - join two lists
+ * @list: the new list to add.
+ * @head: the place to add it in the first list.
*/
static __inline__ void list_splice(struct list_head *list, struct list_head *head)
{
@@ -101,9 +121,20 @@ static __inline__ void list_splice(struct list_head *list, struct list_head *hea
}
}
+/**
+ * list_entry - get the struct for this entry
+ * @ptr: the &struct list_head pointer.
+ * @type: the type of the struct this is embedded in.
+ * @member: the name of the list_struct within the struct.
+ */
#define list_entry(ptr, type, member) \
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
+/**
+ * list_for_each - iterate over a list
+ * @pos: the &struct list_head to use as a loop counter.
+ * @head: the head for your list.
+ */
#define list_for_each(pos, head) \
for (pos = (head)->next; pos != (head); pos = pos->next)
diff --git a/include/linux/major.h b/include/linux/major.h
index 0a6e120d6..17a421ab8 100644
--- a/include/linux/major.h
+++ b/include/linux/major.h
@@ -67,6 +67,8 @@
#define CM206_CDROM_MAJOR 32
#define IDE2_MAJOR 33
#define IDE3_MAJOR 34
+#define XPRAM_MAJOR 35 /* expanded storage on S/390 = "slow ram" */
+ /* proposed by Peter */
#define NETLINK_MAJOR 36
#define PS2ESDI_MAJOR 36
#define IDETAPE_MAJOR 37
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h
index 1eca767b4..99cd63717 100644
--- a/include/linux/minix_fs.h
+++ b/include/linux/minix_fs.h
@@ -101,7 +101,7 @@ extern struct buffer_head * minix_bread(struct inode *, int, int);
extern void minix_truncate(struct inode *);
extern int minix_sync_inode(struct inode *);
-extern int minix_sync_file(struct file *, struct dentry *);
+extern int minix_sync_file(struct file *, struct dentry *, int);
extern struct address_space_operations minix_aops;
extern struct inode_operations minix_file_inode_operations;
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index 9cf4b9a14..f2bc32f72 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -20,6 +20,7 @@
#define SUN_OPENPROM_MINOR 139
#define NVRAM_MINOR 144
#define I2O_MINOR 166
+#define MICROCODE_MINOR 184
#define MISC_DYNAMIC_MINOR 255
#define SGI_GRAPHICS_MINOR 146
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 337ff6182..5875fa8bf 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -153,6 +153,7 @@ typedef struct page {
struct buffer_head * buffers;
unsigned long virtual; /* nonzero if kmapped */
struct zone_struct *zone;
+ unsigned int age;
} mem_map_t;
#define get_page(p) atomic_inc(&(p)->count)
@@ -169,7 +170,7 @@ typedef struct page {
#define PG_dirty 4
#define PG_decr_after 5
#define PG_unused_01 6
-#define PG__unused_02 7
+#define PG_active 7
#define PG_slab 8
#define PG_swap_cache 9
#define PG_skip 10
@@ -185,6 +186,7 @@ typedef struct page {
#define ClearPageUptodate(page) clear_bit(PG_uptodate, &(page)->flags)
#define PageDirty(page) test_bit(PG_dirty, &(page)->flags)
#define SetPageDirty(page) set_bit(PG_dirty, &(page)->flags)
+#define ClearPageDirty(page) clear_bit(PG_dirty, &(page)->flags)
#define PageLocked(page) test_bit(PG_locked, &(page)->flags)
#define LockPage(page) set_bit(PG_locked, &(page)->flags)
#define TryLockPage(page) test_and_set_bit(PG_locked, &(page)->flags)
@@ -192,11 +194,15 @@ typedef struct page {
clear_bit(PG_locked, &(page)->flags); \
wake_up(&page->wait); \
} while (0)
+#define PageActive(page) test_bit(PG_active, &(page)->flags)
+#define SetPageActive(page) set_bit(PG_active, &(page)->flags)
+#define ClearPageActive(page) clear_bit(PG_active, &(page)->flags)
#define PageError(page) test_bit(PG_error, &(page)->flags)
#define SetPageError(page) set_bit(PG_error, &(page)->flags)
#define ClearPageError(page) clear_bit(PG_error, &(page)->flags)
#define PageReferenced(page) test_bit(PG_referenced, &(page)->flags)
#define SetPageReferenced(page) set_bit(PG_referenced, &(page)->flags)
+#define ClearPageReferenced(page) clear_bit(PG_referenced, &(page)->flags)
#define PageTestandClearReferenced(page) test_and_clear_bit(PG_referenced, &(page)->flags)
#define PageDecrAfter(page) test_bit(PG_decr_after, &(page)->flags)
#define SetPageDecrAfter(page) set_bit(PG_decr_after, &(page)->flags)
@@ -457,6 +463,7 @@ extern void remove_inode_page(struct page *);
extern unsigned long page_unuse(struct page *);
extern int shrink_mmap(int, int);
extern void truncate_inode_pages(struct address_space *, loff_t);
+extern void truncate_all_inode_pages(struct address_space *);
/* generic vm_area_ops exported for stackable file systems */
extern int filemap_swapout(struct page * page, struct file *file);
@@ -480,7 +487,6 @@ extern struct page *filemap_nopage(struct vm_area_struct * area,
#define __GFP_HIGHMEM 0x0 /* noop */
#endif
-#define __GFP_UNCACHED 0x20
#define GFP_BUFFER (__GFP_HIGH | __GFP_WAIT)
#define GFP_ATOMIC (__GFP_HIGH)
@@ -490,14 +496,6 @@ extern struct page *filemap_nopage(struct vm_area_struct * area,
#define GFP_NFS (__GFP_HIGH | __GFP_WAIT | __GFP_IO)
#define GFP_KSWAPD (__GFP_IO)
-/* Flag - indicates that the buffer should be allocated uncached as for an
- architecture where the caches don't snoop DMA access. This is a even
- stricter requirement than GFP_DMA as GFP_DMA allocated buffers might be
- writeback cacheable and not be suitable for use with devices like
- networks cards which manipulate objects smaller than a cacheline. */
-
-#define GFP_UNCACHED __GFP_UNCACHED
-
/* Flag - indicates that the buffer will be suitable for DMA. Ignored on some
platforms, used as appropriate on others */
diff --git a/include/linux/module.h b/include/linux/module.h
index 39d3e5560..a561f805f 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -144,6 +144,7 @@ struct module_info
/* Find a symbol exported by the kernel or another module */
extern unsigned long get_module_symbol(char *, char *);
+extern void put_module_symbol(unsigned long);
extern int try_inc_mod_count(struct module *mod);
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 61ab19b1f..adb571de2 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -26,7 +26,6 @@ struct vfsmount
atomic_t mnt_count;
char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
- char *mnt_dirname; /* Name of directory mounted on */
struct list_head mnt_list;
uid_t mnt_owner;
};
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index f2f822b12..cbbf78528 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -69,7 +69,7 @@
#define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */
#define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */
-#define MSDOS_FAT12 4078 /* maximum number of clusters in a 12 bit FAT */
+#define MSDOS_FAT12 4084 /* maximum number of clusters in a 12 bit FAT */
#define EOF_FAT12 0xFF8 /* standard EOF */
#define EOF_FAT16 0xFFF8
@@ -248,7 +248,7 @@ extern struct inode *fat_build_inode(struct super_block*,struct msdos_dir_entry*
extern struct super_block *fat_read_super(struct super_block *s, void *data, int silent, struct inode_operations *dir_ops);
extern void msdos_put_super(struct super_block *sb);
extern int fat_statfs(struct super_block *sb,struct statfs *buf);
-extern void fat_write_inode(struct inode *inode);
+extern void fat_write_inode(struct inode *inode, int);
/* dir.c */
extern struct file_operations fat_dir_operations;
diff --git a/include/linux/ncp_fs_i.h b/include/linux/ncp_fs_i.h
index 96728bcdd..ffdf49f4c 100644
--- a/include/linux/ncp_fs_i.h
+++ b/include/linux/ncp_fs_i.h
@@ -19,7 +19,8 @@ struct ncp_inode_info {
__u32 DosDirNum __attribute__((packed));
__u32 volNumber __attribute__((packed));
__u32 nwattr;
- int opened;
+ struct semaphore open_sem;
+ atomic_t opened;
int access;
__u32 server_file_handle __attribute__((packed));
__u8 open_create_action __attribute__((packed));
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index b2e1ac568..ee129f8c5 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -13,6 +13,7 @@
* Donald J. Becker, <becker@cesdis.gsfc.nasa.gov>
* Alan Cox, <Alan.Cox@linux.org>
* Bjorn Ekwall. <bj0rn@blox.se>
+ * Pekka Riikonen <priikone@poseidon.pspt.fi>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -193,6 +194,17 @@ enum netdev_state_t
/*
+ * This structure holds at boot time configured netdevice settings. They
+ * are then used in the device probing.
+ */
+struct netdev_boot_setup {
+ char name[IFNAMSIZ];
+ struct ifmap map;
+};
+#define NETDEV_BOOT_SETUP_MAX 8
+
+
+/*
* The DEVICE structure.
* Actually, this whole structure is a big mistake. It mixes I/O
* data with strictly "high-level" data, and it has to know about
@@ -389,8 +401,11 @@ struct packet_type
extern struct net_device loopback_dev; /* The loopback */
extern struct net_device *dev_base; /* All devices */
-extern rwlock_t dev_base_lock; /* Device list lock */
+extern rwlock_t dev_base_lock; /* Device list lock */
+extern struct netdev_boot_setup dev_boot_setup[];
+extern int netdev_boot_setup_add(char *name, struct ifmap *map);
+extern int netdev_boot_setup_check(struct net_device *dev);
extern struct net_device *dev_getbyhwaddr(unsigned short type, char *hwaddr);
extern void dev_add_pack(struct packet_type *pt);
extern void dev_remove_pack(struct packet_type *pt);
@@ -414,7 +429,7 @@ extern int dev_restart(struct net_device *dev);
typedef int gifconf_func_t(struct net_device * dev, char * bufptr, int len);
extern int register_gifconf(unsigned int family, gifconf_func_t * gifconf);
-extern __inline__ int unregister_gifconf(unsigned int family)
+static inline int unregister_gifconf(unsigned int family)
{
return register_gifconf(family, 0);
}
@@ -437,7 +452,7 @@ extern struct softnet_data softnet_data[NR_CPUS];
#define HAVE_NETIF_QUEUE
-extern __inline__ void __netif_schedule(struct net_device *dev)
+static inline void __netif_schedule(struct net_device *dev)
{
if (!test_and_set_bit(__LINK_STATE_SCHED, &dev->state)) {
unsigned long flags;
@@ -451,34 +466,34 @@ extern __inline__ void __netif_schedule(struct net_device *dev)
}
}
-extern __inline__ void netif_schedule(struct net_device *dev)
+static inline void netif_schedule(struct net_device *dev)
{
if (!test_bit(__LINK_STATE_XOFF, &dev->state))
__netif_schedule(dev);
}
-extern __inline__ void netif_start_queue(struct net_device *dev)
+static inline void netif_start_queue(struct net_device *dev)
{
clear_bit(__LINK_STATE_XOFF, &dev->state);
}
-extern __inline__ void netif_wake_queue(struct net_device *dev)
+static inline void netif_wake_queue(struct net_device *dev)
{
if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state))
__netif_schedule(dev);
}
-extern __inline__ void netif_stop_queue(struct net_device *dev)
+static inline void netif_stop_queue(struct net_device *dev)
{
set_bit(__LINK_STATE_XOFF, &dev->state);
}
-extern __inline__ int netif_queue_stopped(struct net_device *dev)
+static inline int netif_queue_stopped(struct net_device *dev)
{
return test_bit(__LINK_STATE_XOFF, &dev->state);
}
-extern __inline__ int netif_running(struct net_device *dev)
+static inline int netif_running(struct net_device *dev)
{
return test_bit(__LINK_STATE_START, &dev->state);
}
@@ -486,7 +501,7 @@ extern __inline__ int netif_running(struct net_device *dev)
/* Use this variant when it is known for sure that it
* is executing from interrupt context.
*/
-extern __inline__ void dev_kfree_skb_irq(struct sk_buff *skb)
+static inline void dev_kfree_skb_irq(struct sk_buff *skb)
{
if (atomic_dec_and_test(&skb->users)) {
int cpu =smp_processor_id();
@@ -503,7 +518,7 @@ extern __inline__ void dev_kfree_skb_irq(struct sk_buff *skb)
/* Use this variant in places where it could be invoked
* either from interrupt or non-interrupt context.
*/
-extern __inline__ void dev_kfree_skb_any(struct sk_buff *skb)
+static inline void dev_kfree_skb_any(struct sk_buff *skb)
{
if (in_irq())
dev_kfree_skb_irq(skb);
@@ -522,14 +537,14 @@ extern void dev_init(void);
extern int netdev_nit;
-extern __inline__ void dev_init_buffers(struct net_device *dev)
+static inline void dev_init_buffers(struct net_device *dev)
{
/* DO NOTHING */
}
extern int netdev_finish_unregister(struct net_device *dev);
-extern __inline__ void dev_put(struct net_device *dev)
+static inline void dev_put(struct net_device *dev)
{
if (atomic_dec_and_test(&dev->refcnt))
netdev_finish_unregister(dev);
@@ -543,32 +558,32 @@ extern __inline__ void dev_put(struct net_device *dev)
* who is responsible for serialization of these calls.
*/
-extern __inline__ int netif_carrier_ok(struct net_device *dev)
+static inline int netif_carrier_ok(struct net_device *dev)
{
return !test_bit(__LINK_STATE_NOCARRIER, &dev->state);
}
extern void __netdev_watchdog_up(struct net_device *dev);
-extern __inline__ void netif_carrier_on(struct net_device *dev)
+static inline void netif_carrier_on(struct net_device *dev)
{
clear_bit(__LINK_STATE_NOCARRIER, &dev->state);
if (netif_running(dev))
__netdev_watchdog_up(dev);
}
-extern __inline__ void netif_carrier_off(struct net_device *dev)
+static inline void netif_carrier_off(struct net_device *dev)
{
set_bit(__LINK_STATE_NOCARRIER, &dev->state);
}
/* Hot-plugging. */
-extern __inline__ int netif_device_present(struct net_device *dev)
+static inline int netif_device_present(struct net_device *dev)
{
return test_bit(__LINK_STATE_PRESENT, &dev->state);
}
-extern __inline__ void netif_device_detach(struct net_device *dev)
+static inline void netif_device_detach(struct net_device *dev)
{
if (test_and_clear_bit(__LINK_STATE_PRESENT, &dev->state) &&
netif_running(dev)) {
@@ -576,7 +591,7 @@ extern __inline__ void netif_device_detach(struct net_device *dev)
}
}
-extern __inline__ void netif_device_attach(struct net_device *dev)
+static inline void netif_device_attach(struct net_device *dev)
{
if (!test_and_set_bit(__LINK_STATE_PRESENT, &dev->state) &&
netif_running(dev)) {
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_core.h b/include/linux/netfilter_ipv4/ip_conntrack_core.h
index 4631db1ee..bcf300c51 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack_core.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack_core.h
@@ -22,7 +22,8 @@ extern struct list_head protocol_list;
/* Returns conntrack if it dealt with ICMP, and filled in skb->nfct */
extern struct ip_conntrack *icmp_error_track(struct sk_buff *skb,
- enum ip_conntrack_info *ctinfo);
+ enum ip_conntrack_info *ctinfo,
+ unsigned int hooknum);
extern int get_tuple(const struct iphdr *iph, size_t len,
struct ip_conntrack_tuple *tuple,
struct ip_conntrack_protocol *protocol);
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
index c0a845caf..0218e940b 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
@@ -31,7 +31,6 @@ struct ip_conntrack_manip
{
u_int32_t ip;
union ip_conntrack_manip_proto u;
- u_int16_t pad; /* Must be set to 0 for memcmp. */
};
/* This contains the information to distinguish a connection. */
@@ -78,7 +77,7 @@ DEBUGP("tuple %p: %u %u.%u.%u.%u:%u -> %u.%u.%u.%u:%u\n", \
IP_PARTS((tp)->src.ip), ntohs((tp)->src.u.all), \
IP_PARTS((tp)->dst.ip), ntohs((tp)->dst.u.all))
-#define CTINFO2DIR(ctinfo) ((ctinfo) == IP_CT_IS_REPLY ? IP_CT_DIR_REPLY : IP_CT_DIR_ORIGINAL)
+#define CTINFO2DIR(ctinfo) ((ctinfo) >= IP_CT_IS_REPLY ? IP_CT_DIR_REPLY : IP_CT_DIR_ORIGINAL)
/* If we're the first tuple, it's the original dir. */
#define DIRECTION(h) ((enum ip_conntrack_dir)(&(h)->ctrack->tuplehash[1] == (h)))
@@ -90,6 +89,27 @@ enum ip_conntrack_dir
IP_CT_DIR_MAX
};
+extern inline int ip_ct_tuple_src_equal(const struct ip_conntrack_tuple *t1,
+ const struct ip_conntrack_tuple *t2)
+{
+ return t1->src.ip == t2->src.ip
+ && t1->src.u.all == t2->src.u.all;
+}
+
+extern inline int ip_ct_tuple_dst_equal(const struct ip_conntrack_tuple *t1,
+ const struct ip_conntrack_tuple *t2)
+{
+ return t1->dst.ip == t2->dst.ip
+ && t1->dst.u.all == t2->dst.u.all
+ && t1->dst.protonum == t2->dst.protonum;
+}
+
+extern inline int ip_ct_tuple_equal(const struct ip_conntrack_tuple *t1,
+ const struct ip_conntrack_tuple *t2)
+{
+ return ip_ct_tuple_src_equal(t1, t2) && ip_ct_tuple_dst_equal(t1, t2);
+}
+
/* Connections have two entries in the hash table: one for each way */
struct ip_conntrack_tuple_hash
{
diff --git a/include/linux/netfilter_ipv6/ip6t_LOG.h b/include/linux/netfilter_ipv6/ip6t_LOG.h
new file mode 100644
index 000000000..0646a1077
--- /dev/null
+++ b/include/linux/netfilter_ipv6/ip6t_LOG.h
@@ -0,0 +1,15 @@
+#ifndef _IP6T_LOG_H
+#define _IP6T_LOG_H
+
+#define IP6T_LOG_TCPSEQ 0x01 /* Log TCP sequence numbers */
+#define IP6T_LOG_TCPOPT 0x02 /* Log TCP options */
+#define IP6T_LOG_IPOPT 0x04 /* Log IP options */
+#define IP6T_LOG_MASK 0x07
+
+struct ip6t_log_info {
+ unsigned char level;
+ unsigned char logflags;
+ char prefix[30];
+};
+
+#endif /*_IPT_LOG_H*/
diff --git a/include/linux/netfilter_ipv6/ip6t_MARK.h b/include/linux/netfilter_ipv6/ip6t_MARK.h
new file mode 100644
index 000000000..7ade8d8f5
--- /dev/null
+++ b/include/linux/netfilter_ipv6/ip6t_MARK.h
@@ -0,0 +1,8 @@
+#ifndef _IP6T_MARK_H_target
+#define _IP6T_MARK_H_target
+
+struct ip6t_mark_target_info {
+ unsigned long mark;
+};
+
+#endif /*_IPT_MARK_H_target*/
diff --git a/include/linux/netfilter_ipv6/ip6t_REJECT.h b/include/linux/netfilter_ipv6/ip6t_REJECT.h
new file mode 100644
index 000000000..d1d72d0e9
--- /dev/null
+++ b/include/linux/netfilter_ipv6/ip6t_REJECT.h
@@ -0,0 +1,16 @@
+#ifndef _IP6T_REJECT_H
+#define _IP6T_REJECT_H
+
+enum ip6t_reject_with {
+ IP6T_ICMP_NET_UNREACHABLE,
+ IP6T_ICMP_HOST_UNREACHABLE,
+ IP6T_ICMP_PROT_UNREACHABLE,
+ IP6T_ICMP_PORT_UNREACHABLE,
+ IP6T_ICMP_ECHOREPLY
+};
+
+struct ip6t_reject_info {
+ enum ip6t_reject_with with; /* reject type */
+};
+
+#endif /*_IPT_REJECT_H*/
diff --git a/include/linux/netfilter_ipv6/ip6t_limit.h b/include/linux/netfilter_ipv6/ip6t_limit.h
new file mode 100644
index 000000000..f2866e50f
--- /dev/null
+++ b/include/linux/netfilter_ipv6/ip6t_limit.h
@@ -0,0 +1,21 @@
+#ifndef _IP6T_RATE_H
+#define _IP6T_RATE_H
+
+/* timings are in milliseconds. */
+#define IP6T_LIMIT_SCALE 10000
+
+/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490
+ seconds, or one every 59 hours. */
+struct ip6t_rateinfo {
+ u_int32_t avg; /* Average secs between packets * scale */
+ u_int32_t burst; /* Period multiplier for upper limit. */
+
+ /* Used internally by the kernel */
+ unsigned long prev;
+ u_int32_t credit;
+ u_int32_t credit_cap, cost;
+
+ /* Ugly, ugly fucker. */
+ struct ip6t_rateinfo *master;
+};
+#endif /*_IPT_RATE_H*/
diff --git a/include/linux/netfilter_ipv6/ip6t_mac.h b/include/linux/netfilter_ipv6/ip6t_mac.h
new file mode 100644
index 000000000..87c088c21
--- /dev/null
+++ b/include/linux/netfilter_ipv6/ip6t_mac.h
@@ -0,0 +1,8 @@
+#ifndef _IP6T_MAC_H
+#define _IP6T_MAC_H
+
+struct ip6t_mac_info {
+ unsigned char srcaddr[ETH_ALEN];
+ int invert;
+};
+#endif /*_IPT_MAC_H*/
diff --git a/include/linux/netfilter_ipv6/ip6t_mark.h b/include/linux/netfilter_ipv6/ip6t_mark.h
new file mode 100644
index 000000000..a734441e1
--- /dev/null
+++ b/include/linux/netfilter_ipv6/ip6t_mark.h
@@ -0,0 +1,9 @@
+#ifndef _IP6T_MARK_H
+#define _IP6T_MARK_H
+
+struct ip6t_mark_info {
+ unsigned long mark, mask;
+ u_int8_t invert;
+};
+
+#endif /*_IPT_MARK_H*/
diff --git a/include/linux/netfilter_ipv6/ip6t_multiport.h b/include/linux/netfilter_ipv6/ip6t_multiport.h
new file mode 100644
index 000000000..efe4954a8
--- /dev/null
+++ b/include/linux/netfilter_ipv6/ip6t_multiport.h
@@ -0,0 +1,21 @@
+#ifndef _IP6T_MULTIPORT_H
+#define _IP6T_MULTIPORT_H
+#include <linux/netfilter_ipv6/ip6_tables.h>
+
+enum ip6t_multiport_flags
+{
+ IP6T_MULTIPORT_SOURCE,
+ IP6T_MULTIPORT_DESTINATION,
+ IP6T_MULTIPORT_EITHER
+};
+
+#define IP6T_MULTI_PORTS 15
+
+/* Must fit inside union ip6t_matchinfo: 16 bytes */
+struct ip6t_multiport
+{
+ u_int8_t flags; /* Type of comparison */
+ u_int8_t count; /* Number of ports */
+ u_int16_t ports[IP6T_MULTI_PORTS]; /* Ports */
+};
+#endif /*_IPT_MULTIPORT_H*/
diff --git a/include/linux/netfilter_ipv6/ip6t_owner.h b/include/linux/netfilter_ipv6/ip6t_owner.h
new file mode 100644
index 000000000..19937da3d
--- /dev/null
+++ b/include/linux/netfilter_ipv6/ip6t_owner.h
@@ -0,0 +1,18 @@
+#ifndef _IP6T_OWNER_H
+#define _IP6T_OWNER_H
+
+/* match and invert flags */
+#define IP6T_OWNER_UID 0x01
+#define IP6T_OWNER_GID 0x02
+#define IP6T_OWNER_PID 0x04
+#define IP6T_OWNER_SID 0x08
+
+struct ip6t_owner_info {
+ uid_t uid;
+ gid_t gid;
+ pid_t pid;
+ pid_t sid;
+ u_int8_t match, invert; /* flags */
+};
+
+#endif /*_IPT_OWNER_H*/
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index 42faceaa0..562049465 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -21,62 +21,15 @@ struct notifier_block
#ifdef __KERNEL__
+extern int notifier_chain_register(struct notifier_block **list, struct notifier_block *n);
+extern int notifier_chain_unregister(struct notifier_block **nl, struct notifier_block *n);
+extern int notifier_call_chain(struct notifier_block **n, unsigned long val, void *v);
+
#define NOTIFY_DONE 0x0000 /* Don't care */
#define NOTIFY_OK 0x0001 /* Suits me */
#define NOTIFY_STOP_MASK 0x8000 /* Don't call further */
#define NOTIFY_BAD (NOTIFY_STOP_MASK|0x0002) /* Bad/Veto action */
-extern __inline__ int notifier_chain_register(struct notifier_block **list, struct notifier_block *n)
-{
- while(*list)
- {
- if(n->priority > (*list)->priority)
- break;
- list= &((*list)->next);
- }
- n->next = *list;
- *list=n;
- return 0;
-}
-
-/*
- * Warning to any non GPL module writers out there.. these functions are
- * GPL'd
- */
-
-extern __inline__ int notifier_chain_unregister(struct notifier_block **nl, struct notifier_block *n)
-{
- while((*nl)!=NULL)
- {
- if((*nl)==n)
- {
- *nl=n->next;
- return 0;
- }
- nl=&((*nl)->next);
- }
- return -ENOENT;
-}
-
-/*
- * This is one of these things that is generally shorter inline
- */
-
-extern __inline__ int notifier_call_chain(struct notifier_block **n, unsigned long val, void *v)
-{
- int ret=NOTIFY_DONE;
- struct notifier_block *nb = *n;
- while(nb)
- {
- ret=nb->notifier_call(nb,val,v);
- if(ret&NOTIFY_STOP_MASK)
- return ret;
- nb=nb->next;
- }
- return ret;
-}
-
-
/*
* Declared notifiers so far. I can imagine quite a few more chains
* over time (eg laptop power reset chains, reboot chain (to clean
@@ -105,11 +58,5 @@ extern __inline__ int notifier_call_chain(struct notifier_block **n, unsigned lo
#define SYS_HALT 0x0002 /* Notify of system halt */
#define SYS_POWER_OFF 0x0003 /* Notify of system power off */
-/*
- * Publically visible notifier objects
- */
-
-extern struct notifier_block *boot_notifier_list;
-
-#endif
-#endif
+#endif /* __KERNEL__ */
+#endif /* _LINUX_NOTIFIER_H */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 888b5df13..42a85261f 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -190,6 +190,8 @@
#define PCI_VENDOR_ID_NS 0x100b
#define PCI_DEVICE_ID_NS_87415 0x0002
+#define PCI_DEVICE_ID_NS_87560_LIO 0x000e
+#define PCI_DEVICE_ID_NS_87560_USB 0x0012
#define PCI_DEVICE_ID_NS_87410 0xd001
#define PCI_VENDOR_ID_TSENG 0x100c
@@ -259,7 +261,10 @@
#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001
#define PCI_DEVICE_ID_AMD_SCSI 0x2020
#define PCI_DEVICE_ID_AMD_FE_GATE_7006 0x7006
-#define PCI_DEVICE_ID_AMD_VIPER_7403 0x7403
+#define PCI_DEVICE_ID_AMD_COBRA_7400 0x7400
+#define PCI_DEVICE_ID_AMD_COBRA_7401 0x7401
+#define PCI_DEVICE_ID_AMD_COBRA_7403 0x7403
+#define PCI_DEVICE_ID_AMD_COBRA_7404 0x7404
#define PCI_DEVICE_ID_AMD_VIPER_7408 0x7408
#define PCI_DEVICE_ID_AMD_VIPER_7409 0x7409
#define PCI_DEVICE_ID_AMD_VIPER_740B 0x740B
@@ -412,6 +417,7 @@
#define PCI_DEVICE_ID_MOTOROLA_CPX8216 0x4806
#define PCI_VENDOR_ID_PROMISE 0x105a
+#define PCI_DEVICE_ID_PROMISE_20267 0x4d30
#define PCI_DEVICE_ID_PROMISE_20246 0x4d33
#define PCI_DEVICE_ID_PROMISE_20262 0x4d38
#define PCI_DEVICE_ID_PROMISE_5300 0x5300
@@ -515,6 +521,7 @@
#define PCI_DEVICE_ID_CMD_646 0x0646
#define PCI_DEVICE_ID_CMD_647 0x0647
#define PCI_DEVICE_ID_CMD_648 0x0648
+#define PCI_DEVICE_ID_CMD_649 0x0649
#define PCI_DEVICE_ID_CMD_670 0x0670
#define PCI_VENDOR_ID_VISION 0x1098
@@ -546,6 +553,8 @@
#define PCI_DEVICE_ID_DATABOOK_87144 0xb106
#define PCI_VENDOR_ID_PLX 0x10b5
+#define PCI_VENDOR_ID_PLX_ROMULUS 0x106a
+#define PCI_DEVICE_ID_PLX_SPCOM800 0x1076
#define PCI_DEVICE_ID_PLX_SPCOM200 0x1103
#define PCI_DEVICE_ID_PLX_9050 0x9050
#define PCI_DEVICE_ID_PLX_9060 0x9060
@@ -1075,6 +1084,9 @@
#define PCI_VENDOR_ID_AFAVLAB 0x14db
#define PCI_DEVICE_ID_AFAVLAB_TK9902 0x2120
+#define PCI_VENDOR_ID_MORETON 0x15aa
+#define PCI_DEVICE_ID_RASTEL_2PORT 0x2000
+
#define PCI_VENDOR_ID_SYMPHONY 0x1c1c
#define PCI_DEVICE_ID_SYMPHONY_101 0x0001
@@ -1173,6 +1185,13 @@
#define PCI_DEVICE_ID_INTEL_82801AB_5 0x2425
#define PCI_DEVICE_ID_INTEL_82801AB_6 0x2426
#define PCI_DEVICE_ID_INTEL_82801AB_8 0x2428
+#define PCI_DEVICE_ID_INTEL_82820FW_0 0x2440
+#define PCI_DEVICE_ID_INTEL_82820FW_1 0x2442
+#define PCI_DEVICE_ID_INTEL_82820FW_2 0x2443
+#define PCI_DEVICE_ID_INTEL_82820FW_3 0x2444
+#define PCI_DEVICE_ID_INTEL_82820FW_4 0x2449
+#define PCI_DEVICE_ID_INTEL_82820FW_5 0x244b
+#define PCI_DEVICE_ID_INTEL_82820FW_6 0x244e
#define PCI_DEVICE_ID_INTEL_82810_MC1 0x7120
#define PCI_DEVICE_ID_INTEL_82810_IG1 0x7121
#define PCI_DEVICE_ID_INTEL_82810_MC3 0x7122
diff --git a/include/linux/poll.h b/include/linux/poll.h
index b56cdcf4c..b83e62d74 100644
--- a/include/linux/poll.h
+++ b/include/linux/poll.h
@@ -20,6 +20,7 @@ struct poll_table_entry {
typedef struct poll_table_struct {
struct poll_table_struct * next;
unsigned int nr;
+ int err;
struct poll_table_entry * entry;
} poll_table;
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index d0487c3df..28bf3daa0 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -127,7 +127,7 @@ extern void proc_tty_unregister_driver(struct tty_driver *driver);
extern void proc_device_tree_init(void);
extern struct proc_dir_entry *proc_symlink(const char *,
- struct proc_dir_entry *,char *);
+ struct proc_dir_entry *, const char *);
extern struct proc_dir_entry *proc_mknod(const char *,mode_t,
struct proc_dir_entry *,kdev_t);
extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *);
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h
index ad5ca5543..dd9b7cb6e 100644
--- a/include/linux/qnx4_fs.h
+++ b/include/linux/qnx4_fs.h
@@ -116,7 +116,7 @@ extern void qnx4_truncate(struct inode *inode);
extern void qnx4_free_inode(struct inode *inode);
extern int qnx4_unlink(struct inode *dir, struct dentry *dentry);
extern int qnx4_rmdir(struct inode *dir, struct dentry *dentry);
-extern int qnx4_sync_file(struct file *file, struct dentry *dentry);
+extern int qnx4_sync_file(struct file *file, struct dentry *dentry, int);
extern int qnx4_sync_inode(struct inode *inode);
extern int qnx4_get_block(struct inode *inode, long iblock, struct buffer_head *bh, int create);
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h
index c2cabe19b..152fb359b 100644
--- a/include/linux/raid/md.h
+++ b/include/linux/raid/md.h
@@ -78,7 +78,6 @@ extern int md_do_sync(mddev_t *mddev, mdp_disk_t *spare);
extern void md_done_sync(mddev_t *mddev, int blocks, int ok);
extern void md_recover_arrays (void);
extern int md_check_ordering (mddev_t *mddev);
-extern void autodetect_raid(void);
extern struct gendisk * find_gendisk (kdev_t dev);
extern int md_notify_reboot(struct notifier_block *this,
unsigned long code, void *x);
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index b62d63750..9f722b49e 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -199,15 +199,16 @@ struct mddev_s
int sb_dirty;
mdu_param_t param;
int ro;
- unsigned long curr_resync;
- unsigned long resync_start;
+ unsigned long curr_resync; /* blocks scheduled */
+ unsigned long resync_mark; /* a recent timestamp */
+ unsigned long resync_mark_cnt;/* blocks written at resync_mark */
char *name;
int recovery_running;
struct semaphore reconfig_sem;
struct semaphore recovery_sem;
struct semaphore resync_sem;
- atomic_t recovery_active;
+ atomic_t recovery_active; /* blocks scheduled, but not written */
md_wait_queue_head_t recovery_wait;
struct md_list_head all_mddevs;
@@ -218,11 +219,9 @@ struct mdk_personality_s
{
char *name;
int (*make_request)(request_queue_t *q, mddev_t *mddev, int rw, struct buffer_head * bh);
- void (*end_request)(struct buffer_head * bh, int uptodate);
int (*run)(mddev_t *mddev);
int (*stop)(mddev_t *mddev);
int (*status)(char *page, mddev_t *mddev);
- int max_invalid_dev;
int (*error_handler)(mddev_t *mddev, kdev_t dev);
/*
@@ -337,7 +336,8 @@ typedef struct mdk_thread_s {
typedef struct dev_name_s {
struct md_list_head list;
kdev_t dev;
- char name [MAX_DISKNAME_LEN];
+ char namebuf [MAX_DISKNAME_LEN];
+ char *name;
} dev_name_t;
diff --git a/include/linux/raid/raid1.h b/include/linux/raid/raid1.h
index 1016bdaa4..ffa65d20d 100644
--- a/include/linux/raid/raid1.h
+++ b/include/linux/raid/raid1.h
@@ -9,6 +9,7 @@ struct mirror_info {
kdev_t dev;
int next;
int sect_limit;
+ int head_position;
/*
* State bits:
@@ -34,6 +35,18 @@ struct raid1_private_data {
struct mirror_info *spare;
md_spinlock_t device_lock;
+ /* buffer pool */
+ /* buffer_heads that we have pre-allocated have b_pprev -> &freebh
+ * and are linked into a stack using b_next
+ * raid1_bh that are pre-allocated have R1BH_PreAlloc set.
+ * All these variable are protected by device_lock
+ */
+ struct buffer_head *freebh;
+ int freebh_cnt; /* how many are on the list */
+ struct raid1_bh *freer1;
+ struct raid1_bh *freebuf; /* each bh_req has a page allocated */
+ md_wait_queue_head_t wait_buffer;
+
/* for use when syncing mirrors: */
int start_active, start_ready,
start_pending, start_future;
@@ -68,12 +81,12 @@ struct raid1_bh {
unsigned long state;
mddev_t *mddev;
struct buffer_head *master_bh;
- struct buffer_head *mirror_bh [MD_SB_DISKS];
+ struct buffer_head *mirror_bh_list;
struct buffer_head bh_req;
- struct buffer_head *next_retry;
+ struct raid1_bh *next_r1; /* next for retry or in free list */
};
/* bits for raid1_bh.state */
#define R1BH_Uptodate 1
#define R1BH_SyncPhase 2
-
+#define R1BH_PreAlloc 3 /* this was pre-allocated, add to free list */
#endif
diff --git a/include/linux/raid1.h b/include/linux/raid1.h
deleted file mode 100644
index 4b031e682..000000000
--- a/include/linux/raid1.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef _RAID1_H
-#define _RAID1_H
-
-#include <linux/md.h>
-
-struct mirror_info {
- int number;
- int raid_disk;
- kdev_t dev;
- int next;
- int sect_limit;
-
- /*
- * State bits:
- */
- int operational;
- int write_only;
- int spare;
-};
-
-struct raid1_data {
- struct md_dev *mddev;
- struct mirror_info mirrors[MD_SB_DISKS]; /* RAID1 devices, 2 to MD_SB_DISKS */
- int raid_disks;
- int working_disks; /* Number of working disks */
- int last_used;
- unsigned long next_sect;
- int sect_count;
- int resync_running;
-};
-
-/*
- * this is our 'private' 'collective' RAID1 buffer head.
- * it contains information about what kind of IO operations were started
- * for this RAID5 operation, and about their status:
- */
-
-struct raid1_bh {
- unsigned int remaining;
- int cmd;
- unsigned long state;
- struct md_dev *mddev;
- struct buffer_head *master_bh;
- struct buffer_head *mirror_bh [MD_SB_DISKS];
- struct buffer_head bh_req;
- struct buffer_head *next_retry;
-};
-
-#endif
diff --git a/include/linux/raid5.h b/include/linux/raid5.h
deleted file mode 100644
index 655d41d54..000000000
--- a/include/linux/raid5.h
+++ /dev/null
@@ -1,110 +0,0 @@
-#ifndef _RAID5_H
-#define _RAID5_H
-
-#ifdef __KERNEL__
-#include <linux/md.h>
-#include <asm/atomic.h>
-
-struct disk_info {
- kdev_t dev;
- int operational;
- int number;
- int raid_disk;
- int write_only;
- int spare;
-};
-
-struct stripe_head {
- struct stripe_head *hash_next, **hash_pprev; /* hash pointers */
- struct stripe_head *free_next; /* pool of free sh's */
- struct buffer_head *buffer_pool; /* pool of free buffers */
- struct buffer_head *bh_pool; /* pool of free bh's */
- struct raid5_data *raid_conf;
- struct buffer_head *bh_old[MD_SB_DISKS]; /* disk image */
- struct buffer_head *bh_new[MD_SB_DISKS]; /* buffers of the MD device (present in buffer cache) */
- struct buffer_head *bh_copy[MD_SB_DISKS]; /* copy on write of bh_new (bh_new can change from under us) */
- struct buffer_head *bh_req[MD_SB_DISKS]; /* copy of bh_new (only the buffer heads), queued to the lower levels */
- int cmd_new[MD_SB_DISKS]; /* READ/WRITE for new */
- int new[MD_SB_DISKS]; /* buffer added since the last handle_stripe() */
- unsigned long sector; /* sector of this row */
- int size; /* buffers size */
- int pd_idx; /* parity disk index */
- int nr_pending; /* nr of pending cmds */
- unsigned long state; /* state flags */
- int cmd; /* stripe cmd */
- int count; /* nr of waiters */
- int write_method; /* reconstruct-write / read-modify-write */
- int phase; /* PHASE_BEGIN, ..., PHASE_COMPLETE */
- wait_queue_head_t wait; /* processes waiting for this stripe */
-};
-
-/*
- * Phase
- */
-#define PHASE_BEGIN 0
-#define PHASE_READ_OLD 1
-#define PHASE_WRITE 2
-#define PHASE_READ 3
-#define PHASE_COMPLETE 4
-
-/*
- * Write method
- */
-#define METHOD_NONE 0
-#define RECONSTRUCT_WRITE 1
-#define READ_MODIFY_WRITE 2
-
-/*
- * Stripe state
- */
-#define STRIPE_LOCKED 0
-#define STRIPE_ERROR 1
-
-/*
- * Stripe commands
- */
-#define STRIPE_NONE 0
-#define STRIPE_WRITE 1
-#define STRIPE_READ 2
-
-struct raid5_data {
- struct stripe_head **stripe_hashtbl;
- struct md_dev *mddev;
- struct md_thread *thread, *resync_thread;
- struct disk_info disks[MD_SB_DISKS];
- struct disk_info *spare;
- int buffer_size;
- int chunk_size, level, algorithm;
- int raid_disks, working_disks, failed_disks;
- int sector_count;
- unsigned long next_sector;
- atomic_t nr_handle;
- struct stripe_head *next_free_stripe;
- int nr_stripes;
- int resync_parity;
- int max_nr_stripes;
- int clock;
- int nr_hashed_stripes;
- int nr_locked_stripes;
- int nr_pending_stripes;
- int nr_cached_stripes;
-
- /*
- * Free stripes pool
- */
- int nr_free_sh;
- struct stripe_head *free_sh_list;
- wait_queue_head_t wait_for_stripe;
-};
-
-#endif
-
-/*
- * Our supported algorithms
- */
-#define ALGORITHM_LEFT_ASYMMETRIC 0
-#define ALGORITHM_RIGHT_ASYMMETRIC 1
-#define ALGORITHM_LEFT_SYMMETRIC 2
-#define ALGORITHM_RIGHT_SYMMETRIC 3
-
-#endif
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index 463350f5c..5f128a952 100644
--- a/include/linux/reboot.h
+++ b/include/linux/reboot.h
@@ -34,7 +34,6 @@
#include <linux/notifier.h>
-extern struct notifier_block *reboot_notifier_list;
extern int register_reboot_notifier(struct notifier_block *);
extern int unregister_reboot_notifier(struct notifier_block *);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2bfe015dd..e32e56cf1 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -269,6 +269,7 @@ struct task_struct {
struct mm_struct *mm, *active_mm;
int has_cpu;
int processor;
+ unsigned long ptrace;
struct list_head run_list;
struct task_struct *next_task, *prev_task;
int last_processor;
@@ -356,8 +357,6 @@ struct task_struct {
/* Not implemented yet, only for 486*/
#define PF_STARTING 0x00000002 /* being created */
#define PF_EXITING 0x00000004 /* getting shut down */
-#define PF_PTRACED 0x00000010 /* set if ptrace (0) has been called */
-#define PF_TRACESYS 0x00000020 /* tracing system calls */
#define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */
#define PF_SUPERPRIV 0x00000100 /* used super-user privileges */
#define PF_DUMPCORE 0x00000200 /* dumped core */
@@ -366,7 +365,14 @@ struct task_struct {
#define PF_VFORK 0x00001000 /* Wake up parent in mm_release */
#define PF_USEDFPU 0x00100000 /* task used FPU this quantum (SMP) */
-#define PF_DTRACE 0x00200000 /* delayed trace (used on m68k, i386) */
+
+/*
+ * Ptrace flags
+ */
+
+#define PT_PTRACED 0x00000001
+#define PT_TRACESYS 0x00000002
+#define PT_DTRACE 0x00000004 /* delayed trace (used on m68k, i386) */
/*
* Limit the stack by to some sane default: root can always
diff --git a/include/linux/serial.h b/include/linux/serial.h
index da10e19ed..ce404ca1a 100644
--- a/include/linux/serial.h
+++ b/include/linux/serial.h
@@ -10,6 +10,7 @@
#ifndef _LINUX_SERIAL_H
#define _LINUX_SERIAL_H
+#ifdef __KERNEL__
#include <asm/page.h>
/*
@@ -27,10 +28,12 @@ struct async_icount {
*/
#define SERIAL_XMIT_SIZE PAGE_SIZE
+#endif
+
struct serial_struct {
int type;
int line;
- unsigned long port;
+ unsigned int port;
int irq;
int flags;
int xmit_fifo_size;
@@ -44,7 +47,8 @@ struct serial_struct {
unsigned short closing_wait2; /* no longer used... */
unsigned char *iomem_base;
unsigned short iomem_reg_shift;
- int reserved[2];
+ unsigned int port_high;
+ int reserved[1];
};
/*
@@ -70,7 +74,8 @@ struct serial_struct {
#define PORT_16C950 10 /* Oxford Semiconductor */
#define PORT_16654 11
#define PORT_16850 12
-#define PORT_MAX 12
+#define PORT_RSA 13 /* RSA-DV II/S card */
+#define PORT_MAX 13
#define SERIAL_IO_PORT 0
#define SERIAL_IO_HUB6 1
@@ -115,7 +120,10 @@ struct serial_uart_config {
#define ASYNC_LOW_LATENCY 0x2000 /* Request low latency behaviour */
-#define ASYNC_FLAGS 0x3FFF /* Possible legal async flags */
+#define ASYNC_BUGGY_UART 0x4000 /* This is a buggy UART, skip some safety
+ * checks. Note: can be dangerous! */
+
+#define ASYNC_FLAGS 0x7FFF /* Possible legal async flags */
#define ASYNC_USR_MASK 0x3430 /* Legal flags that non-privileged
* users can set or reset */
@@ -127,7 +135,9 @@ struct serial_uart_config {
#define ASYNC_CLOSING 0x08000000 /* Serial port is closing */
#define ASYNC_CTS_FLOW 0x04000000 /* Do CTS flow control */
#define ASYNC_CHECK_CD 0x02000000 /* i.e., CLOCAL */
-#define ASYNC_SHARE_IRQ 0x01000000 /* for multifunction cards */
+#define ASYNC_SHARE_IRQ 0x01000000 /* for multifunction cards
+ --- no longer used */
+#define ASYNC_AUTOPROBE 0x00800000 /* Port was autoprobed */
#define ASYNC_INTERNAL_FLAGS 0xFF000000 /* Internal flags */
diff --git a/include/linux/serialP.h b/include/linux/serialP.h
index 8329b4580..d1f901262 100644
--- a/include/linux/serialP.h
+++ b/include/linux/serialP.h
@@ -24,6 +24,11 @@
#include <linux/tqueue.h>
#include <linux/circ_buf.h>
#include <linux/wait.h>
+#if (LINUX_VERSION_CODE < 0x020300)
+/* Unfortunate, but Linux 2.2 needs async_icount defined here and
+ * it got moved in 2.3 */
+#include <linux/serial.h>
+#endif
struct serial_state {
int magic;
@@ -190,6 +195,9 @@ struct pci_board_inst {
/* Do not use irq sharing for this device */
#define SPCI_FL_NO_SHIRQ 0x1000
-#define SPCI_FL_PNPDEFAULT (SPCI_FL_IRQRESOURCE)
+/* This is a PNP device */
+#define SPCI_FL_ISPNP 0x2000
+
+#define SPCI_FL_PNPDEFAULT (SPCI_FL_IRQRESOURCE|SPCI_FL_ISPNP)
#endif /* _LINUX_SERIAL_H */
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h
index 1787be41f..09feb9501 100644
--- a/include/linux/serial_reg.h
+++ b/include/linux/serial_reg.h
@@ -229,5 +229,54 @@
#define UART_TRG_120 0x78
#define UART_TRG_128 0x80
+/*
+ * These definitions are for the RSA-DV II/S card, from
+ *
+ * Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
+ */
+
+#define UART_RSA_BASE (-8)
+
+#define UART_RSA_MSR ((UART_RSA_BASE) + 0) /* I/O: Mode Select Register */
+
+#define UART_RSA_MSR_SWAP (1 << 0) /* Swap low/high 8 bytes in I/O port addr */
+#define UART_RSA_MSR_FIFO (1 << 2) /* Enable the external FIFO */
+#define UART_RSA_MSR_FLOW (1 << 3) /* Enable the auto RTS/CTS flow control */
+#define UART_RSA_MSR_ITYP (1 << 4) /* Level (1) / Edge triger (0) */
+
+#define UART_RSA_IER ((UART_RSA_BASE) + 1) /* I/O: Interrupt Enable Register */
+
+#define UART_RSA_IER_Rx_FIFO_H (1 << 0) /* Enable Rx FIFO half full int. */
+#define UART_RSA_IER_Tx_FIFO_H (1 << 1) /* Enable Tx FIFO half full int. */
+#define UART_RSA_IER_Tx_FIFO_E (1 << 2) /* Enable Tx FIFO empty int. */
+#define UART_RSA_IER_Rx_TOUT (1 << 3) /* Enable char receive timeout int */
+#define UART_RSA_IER_TIMER (1 << 4) /* Enable timer interrupt */
+
+#define UART_RSA_SRR ((UART_RSA_BASE) + 2) /* IN: Status Read Register */
+
+#define UART_RSA_SRR_Tx_FIFO_NEMP (1 << 0) /* Tx FIFO is not empty (1) */
+#define UART_RSA_SRR_Tx_FIFO_NHFL (1 << 1) /* Tx FIFO is not half full (1) */
+#define UART_RSA_SRR_Tx_FIFO_NFUL (1 << 2) /* Tx FIFO is not full (1) */
+#define UART_RSA_SRR_Rx_FIFO_NEMP (1 << 3) /* Rx FIFO is not empty (1) */
+#define UART_RSA_SRR_Rx_FIFO_NHFL (1 << 4) /* Rx FIFO is not half full (1) */
+#define UART_RSA_SRR_Rx_FIFO_NFUL (1 << 5) /* Rx FIFO is not full (1) */
+#define UART_RSA_SRR_Rx_TOUT (1 << 6) /* Character reception timeout occured (1) */
+#define UART_RSA_SRR_TIMER (1 << 7) /* Timer interrupt occured */
+
+#define UART_RSA_FRR ((UART_RSA_BASE) + 2) /* OUT: FIFO Reset Register */
+
+#define UART_RSA_TIVSR ((UART_RSA_BASE) + 3) /* I/O: Timer Interval Value Set Register */
+
+#define UART_RSA_TCR ((UART_RSA_BASE) + 4) /* OUT: Timer Control Register */
+
+#define UART_RSA_TCR_SWITCH (1 << 0) /* Timer on */
+
+/*
+ * The RSA DSV/II board has two fixed clock frequencies. One is the
+ * standard rate, and the other is 8 times faster.
+ */
+#define SERIAL_RSA_BAUD_BASE (921600)
+#define SERIAL_RSA_BAUD_BASE_LO (SERIAL_RSA_BAUD_BASE / 8)
+
#endif /* _LINUX_SERIAL_REG_H */
diff --git a/include/linux/shm.h b/include/linux/shm.h
index bc56c5e20..e1b335cbe 100644
--- a/include/linux/shm.h
+++ b/include/linux/shm.h
@@ -2,7 +2,7 @@
#define _LINUX_SHM_H_
#include <linux/ipc.h>
-#include <linux/mm.h>
+#include <asm/page.h>
/*
* SHMMAX, SHMMNI and SHMALL are upper limits are defaults which can
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 20029fd67..71f8772cd 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -168,17 +168,8 @@ struct sk_buff {
#include <asm/system.h>
extern void __kfree_skb(struct sk_buff *skb);
-extern void skb_queue_head_init(struct sk_buff_head *list);
-extern void skb_queue_head(struct sk_buff_head *list,struct sk_buff *buf);
-extern void skb_queue_tail(struct sk_buff_head *list,struct sk_buff *buf);
-extern struct sk_buff * skb_dequeue(struct sk_buff_head *list);
-extern void skb_insert(struct sk_buff *old,struct sk_buff *newsk);
-extern void skb_append(struct sk_buff *old,struct sk_buff *newsk);
-extern void skb_unlink(struct sk_buff *buf);
-extern __u32 skb_queue_len(struct sk_buff_head *list);
extern struct sk_buff * skb_peek_copy(struct sk_buff_head *list);
extern struct sk_buff * alloc_skb(unsigned int size, int priority);
-extern struct sk_buff * dev_alloc_skb(unsigned int size);
extern void kfree_skbmem(struct sk_buff *skb);
extern struct sk_buff * skb_clone(struct sk_buff *skb, int priority);
extern struct sk_buff * skb_copy(const struct sk_buff *skb, int priority);
@@ -187,13 +178,6 @@ extern struct sk_buff * skb_copy_expand(const struct sk_buff *skb,
int newtailroom,
int priority);
#define dev_kfree_skb(a) kfree_skb(a)
-extern unsigned char * skb_put(struct sk_buff *skb, unsigned int len);
-extern unsigned char * skb_push(struct sk_buff *skb, unsigned int len);
-extern unsigned char * skb_pull(struct sk_buff *skb, unsigned int len);
-extern int skb_headroom(const struct sk_buff *skb);
-extern int skb_tailroom(const struct sk_buff *skb);
-extern void skb_reserve(struct sk_buff *skb, unsigned int len);
-extern void skb_trim(struct sk_buff *skb, unsigned int len);
extern void skb_over_panic(struct sk_buff *skb, int len, void *here);
extern void skb_under_panic(struct sk_buff *skb, int len, void *here);
@@ -201,7 +185,7 @@ extern void skb_under_panic(struct sk_buff *skb, int len, void *here);
#define skb_realloc_headroom(skb, nhr) skb_copy_expand(skb, nhr, skb_tailroom(skb), GFP_ATOMIC)
/* Internal */
-extern __inline__ atomic_t *skb_datarefp(struct sk_buff *skb)
+static inline atomic_t *skb_datarefp(struct sk_buff *skb)
{
return (atomic_t *)(skb->end);
}
@@ -213,7 +197,7 @@ extern __inline__ atomic_t *skb_datarefp(struct sk_buff *skb)
* Returns true if the queue is empty, false otherwise.
*/
-extern __inline__ int skb_queue_empty(struct sk_buff_head *list)
+static inline int skb_queue_empty(struct sk_buff_head *list)
{
return (list->next == (struct sk_buff *) list);
}
@@ -226,7 +210,7 @@ extern __inline__ int skb_queue_empty(struct sk_buff_head *list)
* to the buffer.
*/
-extern __inline__ struct sk_buff *skb_get(struct sk_buff *skb)
+static inline struct sk_buff *skb_get(struct sk_buff *skb)
{
atomic_inc(&skb->users);
return skb;
@@ -245,14 +229,14 @@ extern __inline__ struct sk_buff *skb_get(struct sk_buff *skb)
* hit zero.
*/
-extern __inline__ void kfree_skb(struct sk_buff *skb)
+static inline void kfree_skb(struct sk_buff *skb)
{
if (atomic_read(&skb->users) == 1 || atomic_dec_and_test(&skb->users))
__kfree_skb(skb);
}
/* Use this if you didn't touch the skb state [for fast switching] */
-extern __inline__ void kfree_skb_fast(struct sk_buff *skb)
+static inline void kfree_skb_fast(struct sk_buff *skb)
{
if (atomic_read(&skb->users) == 1 || atomic_dec_and_test(&skb->users))
kfree_skbmem(skb);
@@ -267,7 +251,7 @@ extern __inline__ void kfree_skb_fast(struct sk_buff *skb)
* shared data so must not be written to under normal circumstances.
*/
-extern __inline__ int skb_cloned(struct sk_buff *skb)
+static inline int skb_cloned(struct sk_buff *skb)
{
return skb->cloned && atomic_read(skb_datarefp(skb)) != 1;
}
@@ -280,7 +264,7 @@ extern __inline__ int skb_cloned(struct sk_buff *skb)
* buffer.
*/
-extern __inline__ int skb_shared(struct sk_buff *skb)
+static inline int skb_shared(struct sk_buff *skb)
{
return (atomic_read(&skb->users) != 1);
}
@@ -299,7 +283,7 @@ extern __inline__ int skb_shared(struct sk_buff *skb)
* NULL is returned on a memory allocation failure.
*/
-extern __inline__ struct sk_buff *skb_share_check(struct sk_buff *skb, int pri)
+static inline struct sk_buff *skb_share_check(struct sk_buff *skb, int pri)
{
if (skb_shared(skb)) {
struct sk_buff *nskb;
@@ -332,7 +316,7 @@ extern __inline__ struct sk_buff *skb_share_check(struct sk_buff *skb, int pri)
* %NULL is returned on a memory allocation failure.
*/
-extern __inline__ struct sk_buff *skb_unshare(struct sk_buff *skb, int pri)
+static inline struct sk_buff *skb_unshare(struct sk_buff *skb, int pri)
{
struct sk_buff *nskb;
if(!skb_cloned(skb))
@@ -356,7 +340,7 @@ extern __inline__ struct sk_buff *skb_unshare(struct sk_buff *skb, int pri)
* volatile. Use with caution.
*/
-extern __inline__ struct sk_buff *skb_peek(struct sk_buff_head *list_)
+static inline struct sk_buff *skb_peek(struct sk_buff_head *list_)
{
struct sk_buff *list = ((struct sk_buff *)list_)->next;
if (list == (struct sk_buff *)list_)
@@ -378,7 +362,7 @@ extern __inline__ struct sk_buff *skb_peek(struct sk_buff_head *list_)
* volatile. Use with caution.
*/
-extern __inline__ struct sk_buff *skb_peek_tail(struct sk_buff_head *list_)
+static inline struct sk_buff *skb_peek_tail(struct sk_buff_head *list_)
{
struct sk_buff *list = ((struct sk_buff *)list_)->prev;
if (list == (struct sk_buff *)list_)
@@ -393,12 +377,12 @@ extern __inline__ struct sk_buff *skb_peek_tail(struct sk_buff_head *list_)
* Return the length of an &sk_buff queue.
*/
-extern __inline__ __u32 skb_queue_len(struct sk_buff_head *list_)
+static inline __u32 skb_queue_len(struct sk_buff_head *list_)
{
return(list_->qlen);
}
-extern __inline__ void skb_queue_head_init(struct sk_buff_head *list)
+static inline void skb_queue_head_init(struct sk_buff_head *list)
{
spin_lock_init(&list->lock);
list->prev = (struct sk_buff *)list;
@@ -424,7 +408,7 @@ extern __inline__ void skb_queue_head_init(struct sk_buff_head *list)
* A buffer cannot be placed on two lists at the same time.
*/
-extern __inline__ void __skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
+static inline void __skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
{
struct sk_buff *prev, *next;
@@ -451,7 +435,7 @@ extern __inline__ void __skb_queue_head(struct sk_buff_head *list, struct sk_buf
* A buffer cannot be placed on two lists at the same time.
*/
-extern __inline__ void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
+static inline void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
{
unsigned long flags;
@@ -472,7 +456,7 @@ extern __inline__ void skb_queue_head(struct sk_buff_head *list, struct sk_buff
*/
-extern __inline__ void __skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
+static inline void __skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
{
struct sk_buff *prev, *next;
@@ -498,7 +482,7 @@ extern __inline__ void __skb_queue_tail(struct sk_buff_head *list, struct sk_buf
* A buffer cannot be placed on two lists at the same time.
*/
-extern __inline__ void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
+static inline void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
{
unsigned long flags;
@@ -516,7 +500,7 @@ extern __inline__ void skb_queue_tail(struct sk_buff_head *list, struct sk_buff
* returned or %NULL if the list is empty.
*/
-extern __inline__ struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
+static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
{
struct sk_buff *next, *prev, *result;
@@ -545,7 +529,7 @@ extern __inline__ struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
* returned or %NULL if the list is empty.
*/
-extern __inline__ struct sk_buff *skb_dequeue(struct sk_buff_head *list)
+static inline struct sk_buff *skb_dequeue(struct sk_buff_head *list)
{
long flags;
struct sk_buff *result;
@@ -560,7 +544,7 @@ extern __inline__ struct sk_buff *skb_dequeue(struct sk_buff_head *list)
* Insert a packet on a list.
*/
-extern __inline__ void __skb_insert(struct sk_buff *newsk,
+static inline void __skb_insert(struct sk_buff *newsk,
struct sk_buff * prev, struct sk_buff *next,
struct sk_buff_head * list)
{
@@ -582,7 +566,7 @@ extern __inline__ void __skb_insert(struct sk_buff *newsk,
* A buffer cannot be placed on two lists at the same time.
*/
-extern __inline__ void skb_insert(struct sk_buff *old, struct sk_buff *newsk)
+static inline void skb_insert(struct sk_buff *old, struct sk_buff *newsk)
{
unsigned long flags;
@@ -595,7 +579,7 @@ extern __inline__ void skb_insert(struct sk_buff *old, struct sk_buff *newsk)
* Place a packet after a given packet in a list.
*/
-extern __inline__ void __skb_append(struct sk_buff *old, struct sk_buff *newsk)
+static inline void __skb_append(struct sk_buff *old, struct sk_buff *newsk)
{
__skb_insert(newsk, old, old->next, old->list);
}
@@ -611,7 +595,7 @@ extern __inline__ void __skb_append(struct sk_buff *old, struct sk_buff *newsk)
*/
-extern __inline__ void skb_append(struct sk_buff *old, struct sk_buff *newsk)
+static inline void skb_append(struct sk_buff *old, struct sk_buff *newsk)
{
unsigned long flags;
@@ -625,7 +609,7 @@ extern __inline__ void skb_append(struct sk_buff *old, struct sk_buff *newsk)
* the list known..
*/
-extern __inline__ void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
+static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
{
struct sk_buff * next, * prev;
@@ -652,7 +636,7 @@ extern __inline__ void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *li
* destroyed.
*/
-extern __inline__ void skb_unlink(struct sk_buff *skb)
+static inline void skb_unlink(struct sk_buff *skb)
{
struct sk_buff_head *list = skb->list;
@@ -677,7 +661,7 @@ extern __inline__ void skb_unlink(struct sk_buff *skb)
* returned or %NULL if the list is empty.
*/
-extern __inline__ struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
+static inline struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
{
struct sk_buff *skb = skb_peek_tail(list);
if (skb)
@@ -694,7 +678,7 @@ extern __inline__ struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
* returned or %NULL if the list is empty.
*/
-extern __inline__ struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list)
+static inline struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list)
{
long flags;
struct sk_buff *result;
@@ -709,7 +693,7 @@ extern __inline__ struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list)
* Add data to an sk_buff
*/
-extern __inline__ unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
+static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
{
unsigned char *tmp=skb->tail;
skb->tail+=len;
@@ -727,7 +711,7 @@ extern __inline__ unsigned char *__skb_put(struct sk_buff *skb, unsigned int len
* first byte of the extra data is returned.
*/
-extern __inline__ unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
+static inline unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
{
unsigned char *tmp=skb->tail;
skb->tail+=len;
@@ -738,7 +722,7 @@ extern __inline__ unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
return tmp;
}
-extern __inline__ unsigned char *__skb_push(struct sk_buff *skb, unsigned int len)
+static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len)
{
skb->data-=len;
skb->len+=len;
@@ -755,7 +739,7 @@ extern __inline__ unsigned char *__skb_push(struct sk_buff *skb, unsigned int le
* panic. A pointer to the first byte of the extra data is returned.
*/
-extern __inline__ unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
+static inline unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
{
skb->data-=len;
skb->len+=len;
@@ -765,7 +749,7 @@ extern __inline__ unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
return skb->data;
}
-extern __inline__ char *__skb_pull(struct sk_buff *skb, unsigned int len)
+static inline char *__skb_pull(struct sk_buff *skb, unsigned int len)
{
skb->len-=len;
return skb->data+=len;
@@ -782,7 +766,7 @@ extern __inline__ char *__skb_pull(struct sk_buff *skb, unsigned int len)
* the old data.
*/
-extern __inline__ unsigned char * skb_pull(struct sk_buff *skb, unsigned int len)
+static inline unsigned char * skb_pull(struct sk_buff *skb, unsigned int len)
{
if (len > skb->len)
return NULL;
@@ -796,7 +780,7 @@ extern __inline__ unsigned char * skb_pull(struct sk_buff *skb, unsigned int len
* Return the number of bytes of free space at the head of an &sk_buff.
*/
-extern __inline__ int skb_headroom(const struct sk_buff *skb)
+static inline int skb_headroom(const struct sk_buff *skb)
{
return skb->data-skb->head;
}
@@ -808,7 +792,7 @@ extern __inline__ int skb_headroom(const struct sk_buff *skb)
* Return the number of bytes of free space at the tail of an sk_buff
*/
-extern __inline__ int skb_tailroom(const struct sk_buff *skb)
+static inline int skb_tailroom(const struct sk_buff *skb)
{
return skb->end-skb->tail;
}
@@ -822,14 +806,14 @@ extern __inline__ int skb_tailroom(const struct sk_buff *skb)
* room. This is only allowed for an empty buffer.
*/
-extern __inline__ void skb_reserve(struct sk_buff *skb, unsigned int len)
+static inline void skb_reserve(struct sk_buff *skb, unsigned int len)
{
skb->data+=len;
skb->tail+=len;
}
-extern __inline__ void __skb_trim(struct sk_buff *skb, unsigned int len)
+static inline void __skb_trim(struct sk_buff *skb, unsigned int len)
{
skb->len = len;
skb->tail = skb->data+len;
@@ -844,7 +828,7 @@ extern __inline__ void __skb_trim(struct sk_buff *skb, unsigned int len)
* the buffer is already under the length specified it is not modified.
*/
-extern __inline__ void skb_trim(struct sk_buff *skb, unsigned int len)
+static inline void skb_trim(struct sk_buff *skb, unsigned int len)
{
if (skb->len > len) {
__skb_trim(skb, len);
@@ -861,7 +845,7 @@ extern __inline__ void skb_trim(struct sk_buff *skb, unsigned int len)
*/
-extern __inline__ void skb_orphan(struct sk_buff *skb)
+static inline void skb_orphan(struct sk_buff *skb)
{
if (skb->destructor)
skb->destructor(skb);
@@ -879,7 +863,7 @@ extern __inline__ void skb_orphan(struct sk_buff *skb)
*/
-extern __inline__ void skb_queue_purge(struct sk_buff_head *list)
+static inline void skb_queue_purge(struct sk_buff_head *list)
{
struct sk_buff *skb;
while ((skb=skb_dequeue(list))!=NULL)
@@ -896,7 +880,7 @@ extern __inline__ void skb_queue_purge(struct sk_buff_head *list)
*/
-extern __inline__ void __skb_queue_purge(struct sk_buff_head *list)
+static inline void __skb_queue_purge(struct sk_buff_head *list)
{
struct sk_buff *skb;
while ((skb=__skb_dequeue(list))!=NULL)
@@ -916,7 +900,7 @@ extern __inline__ void __skb_queue_purge(struct sk_buff_head *list)
* allocates memory it can be called from an interrupt.
*/
-extern __inline__ struct sk_buff *dev_alloc_skb(unsigned int length)
+static inline struct sk_buff *dev_alloc_skb(unsigned int length)
{
struct sk_buff *skb;
@@ -942,7 +926,7 @@ extern __inline__ struct sk_buff *dev_alloc_skb(unsigned int length)
*/
-extern __inline__ struct sk_buff *
+static inline struct sk_buff *
skb_cow(struct sk_buff *skb, unsigned int headroom)
{
headroom = (headroom+15)&~15;
@@ -965,13 +949,13 @@ extern void skb_init(void);
extern void skb_add_mtu(int mtu);
#ifdef CONFIG_NETFILTER
-extern __inline__ void
+static inline void
nf_conntrack_put(struct nf_ct_info *nfct)
{
if (nfct && atomic_dec_and_test(&nfct->master->use))
nfct->master->destroy(nfct->master);
}
-extern __inline__ void
+static inline void
nf_conntrack_get(struct nf_ct_info *nfct)
{
if (nfct)
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 3401ce5df..6c590a531 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -190,10 +190,10 @@ struct ucred {
/* Maximum queue length specifiable by listen. */
#define SOMAXCONN 128
-/* Flags we can use with send/ and recv.
+/* Flags we can use with send/ and recv.
Added those for 1003.1g not all are supported yet
*/
-
+
#define MSG_OOB 1
#define MSG_PEEK 2
#define MSG_DONTROUTE 4
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index 0d09eb48a..4cc0f16ad 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -30,7 +30,7 @@ struct rpc_portmap {
* The high-level client handle
*/
struct rpc_clnt {
- unsigned int cl_users; /* number of references */
+ atomic_t cl_users; /* number of references */
struct rpc_xprt * cl_xprt; /* transport */
struct rpc_procinfo * cl_procinfo; /* procedure info */
u32 cl_maxproc; /* max procedure number */
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h
index c82289283..eb55e776c 100644
--- a/include/linux/sunrpc/debug.h
+++ b/include/linux/sunrpc/debug.h
@@ -9,13 +9,17 @@
#ifndef _LINUX_SUNRPC_DEBUG_H_
#define _LINUX_SUNRPC_DEBUG_H_
+#include <linux/config.h>
+
#include <linux/timer.h>
#include <linux/tqueue.h>
/*
* Enable RPC debugging/profiling.
*/
+#ifdef CONFIG_SYSCTL
#define RPC_DEBUG
+#endif
/* #define RPC_PROFILE */
/*
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 9226ce0a5..5ee3b7b77 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -161,6 +161,16 @@ static inline int is_page_shared(struct page *page)
extern spinlock_t pagemap_lru_lock;
/*
+ * Magic constants for page aging. If the system is programmed
+ * right, tweaking these should have almost no effect...
+ * The 2.4 code, however, is mostly simple and stable ;)
+ */
+#define PG_AGE_MAX 64
+#define PG_AGE_START 2
+#define PG_AGE_ADV 3
+#define PG_AGE_DECL 1
+
+/*
* Helper macros for lru_pages handling.
*/
#define lru_cache_add(page) \
@@ -168,12 +178,16 @@ do { \
spin_lock(&pagemap_lru_lock); \
list_add(&(page)->lru, &lru_cache); \
nr_lru_pages++; \
+ page->age = PG_AGE_START; \
+ ClearPageReferenced(page); \
+ SetPageActive(page); \
spin_unlock(&pagemap_lru_lock); \
} while (0)
#define __lru_cache_del(page) \
do { \
list_del(&(page)->lru); \
+ ClearPageActive(page); \
nr_lru_pages--; \
} while (0)
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 923a7a111..b374bb9c6 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -545,8 +545,11 @@ enum {
/* /proc/sys/dev/parport/parport n */
enum {
DEV_PARPORT_SPINTIME=1,
- DEV_PARPORT_HARDWARE=2,
- DEV_PARPORT_DEVICES=3,
+ DEV_PARPORT_BASE_ADDR=2,
+ DEV_PARPORT_IRQ=3,
+ DEV_PARPORT_DMA=4,
+ DEV_PARPORT_MODES=5,
+ DEV_PARPORT_DEVICES=6,
DEV_PARPORT_AUTOPROBE=16
};
diff --git a/include/linux/sysv_fs.h b/include/linux/sysv_fs.h
index d9c2557e5..4cff4260c 100644
--- a/include/linux/sysv_fs.h
+++ b/include/linux/sysv_fs.h
@@ -377,9 +377,9 @@ extern unsigned long sysv_count_free_blocks(struct super_block *sb);
extern struct buffer_head * sysv_file_bread(struct inode *, int, int);
extern void sysv_truncate(struct inode *);
-extern void sysv_write_inode(struct inode *);
+extern void sysv_write_inode(struct inode *, int);
extern int sysv_sync_inode(struct inode *);
-extern int sysv_sync_file(struct file *, struct dentry *);
+extern int sysv_sync_file(struct file *, struct dentry *, int);
extern int sysv_notify_change(struct dentry *, struct iattr *);
extern struct inode_operations sysv_file_inode_operations;
diff --git a/include/linux/timer.h b/include/linux/timer.h
index 2de8050ea..45887372a 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -1,6 +1,8 @@
#ifndef _LINUX_TIMER_H
#define _LINUX_TIMER_H
+#ifdef __KERNEL__
+
#include <linux/config.h>
#include <linux/list.h>
@@ -91,9 +93,11 @@ extern int del_timer_sync(struct timer_list * timer);
#define timer_set_running(t) (void)(t)
#define timer_is_running(t) (0)
#define timer_synchronize(t) do { (void)(t); barrier(); } while(0)
-#define del_timer_sync(t) del_timer(t)
+#define del_timer_sync del_timer
#endif
+#define del_timer_async del_timer
+
/*
* These inlines deal with timer wrapping correctly. You are
* strongly encouraged to use them
@@ -112,3 +116,4 @@ extern int del_timer_sync(struct timer_list * timer);
#define time_before_eq(a,b) time_after_eq(b,a)
#endif
+#endif
diff --git a/include/linux/tqueue.h b/include/linux/tqueue.h
index 934850f26..85517135d 100644
--- a/include/linux/tqueue.h
+++ b/include/linux/tqueue.h
@@ -80,7 +80,7 @@ extern spinlock_t tqueue_lock;
/*
* queue_task
*/
-extern __inline__ void queue_task(struct tq_struct *bh_pointer,
+static inline void queue_task(struct tq_struct *bh_pointer,
task_queue *bh_list)
{
if (!test_and_set_bit(0,&bh_pointer->sync)) {
@@ -95,7 +95,7 @@ extern __inline__ void queue_task(struct tq_struct *bh_pointer,
/*
* Call all "bottom halfs" on a given list.
*/
-extern __inline__ void run_task_queue(task_queue *list)
+static inline void run_task_queue(task_queue *list)
{
if (*list) {
unsigned long flags;
diff --git a/include/linux/types.h b/include/linux/types.h
index 196c5f4e0..df4808fcd 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -1,7 +1,10 @@
#ifndef _LINUX_TYPES_H
#define _LINUX_TYPES_H
+#ifdef __KERNEL__
#include <linux/config.h>
+#endif
+
#include <linux/posix_types.h>
#include <asm/types.h>
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index 96cb38e67..3c8f1d415 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -560,9 +560,8 @@ extern struct inode * ufs_new_inode (const struct inode *, int, int *);
extern int ufs_frag_map (struct inode *, int);
extern void ufs_read_inode (struct inode *);
extern void ufs_put_inode (struct inode *);
-extern void ufs_write_inode (struct inode *);
+extern void ufs_write_inode (struct inode *, int);
extern int ufs_sync_inode (struct inode *);
-extern void ufs_write_inode (struct inode *);
extern void ufs_delete_inode (struct inode *);
extern struct buffer_head * ufs_getfrag (struct inode *, unsigned, int, int *);
extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *);
diff --git a/include/linux/umsdos_fs.p b/include/linux/umsdos_fs.p
index 76436a479..677bee22e 100644
--- a/include/linux/umsdos_fs.p
+++ b/include/linux/umsdos_fs.p
@@ -48,7 +48,7 @@ int umsdos_isempty (struct dentry *);
/* inode.c 12/06/95 09.49.40 */
void fill_new_filp (struct file *filp, struct dentry *dentry);
void UMSDOS_read_inode (struct inode *);
-void UMSDOS_write_inode (struct inode *);
+void UMSDOS_write_inode (struct inode *, int);
int UMSDOS_notify_change (struct dentry *, struct iattr *attr);
int umsdos_notify_change_locked(struct dentry *, struct iattr *attr);
void UMSDOS_put_inode (struct inode *);
diff --git a/include/linux/usb.h b/include/linux/usb.h
index a7c8fb324..1b1d3f902 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -307,6 +307,10 @@ struct usb_driver {
struct file_operations *fops;
int minor;
+
+ struct semaphore serialize;
+
+ int (*ioctl)(struct usb_device *dev, unsigned int code, void *buf);
};
/*
@@ -331,6 +335,9 @@ typedef int (*usb_device_irq)(int, void *, int, void *);
* New USB Structures *
*----------------------------------------------------------------------------*/
+/*
+ * urb->transfer_flags:
+ */
#define USB_DISABLE_SPD 0x0001
#define USB_ISO_ASAP 0x0002
#define USB_URB_EARLY_COMPLETE 0x0004
@@ -362,10 +369,11 @@ typedef struct urb
void *transfer_buffer; // associated data buffer
int transfer_buffer_length; // data buffer length
int actual_length; // actual data buffer length
+ int bandwidth; // bandwidth for this transfer request (INT or ISO)
unsigned char *setup_packet; // setup packet (control only)
//
int start_frame; // start frame (iso/irq only)
- int number_of_packets; // number of packets in this request (iso/irq only)
+ int number_of_packets; // number of packets in this request (iso)
int interval; // polling interval (irq only)
int error_count; // number of errors in this transfer (iso only)
int timeout; // timeout (in jiffies)
@@ -483,7 +491,7 @@ struct usb_bus {
struct list_head bus_list;
void *hcpriv; /* Host Controller private data */
- unsigned int bandwidth_allocated; /* on this Host Controller; */
+ int bandwidth_allocated; /* on this Host Controller; */
/* applies to Int. and Isoc. pipes; */
/* measured in microseconds/frame; */
/* range is 0..900, where 900 = */
@@ -492,7 +500,7 @@ struct usb_bus {
int bandwidth_isoc_reqs; /* number of Isoc. requesters */
/* usbdevfs inode list */
- struct list_head inodes;
+ struct list_head inodes;
};
#define USB_MAXCHILDREN (8) /* This is arbitrary */
@@ -506,7 +514,6 @@ struct usb_device {
unsigned int toggle[2]; /* one bit for each endpoint ([0] = IN, [1] = OUT) */
unsigned int halted[2]; /* endpoint halts; one bit per endpoint # & direction; */
/* [0] = IN, [1] = OUT */
- struct usb_config_descriptor *actconfig;/* the active configuration */
int epmaxpacketin[16]; /* INput endpoint specific maximums */
int epmaxpacketout[16]; /* OUTput endpoint specific maximums */
@@ -515,6 +522,9 @@ struct usb_device {
struct usb_device_descriptor descriptor;/* Descriptor */
struct usb_config_descriptor *config; /* All of the configs */
+ struct usb_config_descriptor *actconfig;/* the active configuration */
+
+ char **rawdescriptors; /* Raw descriptors for each config */
int have_langid; /* whether string_langid is valid yet */
int string_langid; /* language ID for strings */
@@ -522,8 +532,8 @@ struct usb_device {
void *hcpriv; /* Host Controller private data */
/* usbdevfs inode list */
- struct list_head inodes;
- struct list_head filelist;
+ struct list_head inodes;
+ struct list_head filelist;
/*
* Child devices - these can be either new devices
@@ -537,6 +547,8 @@ struct usb_device {
struct usb_device *children[USB_MAXCHILDREN];
};
+extern struct usb_interface *usb_ifnum_to_if(struct usb_device *dev, unsigned ifnum);
+
extern int usb_register(struct usb_driver *);
extern void usb_deregister(struct usb_driver *);
@@ -554,7 +566,10 @@ extern struct usb_device *usb_alloc_dev(struct usb_device *parent, struct usb_bu
extern void usb_free_dev(struct usb_device *);
extern void usb_inc_dev_use(struct usb_device *);
#define usb_dec_dev_use usb_free_dev
-extern void usb_release_bandwidth(struct usb_device *, int);
+
+extern int usb_check_bandwidth (struct usb_device *dev, struct urb *urb);
+extern void usb_claim_bandwidth (struct usb_device *dev, struct urb *urb, int bustime, int isoc);
+extern void usb_release_bandwidth(struct usb_device *dev, struct urb *urb, int isoc);
extern int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void *data, __u16 size, int timeout);
@@ -671,6 +686,7 @@ int usb_get_class_descriptor(struct usb_device *dev, int ifnum, unsigned char de
int usb_get_device_descriptor(struct usb_device *dev);
int __usb_get_extra_descriptor(char *buffer, unsigned size, unsigned char type, void **ptr);
int usb_get_status(struct usb_device *dev, int type, int target, void *data);
+int usb_get_configuration(struct usb_device *dev);
int usb_get_protocol(struct usb_device *dev, int ifnum);
int usb_set_protocol(struct usb_device *dev, int ifnum, int protocol);
int usb_set_interface(struct usb_device *dev, int ifnum, int alternate);
@@ -682,6 +698,7 @@ int usb_set_report(struct usb_device *dev, int ifnum, unsigned char type,
unsigned char id, void *buf, int size);
int usb_string(struct usb_device *dev, int index, char *buf, size_t size);
int usb_clear_halt(struct usb_device *dev, int pipe);
+void usb_set_maxpacket(struct usb_device *dev);
#define usb_get_extra_descriptor(ifpoint,type,ptr)\
__usb_get_extra_descriptor((ifpoint)->extra,(ifpoint)->extralen,type,(void**)ptr)
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h
index 7fa98fcb5..0bf8d3087 100644
--- a/include/linux/usbdevice_fs.h
+++ b/include/linux/usbdevice_fs.h
@@ -66,6 +66,18 @@ struct usbdevfs_disconnectsignal {
void *context;
};
+#define USBDEVFS_MAXDRIVERNAME 255
+
+struct usbdevfs_getdriver {
+ unsigned int interface;
+ char driver[USBDEVFS_MAXDRIVERNAME + 1];
+};
+
+struct usbdevfs_connectinfo {
+ unsigned int devnum;
+ unsigned char slow;
+};
+
#define USBDEVFS_URB_DISABLE_SPD 1
#define USBDEVFS_URB_ISO_ASAP 2
@@ -96,11 +108,27 @@ struct usbdevfs_urb {
struct usbdevfs_iso_packet_desc iso_frame_desc[0];
};
+/* ioctls for talking to drivers in the usbcore module: */
+struct usbdevfs_ioctl {
+ int ifno; /* interface 0..N ; negative numbers reserved */
+ int ioctl_code; /* MUST encode size + direction of data so the
+ * macros in <asm/ioctl.h> give correct values */
+ void *data; /* param buffer (in, or out) */
+};
+
+/* You can do most things with hubs just through control messages,
+ * except find out what device connects to what port. */
+struct usbdevfs_hub_portinfo {
+ char nports; /* number of downstream ports in this hub */
+ char port [127]; /* e.g. port 3 connects to device 27 */
+};
+
#define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer)
#define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer)
#define USBDEVFS_RESETEP _IOR('U', 3, unsigned int)
#define USBDEVFS_SETINTERFACE _IOR('U', 4, struct usbdevfs_setinterface)
#define USBDEVFS_SETCONFIGURATION _IOR('U', 5, unsigned int)
+#define USBDEVFS_GETDRIVER _IOW('U', 8, struct usbdevfs_getdriver)
#define USBDEVFS_SUBMITURB _IOR('U', 10, struct usbdevfs_urb)
#define USBDEVFS_DISCARDURB _IO('U', 11)
#define USBDEVFS_REAPURB _IOW('U', 12, void *)
@@ -108,6 +136,10 @@ struct usbdevfs_urb {
#define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal)
#define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int)
#define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int)
+#define USBDEVFS_CONNECTINFO _IOW('U', 17, struct usbdevfs_connectinfo)
+#define USBDEVFS_IOCTL _IOWR('U', 18, struct usbdevfs_ioctl)
+#define USBDEVFS_HUB_PORTINFO _IOR('U', 19, struct usbdevfs_hub_portinfo)
+#define USBDEVFS_RESET _IO('U', 20)
/* --------------------------------------------------------------------- */
@@ -165,7 +197,6 @@ extern struct inode_operations usbdevfs_bus_inode_operations;
extern struct file_operations usbdevfs_bus_file_operations;
extern void usbdevfs_conn_disc_event(void);
-
#endif /* __KERNEL__ */
/* --------------------------------------------------------------------- */
diff --git a/include/linux/wrapper.h b/include/linux/wrapper.h
index bcfaff073..36d80ef1e 100644
--- a/include/linux/wrapper.h
+++ b/include/linux/wrapper.h
@@ -19,9 +19,6 @@
#define module_unregister_blkdev unregister_blkdev
#define inode_get_rdev(i) i->i_rdev
-#define inode_get_count(i) i->i_count
-#define inode_inc_count(i) i->i_count++
-#define inode_dec_count(i) i->i_count--
#define file_get_flags(f) f->f_flags