summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-07-29 03:58:24 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-07-29 03:58:24 +0000
commit1c5c0c934f91fbce2825acbb849e98781e774c1d (patch)
tree12b5ae03516d4103bc070e4579ae1f7f71c27d24 /include
parent4fe70c31de87823ac9e804f4795589ba74dc6971 (diff)
Merge with 2.1.47. Some more cleanup and module fixes.
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/bitops.h4
-rw-r--r--include/linux/dcache.h4
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/lp.h2
-rw-r--r--include/linux/msdos_fs.h35
-rw-r--r--include/linux/nfsd/export.h2
-rw-r--r--include/linux/nfsd/nfsd.h5
-rw-r--r--include/linux/nfsd/nfsfh.h48
-rw-r--r--include/linux/nfsd/syscall.h4
-rw-r--r--include/linux/nfsd/xdr.h3
-rw-r--r--include/linux/parport.h217
-rw-r--r--include/linux/rocket.h55
-rw-r--r--include/linux/timer.h1
13 files changed, 241 insertions, 141 deletions
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h
index 59a6ccbba..a059bb178 100644
--- a/include/asm-mips/bitops.h
+++ b/include/asm-mips/bitops.h
@@ -531,14 +531,16 @@ found_middle:
#define ext2_find_next_zero_bit(addr, size, offset) \
find_next_zero_bit((addr), (size), (offset))
+#endif /* !(__MIPSEB__) */
+
/*
* Bitmap functions for the minix filesystem.
* FIXME: These assume that Minix uses the native byte/bitorder.
+ * This limits the Minix filesystem's value for data exchange very much.
*/
#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
-#endif /* __KERNEL__ */
#endif /* __ASM_MIPS_BITOPS_H */
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 1ca8af0d7..5a1dc90bf 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -98,6 +98,10 @@ extern void d_move(struct dentry * entry, struct dentry * newparent, struct qstr
/* appendix may either be NULL or be used for transname suffixes */
extern struct dentry * d_lookup(struct dentry * dir, struct qstr * name);
+/* validate "insecure" dentry pointer */
+extern int d_validate(struct dentry *dentry, struct dentry *dparent,
+ unsigned int hash, unsigned int len);
+
/* write full pathname into buffer and return length */
extern int d_path(struct dentry * entry, struct dentry * chroot, char * buf);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index b459e966c..4ccb6d569 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -677,6 +677,7 @@ extern void invalidate_inode_pages(struct inode *);
extern void invalidate_buffers(kdev_t dev);
extern int floppy_is_wp(int minor);
extern void sync_inodes(kdev_t dev);
+extern void write_inode_now(struct inode *inode);
extern void sync_dev(kdev_t dev);
extern int fsync_dev(kdev_t dev);
extern void sync_supers(kdev_t dev);
@@ -812,6 +813,7 @@ extern int dcache_lookup(struct inode *, const char *, int, unsigned long *);
extern int inode_change_ok(struct inode *, struct iattr *);
extern void inode_setattr(struct inode *, struct iattr *);
+extern int notify_change(struct inode * inode, struct iattr * attr);
/* kludge to get SCSI modules working */
#include <linux/minix_fs.h>
diff --git a/include/linux/lp.h b/include/linux/lp.h
index 18076c1af..5554600a2 100644
--- a/include/linux/lp.h
+++ b/include/linux/lp.h
@@ -113,7 +113,7 @@ struct lp_stats {
};
struct lp_struct {
- struct ppd *dev;
+ struct pardevice *dev;
int flags;
unsigned int chars;
unsigned int time;
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index 0badd9ebe..fb17117a0 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -211,6 +211,7 @@ int get_cluster(struct inode *inode,int cluster);
extern int fat_bmap(struct inode *inode,int block);
extern int fat_notify_change(struct inode *,struct iattr *);
extern void fat_put_inode(struct inode *inode);
+extern void fat_delete_inode(struct inode *inode);
extern void fat_put_super(struct super_block *sb);
extern void fat_read_inode(struct inode *inode, struct inode_operations *dir_ops);
extern struct super_block *fat_read_super(struct super_block *s, void *data, int silent);
@@ -252,34 +253,30 @@ extern struct super_block *msdos_read_super(struct super_block *sb,void *data, i
/* msdos.c - these are for Umsdos */
extern void msdos_read_inode(struct inode *inode);
-extern int msdos_lookup(struct inode *dir,const char *name,int len,
- struct inode **result);
-extern int msdos_create(struct inode *dir,const char *name,int len,int mode,
- struct inode **result);
-extern int msdos_rmdir(struct inode *dir,const char *name,int len);
-extern int msdos_mkdir(struct inode *dir,const char *name,int len,int mode);
-extern int msdos_unlink(struct inode *dir,const char *name,int len);
-extern int msdos_unlink_umsdos(struct inode *dir,const char *name,int len);
-extern int msdos_rename(struct inode *old_dir,const char *old_name,int old_len,
- struct inode *new_dir,const char *new_name,int new_len);
+extern int msdos_lookup(struct inode *dir,struct dentry *);
+extern int msdos_create(struct inode *dir,struct dentry *dentry,int mode);
+extern int msdos_rmdir(struct inode *dir,struct dentry *dentry);
+extern int msdos_mkdir(struct inode *dir,struct dentry *dentry,int mode);
+extern int msdos_unlink(struct inode *dir,struct dentry *dentry);
+extern int msdos_unlink_umsdos(struct inode *dir,struct dentry *dentry);
+extern int msdos_rename(struct inode *old_dir,struct dentry *old_dentry,
+ struct inode *new_dir,struct dentry *new_dentry);
/* fatfs_syms.c */
extern int init_fat_fs(void);
/* vfat/namei.c - these are for dmsdos */
-extern int vfat_create(struct inode *dir,const char *name,int len,int mode,
- struct inode **result);
-extern int vfat_unlink(struct inode *dir,const char *name,int len);
-extern int vfat_mkdir(struct inode *dir,const char *name,int len,int mode);
-extern int vfat_rmdir(struct inode *dir,const char *name,int len);
-extern int vfat_rename(struct inode *old_dir,const char *old_name,int old_len,
- struct inode *new_dir,const char *new_name,int new_len);
+extern int vfat_create(struct inode *dir,struct dentry *dentry,int mode);
+extern int vfat_unlink(struct inode *dir,struct dentry *dentry);
+extern int vfat_mkdir(struct inode *dir,struct dentry *dentry,int mode);
+extern int vfat_rmdir(struct inode *dir,struct dentry *dentry);
+extern int vfat_rename(struct inode *old_dir,struct dentry *old_dentry,
+ struct inode *new_dir,struct dentry *new_dentry);
extern void vfat_put_super(struct super_block *sb);
extern struct super_block *vfat_read_super(struct super_block *sb,void *data,
int silent);
extern void vfat_read_inode(struct inode *inode);
-extern int vfat_lookup(struct inode *dir,const char *name,int len,
- struct inode **result);
+extern int vfat_lookup(struct inode *dir,struct dentry *);
#endif /* __KERNEL__ */
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
index b0e3499ec..355e96251 100644
--- a/include/linux/nfsd/export.h
+++ b/include/linux/nfsd/export.h
@@ -59,7 +59,7 @@ struct svc_export {
struct svc_export * ex_parent;
struct svc_client * ex_client;
int ex_flags;
- struct inode * ex_inode;
+ struct dentry * ex_dentry;
dev_t ex_dev;
ino_t ex_ino;
uid_t ex_anon_uid;
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index ed42bb042..4869c7ef8 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -109,10 +109,7 @@ int nfsd_readdir(struct svc_rqst *, struct svc_fh *,
int nfsd_statfs(struct svc_rqst *, struct svc_fh *,
struct statfs *);
int nfsd_notify_change(struct inode *, struct iattr *);
-int nfsd_permission(struct svc_export *, struct inode *, int);
-void nfsd_write_inode(struct inode *);
-struct inode * nfsd_iget(dev_t dev, ino_t ino);
-int nfsd_parentdev(dev_t *devp);
+int nfsd_permission(struct svc_export *, struct dentry *, int);
/*
* lockd binding
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h
index 75c2c91b2..ae88f161d 100644
--- a/include/linux/nfsd/nfsfh.h
+++ b/include/linux/nfsd/nfsfh.h
@@ -21,18 +21,18 @@
#include <linux/nfsd/debug.h>
/*
- * This is our NFSv2 file handle.
+ * This is the new "dentry style" Linux NFSv2 file handle.
*
- * The xdev and xino fields are currently used to transport the dev/ino
- * of the exported inode. The xdev field is redundant, though, because
- * we do not allow mount point crossing.
+ * The xino and xdev fields are currently used to transport the
+ * ino/dev of the exported inode.
*/
struct nfs_fhbase {
- dev_t fb_dev;
- dev_t fb_xdev;
- ino_t fb_ino;
+ struct dentry *fb_dentry;
+ struct dentry *fb_dparent;
+ unsigned int fb_dhash;
+ unsigned int fb_dlen;
ino_t fb_xino;
- __u32 fb_version;
+ dev_t fb_xdev;
};
#define NFS_FH_PADDING (NFS_FHSIZE - sizeof(struct nfs_fhbase))
@@ -41,11 +41,12 @@ struct knfs_fh {
__u8 fh_cookie[NFS_FH_PADDING];
};
-#define fh_dev fh_base.fb_dev
-#define fh_xdev fh_base.fb_xdev
-#define fh_ino fh_base.fb_ino
+#define fh_dentry fh_base.fb_dentry
+#define fh_dparent fh_base.fb_dparent
+#define fh_dhash fh_base.fb_dhash
+#define fh_dlen fh_base.fb_dlen
#define fh_xino fh_base.fb_xino
-#define fh_version fh_base.fb_version
+#define fh_xdev fh_base.fb_xdev
#ifdef __KERNEL__
@@ -57,26 +58,24 @@ struct knfs_fh {
typedef struct svc_fh {
struct knfs_fh fh_handle; /* FH data */
struct svc_export * fh_export; /* export pointer */
- struct dentry * fh_dentry; /* file */
size_t fh_pre_size; /* size before operation */
time_t fh_pre_mtime; /* mtime before oper */
time_t fh_pre_ctime; /* ctime before oper */
unsigned long fh_post_version;/* inode version after oper */
unsigned char fh_locked; /* inode locked by us */
+ unsigned char fh_dverified; /* dentry has been checked */
} svc_fh;
/*
- * Shorthands for dprintk()'s
+ * Shorthand for dprintk()'s
*/
-#define SVCFH_INO(f) ((f)->fh_handle.fh_ino)
-#define SVCFH_DEV(f) ((f)->fh_handle.fh_dev)
+#define SVCFH_DENTRY(f) ((f)->fh_handle.fh_dentry)
/*
* Function prototypes
*/
-u32 fh_lookup(struct svc_rqst *, struct svc_fh *, int, int);
-void fh_compose(struct svc_fh *, struct svc_export *,
- struct inode *);
+u32 fh_verify(struct svc_rqst *, struct svc_fh *, int, int);
+void fh_compose(struct svc_fh *, struct svc_export *, struct dentry *);
static __inline__ struct svc_fh *
fh_copy(struct svc_fh *dst, struct svc_fh *src)
@@ -98,7 +97,7 @@ fh_init(struct svc_fh *fhp)
static inline void
fh_lock(struct svc_fh *fhp)
{
- struct inode *inode = fhp->fh_dentry->d_inode;
+ struct inode *inode = fhp->fh_handle.fh_dentry->d_inode;
/*
dfprintk(FILEOP, "nfsd: fh_lock(%x/%ld) locked = %d\n",
@@ -118,7 +117,7 @@ fh_lock(struct svc_fh *fhp)
static inline void
fh_unlock(struct svc_fh *fhp)
{
- struct inode *inode = fhp->fh_dentry->d_inode;
+ struct inode *inode = fhp->fh_handle.fh_dentry->d_inode;
if (fhp->fh_locked) {
if (!fhp->fh_post_version)
@@ -135,9 +134,9 @@ fh_unlock(struct svc_fh *fhp)
static inline void
fh_put(struct svc_fh *fhp)
{
- if (fhp->fh_dentry) {
+ if (fhp->fh_dverified) {
fh_unlock(fhp);
- dput(fhp->fh_dentry);
+ dput(fhp->fh_handle.fh_dentry);
}
}
#else
@@ -148,9 +147,10 @@ __fh_put(struct svc_fh *fhp, char *file, int line)
{
struct dentry *dentry;
- if (!(dentry = fhp->fh_dentry))
+ if (!fhp->fh_dverified)
return;
+ dentry = fhp->fh_handle.fh_dentry;
if (!dentry->d_count) {
printk("nfsd: trying to free free dentry in %s:%d\n"
" file %s/%s\n",
diff --git a/include/linux/nfsd/syscall.h b/include/linux/nfsd/syscall.h
index 98c5d5a6e..690f0095f 100644
--- a/include/linux/nfsd/syscall.h
+++ b/include/linux/nfsd/syscall.h
@@ -111,11 +111,11 @@ union nfsctl_res {
/*
* Kernel syscall implementation.
*/
-#ifdef CONFIG_NFSD
+#if defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)
extern asmlinkage int sys_nfsservctl(int, struct nfsctl_arg *,
union nfsctl_res *);
#else
-# define sys_nfsservctl sys_ni_syscall
+#define sys_nfsservctl sys_ni_syscall
#endif
extern int exp_addclient(struct nfsctl_client *ncp);
extern int exp_delclient(struct nfsctl_client *ncp);
diff --git a/include/linux/nfsd/xdr.h b/include/linux/nfsd/xdr.h
index 3ff82382e..bc47b8bac 100644
--- a/include/linux/nfsd/xdr.h
+++ b/include/linux/nfsd/xdr.h
@@ -150,9 +150,10 @@ int nfssvc_encode_readlinkres(struct svc_rqst *, u32 *, struct nfsd_readlinkres
int nfssvc_encode_readres(struct svc_rqst *, u32 *, struct nfsd_readres *);
int nfssvc_encode_statfsres(struct svc_rqst *, u32 *, struct nfsd_statfsres *);
int nfssvc_encode_readdirres(struct svc_rqst *, u32 *, struct nfsd_readdirres *);
-int nfssvc_release_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *);
int nfssvc_encode_entry(struct readdir_cd *, const char *name,
int namlen, off_t offset, ino_t ino);
+int nfssvc_release_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *);
+
#endif /* LINUX_NFSD_H */
diff --git a/include/linux/parport.h b/include/linux/parport.h
index 93cc5bd51..45c55f5a3 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -1,4 +1,4 @@
-/* $Id: parport.h,v 1.2.6.3 1997/04/16 21:21:03 phil Exp $ */
+/* $Id: parport.h,v 1.2.6.3.2.2 1997/04/18 15:03:53 phil Exp $ */
#ifndef _PARPORT_H_
#define _PARPORT_H_
@@ -11,12 +11,92 @@
#define PARPORT_MAX 8
/* Magic numbers */
-#define PARPORT_IRQ_NONE -1
-#define PARPORT_DMA_NONE -1
+#define PARPORT_IRQ_NONE -2
+#define PARPORT_DMA_NONE -2
+#define PARPORT_IRQ_AUTO -1
+#define PARPORT_DMA_AUTO -1
#define PARPORT_DISABLE -2
-/* Type classes for Plug-and-Play probe */
+/* Define this later. */
+struct parport;
+
+struct pc_parport_state {
+ unsigned int ctr;
+ unsigned int ecr;
+};
+
+struct parport_state {
+ union {
+ struct pc_parport_state pc;
+ /* ARC has no state. */
+ void *misc;
+ } u;
+};
+/* Generic operations vector through the dispatch table. */
+#define parport_write_data(p,x) (p)->ops->write_data(p,x)
+#define parport_read_data(p) (p)->ops->read_data(p)
+#define parport_write_control(p,x) (p)->ops->write_control(p,x)
+#define parport_read_control(p) (p)->ops->read_control(p)
+#define parport_frob_control(p,m,v) (p)->ops->frob_control(p,m,v)
+#define parport_write_econtrol(p,x) (p)->ops->write_econtrol(p,x)
+#define parport_read_econtrol(p) (p)->ops->read_econtrol(p)
+#define parport_frob_econtrol(p,m,v) (p)->ops->frob_econtrol(p,m,v)
+#define parport_write_status(p,v) (p)->ops->write_status(p,v)
+#define parport_read_status(p) (p)->ops->read_status(p)
+#define parport_write_fifo(p,v) (p)->ops->write_fifo(p,v)
+#define parport_read_fifo(p) (p)->ops->read_fifo(p)
+#define parport_change_mode(p,m) (p)->ops->change_mode(p,m)
+#define parport_release_resources(p) (p)->ops->release_resources(p)
+#define parport_claim_resources(p) (p)->ops->claim_resources(p)
+
+struct parport_operations {
+ void (*write_data)(struct parport *, unsigned int);
+ unsigned int (*read_data)(struct parport *);
+ void (*write_control)(struct parport *, unsigned int);
+ unsigned int (*read_control)(struct parport *);
+ unsigned int (*frob_control)(struct parport *, unsigned int mask, unsigned int val);
+ void (*write_econtrol)(struct parport *, unsigned int);
+ unsigned int (*read_econtrol)(struct parport *);
+ unsigned int (*frob_econtrol)(struct parport *, unsigned int mask, unsigned int val);
+ void (*write_status)(struct parport *, unsigned int);
+ unsigned int (*read_status)(struct parport *);
+ void (*write_fifo)(struct parport *, unsigned int);
+ unsigned int (*read_fifo)(struct parport *);
+
+ void (*change_mode)(struct parport *, int);
+
+ void (*release_resources)(struct parport *);
+ int (*claim_resources)(struct parport *);
+
+ unsigned int (*epp_write_block)(struct parport *, void *, unsigned int);
+ unsigned int (*epp_read_block)(struct parport *, void *, unsigned int);
+
+ unsigned int (*ecp_write_block)(struct parport *, void *, unsigned int, void (*fn)(struct parport *, void *, unsigned int), void *);
+ unsigned int (*ecp_read_block)(struct parport *, void *, unsigned int, void (*fn)(struct parport *, void *, unsigned int), void *);
+
+ void (*save_state)(struct parport *, struct parport_state *);
+ void (*restore_state)(struct parport *, struct parport_state *);
+
+ void (*enable_irq)(struct parport *);
+ void (*disable_irq)(struct parport *);
+ int (*examine_irq)(struct parport *);
+};
+
+#define PARPORT_CONTROL_STROBE 0x1
+#define PARPORT_CONTROL_AUTOFD 0x2
+#define PARPORT_CONTROL_INIT 0x4
+#define PARPORT_CONTROL_SELECT 0x8
+#define PARPORT_CONTROL_INTEN 0x10
+#define PARPORT_CONTROL_DIRECTION 0x20
+
+#define PARPORT_STATUS_ERROR 0x8
+#define PARPORT_STATUS_SELECT 0x10
+#define PARPORT_STATUS_PAPEROUT 0x20
+#define PARPORT_STATUS_ACK 0x40
+#define PARPORT_STATUS_BUSY 0x80
+
+/* Type classes for Plug-and-Play probe. */
typedef enum {
PARPORT_CLASS_LEGACY = 0, /* Non-IEEE1284 device */
PARPORT_CLASS_PRINTER,
@@ -41,12 +121,6 @@ struct parport_device_info {
char *description;
};
-/* Definitions for parallel port sharing */
-
-/* Forward declare some stuff so we can use mutually circular structures */
-struct ppd;
-struct parport;
-
/* Each device can have two callback functions:
* 1) a preemption function, called by the resource manager to request
* that the driver relinquish control of the port. The driver should
@@ -59,37 +133,27 @@ struct parport;
* the port, it should call parport_claim() here. The return value from
* this function is ignored.
*/
-typedef int (*callback_func) (void *);
-
-/* This is an ordinary kernel IRQ handler routine.
- * The dev_id field (void *) will point the the port structure
- * associated with the interrupt request (to allow IRQ sharing)
- * Please make code IRQ sharing as this function may be called
- * when it isn't meant for you...
- */
-typedef void (*irq_handler_func) (int, void *, struct pt_regs *);
/* A parallel port device */
-struct ppd {
+struct pardevice {
char *name;
- struct parport *port; /* The port this is associated with */
- callback_func preempt; /* preemption function */
- callback_func wakeup; /* kick function */
+ struct parport *port;
+ int (*preempt)(void *);
+ void (*wakeup)(void *);
void *private;
- irq_handler_func irq_func;
+ void (*irq_func)(int, void *, struct pt_regs *);
int flags;
- unsigned char ctr; /* SPP CTR register */
- unsigned char ecr; /* ECP ECR register */
- struct ppd *next;
- struct ppd *prev;
+ struct pardevice *next;
+ struct pardevice *prev;
+ struct parport_state *state; /* saved status over preemption */
};
-struct parport_dir{
+struct parport_dir {
struct proc_dir_entry *entry; /* Directory /proc/parport/X */
struct proc_dir_entry *irq; /* IRQ entry /proc/parport/X/irq */
struct proc_dir_entry *devices; /* /proc/parport/X/devices */
struct proc_dir_entry *hardware; /* /proc/parport/X/hardware */
- char name[4]; /* /proc/parport/"XXXX" */
+ char name[4]; /* /proc/parport/"XXXX" */
};
/* A parallel port */
@@ -100,16 +164,19 @@ struct parport {
int irq; /* interrupt (or -1 for none) */
int dma;
unsigned int modes;
- struct ppd *devices;
- struct ppd *cad; /* port owner */
- struct ppd *lurker;
- unsigned int ctr; /* SPP CTR register */
- unsigned int ecr; /* ECP ECR register */
+
+ struct pardevice *devices;
+ struct pardevice *cad; /* port owner */
+ struct pardevice *lurker;
+
struct parport *next;
- unsigned int flags;
+ unsigned int flags;
+
struct parport_dir pdir;
struct parport_device_info probe_info;
- int speed; /* Max Write in Bytes/s */
+
+ struct parport_operations *ops;
+ void *private_data; /* for lowlevel driver */
};
/* parport_register_port registers a new parallel port at the given address (if
@@ -117,15 +184,15 @@ struct parport {
* claiming the I/O region, IRQ and DMA.
* NULL is returned if initialisation fails.
*/
-struct parport *parport_register_port(unsigned long base, int irq, int dma);
+struct parport *parport_register_port(unsigned long base, int irq, int dma,
+ struct parport_operations *ops);
/* parport_in_use returns nonzero if there are devices attached to a port. */
#define parport_in_use(x) ((x)->devices != NULL)
-/* parport_destroy blows away a parallel port. This fails if any devices are
- * registered.
- */
-void parport_destroy(struct parport *);
+/* Put a parallel port to sleep; release its hardware resources. Only possible
+ * if no devices are registered. */
+void parport_quiesce(struct parport *);
/* parport_enumerate returns a pointer to the linked list of all the ports
* in this machine.
@@ -140,19 +207,20 @@ struct parport *parport_enumerate(void);
* Only one lurking driver can be used on a given port.
* handle is a user pointer that gets handed to callback functions.
*/
-struct ppd *parport_register_device(struct parport *port, const char *name,
- callback_func pf, callback_func kf,
- irq_handler_func irq_func, int flags,
- void *handle);
+struct pardevice *parport_register_device(struct parport *port,
+ const char *name,
+ int (*pf)(void *), int (*kf)(void *),
+ void (*irq_func)(int, void *, struct pt_regs *),
+ int flags, void *handle);
-/* parport_deregister causes the kernel to forget about a device */
-void parport_unregister_device(struct ppd *dev);
+/* parport_unregister unlinks a device from the chain. */
+void parport_unregister_device(struct pardevice *dev);
/* parport_claim tries to gain ownership of the port for a particular driver.
* This may fail (return non-zero) if another driver is busy. If this
* driver has registered an interrupt handler, it will be enabled.
*/
-int parport_claim(struct ppd *dev);
+int parport_claim(struct pardevice *dev);
/* parport_release reverses a previous parport_claim. This can never fail,
* though the effects are undefined (except that they are bad) if you didn't
@@ -162,25 +230,24 @@ int parport_claim(struct ppd *dev);
* If you mess with the port state (enabling ECP for example) you should
* clean up before releasing the port.
*/
-void parport_release(struct ppd *dev);
+void parport_release(struct pardevice *dev);
/* The "modes" entry in parport is a bit field representing the following
* modes.
* Note that LP_ECPEPP is for the SMC EPP+ECP mode which is NOT
* 100% compatible with EPP.
*/
-#define PARPORT_MODE_SPP 0x0001
-#define PARPORT_MODE_PS2 0x0002
-#define PARPORT_MODE_EPP 0x0004
-#define PARPORT_MODE_ECP 0x0008
-#define PARPORT_MODE_ECPEPP 0x0010
-#define PARPORT_MODE_ECR 0x0020 /* ECR Register Exists */
-#define PARPORT_MODE_ECPPS2 0x0040
-
-/* Flags used to identify what a device does
- */
-#define PARPORT_DEV_TRAN 0x0000
-#define PARPORT_DEV_LURK 0x0001
+#define PARPORT_MODE_PCSPP 0x0001
+#define PARPORT_MODE_PCPS2 0x0002
+#define PARPORT_MODE_PCEPP 0x0004
+#define PARPORT_MODE_PCECP 0x0008
+#define PARPORT_MODE_PCECPEPP 0x0010
+#define PARPORT_MODE_PCECR 0x0020 /* ECR Register Exists */
+#define PARPORT_MODE_PCECPPS2 0x0040
+
+/* Flags used to identify what a device does. */
+#define PARPORT_DEV_TRAN 0x0000 /* We're transient. */
+#define PARPORT_DEV_LURK 0x0001 /* We lurk. */
#define PARPORT_FLAG_COMA 1
@@ -201,30 +268,4 @@ extern void inc_parport_count(void);
extern int parport_probe(struct parport *port, char *buffer, int len);
extern void parport_probe_one(struct parport *port);
-/* Primitive port access functions */
-extern inline void parport_w_ctrl(struct parport *port, int val)
-{
- outb(val, port->base+2);
-}
-
-extern inline int parport_r_ctrl(struct parport *port)
-{
- return inb(port->base+2);
-}
-
-extern inline void parport_w_data(struct parport *port, int val)
-{
- outb(val, port->base);
-}
-
-extern inline int parport_r_data(struct parport *port)
-{
- return inb(port->base);
-}
-
-extern inline int parport_r_status(struct parport *port)
-{
- return inb(port->base+1);
-}
-
#endif /* _PARPORT_H_ */
diff --git a/include/linux/rocket.h b/include/linux/rocket.h
new file mode 100644
index 000000000..2019d4d35
--- /dev/null
+++ b/include/linux/rocket.h
@@ -0,0 +1,55 @@
+/*
+ * This file contains the exported interface of the rocket driver to
+ * its configuration program.
+ */
+
+struct rocket_config {
+ int line;
+ int flags;
+ int closing_wait;
+ int close_delay;
+ int port;
+ int reserved[32];
+};
+
+struct rocket_ports {
+ int tty_major;
+ int callout_major;
+ int port_bitmap[4];
+ int reserved[32];
+};
+
+/*
+ * Rocketport flags
+ */
+#define ROCKET_CALLOUT_NOHUP 0x00000001
+#define ROCKET_FORCE_CD 0x00000002
+#define ROCKET_HUP_NOTIFY 0x00000004
+#define ROCKET_SPLIT_TERMIOS 0x00000008
+#define ROCKET_SPD_MASK 0x00000070
+#define ROCKET_SPD_HI 0x00000010 /* Use 56000 instead of 38400 bps */
+#define ROCKET_SPD_VHI 0x00000020 /* Use 115200 instead of 38400 bps*/
+#define ROCKET_SPD_SHI 0x00000030 /* Use 230400 instead of 38400 bps*/
+#define ROCKET_SPD_WARP 0x00000040 /* Use 460800 instead of 38400 bps*/
+#define ROCKET_SAK 0x00000080
+#define ROCKET_SESSION_LOCKOUT 0x00000100
+#define ROCKET_PGRP_LOCKOUT 0x00000200
+
+#define ROCKET_FLAGS 0x000003FF
+
+#define ROCKET_USR_MASK 0x0071 /* Legal flags that non-privileged
+ * users can set or reset */
+
+/*
+ * For closing_wait and closing_wait2
+ */
+#define ROCKET_CLOSING_WAIT_NONE 65535
+#define ROCKET_CLOSING_WAIT_INF 0
+
+/*
+ * Rocketport ioctls -- "RP"
+ */
+#define RCKP_GET_STRUCT 0x00525001
+#define RCKP_GET_CONFIG 0x00525002
+#define RCKP_SET_CONFIG 0x00525003
+#define RCKP_GET_PORTS 0x00525004
diff --git a/include/linux/timer.h b/include/linux/timer.h
index b922d0dbb..00ae5082f 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -54,6 +54,7 @@
#define HD_TIMER2 24
#define GSCD_TIMER 25
+#define COMTROL_TIMER 26
#define DIGI_TIMER 29