summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRichard Henderson <rth@are.twiddle.net>2002-02-28 08:27:27 -0800
committerRichard Henderson <rth@are.twiddle.net>2002-02-28 08:27:27 -0800
commit4c7fefc3a448c3021ffa6b2eb4ba340b4168653a (patch)
tree01e5b8f0f133542b641891d3e3f52f52e1ca650a /include/linux
parent083b4c0e866ab0a577a26f23c5bf80f554917fa4 (diff)
parentc39e9205e9c097cfa94117a2e452957d2ce03c9e (diff)
Merge are.twiddle.net:/home/rth/BK/linus-2.5
into are.twiddle.net:/home/rth/BK/axp-2.5
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blk.h5
-rw-r--r--include/linux/dcache.h1
-rw-r--r--include/linux/dnotify.h6
-rw-r--r--include/linux/fs.h12
-rw-r--r--include/linux/ide.h185
-rw-r--r--include/linux/init_task.h2
-rw-r--r--include/linux/intermezzo_fs.h3
-rw-r--r--include/linux/irq_cpustat.h2
-rw-r--r--include/linux/jffs2.h8
-rw-r--r--include/linux/jffs2_fs_sb.h3
-rw-r--r--include/linux/nfsd/export.h3
-rw-r--r--include/linux/nfsd/interface.h4
-rw-r--r--include/linux/parport.h3
-rw-r--r--include/linux/rtc.h13
-rw-r--r--include/linux/sched.h3
-rw-r--r--include/linux/sunrpc/sched.h34
-rw-r--r--include/linux/sunrpc/svc.h17
-rw-r--r--include/linux/sunrpc/svcsock.h31
-rw-r--r--include/linux/sunrpc/types.h55
-rw-r--r--include/linux/usb.h58
20 files changed, 175 insertions, 273 deletions
diff --git a/include/linux/blk.h b/include/linux/blk.h
index b6507e62eb4b..173634d2264b 100644
--- a/include/linux/blk.h
+++ b/include/linux/blk.h
@@ -8,11 +8,6 @@
#include <linux/spinlock.h>
#include <linux/compiler.h>
-/*
- * get rid of this next...
- */
-extern int ide_init(void);
-
extern void set_device_ro(kdev_t dev,int flag);
extern void add_blkdev_randomness(int major);
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 3649086ed83f..21da57231050 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -126,6 +126,7 @@ d_iput: no no yes
#define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */
extern spinlock_t dcache_lock;
+extern rwlock_t dparent_lock;
/**
* d_drop - drop a dentry
diff --git a/include/linux/dnotify.h b/include/linux/dnotify.h
index 794fd096f31f..60c1e2117f10 100644
--- a/include/linux/dnotify.h
+++ b/include/linux/dnotify.h
@@ -33,13 +33,13 @@ static inline void inode_dir_notify(struct inode *inode, unsigned long event)
static inline void dnotify_parent(struct dentry *dentry, unsigned long event)
{
struct dentry *parent;
- spin_lock(&dcache_lock);
+ read_lock(&dparent_lock);
parent = dentry->d_parent;
if (parent->d_inode->i_dnotify_mask & event) {
dget(parent);
- spin_unlock(&dcache_lock);
+ read_unlock(&dparent_lock);
__inode_dir_notify(parent->d_inode, event);
dput(parent);
} else
- spin_unlock(&dcache_lock);
+ read_unlock(&dparent_lock);
}
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 7bb0610ba3a6..414bf25bea5f 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1212,12 +1212,12 @@ extern void invalidate_inode_buffers(struct inode *);
#define destroy_buffers(dev) __invalidate_buffers((dev), 1)
extern void invalidate_bdev(struct block_device *, int);
extern void __invalidate_buffers(kdev_t dev, int);
-extern void sync_inodes(kdev_t);
+extern void sync_inodes(void);
extern void sync_unlocked_inodes(void);
extern void write_inode_now(struct inode *, int);
-extern int sync_buffers(kdev_t, int);
-extern void sync_dev(kdev_t);
+extern int sync_buffers(struct block_device *, int);
extern int fsync_dev(kdev_t);
+extern int fsync_bdev(struct block_device *);
extern int fsync_super(struct super_block *);
extern int fsync_no_super(struct block_device *);
extern void sync_inodes_sb(struct super_block *);
@@ -1234,7 +1234,7 @@ static inline int fsync_inode_data_buffers(struct inode *inode)
extern int inode_has_buffers(struct inode *);
extern int filemap_fdatasync(struct address_space *);
extern int filemap_fdatawait(struct address_space *);
-extern void sync_supers(kdev_t);
+extern void sync_supers(void);
extern int bmap(struct inode *, int);
extern int notify_change(struct dentry *, struct iattr *);
extern int permission(struct inode *, int);
@@ -1511,9 +1511,9 @@ extern int inode_setattr(struct inode *, struct iattr *);
static inline ino_t parent_ino(struct dentry *dentry)
{
ino_t res;
- spin_lock(&dcache_lock);
+ read_lock(&dparent_lock);
res = dentry->d_parent->d_inode->i_ino;
- spin_unlock(&dcache_lock);
+ read_unlock(&dparent_lock);
return res;
}
diff --git a/include/linux/ide.h b/include/linux/ide.h
index b734a586cd45..30f881404625 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1,9 +1,7 @@
#ifndef _IDE_H
#define _IDE_H
/*
- * linux/include/linux/ide.h
- *
- * Copyright (C) 1994-1998 Linus Torvalds & authors
+ * Copyright (C) 1994-2002 Linus Torvalds & authors
*/
#include <linux/config.h>
@@ -13,6 +11,7 @@
#include <linux/hdsmart.h>
#include <linux/blkdev.h>
#include <linux/proc_fs.h>
+#include <linux/device.h>
#include <linux/devfs_fs_kernel.h>
#include <asm/hdreg.h>
@@ -349,12 +348,13 @@ void ide_setup_ports( hw_regs_t *hw,
* Now for the data we need to maintain per-drive: ide_drive_t
*/
-#define ide_scsi 0x21
-#define ide_disk 0x20
-#define ide_optical 0x7
-#define ide_cdrom 0x5
-#define ide_tape 0x1
-#define ide_floppy 0x0
+#define ATA_DISK 0x20
+#define ATA_TAPE 0x01
+#define ATA_ROM 0x05 /* CD-ROM */
+#define ATA_MOD 0x07 /* optical */
+#define ATA_FLOPPY 0x00
+#define ATA_SCSI 0x21
+#define ATA_NO_LUN 0x7f
typedef union {
unsigned all : 8; /* all of the bits together */
@@ -370,7 +370,14 @@ typedef union {
struct ide_settings_s;
typedef struct ide_drive_s {
- request_queue_t queue; /* request queue */
+ char type; /* distingiush different devices: disk, cdrom, tape, floppy, ... */
+
+ /* NOTE: If we had proper separation between channel and host chip, we
+ * could move this to the chanell and many sync problems would
+ * magically just go away.
+ */
+ request_queue_t queue; /* per device request queue */
+
struct ide_drive_s *next; /* circular list of hwgroup drives */
unsigned long sleep; /* sleep until this time */
unsigned long service_start; /* time we started last request */
@@ -405,7 +412,6 @@ typedef struct ide_drive_s {
unsigned ata_flash : 1; /* 1=present, 0=default */
unsigned addressing; /* : 2; 0=28-bit, 1=48-bit, 2=64-bit */
byte scsi; /* 0=default, 1=skip current ide-subdriver for ide-scsi emulation */
- byte media; /* disk, cdrom, tape, floppy, ... */
select_t select; /* basic drive/head select reg value */
byte ctl; /* "normal" value for IDE_CONTROL_REG */
byte ready_stat; /* min status value for drive ready */
@@ -426,12 +432,12 @@ typedef struct ide_drive_s {
unsigned long capacity; /* total number of sectors */
unsigned long long capacity48; /* total number of sectors */
unsigned int drive_data; /* for use by tuneproc/selectproc as needed */
- struct hwif_s *hwif; /* actually (ide_hwif_t *) */
+ struct hwif_s *hwif; /* parent pointer to the interface we are attached to */
wait_queue_head_t wqueue; /* used to wait for drive in open() */
struct hd_driveid *id; /* drive model identification info */
struct hd_struct *part; /* drive partition table */
char name[4]; /* drive name, such as "hda" */
- struct ide_driver_s *driver; /* (ide_driver_t *) */
+ struct ata_operations *driver;
void *driver_data; /* extra driver data */
devfs_handle_t de; /* directory for device */
struct proc_dir_entry *proc; /* /proc/ide/ directory entry */
@@ -450,6 +456,7 @@ typedef struct ide_drive_s {
byte acoustic; /* acoustic management */
unsigned int failures; /* current failure count */
unsigned int max_failures; /* maximum allowed failure count */
+ struct device device; /* global device tree handle */
} ide_drive_t;
/*
@@ -519,16 +526,6 @@ typedef void (ide_rw_proc_t) (ide_drive_t *, ide_dma_action_t);
*/
typedef int (ide_busproc_t) (ide_drive_t *, int);
-#ifdef CONFIG_BLK_DEV_IDEPCI
-typedef struct ide_pci_devid_s {
- unsigned short vid;
- unsigned short did;
-} ide_pci_devid_t;
-
-#define IDE_PCI_DEVID_NULL ((ide_pci_devid_t){0,0})
-#define IDE_PCI_DEVID_EQ(a,b) (a.vid == b.vid && a.did == b.did)
-#endif /* CONFIG_BLK_DEV_IDEPCI */
-
typedef struct hwif_s {
struct hwif_s *next; /* for linked-list in ide_hwgroup_t */
struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */
@@ -559,7 +556,7 @@ typedef struct hwif_s {
struct proc_dir_entry *proc; /* /proc/ide/ directory entry */
int irq; /* our irq number */
byte major; /* our major number */
- char name[6]; /* name of interface, eg. "ide0" */
+ char name[80]; /* name of interface */
byte index; /* 0 for ide0; 1 for ide1; ... */
hwif_chipset_t chipset; /* sub-module for tuning.. */
unsigned noprobe : 1; /* don't probe for this interface */
@@ -573,15 +570,14 @@ typedef struct hwif_s {
byte channel; /* for dual-port chips: 0=primary, 1=secondary */
#ifdef CONFIG_BLK_DEV_IDEPCI
struct pci_dev *pci_dev; /* for pci chipsets */
- ide_pci_devid_t pci_devid; /* for pci chipsets: {VID,DID} */
-#endif /* CONFIG_BLK_DEV_IDEPCI */
+#endif
#if (DISK_RECOVERY_TIME > 0)
unsigned long last_time; /* time when previous rq was done */
#endif
byte straight8; /* Alan's straight 8 check */
- void *hwif_data; /* extra hwif data */
ide_busproc_t *busproc; /* driver soft-power interface */
byte bus_state; /* power state of the IDE bus */
+ struct device device; /* global device tree handle */
} ide_hwif_t;
/*
@@ -671,8 +667,6 @@ typedef struct {
#ifdef CONFIG_PROC_FS
void proc_ide_create(void);
void proc_ide_destroy(void);
-void recreate_proc_ide_device(ide_hwif_t *, ide_drive_t *);
-void destroy_proc_ide_device(ide_hwif_t *, ide_drive_t *);
void destroy_proc_ide_drives(ide_hwif_t *);
void create_proc_ide_interfaces(void);
void ide_add_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p, void *data);
@@ -700,37 +694,54 @@ read_proc_t proc_ide_read_geometry;
#endif
/*
- * Subdrivers support.
+ * This structure describes the operations possible on a particular device type
+ * (CD-ROM, tape, DISK and so on).
+ *
+ * This is the main hook for device type support submodules.
*/
-typedef struct ide_driver_s {
- const char *name;
- byte media;
- unsigned busy : 1;
- unsigned supports_dma : 1;
- unsigned supports_dsc_overlap : 1;
+
+struct ata_operations {
+ struct module *owner;
+ unsigned busy: 1; /* FIXME: this will go soon away... */
int (*cleanup)(ide_drive_t *);
int (*standby)(ide_drive_t *);
int (*flushcache)(ide_drive_t *);
ide_startstop_t (*do_request)(ide_drive_t *, struct request *, unsigned long);
int (*end_request)(ide_drive_t *drive, int uptodate);
+
int (*ioctl)(ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long);
int (*open)(struct inode *, struct file *, ide_drive_t *);
void (*release)(struct inode *, struct file *, ide_drive_t *);
int (*media_change)(ide_drive_t *);
void (*revalidate)(ide_drive_t *);
+
void (*pre_reset)(ide_drive_t *);
unsigned long (*capacity)(ide_drive_t *);
ide_startstop_t (*special)(ide_drive_t *);
ide_proc_entry_t *proc;
- int (*driver_init)(void);
int (*driver_reinit)(ide_drive_t *);
+};
+
+/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
+#define ata_get(ata) \
+ (((ata) && (ata)->owner) \
+ ? ( try_inc_mod_count((ata)->owner) ? (ata) : NULL ) \
+ : (ata))
+
+#define ata_put(ata) \
+do { \
+ if ((ata) && (ata)->owner) \
+ __MOD_DEC_USE_COUNT((ata)->owner); \
+} while(0)
- /* FIXME: Single linked list of drivers for iteration.
- */
- struct ide_driver_s *next;
-} ide_driver_t;
-#define DRIVER(drive) ((drive)->driver)
+/* FIXME: Actually implement and use them as soon as possible! to make the
+ * ide_scan_devices() go away! */
+
+extern int unregister_ata_driver(unsigned int type, struct ata_operations *driver);
+extern int register_ata_driver(unsigned int type, struct ata_operations *driver);
+
+#define ata_ops(drive) ((drive)->driver)
/*
* ide_hwifs[] is the master data structure used to keep track
@@ -740,10 +751,7 @@ typedef struct ide_driver_s {
* structure directly (the allocation/layout may change!).
*
*/
-#ifndef _IDE_C
extern struct hwif_s ide_hwifs[]; /* master data repository */
-extern struct ide_driver_s *ide_drivers;
-#endif
extern int noautodma;
/*
@@ -818,7 +826,7 @@ unsigned long current_capacity (ide_drive_t *drive);
/*
* Revalidate (read partition tables)
*/
-void ide_revalidate_drive (ide_drive_t *drive);
+extern void ide_revalidate_drive (ide_drive_t *drive);
/*
* Start a reset operation for an IDE interface.
@@ -855,34 +863,6 @@ typedef enum {
#define task_rq_offset(rq) \
(((rq)->nr_sectors - (rq)->current_nr_sectors) * SECTOR_SIZE)
-extern inline void *ide_map_buffer(struct request *rq, unsigned long *flags)
-{
- return bio_kmap_irq(rq->bio, flags) + ide_rq_offset(rq);
-}
-
-extern inline void ide_unmap_buffer(char *buffer, unsigned long *flags)
-{
- bio_kunmap_irq(buffer, flags);
-}
-
-/*
- * for now, taskfile requests are special :/
- */
-extern inline char *ide_map_rq(struct request *rq, unsigned long *flags)
-{
- if (rq->bio)
- return ide_map_buffer(rq, flags);
- else
- return rq->buffer + task_rq_offset(rq);
-}
-
-extern inline void ide_unmap_rq(struct request *rq, char *buf,
- unsigned long *flags)
-{
- if (rq->bio)
- ide_unmap_buffer(buf, flags);
-}
-
/*
* This function issues a special IDE device request
* onto the request queue.
@@ -959,7 +939,6 @@ void do_taskfile (ide_drive_t *drive, struct hd_drive_task_hdr *taskfile, struct
/*
* Special Flagged Register Validation Caller
*/
-// ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task);
ide_startstop_t set_multmode_intr (ide_drive_t *drive);
ide_startstop_t set_geometry_intr (ide_drive_t *drive);
@@ -990,7 +969,6 @@ int pkt_taskfile_ioctl (ide_drive_t *drive, struct inode *inode, struct file *fi
#endif /* CONFIG_PKT_TASK_IOCTL */
void ide_delay_50ms (void);
-int system_bus_clock(void);
byte ide_auto_reduce_xfer (ide_drive_t *drive);
int ide_driveid_update (ide_drive_t *drive);
@@ -999,13 +977,7 @@ 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, ide_task_t *args);
-/*
- * ide_system_bus_speed() returns what we think is the system VESA/PCI
- * bus speed (in MHz). This is used for calculating interface PIO timings.
- * The default is 40 for known PCI systems, 50 otherwise.
- * The "idebus=xx" parameter can be used to override this value.
- */
-int ide_system_bus_speed (void);
+extern int system_bus_speed;
/*
* idedisk_input_data() is a wrapper around ide_input_data() which copes
@@ -1037,47 +1009,33 @@ void ide_intr (int irq, void *dev_id, struct pt_regs *regs);
void do_ide_request (request_queue_t * q);
void ide_init_subdrivers (void);
-#ifndef _IDE_C
extern struct block_device_operations ide_fops[];
extern ide_proc_entry_t generic_subdriver_entries[];
-#endif
-
-int ide_reinit_drive (ide_drive_t *drive);
-#ifdef _IDE_C
-# ifdef CONFIG_BLK_DEV_IDE
+#ifdef CONFIG_BLK_DEV_IDE
/* Probe for devices attached to the systems host controllers.
*/
extern int ideprobe_init (void);
-# endif
+#endif
#ifdef CONFIG_BLK_DEV_IDEDISK
-int idedisk_reinit (ide_drive_t *drive);
-int idedisk_init (void);
-#endif /* CONFIG_BLK_DEV_IDEDISK */
+extern int idedisk_init (void);
+#endif
#ifdef CONFIG_BLK_DEV_IDECD
-int ide_cdrom_reinit (ide_drive_t *drive);
-int ide_cdrom_init (void);
-#endif /* CONFIG_BLK_DEV_IDECD */
+extern int ide_cdrom_init (void);
+#endif
#ifdef CONFIG_BLK_DEV_IDETAPE
-int idetape_reinit (ide_drive_t *drive);
-int idetape_init (void);
-#endif /* CONFIG_BLK_DEV_IDETAPE */
+extern int idetape_init (void);
+#endif
#ifdef CONFIG_BLK_DEV_IDEFLOPPY
-int idefloppy_reinit (ide_drive_t *drive);
-int idefloppy_init (void);
-#endif /* CONFIG_BLK_DEV_IDEFLOPPY */
+extern int idefloppy_init (void);
+#endif
#ifdef CONFIG_BLK_DEV_IDESCSI
-int idescsi_reinit (ide_drive_t *drive);
-int idescsi_init (void);
-#endif /* CONFIG_BLK_DEV_IDESCSI */
-#endif /* _IDE_C */
-
-extern int ide_register_module (struct ide_driver_s *d);
-extern void ide_unregister_module (struct ide_driver_s *d);
-ide_drive_t *ide_scan_devices (byte media, const char *name, ide_driver_t *driver, int n);
-extern int ide_register_subdriver(ide_drive_t *drive, ide_driver_t *driver);
+extern int idescsi_init (void);
+#endif
+
+ide_drive_t *ide_scan_devices (byte media, const char *name, struct ata_operations *driver, int n);
+extern int ide_register_subdriver(ide_drive_t *drive, struct ata_operations *driver);
extern int ide_unregister_subdriver(ide_drive_t *drive);
-extern int ide_replace_subdriver(ide_drive_t *drive, const char *driver);
#ifdef CONFIG_BLK_DEV_IDEPCI
#define ON_BOARD 1
@@ -1088,7 +1046,7 @@ extern int ide_replace_subdriver(ide_drive_t *drive, const char *driver);
# define OFF_BOARD NEVER_BOARD
#endif /* CONFIG_BLK_DEV_OFFBOARD */
-void ide_scan_pcibus (int scan_direction) __init;
+void __init ide_scan_pcibus(int scan_direction);
#endif
#ifdef CONFIG_BLK_DEV_IDEDMA
#define BAD_DMA_DRIVE 0
@@ -1108,5 +1066,6 @@ extern unsigned long ide_get_or_set_dma_base (ide_hwif_t *hwif, int extra, const
extern spinlock_t ide_lock;
extern int drive_is_ready(ide_drive_t *drive);
+extern void revalidate_drives(void);
#endif /* _IDE_H */
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index f97e245dcddc..9f34e057079a 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -52,8 +52,6 @@
mm: NULL, \
active_mm: &init_mm, \
run_list: LIST_HEAD_INIT(tsk.run_list), \
- migration_list: LIST_HEAD_INIT(tsk.migration_list), \
- migration_sem: __MUTEX_INITIALIZER(tsk.migration_sem), \
time_slice: HZ, \
next_task: &tsk, \
prev_task: &tsk, \
diff --git a/include/linux/intermezzo_fs.h b/include/linux/intermezzo_fs.h
index 240dd8f24fe6..a0fe6dbc4622 100644
--- a/include/linux/intermezzo_fs.h
+++ b/include/linux/intermezzo_fs.h
@@ -68,7 +68,7 @@ struct kml_fsdata
};
/* super.c */
-struct presto_cache *presto_find_cache(kdev_t dev) ;
+struct presto_cache *presto_find_cache(struct super_block *sb) ;
extern struct file_system_type presto_fs_type;
extern int init_intermezzo_fs(void);
@@ -89,7 +89,6 @@ struct presto_cache {
int cache_flags;
char *cache_root_fileset; /* fileset mounted on cache "/" */
- kdev_t cache_dev; /* underlying block device */
struct super_block *cache_sb;
struct dentry *cache_mtde; /* unix mtpt of cache XXX NOT VALID XXX */
char *cache_mtpt; /* again */
diff --git a/include/linux/irq_cpustat.h b/include/linux/irq_cpustat.h
index 24696e15dacc..dfd73c5ec60d 100644
--- a/include/linux/irq_cpustat.h
+++ b/include/linux/irq_cpustat.h
@@ -19,11 +19,13 @@
extern irq_cpustat_t irq_stat[]; /* defined in asm/hardirq.h */
+#ifndef __ARCH_IRQ_STAT /* Some architectures can do this more efficiently */
#ifdef CONFIG_SMP
#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
#else
#define __IRQ_STAT(cpu, member) ((void)(cpu), irq_stat[0].member)
#endif
+#endif
/* arch independent irq_stat fields */
#define softirq_pending(cpu) __IRQ_STAT((cpu), __softirq_pending)
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h
index 37d3d931e416..9c67732fb12f 100644
--- a/include/linux/jffs2.h
+++ b/include/linux/jffs2.h
@@ -31,7 +31,7 @@
* provisions above, a recipient may use your version of this file
* under either the RHEPL or the GPL.
*
- * $Id: jffs2.h,v 1.18 2001/03/25 22:36:12 dwmw2 Exp $
+ * $Id: jffs2.h,v 1.19 2001/10/09 13:20:23 dwmw2 Exp $
*
*/
@@ -103,7 +103,7 @@ struct jffs2_unknown_node
__u16 nodetype;
__u32 totlen; /* So we can skip over nodes we don't grok */
__u32 hdr_crc;
-};
+} __attribute__((packed));
struct jffs2_raw_dirent
{
@@ -121,7 +121,7 @@ struct jffs2_raw_dirent
__u32 node_crc;
__u32 name_crc;
__u8 name[0];
-};
+} __attribute__((packed));
/* The JFFS2 raw inode structure: Used for storage on physical media. */
/* The uid, gid, atime, mtime and ctime members could be longer, but
@@ -153,7 +153,7 @@ struct jffs2_raw_inode
__u32 data_crc; /* CRC for the (compressed) data. */
__u32 node_crc; /* CRC for the raw inode (excluding data) */
// __u8 data[dsize];
-};
+} __attribute__((packed));
union jffs2_node_union {
struct jffs2_raw_inode i;
diff --git a/include/linux/jffs2_fs_sb.h b/include/linux/jffs2_fs_sb.h
index 2d9ad4e54f5f..626c8c57fb72 100644
--- a/include/linux/jffs2_fs_sb.h
+++ b/include/linux/jffs2_fs_sb.h
@@ -1,4 +1,4 @@
-/* $Id: jffs2_fs_sb.h,v 1.16 2001/09/18 20:15:18 dwmw2 Exp $ */
+/* $Id: jffs2_fs_sb.h,v 1.16.2.1 2002/02/23 14:13:34 dwmw2 Exp $ */
#ifndef _JFFS2_FS_SB
#define _JFFS2_FS_SB
@@ -12,6 +12,7 @@
#define INOCACHE_HASHSIZE 1
#define JFFS2_SB_FLAG_RO 1
+#define JFFS2_SB_FLAG_MOUNTING 2
/* A struct for the overall file system control. Pointers to
jffs2_sb_info structs are named `c' in the source code.
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
index 6f3e970f40d4..1125d2fa1cbf 100644
--- a/include/linux/nfsd/export.h
+++ b/include/linux/nfsd/export.h
@@ -87,8 +87,7 @@ struct svc_export {
void nfsd_export_init(void);
void nfsd_export_shutdown(void);
void exp_readlock(void);
-int exp_writelock(void);
-void exp_unlock(void);
+void exp_readunlock(void);
struct svc_client * exp_getclient(struct sockaddr_in *sin);
void exp_putclient(struct svc_client *clp);
struct svc_export * exp_get(struct svc_client *clp, kdev_t dev, ino_t ino);
diff --git a/include/linux/nfsd/interface.h b/include/linux/nfsd/interface.h
index 807a4fc6c5f5..80c65165778d 100644
--- a/include/linux/nfsd/interface.h
+++ b/include/linux/nfsd/interface.h
@@ -12,7 +12,8 @@
#include <linux/config.h>
-#ifdef CONFIG_NFSD_MODULE
+#ifndef CONFIG_NFSD
+#ifdef CONFIG_MODULES
extern struct nfsd_linkage {
long (*do_nfsservctl)(int cmd, void *argp, void *resp);
@@ -20,5 +21,6 @@ extern struct nfsd_linkage {
} * nfsd_linkage;
#endif
+#endif
#endif /* LINUX_NFSD_INTERFACE_H */
diff --git a/include/linux/parport.h b/include/linux/parport.h
index ce82bcdb5e1a..a41c6be7810e 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -459,7 +459,10 @@ extern void parport_ieee1284_interrupt (int, void *, struct pt_regs *);
extern int parport_negotiate (struct parport *, int mode);
extern ssize_t parport_write (struct parport *, const void *buf, size_t len);
extern ssize_t parport_read (struct parport *, void *buf, size_t len);
+
+#define PARPORT_INACTIVITY_O_NONBLOCK 1
extern long parport_set_timeout (struct pardevice *, long inactivity);
+
extern int parport_wait_event (struct parport *, long timeout);
extern int parport_wait_peripheral (struct parport *port,
unsigned char mask,
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index df958b66ada6..e99a2357ab28 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -66,4 +66,17 @@ struct rtc_wkalrm {
#define RTC_WKALM_SET _IOW('p', 0x0f, struct rtc_wkalrm)/* Set wakeup alarm*/
#define RTC_WKALM_RD _IOR('p', 0x10, struct rtc_wkalrm)/* Get wakeup alarm*/
+#ifdef __KERNEL__
+
+typedef struct rtc_task {
+ void (*func)(void *private_data);
+ void *private_data;
+} rtc_task_t;
+
+int rtc_register(rtc_task_t *task);
+int rtc_unregister(rtc_task_t *task);
+int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg);
+
+#endif /* __KERNEL__ */
+
#endif /* _LINUX_RTC_H_ */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2992fe65e6aa..c71390735df2 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -286,9 +286,6 @@ struct task_struct {
wait_queue_head_t wait_chldexit; /* for wait4() */
struct completion *vfork_done; /* for vfork() */
- list_t migration_list;
- struct semaphore migration_sem;
-
unsigned long rt_priority;
unsigned long it_real_value, it_prof_value, it_virt_value;
unsigned long it_real_incr, it_prof_incr, it_virt_incr;
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index eee6756b842a..892565ca4721 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -34,13 +34,11 @@ struct rpc_message {
* This is the RPC task struct
*/
struct rpc_task {
- struct rpc_task * tk_prev; /* wait queue links */
- struct rpc_task * tk_next;
+ struct list_head tk_list; /* wait queue links */
#ifdef RPC_DEBUG
unsigned long tk_magic; /* 0xf00baa */
#endif
- struct rpc_task * tk_next_task; /* global list of tasks */
- struct rpc_task * tk_prev_task; /* global list of tasks */
+ struct list_head tk_task; /* global list of tasks */
struct rpc_clnt * tk_client; /* RPC client */
struct rpc_rqst * tk_rqstp; /* RPC request */
int tk_status; /* result of last operation */
@@ -88,6 +86,20 @@ struct rpc_task {
#define tk_auth tk_client->cl_auth
#define tk_xprt tk_client->cl_xprt
+/* support walking a list of tasks on a wait queue */
+#define task_for_each(task, pos, head) \
+ list_for_each(pos, head) \
+ if ((task=list_entry(pos, struct rpc_task, tk_list)),1)
+
+#define task_for_first(task, head) \
+ if (!list_empty(head) && \
+ ((task=list_entry((head)->next, struct rpc_task, tk_list)),1))
+
+/* .. and walking list of all tasks */
+#define alltask_for_each(task, pos, head) \
+ list_for_each(pos, head) \
+ if ((task=list_entry(pos, struct rpc_task, tk_task)),1)
+
typedef void (*rpc_action)(struct rpc_task *);
/*
@@ -133,16 +145,24 @@ typedef void (*rpc_action)(struct rpc_task *);
* RPC synchronization objects
*/
struct rpc_wait_queue {
- struct rpc_task * task;
+ struct list_head tasks;
#ifdef RPC_DEBUG
char * name;
#endif
};
#ifndef RPC_DEBUG
-# define RPC_INIT_WAITQ(name) ((struct rpc_wait_queue) { NULL })
+# define RPC_WAITQ_INIT(var,qname) ((struct rpc_wait_queue) {LIST_HEAD_INIT(var)})
+# define RPC_WAITQ(var,qname) struct rpc_wait_queue var = RPC_WAITQ_INIT(var.tasks,qname)
+# define INIT_RPC_WAITQ(ptr,qname) do { \
+ INIT_LIST_HEAD(&(ptr)->tasks); \
+ } while(0)
#else
-# define RPC_INIT_WAITQ(name) ((struct rpc_wait_queue) { NULL, name })
+# define RPC_WAITQ_INIT(var,qname) ((struct rpc_wait_queue) {LIST_HEAD_INIT(var.tasks), qname})
+# define RPC_WAITQ(var,qname) struct rpc_wait_queue var = RPC_WAITQ_INIT(var,qname)
+# define INIT_RPC_WAITQ(ptr,qname) do { \
+ INIT_LIST_HEAD(&(ptr)->tasks); (ptr)->name = qname; \
+ } while(0)
#endif
/*
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index f6439cb4facf..2d2461bb38c8 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -27,8 +27,8 @@
* We currently do not support more than one RPC program per daemon.
*/
struct svc_serv {
- struct svc_rqst * sv_threads; /* idle server threads */
- struct svc_sock * sv_sockets; /* pending sockets */
+ struct list_head sv_threads; /* idle server threads */
+ struct list_head sv_sockets; /* pending sockets */
struct svc_program * sv_program; /* RPC program */
struct svc_stat * sv_stats; /* RPC statistics */
spinlock_t sv_lock;
@@ -36,7 +36,9 @@ struct svc_serv {
unsigned int sv_bufsz; /* datagram buffer size */
unsigned int sv_xdrsize; /* XDR buffer size */
- struct svc_sock * sv_allsocks; /* all sockets */
+ struct list_head sv_permsocks; /* all permanent sockets */
+ struct list_head sv_tempsocks; /* all temporary sockets */
+ int sv_tmpcnt; /* count of temporary sockets */
char * sv_name; /* service name */
};
@@ -89,8 +91,7 @@ struct svc_buf {
* NOTE: First two items must be prev/next.
*/
struct svc_rqst {
- struct svc_rqst * rq_prev; /* idle list */
- struct svc_rqst * rq_next;
+ struct list_head rq_list; /* idle list */
struct svc_sock * rq_sock; /* socket */
struct sockaddr_in rq_addr; /* peer address */
int rq_addrlen;
@@ -115,6 +116,10 @@ struct svc_rqst {
void * rq_argp; /* decoded arguments */
void * rq_resp; /* xdr'd results */
+ int rq_reserved; /* space on socket outq
+ * reserved for this request
+ */
+
/* Catering to nfsd */
struct svc_client * rq_client; /* RPC peer info */
struct svc_cacherep * rq_cacherep; /* cache info */
@@ -163,6 +168,7 @@ struct svc_procedure {
unsigned int pc_ressize; /* result struct size */
unsigned int pc_count; /* call count */
unsigned int pc_cachetype; /* cache info (NFS) */
+ unsigned int pc_xdrressize; /* maximum size of XDR reply */
};
/*
@@ -180,5 +186,6 @@ void svc_destroy(struct svc_serv *);
int svc_process(struct svc_serv *, struct svc_rqst *);
int svc_register(struct svc_serv *, int, unsigned short);
void svc_wake_up(struct svc_serv *);
+void svc_reserve(struct svc_rqst *rqstp, int space);
#endif /* SUNRPC_SVC_H */
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h
index 82d9678d4905..95f52982b49e 100644
--- a/include/linux/sunrpc/svcsock.h
+++ b/include/linux/sunrpc/svcsock.h
@@ -13,38 +13,38 @@
/*
* RPC server socket.
- * NOTE: First two items must be prev/next.
*/
struct svc_sock {
- struct svc_sock * sk_prev; /* list of ready sockets */
- struct svc_sock * sk_next;
- struct svc_sock * sk_list; /* list of all sockets */
+ struct list_head sk_ready; /* list of ready sockets */
+ struct list_head sk_list; /* list of all sockets */
struct socket * sk_sock; /* berkeley socket layer */
struct sock * sk_sk; /* INET layer */
- spinlock_t sk_lock;
struct svc_serv * sk_server; /* service for this socket */
unsigned char sk_inuse; /* use count */
- unsigned char sk_busy; /* enqueued/receiving */
- unsigned char sk_conn; /* conn pending */
- unsigned char sk_close; /* dead or dying */
- int sk_data; /* data pending */
- unsigned int sk_temp : 1, /* temp socket */
- sk_qued : 1, /* on serv->sk_sockets */
- sk_dead : 1; /* socket closed */
+ unsigned int sk_flags;
+#define SK_BUSY 0 /* enqueued/receiving */
+#define SK_CONN 1 /* conn pending */
+#define SK_CLOSE 2 /* dead or dying */
+#define SK_DATA 3 /* data pending */
+#define SK_TEMP 4 /* temp (TCP) socket */
+#define SK_QUED 5 /* on serv->sk_sockets */
+#define SK_DEAD 6 /* socket closed */
+
+ int sk_reserved; /* space on outq that is reserved */
+
int (*sk_recvfrom)(struct svc_rqst *rqstp);
int (*sk_sendto)(struct svc_rqst *rqstp);
/* We keep the old state_change and data_ready CB's here */
void (*sk_ostate)(struct sock *);
void (*sk_odata)(struct sock *, int bytes);
+ void (*sk_owspace)(struct sock *);
/* private TCP part */
int sk_reclen; /* length of record */
int sk_tcplen; /* current read length */
-
- /* Debugging */
- struct svc_rqst * sk_rqstp;
+ time_t sk_lastrecv; /* time of last received request */
};
/*
@@ -55,5 +55,6 @@ void svc_delete_socket(struct svc_sock *);
int svc_recv(struct svc_serv *, struct svc_rqst *, long);
int svc_send(struct svc_rqst *);
void svc_drop(struct svc_rqst *);
+void svc_sock_update_bufs(struct svc_serv *serv);
#endif /* SUNRPC_SVCSOCK_H */
diff --git a/include/linux/sunrpc/types.h b/include/linux/sunrpc/types.h
index 232ac45c725e..d524016fb4ba 100644
--- a/include/linux/sunrpc/types.h
+++ b/include/linux/sunrpc/types.h
@@ -12,60 +12,7 @@
#include <linux/timer.h>
#include <linux/tqueue.h>
#include <linux/sunrpc/debug.h>
-
-/*
- * These are the RPC list manipulation primitives used everywhere.
- */
-struct rpc_listitem {
- struct rpc_listitem * prev;
- struct rpc_listitem * next;
-};
-
-static __inline__ void
-__rpc_append_list(struct rpc_listitem **q, struct rpc_listitem *item)
-{
- struct rpc_listitem *next, *prev;
-
- if (!(next = *q)) {
- *q = item->next = item->prev = item;
- } else {
- prev = next->prev;
- prev->next = item;
- next->prev = item;
- item->next = next;
- item->prev = prev;
- }
-}
-
-static __inline__ void
-__rpc_insert_list(struct rpc_listitem **q, struct rpc_listitem *item)
-{
- __rpc_append_list(q, item);
- *q = item;
-}
-
-static __inline__ void
-__rpc_remove_list(struct rpc_listitem **q, struct rpc_listitem *item)
-{
- struct rpc_listitem *prev = item->prev,
- *next = item->next;
-
- if (item != prev) {
- next->prev = prev;
- prev->next = next;
- } else {
- next = NULL;
- }
- if (*q == item)
- *q = next;
-}
-
-#define rpc_insert_list(q, i) \
- __rpc_insert_list((struct rpc_listitem **) q, (struct rpc_listitem *) i)
-#define rpc_append_list(q, i) \
- __rpc_append_list((struct rpc_listitem **) q, (struct rpc_listitem *) i)
-#define rpc_remove_list(q, i) \
- __rpc_remove_list((struct rpc_listitem **) q, (struct rpc_listitem *) i)
+#include <linux/list.h>
/*
* Shorthands
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 583af126199b..391668010831 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -44,8 +44,8 @@
/*
* USB directions
*/
-#define USB_DIR_OUT 0
-#define USB_DIR_IN 0x80
+#define USB_DIR_OUT 0 /* to device */
+#define USB_DIR_IN 0x80 /* to host */
/*
* Endpoints
@@ -148,12 +148,6 @@ struct usb_devmap {
unsigned long devicemap[128 / (8*sizeof(unsigned long))];
};
-#define USB_MAXBUS 64
-
-struct usb_busmap {
- unsigned long busmap[USB_MAXBUS / (8*sizeof(unsigned long))];
-};
-
struct usb_device;
/*-------------------------------------------------------------------------*/
@@ -516,7 +510,8 @@ struct usb_device_id {
* work to connect to a device should be done when the device is opened,
* and undone at the last close. The disconnect code needs to address
* concurrency issues with respect to open() and close() methods, as
- * well as cancel any I/O requests that are still pending.
+ * well as forcing all pending I/O requests to complete (by unlinking
+ * them as necessary, and blocking until the unlinks complete).
*/
struct usb_driver {
struct module *owner;
@@ -905,13 +900,7 @@ extern int usb_make_path(struct usb_device *dev, char *buf, size_t size);
/* Host Controller Driver (HCD) support */
-struct usb_operations {
- int (*allocate)(struct usb_device *);
- int (*deallocate)(struct usb_device *);
- int (*get_frame_number) (struct usb_device *usb_dev);
- int (*submit_urb) (struct urb *urb, int mem_flags);
- int (*unlink_urb) (struct urb *urb);
-};
+struct usb_operations;
#define DEVNUM_ROUND_ROBIN /***** OPTION *****/
@@ -944,41 +933,12 @@ struct usb_bus {
atomic_t refcnt;
};
-extern struct usb_bus *usb_alloc_bus(struct usb_operations *);
-extern void usb_free_bus(struct usb_bus *);
-extern void usb_register_bus(struct usb_bus *);
-extern void usb_deregister_bus(struct usb_bus *);
-extern int usb_register_root_hub(struct usb_device *usb_dev, struct device *parent_dev);
-
-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);
+// FIXME: root_hub_string vanishes when "usb_hcd" conversion is done,
+// along with pre-hcd versions of the OHCI and UHCI drivers.
extern int usb_root_hub_string(int id, int serial,
char *type, __u8 *data, int len);
/*
- * Some USB 1.1 bandwidth allocation constants.
- */
-#define BW_HOST_DELAY 1000L /* nanoseconds */
-#define BW_HUB_LS_SETUP 333L /* nanoseconds */
- /* 4 full-speed bit times (est.) */
-
-#define FRAME_TIME_BITS 12000L /* frame = 1 millisecond */
-#define FRAME_TIME_MAX_BITS_ALLOC (90L * FRAME_TIME_BITS / 100L)
-#define FRAME_TIME_USECS 1000L
-#define FRAME_TIME_MAX_USECS_ALLOC (90L * FRAME_TIME_USECS / 100L)
-
-#define BitTime(bytecount) (7 * 8 * bytecount / 6) /* with integer truncation */
- /* Trying not to use worst-case bit-stuffing
- of (7/6 * 8 * bytecount) = 9.33 * bytecount */
- /* bytecount = data payload byte count */
-
-#define NS_TO_US(ns) ((ns + 500L) / 1000L)
- /* convert & round nanoseconds to microseconds */
-
-/*
* As of USB 2.0, full/low speed devices are segregated into trees.
* One type grows from USB 1.1 host controllers (OHCI, UHCI etc).
* The other type grows from high speed hubs when they connect to
@@ -1209,13 +1169,11 @@ void usb_show_string(struct usb_device *dev, char *id, int index);
/* -------------------------------------------------------------------------- */
/*
- * bus and driver list
+ * driver list
* exported only for usbfs (not visible outside usbcore)
*/
extern struct list_head usb_driver_list;
-extern struct list_head usb_bus_list;
-extern struct semaphore usb_bus_list_lock;
/*
* USB device fs stuff