diff options
Diffstat (limited to 'include/linux')
41 files changed, 697 insertions, 240 deletions
diff --git a/include/linux/atm_idt77105.h b/include/linux/atm_idt77105.h index 70e9e6e59..05621cf20 100644 --- a/include/linux/atm_idt77105.h +++ b/include/linux/atm_idt77105.h @@ -9,6 +9,7 @@ #include <asm/types.h> #include <linux/atmioc.h> +#include <linux/atmdev.h> /* * Structure for IDT77105_GETSTAT and IDT77105_GETSTATZ ioctls. @@ -21,20 +22,7 @@ struct idt77105_stats { __u32 rx_hec_errors; /* Header Error Check errors on receive */ }; -#define IDT77105_GETLOOP _IOW('a',ATMIOC_PHYPRV,struct atmif_sioc) /* get loopback mode */ -#define IDT77105_SETLOOP _IOW('a',ATMIOC_PHYPRV+1,struct atmif_sioc) /* set loopback mode */ #define IDT77105_GETSTAT _IOW('a',ATMIOC_PHYPRV+2,struct atmif_sioc) /* get stats */ #define IDT77105_GETSTATZ _IOW('a',ATMIOC_PHYPRV+3,struct atmif_sioc) /* get stats and zero */ - -/* - * TODO: what we need is a global loopback mode get/set ioctl for - * all devices, not these device-specific hacks -- Greg Banks - */ -#define IDT77105_LM_NONE 0 /* no loopback */ -#define IDT77105_LM_DIAG 1 /* diagnostic (i.e. loop TX to RX) - * (a.k.a. local loopback) */ -#define IDT77105_LM_LOOP 2 /* line (i.e. loop RX to TX) - * (a.k.a. remote loopback) */ - #endif diff --git a/include/linux/atm_suni.h b/include/linux/atm_suni.h index 2e6a01a61..84f3aab54 100644 --- a/include/linux/atm_suni.h +++ b/include/linux/atm_suni.h @@ -1,19 +1,12 @@ /* atm_suni.h - Driver-specific declarations of the SUNI driver (for use by driver-specific utilities) */ -/* Written 1998 by Werner Almesberger, EPFL ICA */ +/* Written 1998,2000 by Werner Almesberger, EPFL ICA */ #ifndef LINUX_ATM_SUNI_H #define LINUX_ATM_SUNI_H -#include <linux/atmioc.h> - -#define SUNI_GETLOOP _IOR('a',ATMIOC_PHYPRV,int) /* get loopback mode */ -#define SUNI_SETLOOP _IO('a',ATMIOC_PHYPRV+1) /* set loopback mode */ - -#define SUNI_LM_NONE 0 /* no loopback */ -#define SUNI_LM_DIAG 1 /* diagnostic (i.e. loop TX to RX) */ -#define SUNI_LM_LOOP 2 /* line (i.e. loop RX to TX) */ +/* everything obsoleted */ #endif diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 95e97de35..0a9eb9762 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h @@ -1,6 +1,6 @@ /* atmdev.h - ATM device driver declarations and various related items */ -/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */ +/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ #ifndef LINUX_ATMDEV_H @@ -20,6 +20,8 @@ SONET overhead: /270*260 (9 section, 1 path) bits per cell: /8/53 max cell rate: 353207.547 cells/sec */ +#define ATM_25_PCR ((25600000/8-8000)/54) + /* 25 Mbps ATM cell rate (59111) */ #define ATM_PDU_OVHD 0 /* number of bytes to charge against buffer quota per PDU */ @@ -27,10 +29,17 @@ #define ATM_SD(s) ((s)->sk->protinfo.af_atm) +#define __AAL_STAT_ITEMS \ + __HANDLE_ITEM(tx); /* TX okay */ \ + __HANDLE_ITEM(tx_err); /* TX errors */ \ + __HANDLE_ITEM(rx); /* RX okay */ \ + __HANDLE_ITEM(rx_err); /* RX errors */ \ + __HANDLE_ITEM(rx_drop); /* RX out of memory */ + struct atm_aal_stats { - int tx,tx_err; /* TX okay and errors */ - int rx,rx_err; /* RX okay and errors */ - int rx_drop; /* RX out of memory */ +#define __HANDLE_ITEM(i) int i + __AAL_STAT_ITEMS +#undef __HANDLE_ITEM }; @@ -69,12 +78,53 @@ struct atm_dev_stats { /* get AAL layer statistics */ #define ATM_GETSTATZ _IOW('a',ATMIOC_SARCOM+1,struct atmif_sioc) /* get AAL layer statistics and zero */ +#define ATM_GETLOOP _IOW('a',ATMIOC_SARCOM+2,struct atmif_sioc) + /* get loopback mode */ +#define ATM_SETLOOP _IOW('a',ATMIOC_SARCOM+3,struct atmif_sioc) + /* set loopback mode */ +#define ATM_QUERYLOOP _IOW('a',ATMIOC_SARCOM+4,struct atmif_sioc) + /* query supported loopback modes */ #define ATM_SETSC _IOW('a',ATMIOC_SPECIAL+1,int) /* enable or disable single-copy */ /* for ATM_GETTYPE */ #define ATM_ITFTYP_LEN 8 /* maximum length of interface type name */ +/* + * Loopback modes for ATM_{PHY,SAR}_{GET,SET}LOOP + */ + +/* Point of loopback CPU-->SAR-->PHY-->line--> ... */ +#define __ATM_LM_NONE 0 /* no loop back ^ ^ ^ ^ */ +#define __ATM_LM_AAL 1 /* loop back PDUs --' | | | */ +#define __ATM_LM_ATM 2 /* loop back ATM cells ---' | | */ +/* RESERVED 4 loop back on PHY side ---' */ +#define __ATM_LM_PHY 8 /* loop back bits (digital) ----' | */ +#define __ATM_LM_ANALOG 16 /* loop back the analog signal --------' */ + +/* Direction of loopback */ +#define __ATM_LM_MKLOC(n) ((n)) /* Local (i.e. loop TX to RX) */ +#define __ATM_LM_MKRMT(n) ((n) << 8) /* Remote (i.e. loop RX to TX) */ + +#define __ATM_LM_XTLOC(n) ((n) & 0xff) +#define __ATM_LM_XTRMT(n) (((n) >> 8) & 0xff) + +#define ATM_LM_NONE 0 /* no loopback */ + +#define ATM_LM_LOC_AAL __ATM_LM_MKLOC(__ATM_LM_AAL) +#define ATM_LM_LOC_ATM __ATM_LM_MKLOC(__ATM_LM_ATM) +#define ATM_LM_LOC_PHY __ATM_LM_MKLOC(__ATM_LM_PHY) +#define ATM_LM_LOC_ANALOG __ATM_LM_MKLOC(__ATM_LM_ANALOG) + +#define ATM_LM_RMT_AAL __ATM_LM_MKRMT(__ATM_LM_AAL) +#define ATM_LM_RMT_ATM __ATM_LM_MKRMT(__ATM_LM_ATM) +#define ATM_LM_RMT_PHY __ATM_LM_MKRMT(__ATM_LM_PHY) +#define ATM_LM_RMT_ANALOG __ATM_LM_MKRMT(__ATM_LM_ANALOG) + +/* + * Note: ATM_LM_LOC_* and ATM_LM_RMT_* can be combined, provided that + * __ATM_LM_XTLOC(x) <= __ATM_LM_XTRMT(x) + */ struct atm_iobuf { @@ -132,7 +182,9 @@ struct atm_cirange { "SESSION", "HASSAP", "BOUND", "CLOSE" -#ifdef __KERNEL__ +#ifndef __KERNEL__ +#undef __AAL_STAT_ITEMS +#else #include <linux/sched.h> /* wait_queue_head_t */ #include <linux/time.h> /* struct timeval */ @@ -147,39 +199,56 @@ struct atm_cirange { #endif -#define ATM_VF_ADDR 1 /* Address is in use. Set by anybody, cleared +struct k_atm_aal_stats { +#define __HANDLE_ITEM(i) atomic_t i + __AAL_STAT_ITEMS +#undef __HANDLE_ITEM +}; + + +struct k_atm_dev_stats { + struct k_atm_aal_stats aal0; + struct k_atm_aal_stats aal34; + struct k_atm_aal_stats aal5; +}; + + +enum { + ATM_VF_ADDR, /* Address is in use. Set by anybody, cleared by device driver. */ -#define ATM_VF_READY 2 /* VC is ready to transfer data. Set by device + ATM_VF_READY, /* VC is ready to transfer data. Set by device driver, cleared by anybody. */ -#define ATM_VF_PARTIAL 4 /* resources are bound to PVC (partial PVC + ATM_VF_PARTIAL, /* resources are bound to PVC (partial PVC setup), controlled by socket layer */ -#define ATM_VF_BOUND 16384 /* local SAP is set, controlled by SVC socket - layer */ -#define ATM_VF_REGIS 8 /* registered with demon, controlled by SVC + ATM_VF_REGIS, /* registered with demon, controlled by SVC socket layer */ -#define ATM_VF_RELEASED 16 /* demon has indicated/requested release, + ATM_VF_BOUND, /* local SAP is set, controlled by SVC socket + layer */ + ATM_VF_RELEASED, /* demon has indicated/requested release, controlled by SVC socket layer */ -#define ATM_VF_HASQOS 32 /* QOS parameters have been set */ -#define ATM_VF_LISTEN 64 /* socket is used for listening */ -#define ATM_VF_META 128 /* SVC socket isn't used for normal data + ATM_VF_HASQOS, /* QOS parameters have been set */ + ATM_VF_LISTEN, /* socket is used for listening */ + ATM_VF_META, /* SVC socket isn't used for normal data traffic and doesn't depend on signaling to be available */ - /* 256; unused */ - /* 512; unused */ - /* 1024; unused */ - /* 2048; unused */ -#define ATM_VF_SESSION 4096 /* VCC is p2mp session control descriptor */ -#define ATM_VF_HASSAP 8192 /* SAP has been set */ -#define ATM_VF_CLOSE 32768 /* asynchronous close - treat like VF_RELEASED*/ + ATM_VF_SESSION, /* VCC is p2mp session control descriptor */ + ATM_VF_HASSAP, /* SAP has been set */ + ATM_VF_CLOSE, /* asynchronous close - treat like VF_RELEASED*/ +}; + #define ATM_VF2VS(flags) \ - ((flags) & ATM_VF_READY ? ATM_VS_CONNECTED : \ - (flags) & ATM_VF_RELEASED ? ATM_VS_CLOSING : \ - (flags) & ATM_VF_LISTEN ? ATM_VS_LISTEN : \ - (flags) & ATM_VF_REGIS ? ATM_VS_INUSE : \ - (flags) & ATM_VF_BOUND ? ATM_VS_BOUND : ATM_VS_IDLE) + (test_bit(ATM_VF_READY,&(flags)) ? ATM_VS_CONNECTED : \ + test_bit(ATM_VF_RELEASED,&(flags)) ? ATM_VS_CLOSING : \ + test_bit(ATM_VF_LISTEN,&(flags)) ? ATM_VS_LISTEN : \ + test_bit(ATM_VF_REGIS,&(flags)) ? ATM_VS_INUSE : \ + test_bit(ATM_VF_BOUND,&(flags)) ? ATM_VS_BOUND : ATM_VS_IDLE) + + +enum { + ATM_DF_CLOSE, /* close device when last VCC is closed */ +}; -#define ATM_DF_CLOSE 1 /* close device when last VCC is closed */ #define ATM_PHY_SIG_LOST 0 /* no carrier/light */ #define ATM_PHY_SIG_UNKNOWN 1 /* carrier/light status is unknown */ @@ -188,8 +257,11 @@ struct atm_cirange { #define ATM_ATMOPT_CLP 1 /* set CLP bit */ +typedef struct { unsigned short bits; } atm_vcc_flags_t; + + struct atm_vcc { - unsigned short flags; /* VCC flags (ATM_VF_*) */ + atm_vcc_flags_t flags; /* VCC flags (ATM_VF_*) */ unsigned char family; /* address family; 0 if unused */ short vpi; /* VPI and VCI (types must be equal */ /* with sockaddr) */ @@ -207,11 +279,12 @@ struct atm_vcc { /* modified by protocol or by driver.*/ /* NOTE: this interface will change */ int (*push_oam)(struct atm_vcc *vcc,void *cell); + int (*send)(struct atm_vcc *vcc,struct sk_buff *skb); void *dev_data; /* per-device data */ void *proto_data; /* per-protocol data */ struct timeval timestamp; /* AAL timestamps */ struct sk_buff_head recvq; /* receive queue */ - struct atm_aal_stats *stats; /* pointer to AAL stats group */ + struct k_atm_aal_stats *stats; /* pointer to AAL stats group */ wait_queue_head_t sleep; /* if socket is busy */ wait_queue_head_t wsleep; /* if waiting for write buffer space */ struct sock *sk; /* socket backpointer */ @@ -240,6 +313,9 @@ struct atm_dev_addr { }; +typedef struct { unsigned int bits; } atm_dev_flags_t; + + struct atm_dev { const struct atmdev_ops *ops; /* device operations; NULL if unused */ const struct atmphy_ops *phy; /* PHY operations, may be undefined */ @@ -250,11 +326,11 @@ struct atm_dev { struct atm_vcc *last; /* last VCC (or undefined) */ void *dev_data; /* per-device data */ void *phy_data; /* private PHY date */ - unsigned long flags; /* device flags (ATM_DF_*) */ + atm_dev_flags_t flags; /* device flags (ATM_DF_*) */ struct atm_dev_addr *local; /* local ATM addresses */ unsigned char esi[ESI_LEN]; /* ESI ("MAC" addr) */ struct atm_cirange ci_range; /* VPI/VCI range */ - struct atm_dev_stats stats; /* statistics */ + struct k_atm_dev_stats stats; /* statistics */ char signal; /* signal status (ATM_PHY_SIG_*) */ int link_rate; /* link rate (default: OC3) */ #ifdef CONFIG_PROC_FS @@ -307,6 +383,7 @@ struct atmphy_ops { int (*start)(struct atm_dev *dev); int (*ioctl)(struct atm_dev *dev,unsigned int cmd,void *arg); void (*interrupt)(struct atm_dev *dev); + int (*stop)(struct atm_dev *dev); }; struct atm_skb_data { @@ -318,7 +395,7 @@ struct atm_skb_data { #define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb)) struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops, - int number,unsigned long flags); /* number == -1: pick first available */ + int number,atm_dev_flags_t *flags); /* number == -1: pick first available */ struct atm_dev *atm_find_dev(int number); void atm_dev_deregister(struct atm_dev *dev); void shutdown_atm_dev(struct atm_dev *dev); diff --git a/include/linux/awe_voice.h b/include/linux/awe_voice.h index aed60f5c2..9ca80334f 100644 --- a/include/linux/awe_voice.h +++ b/include/linux/awe_voice.h @@ -3,9 +3,9 @@ * * Voice information definitions for the low level driver for the * AWE32/SB32/AWE64 wave table synth. - * version 0.4.3; Feb. 1, 1999 + * version 0.4.4; Jan. 4, 2000 * - * Copyright (C) 1996-1999 Takashi Iwai + * Copyright (C) 1996-2000 Takashi Iwai * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -57,6 +57,7 @@ typedef struct awe_patch_info { #define AWE_MAP_PRESET 6 /* awe_voice_map */ /*#define AWE_PROBE_INFO 7*/ /* awe_voice_map (pat only) */ #define AWE_PROBE_DATA 8 /* optarg=sample */ +#define AWE_REMOVE_INFO 9 /* optarg=(bank<<8)|instr */ #define AWE_LOAD_CHORUS_FX 0x10 /* awe_chorus_fx_rec (optarg=mode) */ #define AWE_LOAD_REVERB_FX 0x11 /* awe_reverb_fx_rec (optarg=mode) */ diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 14e163b0e..04e9963de 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h @@ -21,7 +21,7 @@ struct linux_binprm{ struct page *page[MAX_ARG_PAGES]; unsigned long p; /* current top of mem */ int sh_bang; - struct dentry * dentry; + struct file * file; int e_uid, e_gid; kernel_cap_t cap_inheritable, cap_permitted, cap_effective; int argc, envc; @@ -45,11 +45,6 @@ struct linux_binfmt { extern int register_binfmt(struct linux_binfmt *); extern int unregister_binfmt(struct linux_binfmt *); -extern int read_exec(struct dentry *, unsigned long offset, - char * addr, unsigned long count, int to_kmem); - -extern int open_dentry(struct dentry *, int mode); - extern int prepare_binprm(struct linux_binprm *); extern void remove_arg_zero(struct linux_binprm *); extern int search_binary_handler(struct linux_binprm *,struct pt_regs *); diff --git a/include/linux/capi.h b/include/linux/capi.h index 9876da085..b5cd26c52 100644 --- a/include/linux/capi.h +++ b/include/linux/capi.h @@ -1,11 +1,28 @@ /* - * $Id: capi.h,v 1.1 1997/03/04 21:27:33 calle Exp $ + * $Id: capi.h,v 1.3 2000/03/08 17:06:34 calle Exp $ * * CAPI 2.0 Interface for Linux * * Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de) * * $Log: capi.h,v $ + * Revision 1.3 2000/03/08 17:06:34 calle + * - changes for devfs and 2.3.49 + * - capifs now configurable (no need with devfs) + * - New Middleware ioctl CAPI_NCCI_GETUNIT + * - Middleware again tested with 2.2.14 and 2.3.49 (with and without devfs) + * + * Revision 1.2 2000/03/03 15:50:42 calle + * - kernel CAPI: + * - Changed parameter "param" in capi_signal from __u32 to void *. + * - rewrote notifier handling in kcapi.c + * - new notifier NCCI_UP and NCCI_DOWN + * - User CAPI: + * - /dev/capi20 is now a cloning device. + * - middleware extentions prepared. + * - capidrv.c + * - locking of list operations and module count updates. + * * Revision 1.1 1997/03/04 21:27:33 calle * First version in isdn4linux * @@ -108,6 +125,7 @@ typedef struct capi_manufacturer_cmd { */ #define CAPI_INSTALLED _IOR('C',0x22, __u16) + /* * member contr is input for * CAPI_GET_MANUFACTURER, CAPI_VERSION, CAPI_GET_SERIAL @@ -124,4 +142,18 @@ typedef union capi_ioctl_struct { __u16 errcode; } capi_ioctl_struct; +/* + * Middleware extension + */ + +#define CAPIFLAG_HIGHJACKING 0x0001 + +#define CAPI_GET_FLAGS _IOR('C',0x23, unsigned) +#define CAPI_SET_FLAGS _IOR('C',0x24, unsigned) +#define CAPI_CLR_FLAGS _IOR('C',0x25, unsigned) + +#define CAPI_NCCI_OPENCOUNT _IOR('C',0x26, unsigned) + +#define CAPI_NCCI_GETUNIT _IOR('C',0x27, unsigned) + #endif /* __LINUX_CAPI_H__ */ diff --git a/include/linux/circ_buf.h b/include/linux/circ_buf.h new file mode 100644 index 000000000..a2ed0591f --- /dev/null +++ b/include/linux/circ_buf.h @@ -0,0 +1,32 @@ +#ifndef _LINUX_CIRC_BUF_H +#define _LINUX_CIRC_BUF_H 1 + +struct circ_buf { + char *buf; + int head; + int tail; +}; + +/* Return count in buffer. */ +#define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1)) + +/* Return space available, 0..size-1. We always leave one free char + as a completely full buffer has head == tail, which is the same as + empty. */ +#define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size)) + +/* Return count up to the end of the buffer. Carefully avoid + accessing head and tail more than once, so they can change + underneath us without returning inconsistent results. */ +#define CIRC_CNT_TO_END(head,tail,size) \ + ({int end = (size) - (tail); \ + int n = ((head) + end) & ((size)-1); \ + n < end ? n : end;}) + +/* Return space available up to the end of the buffer. */ +#define CIRC_SPACE_TO_END(head,tail,size) \ + ({int end = (size) - 1 - (head); \ + int n = (end + (tail)) & ((size)-1); \ + n <= end ? n : end+1;}) + +#endif /* _LINUX_CIRC_BUF_H */ diff --git a/include/linux/dcache.h b/include/linux/dcache.h index c5ef464b4..4cc4c56ce 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -157,6 +157,9 @@ extern struct dentry * d_alloc_root(struct inode *); /* test whether root is busy without destroying dcache */ extern int is_root_busy(struct dentry *); +/* test whether we have any submounts in a subdir tree */ +extern int have_submounts(struct dentry *); + /* * This adds the entry to the hash queues. */ diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index 85e8d092f..25178b66b 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h @@ -306,10 +306,7 @@ struct ext2_inode { /* * Mount flags */ -#define EXT2_MOUNT_CHECK_NORMAL 0x0001 /* Do some more checks */ -#define EXT2_MOUNT_CHECK_STRICT 0x0002 /* Do again more checks */ -#define EXT2_MOUNT_CHECK (EXT2_MOUNT_CHECK_NORMAL | \ - EXT2_MOUNT_CHECK_STRICT) +#define EXT2_MOUNT_CHECK 0x0001 /* Do mount-time checks */ #define EXT2_MOUNT_GRPID 0x0004 /* Create files with directory's group */ #define EXT2_MOUNT_DEBUG 0x0008 /* Some debugging messages */ #define EXT2_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */ diff --git a/include/linux/fb.h b/include/linux/fb.h index d763e4ba8..c7df47297 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -435,12 +435,41 @@ struct fb_videomode { u32 vmode; }; +#ifdef MODULE +static inline int fb_find_mode(struct fb_var_screeninfo *var, + struct fb_info *info, const char *mode_option, + const struct fb_videomode *db, + unsigned int dbsize, + const struct fb_videomode *default_mode, + unsigned int default_bpp) +{ + extern int __fb_try_mode(struct fb_var_screeninfo *var, + struct fb_info *info, + const struct fb_videomode *mode, + unsigned int bpp); + /* + * FIXME: How to make the compiler optimize vga640x400 away if + * default_mode is non-NULL? + */ + static const struct fb_videomode vga640x400 = { + /* 640x400 @ 70 Hz, 31.5 kHz hsync */ + NULL, 70, 640, 400, 39721, 40, 24, 39, 9, 96, 2, + 0, FB_VMODE_NONINTERLACED + }; + if (!default_mode) + default_mode = &vga640x400; + if (!default_bpp) + default_bpp = 8; + return __fb_try_mode(var, info, default_mode, default_bpp); +} +#else extern int __init fb_find_mode(struct fb_var_screeninfo *var, struct fb_info *info, const char *mode_option, const struct fb_videomode *db, unsigned int dbsize, const struct fb_videomode *default_mode, unsigned int default_bpp); +#endif #endif /* __KERNEL__ */ diff --git a/include/linux/fs.h b/include/linux/fs.h index 1001d5cba..c1d3ffe75 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -339,7 +339,7 @@ struct address_space; struct address_space_operations { int (*writepage) (struct dentry *, struct page *); int (*readpage)(struct dentry *, struct page *); - int (*prepare_write)(struct page *, unsigned, unsigned); + int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); int (*commit_write)(struct file *, struct page *, unsigned, unsigned); /* Unfortunately this kludge is needed for FIBMAP. Don't use it */ int (*bmap)(struct address_space *, long); @@ -751,8 +751,7 @@ static inline int vfs_statfs(struct super_block *sb, struct statfs *buf) return -ENODEV; if (!sb->s_op || !sb->s_op->statfs) return -ENOSYS; - memset(buf, 0xff, sizeof(struct statfs)); - buf->f_blocks = 0; /* Darn GNU df... */ + memset(buf, 0, sizeof(struct statfs)); return sb->s_op->statfs(sb, buf); } @@ -814,6 +813,7 @@ extern int get_unused_fd(void); extern void put_unused_fd(unsigned int); extern struct file *filp_open(const char *, int, int, struct dentry *); +extern struct file *dentry_open(struct dentry *, int); extern int filp_close(struct file *, fl_owner_t id); extern char * getname(const char *); @@ -938,6 +938,9 @@ static inline struct dentry * open_namei(const char *pathname) return __open_namei(pathname, 0, 0, NULL); } +extern int kernel_read(struct file *, unsigned long, char *, unsigned long); +extern struct file * open_exec(const char *); + /* fs/dcache.c -- generic fs support functions */ extern int is_subdir(struct dentry *, struct dentry *); extern ino_t find_inode_number(struct dentry *, struct qstr *); diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h index 94030b18d..70635b491 100644 --- a/include/linux/hdreg.h +++ b/include/linux/hdreg.h @@ -193,8 +193,20 @@ struct hd_geometry { #define HDIO_SET_NICE 0x0329 /* set nice flags */ #define HDIO_UNREGISTER_HWIF 0x032a /* unregister interface */ -#define __NEW_HD_DRIVE_ID +/* BIG GEOMETRY */ +struct hd_big_geometry { + unsigned char heads; + unsigned char sectors; + unsigned int cylinders; + unsigned long start; +}; + +/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x033n/0x033n */ +#define HDIO_GETGEO_BIG 0x0330 /* */ +#define HDIO_GETGEO_BIG_RAW 0x0331 /* */ + +#define __NEW_HD_DRIVE_ID /* structure returned by HDIO_GET_IDENTITY, as per ANSI ATA2 rev.2f spec */ struct hd_driveid { unsigned short config; /* lots of obsolete bit flags */ diff --git a/include/linux/ide.h b/include/linux/ide.h index 248c37b39..ae597c151 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -326,6 +326,7 @@ typedef enum { ide_dma_read, ide_dma_write, ide_dma_begin, ide_dma_end, ide_dma_check, ide_dma_on, ide_dma_off, ide_dma_off_quietly, ide_dma_test_irq, ide_dma_bad_drive, ide_dma_good_drive, + ide_dma_verbose, ide_dma_retune, ide_dma_lostirq, ide_dma_timeout } ide_dma_action_t; @@ -857,6 +858,7 @@ int ide_build_dmatable (ide_drive_t *drive, ide_dma_action_t func); void ide_destroy_dmatable (ide_drive_t *drive); ide_startstop_t ide_dma_intr (ide_drive_t *drive); int check_drive_lists (ide_drive_t *drive, int good_bad); +int report_drive_dmaing (ide_drive_t *drive); int ide_dmaproc (ide_dma_action_t func, ide_drive_t *drive); int ide_release_dma (ide_hwif_t *hwif); void ide_setup_dma (ide_hwif_t *hwif, unsigned long dmabase, unsigned int num_ports) __init; diff --git a/include/linux/input.h b/include/linux/input.h index d5b75700a..4cc82fbf4 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -302,9 +302,10 @@ struct input_event { #define BTN_TOOL_AIRBRUSH 0x144 #define BTN_TOOL_FINGER 0x145 #define BTN_TOOL_MOUSE 0x146 -#define BTN_TOUCH 0x147 -#define BTN_STYLUS 0x148 -#define BTN_STYLUS2 0x149 +#define BTN_TOOL_LENS 0x147 +#define BTN_TOUCH 0x14a +#define BTN_STYLUS 0x14b +#define BTN_STYLUS2 0x14c #define KEY_MAX 0x1ff diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h index 7a52a7c4d..0985c29fb 100644 --- a/include/linux/isapnp.h +++ b/include/linux/isapnp.h @@ -128,6 +128,24 @@ struct isapnp_resources { struct isapnp_resources *next; /* next resource */ }; +#define ISAPNP_ANY_ID 0xffff +#define ISAPNP_CARD_DEVS 8 + +#define ISAPNP_CARD_ID(_va, _vb, _vc, _device) \ + vendor: ISAPNP_VENDOR(_va, _vb, _vc), device: ISAPNP_DEVICE(_device) +#define ISAPNP_CARD_END \ + vendor: 0, device: 0 +#define ISAPNP_DEVICE_ID(_va, _vb, _vc, _function) \ + { vendor: ISAPNP_VENDOR(_va, _vb, _vc), function: ISAPNP_FUNCTION(_function) } + +struct isapnp_card_id { + unsigned short vendor, device; + struct { + unsigned short vendor, function; + } devs[ISAPNP_CARD_DEVS]; /* logical devices */ + unsigned long driver_data; /* data private to the driver */ +}; + #if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE)) #define __ISAPNP__ @@ -158,6 +176,9 @@ struct pci_dev *isapnp_find_dev(struct pci_bus *card, unsigned short vendor, unsigned short function, struct pci_dev *from); +int isapnp_probe_cards(const struct isapnp_card_id *ids, + int (*probe)(struct pci_bus *card, + const struct isapnp_card_id *id)); /* misc */ void isapnp_resource_change(struct resource *resource, unsigned long start, @@ -196,7 +217,10 @@ extern inline struct pci_bus *isapnp_find_card(unsigned short vendor, extern inline struct pci_dev *isapnp_find_dev(struct pci_bus *card, unsigned short vendor, unsigned short function, - struct pci_dev *from) { return NULL; } + struct pci_dev *from) { return NULL; } +extern inline int isapnp_probe_cards(const struct isapnp_card_id *ids, + int (*probe)(struct pci_bus *card, + const struct isapnp_card_id *id)) { return -ENODEV; } extern inline void isapnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { ; } diff --git a/include/linux/isdn.h b/include/linux/isdn.h index f34122fc3..c916a8fa0 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -1,4 +1,4 @@ -/* $Id: isdn.h,v 1.94 2000/02/26 00:29:40 keil Exp $ +/* $Id: isdn.h,v 1.101 2000/03/20 22:37:47 detabc Exp $ * * Main header for the Linux ISDN subsystem (linklevel). * @@ -21,6 +21,35 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: isdn.h,v $ + * Revision 1.101 2000/03/20 22:37:47 detabc + * modify abc-extension to work together with the new LL. + * remove abc frame-counter (is obsolete now). + * use the new lp->super_tx_queue for internal queueing (bsd-rawip-compress). + * modify isdn_net_xmit() and isdn_net_write_super(). + * -- Kai, please have a look to this two function's. Thank's. + * + * Revision 1.100 2000/03/19 15:27:53 kai + * no known bugs left... + * + * Revision 1.99 2000/03/18 16:20:26 kai + * cosmetics / renaming + * + * Revision 1.98 2000/03/17 18:20:47 kai + * moved to frame_cnt based flow control + * some races still need to be fixed + * + * Revision 1.97 2000/03/17 16:22:55 kai + * we keep track of outstanding packets (given to HL, but not confirmed yet) + * now, but we don't use it for flow control yet. + * + * Revision 1.96 2000/03/17 12:49:42 kai + * calling statcallb with ISDN_STAT_BSENT in hard-IRQ context is now + * officially allowed. writebuf_skb() will never be called in hard-IRQ context + * anymore. + * + * Revision 1.95 2000/03/04 16:20:42 detabc + * copy frames before rewriting frame's saddr + * * Revision 1.94 2000/02/26 00:29:40 keil * more softnet changes * @@ -395,7 +424,6 @@ #undef CONFIG_ISDN_WITH_ABC_CH_EXTINUSE #undef CONFIG_ISDN_WITH_ABC_CONN_ERROR #undef CONFIG_ISDN_WITH_ABC_RAWIPCOMPRESS -#undef CONFIG_ISDN_WITH_ABC_FRAME_LIMIT #undef CONFIG_ISDN_WITH_ABC_IPV4_RW_SOCKADDR #undef CONFIG_ISDN_WITH_ABC_IPV4_RWUDP_SOCKADDR @@ -701,7 +729,6 @@ typedef struct isdn_net_local_s { ulong sqfull_stamp; /* Start-Time of overload */ ulong slavedelay; /* Dynamic bundling delaytime */ int triggercps; /* BogoCPS needed for trigger slave */ - struct net_device *srobin; /* Ptr to Master device for slaves */ isdn_net_phone *phone[2]; /* List of remote-phonenumbers */ /* phone[0] = Incoming Numbers */ /* phone[1] = Outgoing Numbers */ @@ -711,9 +738,15 @@ typedef struct isdn_net_local_s { struct isdn_net_local_s *next; /* Ptr to next link in bundle */ struct isdn_net_local_s *last; /* Ptr to last link in bundle */ struct isdn_net_dev_s *netdev; /* Ptr to netdev */ - struct sk_buff *first_skb; /* Ptr to skb that triggers dialing */ - struct sk_buff *volatile sav_skb; /* Ptr to skb, rejected by LL-driver*/ + struct sk_buff_head super_tx_queue; /* List of supervisory frames to */ + /* be transmitted asap */ + atomic_t frame_cnt; /* number of frames currently */ + /* queued in HL driver */ /* Ptr to orig. hard_header_cache */ + spinlock_t xmit_lock; /* used to protect the xmit path of */ + /* a particular channel (including */ + /* the frame_cnt */ + int (*org_hhc)( struct neighbour *neigh, struct hh_cache *hh); @@ -733,13 +766,17 @@ typedef struct isdn_net_local_s { int cisco_loop; /* Loop counter for Cisco-SLARP */ ulong cisco_myseq; /* Local keepalive seq. for Cisco */ ulong cisco_yourseq; /* Remote keepalive seq. for Cisco */ + struct tq_struct tqueue; } isdn_net_local; /* the interface itself */ typedef struct isdn_net_dev_s { isdn_net_local *local; - isdn_net_local *queue; - void *next; /* Pointer to next isdn-interface */ + isdn_net_local *queue; /* circular list of all bundled + channels, which are currently + online */ + spinlock_t queue_lock; /* lock to protect queue */ + void *next; /* Pointer to next isdn-interface */ struct net_device dev; /* interface to upper levels */ #ifdef CONFIG_ISDN_PPP struct mpqueue *mp_last; diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h index 6ba3086ab..5536bd43a 100644 --- a/include/linux/isdn_ppp.h +++ b/include/linux/isdn_ppp.h @@ -29,9 +29,6 @@ struct pppcallinfo #define PPPIOCSCOMPRESSOR _IOW('t',135,int) #define PPPIOCGIFNAME _IOR('t',136, char [IFNAMSIZ] ) -#define PPP_MP 0x003d -#define PPP_LINK_COMP 0x00fb -#define PPP_LINK_CCP 0x80fb #define SC_MP_PROT 0x00000200 #define SC_REJ_MP_PROT 0x00000400 diff --git a/include/linux/kernelcapi.h b/include/linux/kernelcapi.h index b10f304a5..250191081 100644 --- a/include/linux/kernelcapi.h +++ b/include/linux/kernelcapi.h @@ -1,11 +1,22 @@ /* - * $Id: kernelcapi.h,v 1.5 2000/01/28 16:45:40 calle Exp $ + * $Id: kernelcapi.h,v 1.6 2000/03/03 15:50:42 calle Exp $ * * Kernel CAPI 2.0 Interface for Linux * * (c) Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de) * * $Log: kernelcapi.h,v $ + * Revision 1.6 2000/03/03 15:50:42 calle + * - kernel CAPI: + * - Changed parameter "param" in capi_signal from __u32 to void *. + * - rewrote notifier handling in kcapi.c + * - new notifier NCCI_UP and NCCI_DOWN + * - User CAPI: + * - /dev/capi20 is now a cloning device. + * - middleware extentions prepared. + * - capidrv.c + * - locking of list operations and module count updates. + * * Revision 1.5 2000/01/28 16:45:40 calle * new manufacturer command KCAPI_CMD_ADDCARD (generic addcard), * will search named driver and call the add_card function if one exist. @@ -94,8 +105,8 @@ struct capi_interface { __u16 (*capi_put_message) (__u16 applid, struct sk_buff * msg); __u16 (*capi_get_message) (__u16 applid, struct sk_buff ** msgp); __u16 (*capi_set_signal) (__u16 applid, - void (*signal) (__u16 applid, __u32 param), - __u32 param); + void (*signal) (__u16 applid, void *param), + void *param); __u16 (*capi_get_manufacturer) (__u32 contr, __u8 buf[CAPI_MANUFACTURER_LEN]); __u16 (*capi_get_version) (__u32 contr, struct capi_version * verp); __u16(*capi_get_serial) (__u32 contr, __u8 serial[CAPI_SERIAL_LEN]); @@ -108,8 +119,15 @@ struct capi_interface { }; -#define KCI_CONTRUP 0 -#define KCI_CONTRDOWN 1 +struct capi_ncciinfo { + __u16 applid; + __u32 ncci; +}; + +#define KCI_CONTRUP 0 /* struct capi_profile */ +#define KCI_CONTRDOWN 1 /* NULL */ +#define KCI_NCCIUP 2 /* struct capi_ncciinfo */ +#define KCI_NCCIDOWN 3 /* struct capi_ncciinfo */ struct capi_interface_user { char name[20]; @@ -148,6 +166,7 @@ int detach_capi_interface(struct capi_interface_user *); #define CAPI_MSGCTRLERNOTSUPPORTEXTEQUIP 0x110a #define CAPI_MSGCTRLERONLYSUPPORTEXTEQUIP 0x110b + #endif /* __KERNEL__ */ #endif /* __KERNELCAPI_H__ */ diff --git a/include/linux/linkage.h b/include/linux/linkage.h index c2619da50..aaf6edf02 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@ -1,6 +1,8 @@ #ifndef _LINUX_LINKAGE_H #define _LINUX_LINKAGE_H +#include <linux/config.h> + #ifdef __cplusplus #define CPP_ASMLINKAGE extern "C" #else @@ -35,13 +37,13 @@ #define __ALIGN .balign 4 #define __ALIGN_STR ".balign 4" #else -#if !defined(__i486__) && !defined(__i586__) -#define __ALIGN .align 4,0x90 -#define __ALIGN_STR ".align 4,0x90" -#else /* __i486__/__i586__ */ +#if defined(__i386__) && defined(CONFIG_X86_ALIGNMENT_16) #define __ALIGN .align 16,0x90 #define __ALIGN_STR ".align 16,0x90" -#endif /* __i486__/__i586__ */ +#else +#define __ALIGN .align 4,0x90 +#define __ALIGN_STR ".align 4,0x90" +#endif #endif /* __sh__ */ #endif /* __mc68000__ */ #endif /* __arm__ */ diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 13d09502b..bb19b0807 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -42,6 +42,9 @@ #define NET_XMIT_DROP 1 /* skb dropped */ #define NET_XMIT_CN 2 /* congestion notification */ #define NET_XMIT_POLICED 3 /* skb is shot by police */ +#define NET_XMIT_BYPASS 4 /* packet does not leave via dequeue; + (TC use only - dev_queue_xmit + returns this as NET_XMIT_SUCCESS) */ #define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0) diff --git a/include/linux/nfs.h b/include/linux/nfs.h index e476cdbf9..3dca58cbc 100644 --- a/include/linux/nfs.h +++ b/include/linux/nfs.h @@ -160,11 +160,35 @@ struct nfs_fsinfo { __u32 bavail; }; +/* Arguments to the write call. + * Note that NFS_WRITE_MAXIOV must be <= (MAX_IOVEC-2) from sunrpc/xprt.h + */ +#define NFS_WRITE_MAXIOV 8 + +enum nfs3_stable_how { + NFS_UNSTABLE = 0, + NFS_DATA_SYNC = 1, + NFS_FILE_SYNC = 2 +}; + struct nfs_writeargs { struct nfs_fh * fh; __u32 offset; __u32 count; - const void * buffer; + enum nfs3_stable_how stable; + unsigned int nriov; + struct iovec iov[NFS_WRITE_MAXIOV]; +}; + +struct nfs_writeverf { + enum nfs3_stable_how committed; + __u32 verifier[2]; +}; + +struct nfs_writeres { + struct nfs_fattr * fattr; + struct nfs_writeverf * verf; + __u32 count; }; #ifdef NFS_NEED_XDR_TYPES diff --git a/include/linux/nfs_flushd.h b/include/linux/nfs_flushd.h new file mode 100644 index 000000000..015a3c032 --- /dev/null +++ b/include/linux/nfs_flushd.h @@ -0,0 +1,64 @@ +#ifndef NFS_CLUSTER_H +#define NFS_CLUSTER_H + + + +#ifdef __KERNEL__ +#include <linux/nfs_fs_sb.h> + +/* + * Counters of total number and pending number of requests. + * When the total number of requests exceeds the soft limit, we start + * flushing out requests. If it exceeds the hard limit, we stall until + * it drops again. + */ +#define MAX_REQUEST_SOFT 192 +#define MAX_REQUEST_HARD 256 + +/* + * Maximum number of requests per write cluster. + * 32 requests per cluster account for 128K of data on an intel box. + * Note: it's a good idea to make this number smaller than MAX_REQUEST_SOFT. + * + * For 100Mbps Ethernet, 128 pages (i.e. 256K) per cluster gives much + * better performance. + */ +#define REQUEST_HASH_SIZE 16 +#define REQUEST_NR(off) ((off) >> PAGE_CACHE_SHIFT) +#define REQUEST_HASH(ino, off) (((ino) ^ REQUEST_NR(off)) & (REQUEST_HASH_SIZE - 1)) + + +/* + * Functions + */ +extern int nfs_reqlist_alloc(struct nfs_server *); +extern void nfs_reqlist_free(struct nfs_server *); +extern int nfs_reqlist_init(struct nfs_server *); +extern void nfs_reqlist_exit(struct nfs_server *); +extern void inode_schedule_scan(struct inode *, unsigned long); +extern void inode_remove_flushd(struct inode *); +extern void nfs_wake_flushd(void); + +/* + * This is the per-mount writeback cache. + */ +struct nfs_reqlist { + unsigned int nr_requests; + unsigned long runat; + wait_queue_head_t request_wait; + + /* The async RPC task that is responsible for scanning the + * requests. + */ + struct rpc_task *task; /* request flush task */ + + /* Authentication flavor handle for this NFS client */ + struct rpc_auth *auth; + + /* The list of all inodes with pending writebacks. */ + struct inode *inodes; +}; + +#endif + +#endif diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 3b1ae1764..19f1740f1 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -9,8 +9,10 @@ #ifndef _LINUX_NFS_FS_H #define _LINUX_NFS_FS_H +#include <linux/config.h> #include <linux/signal.h> #include <linux/sched.h> +#include <linux/pagemap.h> #include <linux/in.h> #include <linux/sunrpc/sched.h> @@ -34,13 +36,16 @@ */ #define NFS_MAX_DIRCACHE 16 -#define NFS_MAX_FILE_IO_BUFFER_SIZE 16384 +#define NFS_MAX_FILE_IO_BUFFER_SIZE 32768 #define NFS_DEF_FILE_IO_BUFFER_SIZE 4096 /* * The upper limit on timeouts for the exponential backoff algorithm. */ #define NFS_MAX_RPC_TIMEOUT (6*HZ) +#define NFS_WRITEBACK_DELAY (5*HZ) +#define NFS_WRITEBACK_LOCKDELAY (60*HZ) +#define NFS_COMMIT_DELAY (5*HZ) /* * Size of the lookup cache in units of number of entries cached. @@ -58,11 +63,13 @@ #define NFS_DSERVER(dentry) (&(dentry)->d_sb->u.nfs_sb.s_server) #define NFS_SERVER(inode) (&(inode)->i_sb->u.nfs_sb.s_server) #define NFS_CLIENT(inode) (NFS_SERVER(inode)->client) +#define NFS_REQUESTLIST(inode) (NFS_SERVER(inode)->rw_requests) #define NFS_ADDR(inode) (RPC_PEERADDR(NFS_CLIENT(inode))) #define NFS_CONGESTED(inode) (RPC_CONGESTED(NFS_CLIENT(inode))) #define NFS_READTIME(inode) ((inode)->u.nfs_i.read_cache_jiffies) #define NFS_OLDMTIME(inode) ((inode)->u.nfs_i.read_cache_mtime) +#define NFS_NEXTSCAN(inode) ((inode)->u.nfs_i.nextscan) #define NFS_CACHEINV(inode) \ do { \ NFS_READTIME(inode) = jiffies - 1000000; \ @@ -78,7 +85,6 @@ do { \ #define NFS_FLAGS(inode) ((inode)->u.nfs_i.flags) #define NFS_REVALIDATING(inode) (NFS_FLAGS(inode) & NFS_INO_REVALIDATING) -#define NFS_WRITEBACK(inode) ((inode)->u.nfs_i.writeback) #define NFS_COOKIES(inode) ((inode)->u.nfs_i.cookies) #define NFS_DIREOF(inode) ((inode)->u.nfs_i.direof) @@ -93,46 +99,31 @@ do { \ /* Flags in the RPC client structure */ #define NFS_CLNTF_BUFSIZE 0x0001 /* readdir buffer in longwords */ -#ifdef __KERNEL__ +#define NFS_RW_SYNC 0x0001 /* O_SYNC handling */ +#define NFS_RW_SWAP 0x0002 /* This is a swap request */ /* - * This struct describes a file region to be written. - * It's kind of a pity we have to keep all these lists ourselves, rather - * than sticking an extra pointer into struct page. + * When flushing a cluster of dirty pages, there can be different + * strategies: */ -struct nfs_wreq { - struct rpc_listitem wb_list; /* linked list of req's */ - struct rpc_task wb_task; /* RPC task */ - struct file * wb_file; /* dentry referenced */ - struct page * wb_page; /* page to be written */ - wait_queue_head_t wb_wait; /* wait for completion */ - unsigned int wb_offset; /* offset within page */ - unsigned int wb_bytes; /* dirty range */ - unsigned int wb_count; /* user count */ - int wb_status; - pid_t wb_pid; /* owner process */ - unsigned short wb_flags; /* status flags */ - - struct nfs_writeargs wb_args; /* NFS RPC stuff */ - struct nfs_fattr wb_fattr; /* file attributes */ -}; - -#define WB_NEXT(req) ((struct nfs_wreq *) ((req)->wb_list.next)) +#define FLUSH_AGING 0 /* only flush old buffers */ +#define FLUSH_SYNC 1 /* file being synced, or contention */ +#define FLUSH_WAIT 2 /* wait for completion */ +#define FLUSH_STABLE 4 /* commit to stable storage */ -/* - * Various flags for wb_flags - */ -#define NFS_WRITE_CANCELLED 0x0004 /* has been cancelled */ -#define NFS_WRITE_UNCOMMITTED 0x0008 /* written but uncommitted (NFSv3) */ -#define NFS_WRITE_INVALIDATE 0x0010 /* invalidate after write */ -#define NFS_WRITE_INPROGRESS 0x0100 /* RPC call in progress */ -#define NFS_WRITE_COMPLETE 0x0200 /* RPC call completed */ - -#define WB_CANCELLED(req) ((req)->wb_flags & NFS_WRITE_CANCELLED) -#define WB_UNCOMMITTED(req) ((req)->wb_flags & NFS_WRITE_UNCOMMITTED) -#define WB_INVALIDATE(req) ((req)->wb_flags & NFS_WRITE_INVALIDATE) -#define WB_INPROGRESS(req) ((req)->wb_flags & NFS_WRITE_INPROGRESS) -#define WB_COMPLETE(req) ((req)->wb_flags & NFS_WRITE_COMPLETE) +static inline +loff_t page_offset(struct page *page) +{ + return ((loff_t)page->index) << PAGE_CACHE_SHIFT; +} + +static inline +unsigned long page_index(struct page *page) +{ + return page->index; +} + +#ifdef __KERNEL__ /* * linux/fs/nfs/proc.c @@ -218,21 +209,54 @@ extern int nfs_lock(struct file *, int, struct file_lock *); */ extern int nfs_writepage(struct dentry *, struct page *); extern int nfs_check_failed_request(struct inode *); - +extern struct nfs_page* nfs_find_request(struct inode *, struct page *); +extern void nfs_release_request(struct nfs_page *req); +extern int nfs_flush_incompatible(struct file *file, struct page *page); +extern int nfs_updatepage(struct file *, struct page *, unsigned long, unsigned int); /* * Try to write back everything synchronously (but check the * return value!) */ -extern int nfs_wb_all(struct inode *); -extern int nfs_wb_page(struct inode *, struct page *); -extern int nfs_wb_file(struct inode *, struct file *); +extern int nfs_sync_file(struct inode *, struct file *, unsigned long, unsigned int, int); +extern int nfs_flush_file(struct inode *, struct file *, unsigned long, unsigned int, int); +extern int nfs_flush_timeout(struct inode *, int); +#ifdef CONFIG_NFS_V3 +extern int nfs_commit_file(struct inode *, struct file *, unsigned long, unsigned int, int); +extern int nfs_commit_timeout(struct inode *, int); +#endif + +static inline int +nfs_have_writebacks(struct inode *inode) +{ + return !list_empty(&inode->u.nfs_i.writeback); +} + +static inline int +nfs_wb_all(struct inode *inode) +{ + int error = nfs_sync_file(inode, 0, 0, 0, FLUSH_WAIT); + return (error < 0) ? error : 0; +} + +/* + * Write back all requests on one page - we do this before reading it. + */ +static inline int +nfs_wb_page(struct inode *inode, struct page* page) +{ + int error = nfs_sync_file(inode, 0, page_offset(page), PAGE_CACHE_SIZE, FLUSH_WAIT | FLUSH_STABLE); + return (error < 0) ? error : 0; +} /* - * Invalidate write-backs, possibly trying to write them - * back first.. + * Write back all pending writes for one user.. */ -extern void nfs_inval(struct inode *); -extern int nfs_updatepage(struct file *, struct page *, unsigned long, unsigned int); +static inline int +nfs_wb_file(struct inode *inode, struct file *file) +{ + int error = nfs_sync_file(inode, file, 0, 0, FLUSH_WAIT); + return (error < 0) ? error : 0; +} /* * linux/fs/nfs/read.c @@ -261,6 +285,19 @@ nfs_revalidate_inode(struct nfs_server *server, struct dentry *dentry) extern int nfs_root_mount(struct super_block *sb); +#define nfs_wait_event(clnt, wq, condition) \ +({ \ + int __retval = 0; \ + if (clnt->cl_intr) { \ + sigset_t oldmask; \ + rpc_clnt_sigmask(clnt, &oldmask); \ + __retval = wait_event_interruptible(wq, condition); \ + rpc_clnt_sigunmask(clnt, &oldmask); \ + } else \ + wait_event(wq, condition); \ + __retval; \ +}) + #endif /* __KERNEL__ */ /* diff --git a/include/linux/nfs_fs_i.h b/include/linux/nfs_fs_i.h index 22681be9d..d4a80639b 100644 --- a/include/linux/nfs_fs_i.h +++ b/include/linux/nfs_fs_i.h @@ -42,10 +42,19 @@ struct nfs_inode_info { /* * This is the list of dirty unwritten pages. - * NFSv3 will want to add a list for written but uncommitted - * pages. */ - struct nfs_wreq * writeback; + struct list_head dirty; + struct list_head commit; + struct list_head writeback; + + unsigned int ndirty, + ncommit, + npages; + + /* Flush daemon info */ + struct inode *hash_next, + *hash_prev; + unsigned long nextscan; /* Readdir caching information. */ void *cookies; @@ -55,8 +64,9 @@ struct nfs_inode_info { /* * Legal inode flag values */ -#define NFS_INO_REVALIDATING 0x0001 /* revalidating attrs */ +#define NFS_INO_REVALIDATING 0x0004 /* revalidating attrs */ #define NFS_IS_SNAPSHOT 0x0010 /* a snapshot file */ +#define NFS_INO_FLUSH 0x0020 /* inode is due for flushing */ /* * NFS lock info diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 343455ec9..418faaa33 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h @@ -18,6 +18,7 @@ struct nfs_server { unsigned int acdirmin; unsigned int acdirmax; char * hostname; /* remote hostname */ + struct nfs_reqlist * rw_requests; /* async read/write requests */ }; /* diff --git a/include/linux/nfsd/stats.h b/include/linux/nfsd/stats.h index 4169a1e21..3523a6daa 100644 --- a/include/linux/nfsd/stats.h +++ b/include/linux/nfsd/stats.h @@ -16,8 +16,17 @@ struct nfsd_stats { unsigned int fh_stale; /* FH stale error */ unsigned int fh_lookup; /* dentry cached */ unsigned int fh_anon; /* anon file dentry returned */ - unsigned int fh_nocache_dir; /* filehandle not foudn in dcache */ - unsigned int fh_nocache_nondir; /* filehandle not foudn in dcache */ + unsigned int fh_nocache_dir; /* filehandle not found in dcache */ + unsigned int fh_nocache_nondir; /* filehandle not found in dcache */ + unsigned int io_read; /* bytes returned to read requests */ + unsigned int io_write; /* bytes passed in write requests */ + unsigned int th_cnt; /* number of available threads */ + unsigned int th_usage[10]; /* number of ticks during which n perdeciles + * of available threads were in use */ + unsigned int th_fullcnt; /* number of times last free thread was used */ + unsigned int ra_size; /* size of ra cache */ + unsigned int ra_depth[11]; /* number of times ra entry was found that deep + * in the cache (10percentiles). [10] = not found */ }; #ifdef __KERNEL__ diff --git a/include/linux/nfsd/syscall.h b/include/linux/nfsd/syscall.h index af723ced8..4f20ad01f 100644 --- a/include/linux/nfsd/syscall.h +++ b/include/linux/nfsd/syscall.h @@ -111,10 +111,7 @@ struct nfsctl_arg { struct nfsctl_uidmap u_umap; struct nfsctl_fhparm u_getfh; struct nfsctl_fdparm u_getfd; -#ifdef notyet struct nfsctl_fsparm u_getfs; -#endif - unsigned int u_debug; } u; #define ca_svc u.u_svc #define ca_client u.u_client @@ -124,15 +121,11 @@ struct nfsctl_arg { #define ca_getfd u.u_getfd #define ca_getfs u.u_getfs #define ca_authd u.u_authd -#define ca_debug u.u_debug }; union nfsctl_res { __u8 cr_getfh[NFS_FHSIZE]; -#ifdef notyet struct knfsd_fh cr_getfs; -#endif - unsigned int cr_debug; }; #ifdef __KERNEL__ diff --git a/include/linux/pci.h b/include/linux/pci.h index 472c9d87e..55423de5c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -551,6 +551,8 @@ const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, co #ifndef CONFIG_PCI extern inline int pcibios_present(void) { return 0; } +extern inline int pcibios_find_class (unsigned int class_code, unsigned short index, unsigned char *bus, unsigned char *dev_fn) +{ return PCIBIOS_DEVICE_NOT_FOUND; } #define _PCI_NOP(o,s,t) \ extern inline int pcibios_##o##_config_##s## (u8 bus, u8 dfn, u8 where, t val) \ @@ -583,6 +585,7 @@ extern inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUS extern inline int pci_register_driver(struct pci_driver *drv) { return 0;} extern inline void pci_unregister_driver(struct pci_driver *drv) { } extern inline int scsi_to_pci_dma_dir(unsigned char scsi_dir) { return scsi_dir; } +extern inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } #else diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index d9909e0cc..2b37bcf20 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1053,6 +1053,12 @@ #define PCI_DEVICE_ID_OXSEMI_16PCI952 0x950A #define PCI_DEVICE_ID_OXSEMI_16PCI95N 0x9511 +#define PCI_VENDOR_ID_TITAN 0x14D2 +#define PCI_DEVICE_ID_TITAN_100 0xA001 +#define PCI_DEVICE_ID_TITAN_200 0xA005 +#define PCI_DEVICE_ID_TITAN_400 0xA003 +#define PCI_DEVICE_ID_TITAN_800B 0xA004 + #define PCI_VENDOR_ID_PANACOM 0x14d4 #define PCI_DEVICE_ID_PANACOM_QUADMODEM 0x0400 #define PCI_DEVICE_ID_PANACOM_DUALMODEM 0x0402 diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 25210f8e5..dfcba46fe 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h @@ -9,6 +9,8 @@ struct pipe_inode_info { unsigned int writers; unsigned int waiting_readers; unsigned int waiting_writers; + unsigned int r_counter; + unsigned int w_counter; }; /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual @@ -24,6 +26,8 @@ struct pipe_inode_info { #define PIPE_WRITERS(inode) ((inode).i_pipe->writers) #define PIPE_WAITING_READERS(inode) ((inode).i_pipe->waiting_readers) #define PIPE_WAITING_WRITERS(inode) ((inode).i_pipe->waiting_writers) +#define PIPE_RCOUNTER(inode) ((inode).i_pipe->r_counter) +#define PIPE_WCOUNTER(inode) ((inode).i_pipe->w_counter) #define PIPE_EMPTY(inode) (PIPE_LEN(inode) == 0) #define PIPE_FULL(inode) (PIPE_LEN(inode) == PIPE_SIZE) @@ -32,4 +36,9 @@ struct pipe_inode_info { #define PIPE_MAX_RCHUNK(inode) (PIPE_SIZE - PIPE_START(inode)) #define PIPE_MAX_WCHUNK(inode) (PIPE_SIZE - PIPE_END(inode)) +/* Drop the inode semaphore and wait for a pipe event, atomically */ +void pipe_wait(struct inode * inode); + +struct inode* pipe_new(struct inode* inode); + #endif diff --git a/include/linux/serial.h b/include/linux/serial.h index 48db96051..39d2de6e1 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h @@ -10,6 +10,8 @@ #ifndef _LINUX_SERIAL_H #define _LINUX_SERIAL_H +#include <asm/page.h> + /* * Counters of the input lines (CTS, DSR, RI, CD) interrupts */ @@ -23,12 +25,12 @@ struct async_icount { /* * The size of the serial xmit buffer is 1 page, or 4096 bytes */ -#define SERIAL_XMIT_SIZE 4096 +#define SERIAL_XMIT_SIZE PAGE_SIZE struct serial_struct { int type; int line; - int port; + unsigned long port; int irq; int flags; int xmit_fifo_size; diff --git a/include/linux/serialP.h b/include/linux/serialP.h index 6bb99d32f..8329b4580 100644 --- a/include/linux/serialP.h +++ b/include/linux/serialP.h @@ -22,6 +22,7 @@ #include <linux/config.h> #include <linux/termios.h> #include <linux/tqueue.h> +#include <linux/circ_buf.h> #include <linux/wait.h> struct serial_state { @@ -42,7 +43,7 @@ struct serial_state { unsigned short close_delay; unsigned short closing_wait; /* time to wait before closing */ struct async_icount icount; - struct termios normal_termios; + struct termios normal_termios; struct termios callout_termios; int io_type; struct async_struct *info; @@ -74,10 +75,8 @@ struct async_struct { int blocked_open; /* # of blocked opens */ long session; /* Session of opening process */ long pgrp; /* pgrp of opening process */ - unsigned char *xmit_buf; - int xmit_head; - int xmit_tail; - int xmit_cnt; + struct circ_buf xmit; + spinlock_t xmit_lock; u8 *iomem_base; u16 iomem_reg_shift; int io_type; @@ -101,11 +100,6 @@ struct async_struct { #define SSTATE_MAGIC 0x5302 /* - * The size of the serial xmit buffer is 1 page, or 4096 bytes - */ -#define SERIAL_XMIT_SIZE 4096 - -/* * Events are used to schedule things to happen at timer-interrupt * time, instead of at rs interrupt time. */ @@ -180,19 +174,22 @@ struct pci_board_inst { #define SPCI_FL_IRQBASE3 (0x0003 << 4) #define SPCI_FL_IRQBASE4 (0x0004 << 4) #define SPCI_FL_GET_IRQBASE(x) ((x & SPCI_FL_IRQ_MASK) >> 4) - + /* Use sucessiveentries base resource table */ #define SPCI_FL_BASE_TABLE 0x0100 - + /* Use successive entries in the irq resource table */ #define SPCI_FL_IRQ_TABLE 0x0200 - + /* Use the irq resource table instead of dev->irq */ #define SPCI_FL_IRQRESOURCE 0x0400 /* Use the Base address register size to cap number of ports */ #define SPCI_FL_REGION_SZ_CAP 0x0800 - + +/* Do not use irq sharing for this device */ +#define SPCI_FL_NO_SHIRQ 0x1000 + #define SPCI_FL_PNPDEFAULT (SPCI_FL_IRQRESOURCE) - + #endif /* _LINUX_SERIAL_H */ diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index 4583e2f5a..320c69612 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h @@ -7,6 +7,7 @@ #define unlock_kernel() do { } while(0) #define release_kernel_lock(task, cpu) do { } while(0) #define reacquire_kernel_lock(task) do { } while(0) +#define kernel_locked() 1 #else diff --git a/include/linux/sonet.h b/include/linux/sonet.h index c2307389c..30c45ec59 100644 --- a/include/linux/sonet.h +++ b/include/linux/sonet.h @@ -1,23 +1,29 @@ /* sonet.h - SONET/SHD physical layer control */ -/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */ +/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ #ifndef LINUX_SONET_H #define LINUX_SONET_H +#define __SONET_ITEMS \ + __HANDLE_ITEM(section_bip); /* section parity errors (B1) */ \ + __HANDLE_ITEM(line_bip); /* line parity errors (B2) */ \ + __HANDLE_ITEM(path_bip); /* path parity errors (B3) */ \ + __HANDLE_ITEM(line_febe); /* line parity errors at remote */ \ + __HANDLE_ITEM(path_febe); /* path parity errors at remote */ \ + __HANDLE_ITEM(corr_hcs); /* correctable header errors */ \ + __HANDLE_ITEM(uncorr_hcs); /* uncorrectable header errors */ \ + __HANDLE_ITEM(tx_cells); /* cells sent */ \ + __HANDLE_ITEM(rx_cells); /* cells received */ + struct sonet_stats { - int section_bip; /* section parity errors (B1) */ - int line_bip; /* line parity errors (B2) */ - int path_bip; /* path parity errors (B3) */ - int line_febe; /* line parity errors at remote */ - int path_febe; /* path parity errors at remote */ - int corr_hcs; /* correctable header errors */ - int uncorr_hcs; /* uncorrectable header errors */ - int tx_cells; /* cells sent */ - int rx_cells; /* cells received */ +#define __HANDLE_ITEM(i) int i + __SONET_ITEMS +#undef __HANDLE_ITEM } __attribute__ ((packed)); + #define SONET_GETSTAT _IOR('a',ATMIOC_PHYTYP,struct sonet_stats) /* get statistics */ #define SONET_GETSTATZ _IOR('a',ATMIOC_PHYTYP+1,struct sonet_stats) @@ -49,4 +55,23 @@ struct sonet_stats { #define SONET_FRSENSE_SIZE 6 /* C1[3],H1[3] (0xff for unknown) */ + +#ifndef __KERNEL__ +#undef __SONET_ITEMS +#else + +#include <asm/atomic.h> + +struct k_sonet_stats { +#define __HANDLE_ITEM(i) atomic_t i + __SONET_ITEMS +#undef __HANDLE_ITEM +}; + +extern void sonet_copy_stats(struct k_sonet_stats *from,struct sonet_stats *to); +extern void sonet_subtract_stats(struct k_sonet_stats *from, + struct sonet_stats *to); + +#endif + #endif diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index f374af3f4..d106c881a 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h @@ -64,10 +64,10 @@ struct rpc_authops { struct rpc_auth * (*create)(struct rpc_clnt *); void (*destroy)(struct rpc_auth *); - struct rpc_cred * (*crcreate)(struct rpc_task *); + struct rpc_cred * (*crcreate)(int); void (*crdestroy)(struct rpc_cred *); - int (*crmatch)(struct rpc_task *, struct rpc_cred*); + int (*crmatch)(struct rpc_cred *, int); u32 * (*crmarshal)(struct rpc_task *, u32 *, int); int (*crrefresh)(struct rpc_task *); u32 * (*crvalidate)(struct rpc_task *, u32 *); @@ -83,10 +83,14 @@ int rpcauth_register(struct rpc_authops *); int rpcauth_unregister(struct rpc_authops *); struct rpc_auth * rpcauth_create(unsigned int, struct rpc_clnt *); void rpcauth_destroy(struct rpc_auth *); -struct rpc_cred * rpcauth_lookupcred(struct rpc_task *); +struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); +struct rpc_cred * rpcauth_bindcred(struct rpc_task *); void rpcauth_holdcred(struct rpc_task *); -void rpcauth_releasecred(struct rpc_task *); -int rpcauth_matchcred(struct rpc_task *, struct rpc_cred *); +void rpcauth_releasecred(struct rpc_auth *, + struct rpc_cred *); +void rpcauth_unbindcred(struct rpc_task *); +int rpcauth_matchcred(struct rpc_auth *, + struct rpc_cred *, int); u32 * rpcauth_marshcred(struct rpc_task *, u32 *); u32 * rpcauth_checkverf(struct rpc_task *, u32 *); int rpcauth_refreshcred(struct rpc_task *); diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index d0be5f044..0d09eb48a 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h @@ -111,21 +111,23 @@ void rpc_release_client(struct rpc_clnt *); void rpc_getport(struct rpc_task *, struct rpc_clnt *); int rpc_register(u32, u32, int, unsigned short, int *); -int rpc_call(struct rpc_clnt *clnt, u32 proc, - void *argp, void *resp, int flags); -int rpc_call_async(struct rpc_task *task, u32 proc, - void *argp, void *resp, int flags); -void rpc_call_setup(struct rpc_task *task, u32 proc, - void *argp, void *resp, int flags); -int rpc_do_call(struct rpc_clnt *clnt, u32 proc, - void *argp, void *resp, int flags, - rpc_action callback, void *clntdata); +void rpc_call_setup(struct rpc_task *, struct rpc_message *, int); + +int rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg, + int flags, rpc_action callback, void *clntdata); +int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, + int flags); void rpc_restart_call(struct rpc_task *); void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset); void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); -#define rpc_call(clnt, proc, argp, resp, flags) \ - rpc_do_call(clnt, proc, argp, resp, flags, NULL, NULL) +static __inline__ +int rpc_call(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, int flags) +{ + struct rpc_message msg = { proc, argp, resp, NULL }; + return rpc_call_sync(clnt, &msg, flags); +} + extern __inline__ void rpc_set_timeout(struct rpc_clnt *clnt, unsigned int retr, unsigned long incr) diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index d43dfaf0c..279636434 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h @@ -21,6 +21,16 @@ #undef CONFIG_RPC_FASTSCHED /* + * This is the actual RPC procedure call info. + */ +struct rpc_message { + __u32 rpc_proc; /* Procedure number */ + void * rpc_argp; /* Arguments */ + void * rpc_resp; /* Result */ + struct rpc_cred * rpc_cred; /* Credentials */ +}; + +/* * This is the RPC task struct */ struct rpc_task { @@ -33,17 +43,14 @@ struct rpc_task { struct rpc_task * tk_prev_task; /* global list of tasks */ struct rpc_clnt * tk_client; /* RPC client */ struct rpc_rqst * tk_rqstp; /* RPC request */ - struct rpc_cred * tk_cred; /* RPC credentials */ int tk_status; /* result of last operation */ struct rpc_wait_queue * tk_rpcwait; /* RPC wait queue we're on */ /* * RPC call state */ - __u32 tk_proc; /* procedure number */ + struct rpc_message tk_msg; /* RPC call info */ __u32 * tk_buffer; /* XDR buffer */ - void * tk_argp; /* argument storage */ - void * tk_resp; /* result storage */ __u8 tk_garb_retry, tk_cred_retry, tk_suid_retry; @@ -67,6 +74,10 @@ struct rpc_task { wait_queue_head_t tk_wait; /* sync: sleep on this q */ unsigned long tk_timeout; /* timeout for rpc_sleep() */ unsigned short tk_flags; /* misc flags */ + unsigned short tk_lock; /* Task lock counter */ + unsigned int tk_wakeup : 1,/* Task waiting to wake up */ + tk_sleeping : 1,/* Task is truly asleep */ + tk_active : 1;/* Task has been activated */ #ifdef RPC_DEBUG unsigned short tk_pid; /* debugging aid */ #endif @@ -100,6 +111,8 @@ typedef void (*rpc_action)(struct rpc_task *); #define RPC_DO_CALLBACK(t) ((t)->tk_flags & RPC_TASK_CALLBACK) #define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS) #define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED) +#define RPC_IS_SLEEPING(t) ((t)->tk_sleeping) +#define RPC_IS_ACTIVATED(t) ((t)->tk_active) /* * RPC synchronization objects @@ -126,29 +139,28 @@ void rpc_init_task(struct rpc_task *, struct rpc_clnt *, rpc_action exitfunc, int flags); void rpc_release_task(struct rpc_task *); void rpc_killall_tasks(struct rpc_clnt *); -void rpc_execute(struct rpc_task *); +int rpc_execute(struct rpc_task *); void rpc_run_child(struct rpc_task *parent, struct rpc_task *child, rpc_action action); int rpc_add_wait_queue(struct rpc_wait_queue *, struct rpc_task *); void rpc_remove_wait_queue(struct rpc_task *); void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, rpc_action action, rpc_action timer); -void rpc_cond_wait(struct rpc_wait_queue *, struct rpc_task *, - unsigned char *, - rpc_action action, rpc_action timer); +void rpc_sleep_locked(struct rpc_wait_queue *, struct rpc_task *, + rpc_action action, rpc_action timer); +void rpc_add_timer(struct rpc_task *, rpc_action); void rpc_wake_up_task(struct rpc_task *); void rpc_wake_up(struct rpc_wait_queue *); struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *); void rpc_wake_up_status(struct rpc_wait_queue *, int); -void rpc_add_timer(struct rpc_task *, rpc_action); -void rpc_del_timer(struct rpc_task *); +int rpc_lock_task(struct rpc_task *); +void rpc_unlock_task(struct rpc_task *); void rpc_delay(struct rpc_task *, unsigned long); void * rpc_allocate(unsigned int flags, unsigned int); void rpc_free(void *); int rpciod_up(void); void rpciod_down(void); void rpciod_wake_up(void); -void rpciod_tcp_dispatcher(void); #ifdef RPC_DEBUG void rpc_show_tasks(void); #endif diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 5e01407fc..e5e66c1de 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -47,7 +47,7 @@ ((xprt)->cong >= (xprt)->cwnd) /* Default timeout values */ -#define RPC_MAX_UDP_TIMEOUT (6*HZ) +#define RPC_MAX_UDP_TIMEOUT (60*HZ) #define RPC_MAX_TCP_TIMEOUT (600*HZ) /* RPC call and reply header size as number of 32bit words (verifier @@ -96,8 +96,7 @@ struct rpc_rqst { struct rpc_task * rq_task; /* RPC task data */ __u32 rq_xid; /* request XID */ struct rpc_rqst * rq_next; /* free list */ - unsigned char rq_gotit; /* reply received */ - unsigned char rq_damaged; /* being received */ + unsigned char rq_damaged; /* reply being received */ /* * For authentication (e.g. auth_des) @@ -122,12 +121,6 @@ struct rpc_rqst { #define rq_rlen rq_rcv_buf.io_len struct rpc_xprt { - struct rpc_xprt * link; /* list of all clients */ - struct rpc_xprt * rx_pending; /* receive pending list */ - - int rx_pending_flag;/* are we on the rcv pending list ? */ - - struct file * file; /* VFS layer */ struct socket * sock; /* BSD socket layer */ struct sock * inet; /* INET layer */ @@ -145,9 +138,9 @@ struct rpc_xprt { struct rpc_wait_queue reconn; /* waiting for reconnect */ struct rpc_rqst * free; /* free slots */ struct rpc_rqst slot[RPC_MAXREQS]; - unsigned char connected; /* TCP: connected */ - unsigned char write_space; /* TCP: can send */ - unsigned int shutdown : 1, /* being shut down */ + unsigned int connected : 1, /* TCP: connected */ + write_space: 1, /* TCP: can send */ + shutdown : 1, /* being shut down */ nocong : 1, /* no congestion control */ stream : 1, /* TCP */ tcp_more : 1, /* more record fragments */ @@ -156,16 +149,12 @@ struct rpc_xprt { /* * State of TCP reply receive stuff */ - union { /* record marker & XID */ - u32 header[2]; - u8 data[8]; - } tcp_recm; - struct rpc_rqst * tcp_rqstp; - struct iovec tcp_iovec[MAX_IOVEC]; - u32 tcp_total; /* overall record length */ - u32 tcp_reclen; /* fragment length */ - u32 tcp_offset; /* fragment offset */ - u32 tcp_copied; /* copied to request */ + u32 tcp_recm; /* Fragment header */ + u32 tcp_xid; /* Current XID */ + unsigned int tcp_reclen, /* fragment length */ + tcp_offset, /* fragment offset */ + tcp_copied; /* copied to request */ + struct list_head rx_pending; /* receive pending list */ /* * Send stuff @@ -179,17 +168,13 @@ struct rpc_xprt { wait_queue_head_t cong_wait; }; -#define tcp_reclen tcp_recm.header[0] -#define tcp_xid tcp_recm.header[1] #ifdef __KERNEL__ -struct rpc_xprt * xprt_create(struct file *socket, - struct sockaddr_in *addr, - struct rpc_timeout *toparms); struct rpc_xprt * xprt_create_proto(int proto, struct sockaddr_in *addr, struct rpc_timeout *toparms); int xprt_destroy(struct rpc_xprt *); +void xprt_shutdown(struct rpc_xprt *); void xprt_default_timeout(struct rpc_timeout *, int); void xprt_set_timeout(struct rpc_timeout *, unsigned int, unsigned long); @@ -201,8 +186,22 @@ int xprt_adjust_timeout(struct rpc_timeout *); void xprt_release(struct rpc_task *); void xprt_reconnect(struct rpc_task *); int xprt_clear_backlog(struct rpc_xprt *); - -int xprt_tcp_pending(void); +void __rpciod_tcp_dispatcher(void); + +extern struct list_head rpc_xprt_pending; + +static inline +int xprt_tcp_pending(void) +{ + return !list_empty(&rpc_xprt_pending); +} + +static inline +void rpciod_tcp_dispatcher(void) +{ + if (xprt_tcp_pending()) + __rpciod_tcp_dispatcher(); +} #endif /* __KERNEL__*/ diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h index 4f842ac30..47980eaaf 100644 --- a/include/linux/udf_fs.h +++ b/include/linux/udf_fs.h @@ -60,6 +60,7 @@ /* * Function prototypes (all other prototypes included in udfdecl.h) */ +extern int init_udf_fs(void); #endif /* __KERNEL__ */ diff --git a/include/linux/udf_fs_sb.h b/include/linux/udf_fs_sb.h index 15696cf33..99cd246e9 100644 --- a/include/linux/udf_fs_sb.h +++ b/include/linux/udf_fs_sb.h @@ -49,7 +49,16 @@ struct udf_virtual_data struct udf_part_map { - __u32 s_uspace_bitmap; + union + { + __u32 bitmap; + struct inode *table; + } s_uspace; + union + { + __u32 bitmap; + struct inode *table; + } s_fspace; __u32 s_partition_root; __u32 s_partition_len; __u16 s_partition_type; @@ -61,6 +70,7 @@ struct udf_part_map } s_type_specific; __u32 (*s_partition_func)(struct super_block *, __u32, __u16, __u32); __u16 s_volumeseqnum; + __u16 s_partition_flags; }; #pragma pack() diff --git a/include/linux/usb.h b/include/linux/usb.h index 8326fb791..c011f8238 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -604,6 +604,7 @@ extern void *usb_request_bulk(struct usb_device *, unsigned int, usb_device_irq, extern int usb_terminate_bulk(struct usb_device *, void *); extern void usb_init_root_hub(struct usb_device *dev); +extern int usb_root_hub_string(int id, int serial, char *type, __u8 *data, int len); extern void usb_connect(struct usb_device *dev); extern void usb_disconnect(struct usb_device **); |