summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@maxwell.earthlink.net>2002-07-16 16:44:37 -0700
committerJames Simmons <jsimmons@maxwell.earthlink.net>2002-07-16 16:44:37 -0700
commitde442a0fe11736da5e9e8cf8101326768ae55ac7 (patch)
tree2d0897a786369cfa07a169e81ed83e37d57894fd /include/linux
parent1159a2cae8c718d08d7dffab045de53d7a9ea958 (diff)
parent0d84f0acc5c914fbd249b2611711517f5c001a0c (diff)
Merge http://linus.bkbits.net/linux-2.5
into maxwell.earthlink.net:/tmp/linus-2.5
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/atapi.h281
-rw-r--r--include/linux/blkdev.h2
-rw-r--r--include/linux/brlock.h2
-rw-r--r--include/linux/buffer_head.h2
-rw-r--r--include/linux/console_struct.h1
-rw-r--r--include/linux/fs.h12
-rw-r--r--include/linux/gameport.h1
-rw-r--r--include/linux/hiddev.h27
-rw-r--r--include/linux/ide.h70
-rw-r--r--include/linux/if_vlan.h22
-rw-r--r--include/linux/input.h68
-rw-r--r--include/linux/namespace.h2
-rw-r--r--include/linux/netlink.h8
-rw-r--r--include/linux/nfs_xdr.h4
-rw-r--r--include/linux/notifier.h2
-rw-r--r--include/linux/raid/md_k.h2
-rw-r--r--include/linux/reiserfs_fs.h8
-rw-r--r--include/linux/sched.h21
-rw-r--r--include/linux/serio.h5
-rw-r--r--include/linux/smb_fs_sb.h46
-rw-r--r--include/linux/sunrpc/clnt.h5
-rw-r--r--include/linux/sunrpc/sched.h8
-rw-r--r--include/linux/sunrpc/timer.h41
-rw-r--r--include/linux/sunrpc/xprt.h29
-rw-r--r--include/linux/suspend.h13
-rw-r--r--include/linux/sysrq.h13
-rw-r--r--include/linux/uinput.h78
-rw-r--r--include/linux/usb.h34
-rw-r--r--include/linux/usbdevice_fs.h3
-rw-r--r--include/linux/vt_kern.h1
30 files changed, 670 insertions, 141 deletions
diff --git a/include/linux/atapi.h b/include/linux/atapi.h
index 029ae2b6633a..0ac305922e3a 100644
--- a/include/linux/atapi.h
+++ b/include/linux/atapi.h
@@ -12,6 +12,9 @@
* more details.
*/
+#include <linux/types.h>
+#include <asm/byteorder.h>
+
/*
* With each packet command, we allocate a buffer.
* This is used for several packet
@@ -79,3 +82,281 @@ extern void atapi_write_zeros(struct ata_device *, unsigned int);
extern void atapi_read(struct ata_device *, u8 *, unsigned int);
extern void atapi_write(struct ata_device *, u8 *, unsigned int);
+
+/*
+ * ATAPI Status Register.
+ */
+typedef union {
+ u8 all : 8;
+ struct {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ u8 check : 1; /* Error occurred */
+ u8 idx : 1; /* Reserved */
+ u8 corr : 1; /* Correctable error occurred */
+ u8 drq : 1; /* Data is request by the device */
+ u8 dsc : 1; /* Media access command finished / Buffer availability */
+ u8 reserved5 : 1; /* Reserved */
+ u8 drdy : 1; /* Ignored for ATAPI commands (ready to accept ATA command) */
+ u8 bsy : 1; /* The device has access to the command block */
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ u8 bsy : 1;
+ u8 drdy : 1;
+ u8 reserved5 : 1;
+ u8 dsc : 1;
+ u8 drq : 1;
+ u8 corr : 1;
+ u8 idx : 1;
+ u8 check : 1;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ } b;
+} atapi_status_reg_t;
+
+/*
+ * ATAPI error register.
+ */
+typedef union {
+ u8 all : 8;
+ struct {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ u8 ili : 1; /* Illegal Length Indication */
+ u8 eom : 1; /* End Of Media Detected */
+ u8 abrt : 1; /* Aborted command - As defined by ATA */
+ u8 mcr : 1; /* Media Change Requested - As defined by ATA */
+ u8 sense_key : 4; /* Sense key of the last failed packet command */
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ u8 sense_key : 4;
+ u8 mcr : 1;
+ u8 abrt : 1;
+ u8 eom : 1;
+ u8 ili : 1;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ } b;
+} atapi_error_reg_t;
+
+/* Currently unused, but please do not remove. --bkz */
+/*
+ * ATAPI Feature Register.
+ */
+typedef union {
+ u8 all : 8;
+ struct {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ u8 dma : 1; /* Using DMA or PIO */
+ u8 reserved321 : 3; /* Reserved */
+ u8 reserved654 : 3; /* Reserved (Tag Type) */
+ u8 reserved7 : 1; /* Reserved */
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ u8 reserved7 : 1;
+ u8 reserved654 : 3;
+ u8 reserved321 : 3;
+ u8 dma : 1;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ } b;
+} atapi_feature_reg_t;
+
+/*
+ * ATAPI Byte Count Register.
+ */
+typedef union {
+ u16 all : 16;
+ struct {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ u8 low; /* LSB */
+ u8 high; /* MSB */
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ u8 high;
+ u8 low;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ } b;
+} atapi_bcount_reg_t;
+
+/*
+ * ATAPI Interrupt Reason Register.
+ */
+typedef union {
+ u8 all : 8;
+ struct {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ u8 cod : 1; /* Information transferred is command (1) or data (0) */
+ u8 io : 1; /* The device requests us to read (1) or write (0) */
+ u8 reserved : 6; /* Reserved */
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ u8 reserved : 6;
+ u8 io : 1;
+ u8 cod : 1;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ } b;
+} atapi_ireason_reg_t;
+
+/* Currently unused, but please do not remove. --bkz */
+/*
+ * ATAPI Drive Select Register.
+ */
+typedef union {
+ u8 all :8;
+ struct {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ u8 sam_lun :3; /* Logical unit number */
+ u8 reserved3 :1; /* Reserved */
+ u8 drv :1; /* The responding drive will be drive 0 (0) or drive 1 (1) */
+ u8 one5 :1; /* Should be set to 1 */
+ u8 reserved6 :1; /* Reserved */
+ u8 one7 :1; /* Should be set to 1 */
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ u8 one7 :1;
+ u8 reserved6 :1;
+ u8 one5 :1;
+ u8 drv :1;
+ u8 reserved3 :1;
+ u8 sam_lun :3;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ } b;
+} atapi_drivesel_reg_t;
+
+/* Currently unused, but please do not remove. --bkz */
+/*
+ * ATAPI Device Control Register.
+ */
+typedef union {
+ u8 all : 8;
+ struct {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ u8 zero0 : 1; /* Should be set to zero */
+ u8 nien : 1; /* Device interrupt is disabled (1) or enabled (0) */
+ u8 srst : 1; /* ATA software reset. ATAPI devices should use the new ATAPI srst. */
+ u8 one3 : 1; /* Should be set to 1 */
+ u8 reserved4567 : 4; /* Reserved */
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ u8 reserved4567 : 4;
+ u8 one3 : 1;
+ u8 srst : 1;
+ u8 nien : 1;
+ u8 zero0 : 1;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ } b;
+} atapi_control_reg_t;
+
+/*
+ * The following is used to format the general configuration word
+ * of the ATAPI IDENTIFY DEVICE command.
+ */
+struct atapi_id_gcw {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ u8 packet_size : 2; /* Packet Size */
+ u8 reserved234 : 3; /* Reserved */
+ u8 drq_type : 2; /* Command packet DRQ type */
+ u8 removable : 1; /* Removable media */
+ u8 device_type : 5; /* Device type */
+ u8 reserved13 : 1; /* Reserved */
+ u8 protocol : 2; /* Protocol type */
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ u8 protocol : 2;
+ u8 reserved13 : 1;
+ u8 device_type : 5;
+ u8 removable : 1;
+ u8 drq_type : 2;
+ u8 reserved234 : 3;
+ u8 packet_size : 2;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+};
+
+/*
+ * INQUIRY packet command - Data Format.
+ */
+typedef struct {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ u8 device_type : 5; /* Peripheral Device Type */
+ u8 reserved0_765 : 3; /* Peripheral Qualifier - Reserved */
+ u8 reserved1_6t0 : 7; /* Reserved */
+ u8 rmb : 1; /* Removable Medium Bit */
+ u8 ansi_version : 3; /* ANSI Version */
+ u8 ecma_version : 3; /* ECMA Version */
+ u8 iso_version : 2; /* ISO Version */
+ u8 response_format : 4; /* Response Data Format */
+ u8 reserved3_45 : 2; /* Reserved */
+ u8 reserved3_6 : 1; /* TrmIOP - Reserved */
+ u8 reserved3_7 : 1; /* AENC - Reserved */
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ u8 reserved0_765 : 3;
+ u8 device_type : 5;
+ u8 rmb : 1;
+ u8 reserved1_6t0 : 7;
+ u8 iso_version : 2;
+ u8 ecma_version : 3;
+ u8 ansi_version : 3;
+ u8 reserved3_7 : 1;
+ u8 reserved3_6 : 1;
+ u8 reserved3_45 : 2;
+ u8 response_format : 4;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ u8 additional_length; /* Additional Length (total_length-4) */
+ u8 rsv5, rsv6, rsv7; /* Reserved */
+ u8 vendor_id[8]; /* Vendor Identification */
+ u8 product_id[16]; /* Product Identification */
+ u8 revision_level[4]; /* Revision Level */
+ u8 vendor_specific[20]; /* Vendor Specific - Optional */
+ u8 reserved56t95[40]; /* Reserved - Optional */
+ /* Additional information may be returned */
+} atapi_inquiry_result_t;
+
+/*
+ * REQUEST SENSE packet command result - Data Format.
+ */
+typedef struct atapi_request_sense {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ u8 error_code : 7; /* Error Code (0x70 - current or 0x71 - deferred) */
+ u8 valid : 1; /* The information field conforms to standard */
+ u8 reserved1 : 8; /* Reserved (Segment Number) */
+ u8 sense_key : 4; /* Sense Key */
+ u8 reserved2_4 : 1; /* Reserved */
+ u8 ili : 1; /* Incorrect Length Indicator */
+ u8 eom : 1; /* End Of Medium */
+ u8 filemark : 1; /* Filemark */
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ u8 valid : 1;
+ u8 error_code : 7;
+ u8 reserved1 : 8;
+ u8 filemark : 1;
+ u8 eom : 1;
+ u8 ili : 1;
+ u8 reserved2_4 : 1;
+ u8 sense_key : 4;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ u32 information __attribute__ ((packed));
+ u8 asl; /* Additional sense length (n-7) */
+ u32 command_specific; /* Additional command specific information */
+ u8 asc; /* Additional Sense Code */
+ u8 ascq; /* Additional Sense Code Qualifier */
+ u8 replaceable_unit_code; /* Field Replaceable Unit Code */
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ u8 sk_specific1 : 7; /* Sense Key Specific */
+ u8 sksv : 1; /* Sense Key Specific information is valid */
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ u8 sksv : 1; /* Sense Key Specific information is valid */
+ u8 sk_specific1 : 7; /* Sense Key Specific */
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ u8 sk_specific[2]; /* Sense Key Specific */
+ u8 pad[2]; /* Padding to 20 bytes */
+} atapi_request_sense_result_t;
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index ec38ad1d1f7b..297cb0ba10c1 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -283,7 +283,9 @@ extern void generic_make_request(struct bio *bio);
extern inline request_queue_t *bdev_get_queue(struct block_device *bdev);
extern void blkdev_release_request(struct request *);
extern void blk_attempt_remerge(request_queue_t *, struct request *);
+extern void __blk_attempt_remerge(request_queue_t *, struct request *);
extern struct request *blk_get_request(request_queue_t *, int, int);
+extern struct request *__blk_get_request(request_queue_t *, int);
extern void blk_put_request(struct request *);
extern void blk_plug_device(request_queue_t *);
extern int blk_remove_plug(request_queue_t *);
diff --git a/include/linux/brlock.h b/include/linux/brlock.h
index 68c200512604..81d87c72ca1d 100644
--- a/include/linux/brlock.h
+++ b/include/linux/brlock.h
@@ -19,7 +19,7 @@
*
* David S. Miller <davem@redhat.com>
*
- * David has an implementation that doesnt use atomic operations in
+ * David has an implementation that doesn't use atomic operations in
* the read branch via memory ordering tricks - i guess we need to
* split this up into a per-arch thing? The atomicity issue is a
* secondary item in profiles, at least on x86 platforms.
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index f22fdecee5a9..b07e937f900b 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -185,8 +185,6 @@ int block_sync_page(struct page *);
sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *);
int generic_commit_write(struct file *, struct page *, unsigned, unsigned);
int block_truncate_page(struct address_space *, loff_t, get_block_t *);
-int generic_direct_IO(int, struct inode *, struct kiobuf *,
- unsigned long, int, get_block_t *);
int file_fsync(struct file *, struct dentry *, int);
#define OSYNC_METADATA (1<<0)
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
index bbf34f3aa21f..d86c16e96d11 100644
--- a/include/linux/console_struct.h
+++ b/include/linux/console_struct.h
@@ -33,6 +33,7 @@ struct vc_data {
unsigned int vc_top, vc_bottom; /* Scrolling region */
unsigned int vc_state; /* Escape sequence parser state */
unsigned int vc_npar,vc_par[NPAR]; /* Parameters of current escape sequence */
+ struct tty_struct *vc_tty; /* TTY we are attached to */
unsigned long vc_origin; /* [!] Start of real screen */
unsigned long vc_scr_end; /* [!] End of real screen */
unsigned long vc_visible_origin; /* [!] Top of visible window */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index db86a9686640..2ac85b8e28a3 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -303,8 +303,8 @@ struct address_space_operations {
int (*bmap)(struct address_space *, long);
int (*invalidatepage) (struct page *, unsigned long);
int (*releasepage) (struct page *, int);
-#define KERNEL_HAS_O_DIRECT /* this is for modules out of the kernel */
- int (*direct_IO)(int, struct inode *, struct kiobuf *, unsigned long, int);
+ int (*direct_IO)(int, struct inode *, char *buf,
+ loff_t offset, size_t count);
};
struct backing_dev_info;
@@ -988,7 +988,6 @@ extern int unregister_filesystem(struct file_system_type *);
extern struct vfsmount *kern_mount(struct file_system_type *);
extern int may_umount(struct vfsmount *);
extern long do_mount(char *, char *, char *, unsigned long, void *);
-extern void umount_tree(struct vfsmount *);
#define kern_umount mntput
@@ -1128,7 +1127,7 @@ extern int check_disk_change(kdev_t);
extern int invalidate_inodes(struct super_block *);
extern int invalidate_device(kdev_t, int);
extern void invalidate_inode_pages(struct inode *);
-extern void invalidate_inode_pages2(struct address_space *);
+extern void invalidate_inode_pages2(struct address_space *mapping);
extern void write_inode_now(struct inode *, int);
extern int filemap_fdatawrite(struct address_space *);
extern int filemap_fdatawait(struct address_space *);
@@ -1233,6 +1232,11 @@ extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned
extern ssize_t generic_file_read(struct file *, char *, size_t, loff_t *);
extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *);
extern void do_generic_file_read(struct file *, loff_t *, read_descriptor_t *, read_actor_t);
+ssize_t generic_file_direct_IO(int rw, struct inode *inode, char *buf,
+ loff_t offset, size_t count);
+int generic_direct_IO(int rw, struct inode *inode, char *buf,
+ loff_t offset, size_t count, get_block_t *get_block);
+
extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
extern loff_t remote_llseek(struct file *file, loff_t offset, int origin);
diff --git a/include/linux/gameport.h b/include/linux/gameport.h
index 479d81947604..0cb1a3b46f77 100644
--- a/include/linux/gameport.h
+++ b/include/linux/gameport.h
@@ -38,7 +38,6 @@ struct gameport {
void *driver; /* Private pointer for gameport drivers */
char *name;
char *phys;
- int number;
unsigned short idbus;
unsigned short idvendor;
diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h
index eb948560836d..0077b58559f5 100644
--- a/include/linux/hiddev.h
+++ b/include/linux/hiddev.h
@@ -49,6 +49,13 @@ struct hiddev_devinfo {
unsigned num_applications;
};
+struct hiddev_collection_info {
+ unsigned index;
+ unsigned type;
+ unsigned usage;
+ unsigned level;
+};
+
#define HID_STRING_SIZE 256
struct hiddev_string_descriptor {
int index;
@@ -64,9 +71,9 @@ struct hiddev_report_info {
/* To do a GUSAGE/SUSAGE, fill in at least usage_code, report_type and
* report_id. Set report_id to REPORT_ID_UNKNOWN if the rest of the fields
* are unknown. Otherwise use a usage_ref struct filled in from a previous
- * successful GUSAGE/SUSAGE call to save time. To actually send a value
- * to the device, perform a SUSAGE first, followed by a SREPORT. If an
- * INITREPORT is done, a GREPORT isn't necessary before a GUSAGE.
+ * successful GUSAGE call to save time. To actually send a value to the
+ * device, perform a SUSAGE first, followed by a SREPORT. An INITREPORT or a
+ * GREPORT isn't necessary for a GUSAGE to return valid data.
*/
#define HID_REPORT_ID_UNKNOWN 0xffffffff
#define HID_REPORT_ID_FIRST 0x00000100
@@ -129,7 +136,7 @@ struct hiddev_usage_ref {
* Protocol version.
*/
-#define HID_VERSION 0x010003
+#define HID_VERSION 0x010004
/*
* IOCTLs (0x00 - 0x7f)
@@ -150,6 +157,8 @@ struct hiddev_usage_ref {
#define HIDIOCGUCODE _IOWR('H', 0x0D, struct hiddev_usage_ref)
#define HIDIOCGFLAG _IOR('H', 0x0E, int)
#define HIDIOCSFLAG _IOW('H', 0x0F, int)
+#define HIDIOCGCOLLECTIONINDEX _IOW('H', 0x10, struct hiddev_usage_ref)
+#define HIDIOCGCOLLECTIONINFO _IOWR('H', 0x11, struct hiddev_collection_info)
/*
* Flags to be used in HIDIOCSFLAG
@@ -193,13 +202,17 @@ struct hiddev_usage_ref {
#ifdef CONFIG_USB_HIDDEV
int hiddev_connect(struct hid_device *);
void hiddev_disconnect(struct hid_device *);
-void hiddev_hid_event(struct hid_device *, struct hiddev_usage_ref *ref);
+void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
+ struct hid_usage *usage, __s32 value);
+void hiddev_report_event(struct hid_device *hid, struct hid_report *report);
int __init hiddev_init(void);
void __exit hiddev_exit(void);
#else
-static inline void *hiddev_connect(struct hid_device *hid) { return NULL; }
+static inline int hiddev_connect(struct hid_device *hid) { return -1; }
static inline void hiddev_disconnect(struct hid_device *hid) { }
-static inline void hiddev_event(struct hid_device *hid, unsigned int usage, int value) { }
+static inline void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
+ struct hid_usage *usage, __s32 value) { }
+static inline void hiddev_report_event(struct hid_device *hid, struct hid_report *report) { }
static inline int hiddev_init(void) { return 0; }
static inline void hiddev_exit(void) { }
#endif
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 98426a06e782..4076310675f8 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -372,16 +372,17 @@ struct ata_device {
* Status returned by various functions.
*/
typedef enum {
- ide_stopped, /* no drive operation was started */
- ide_started, /* a drive operation was started, and a handler was set */
- ide_released /* started and released bus */
+ ATA_OP_FINISHED, /* no drive operation was started */
+ ATA_OP_CONTINUES, /* a drive operation was started, and a handler was set */
+ ATA_OP_RELEASED, /* started and released bus */
+ ATA_OP_READY, /* indicate status poll finished fine */
} ide_startstop_t;
/*
* Interrupt and timeout handler type.
*/
typedef ide_startstop_t (ata_handler_t)(struct ata_device *, struct request *);
-typedef int (ata_expiry_t)(struct ata_device *, struct request *);
+typedef ide_startstop_t (ata_expiry_t)(struct ata_device *, struct request *, unsigned long *);
enum {
ATA_PRIMARY = 0,
@@ -406,7 +407,7 @@ struct ata_channel {
ide_startstop_t (*handler)(struct ata_device *, struct request *); /* irq handler, if active */
struct timer_list timer; /* failsafe timer */
- int (*expiry)(struct ata_device *, struct request *); /* irq handler, if active */
+ ide_startstop_t (*expiry)(struct ata_device *, struct request *, unsigned long *); /* irq handler, if active */
unsigned long poll_timeout; /* timeout value during polled operations */
struct ata_device *drive; /* last serviced drive */
@@ -456,7 +457,7 @@ struct ata_channel {
void (*atapi_read)(struct ata_device *, void *, unsigned int);
void (*atapi_write)(struct ata_device *, void *, unsigned int);
- int (*udma_setup)(struct ata_device *);
+ int (*udma_setup)(struct ata_device *, int);
void (*udma_enable)(struct ata_device *, int, int);
void (*udma_start) (struct ata_device *, struct request *);
@@ -496,7 +497,9 @@ struct ata_channel {
unsigned unmask : 1; /* flag: okay to unmask other irqs */
unsigned slow : 1; /* flag: slow data port */
unsigned io_32bit : 1; /* 0=16-bit, 1=32-bit */
+ unsigned no_atapi_autodma : 1; /* flag: use auto DMA only for disks */
unsigned char bus_state; /* power state of the IDE bus */
+ int modes_map; /* map of supported transfer modes */
};
/*
@@ -602,9 +605,7 @@ extern int noautodma;
#define DEVICE_NR(device) (minor(device) >> PARTN_BITS)
#include <linux/blk.h>
-/* Not locking and locking variant: */
extern int __ata_end_request(struct ata_device *, struct request *, int, unsigned int);
-extern int ata_end_request(struct ata_device *drive, struct request *, int);
extern void ata_set_handler(struct ata_device *drive, ata_handler_t handler,
unsigned long timeout, ata_expiry_t expiry);
@@ -626,12 +627,6 @@ int ide_xlate_1024(kdev_t, int, int, const char *);
struct ata_device *get_info_ptr(kdev_t i_rdev);
/*
- * Re-Start an operation for an IDE interface.
- * The caller should return immediately after invoking this.
- */
-ide_startstop_t restart_request(struct ata_device *);
-
-/*
* "action" parameter type for ide_do_drive_cmd() below.
*/
typedef enum {
@@ -658,31 +653,7 @@ struct ata_taskfile {
extern void ata_read(struct ata_device *, void *, unsigned int);
extern void ata_write(struct ata_device *, void *, unsigned int);
-/*
- * Special Flagged Register Validation Caller
- */
-
-/*
- * for now, taskfile requests are special :/
- */
-static inline char *ide_map_rq(struct request *rq, unsigned long *flags)
-{
- if (rq->bio)
- return bio_kmap_irq(rq->bio, flags) + ide_rq_offset(rq);
- else
- return rq->buffer + ((rq)->nr_sectors - (rq)->current_nr_sectors) * SECTOR_SIZE;
-}
-
-static inline void ide_unmap_rq(struct request *rq, char *to,
- unsigned long *flags)
-{
- if (rq->bio)
- bio_kunmap_irq(to, flags);
-}
-
-extern ide_startstop_t ata_special_intr(struct ata_device *, struct request *);
-extern int ide_raw_taskfile(struct ata_device *, struct ata_taskfile *);
-
+extern int ide_raw_taskfile(struct ata_device *, struct ata_taskfile *, char *);
extern void ide_fix_driveid(struct hd_driveid *id);
extern int ide_config_drive_speed(struct ata_device *, byte);
extern byte eighty_ninty_three(struct ata_device *);
@@ -756,9 +727,12 @@ static inline void udma_start(struct ata_device *drive, struct request *rq)
static inline int udma_stop(struct ata_device *drive)
{
+ int ret;
+
+ ret = drive->channel->udma_stop(drive);
clear_bit(IDE_DMA, drive->channel->active);
- return drive->channel->udma_stop(drive);
+ return ret;
}
/*
@@ -766,9 +740,12 @@ static inline int udma_stop(struct ata_device *drive)
*/
static inline ide_startstop_t udma_init(struct ata_device *drive, struct request *rq)
{
- int ret = drive->channel->udma_init(drive, rq);
- if (ret == ide_started)
- set_bit(IDE_DMA, drive->channel->active);
+ int ret;
+
+ set_bit(IDE_DMA, drive->channel->active);
+ ret = drive->channel->udma_init(drive, rq);
+ if (ret != ATA_OP_CONTINUES)
+ clear_bit(IDE_DMA, drive->channel->active);
return ret;
}
@@ -797,7 +774,9 @@ extern int udma_pci_init(struct ata_device *drive, struct request *rq);
extern int udma_pci_irq_status(struct ata_device *drive);
extern void udma_pci_timeout(struct ata_device *drive);
extern void udma_pci_irq_lost(struct ata_device *);
-extern int udma_pci_setup(struct ata_device *);
+extern int udma_pci_setup(struct ata_device *, int);
+
+extern int udma_generic_setup(struct ata_device *, int);
extern int udma_new_table(struct ata_device *, struct request *);
extern void udma_destroy_table(struct ata_channel *);
@@ -830,10 +809,9 @@ extern int drive_is_ready(struct ata_device *drive);
extern void ata_select(struct ata_device *, unsigned long);
extern void ata_mask(struct ata_device *);
-extern int ata_busy_poll(struct ata_device *, unsigned long);
extern int ata_status(struct ata_device *, u8, u8);
extern int ata_status_poll( struct ata_device *, u8, u8,
- unsigned long, struct request *rq, ide_startstop_t *);
+ unsigned long, struct request *rq);
extern int ata_irq_enable(struct ata_device *, int);
extern void ata_reset(struct ata_channel *);
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 99d7f1663f30..3fbf27dcc20e 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -141,9 +141,10 @@ struct vlan_skb_tx_cookie {
(VLAN_TX_SKB_CB(__skb)->magic == VLAN_TX_COOKIE_MAGIC)
#define vlan_tx_tag_get(__skb) (VLAN_TX_SKB_CB(__skb)->vlan_tag)
-/* VLAN rx hw acceleration helper. This acts like netif_rx(). */
-static inline int vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
- unsigned short vlan_tag)
+/* VLAN rx hw acceleration helper. This acts like netif_{rx,receive_skb}(). */
+static inline int __vlan_hwaccel_rx(struct sk_buff *skb,
+ struct vlan_group *grp,
+ unsigned short vlan_tag, int polling)
{
struct net_device_stats *stats;
@@ -182,9 +183,22 @@ static inline int vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
break;
};
- return netif_rx(skb);
+ return (polling ? netif_receive_skb(skb) : netif_rx(skb));
}
+static inline int vlan_hwaccel_rx(struct sk_buff *skb,
+ struct vlan_group *grp,
+ unsigned short vlan_tag)
+{
+ return __vlan_hwaccel_rx(skb, grp, vlan_tag, 0);
+}
+
+static inline int vlan_hwaccel_receive_skb(struct sk_buff *skb,
+ struct vlan_group *grp,
+ unsigned short vlan_tag)
+{
+ return __vlan_hwaccel_rx(skb, grp, vlan_tag, 1);
+}
#endif /* __KERNEL__ */
/* VLAN IOCTLs are found in sockios.h */
diff --git a/include/linux/input.h b/include/linux/input.h
index 76130b47a59a..28cc98e91037 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -399,6 +399,73 @@ struct input_event {
#define BTN_GEAR_DOWN 0x150
#define BTN_GEAR_UP 0x151
+#define KEY_OK 0x160
+#define KEY_SELECT 0x161
+#define KEY_GOTO 0x162
+#define KEY_CLEAR 0x163
+#define KEY_POWER2 0x164
+#define KEY_OPTION 0x165
+#define KEY_INFO 0x166
+#define KEY_TIME 0x167
+#define KEY_VENDOR 0x168
+#define KEY_ARCHIVE 0x169
+#define KEY_PROGRAM 0x16a
+#define KEY_CHANNEL 0x16b
+#define KEY_FAVORITES 0x16c
+#define KEY_EPG 0x16d
+#define KEY_PVR 0x16e
+#define KEY_MHP 0x16f
+#define KEY_LANGUAGE 0x170
+#define KEY_TITLE 0x171
+#define KEY_SUBTITLE 0x172
+#define KEY_ANGLE 0x173
+#define KEY_ZOOM 0x174
+#define KEY_MODE 0x175
+#define KEY_KEYBOARD 0x176
+#define KEY_SCREEN 0x177
+#define KEY_PC 0x178
+#define KEY_TV 0x179
+#define KEY_TV2 0x17a
+#define KEY_VCR 0x17b
+#define KEY_VCR2 0x17c
+#define KEY_SAT 0x17d
+#define KEY_SAT2 0x17e
+#define KEY_CD 0x17f
+#define KEY_TAPE 0x180
+#define KEY_RADIO 0x181
+#define KEY_TUNER 0x182
+#define KEY_PLAYER 0x183
+#define KEY_TEXT 0x184
+#define KEY_DVD 0x185
+#define KEY_AUX 0x186
+#define KEY_MP3 0x187
+#define KEY_AUDIO 0x188
+#define KEY_VIDEO 0x189
+#define KEY_DIRECTORY 0x18a
+#define KEY_LIST 0x18b
+#define KEY_MEMO 0x18c
+#define KEY_CALENDAR 0x18d
+#define KEY_RED 0x18e
+#define KEY_GREEN 0x18f
+#define KEY_YELLOW 0x190
+#define KEY_BLUE 0x191
+#define KEY_CHANNELUP 0x192
+#define KEY_CHANNELDOWN 0x193
+#define KEY_FIRST 0x194
+#define KEY_LAST 0x195
+#define KEY_AB 0x196
+#define KEY_PLAY 0x197
+#define KEY_RESTART 0x198
+#define KEY_SLOW 0x199
+#define KEY_SHUFFLE 0x19a
+#define KEY_FASTFORWARD 0x19b
+#define KEY_PREVIOUS 0x19c
+#define KEY_NEXT 0x19d
+#define KEY_DIGITS 0x19e
+#define KEY_TEEN 0x19f
+#define KEY_TWEN 0x1a0
+#define KEY_BREAK 0x1a1
+
#define KEY_MAX 0x1ff
/*
@@ -507,6 +574,7 @@ struct input_event {
#define BUS_AMIGA 0x16
#define BUS_ADB 0x17
#define BUS_I2C 0x18
+#define BUS_HOST 0x19
/*
* Values describing the status of an effect
diff --git a/include/linux/namespace.h b/include/linux/namespace.h
index 1113fe62d6cd..acd64b4ca117 100644
--- a/include/linux/namespace.h
+++ b/include/linux/namespace.h
@@ -14,6 +14,8 @@ struct namespace {
void umount_tree(struct vfsmount *mnt);
+extern void umount_tree(struct vfsmount *);
+
static inline void put_namespace(struct namespace *namespace)
{
if (atomic_dec_and_test(&namespace->count)) {
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index b3a7c5770c45..327e4efe7adc 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -110,6 +110,8 @@ extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int
extern void netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,
__u32 group, int allocation);
extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code);
+extern int netlink_register_notifier(struct notifier_block *nb);
+extern int netlink_unregister_notifier(struct notifier_block *nb);
/*
* skb should fit one page. This choice is good for headerless malloc.
@@ -129,6 +131,12 @@ struct netlink_callback
long args[4];
};
+struct netlink_notify
+{
+ int pid;
+ int protocol;
+};
+
static __inline__ struct nlmsghdr *
__nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len)
{
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 2a3e2dd69dc0..110e5b661b58 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1,9 +1,6 @@
#ifndef _LINUX_NFS_XDR_H
#define _LINUX_NFS_XDR_H
-extern struct rpc_program nfs_program;
-extern struct rpc_stat nfs_rpcstat;
-
struct nfs_fattr {
unsigned short valid; /* which fields are valid */
__u64 pre_size; /* pre_op_attr.size */
@@ -354,5 +351,6 @@ extern struct nfs_rpc_ops nfs_v3_clientops;
extern struct rpc_version nfs_version2;
extern struct rpc_version nfs_version3;
extern struct rpc_program nfs_program;
+extern struct rpc_stat nfs_rpcstat;
#endif
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index 56204946541f..0db9736c1166 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -58,5 +58,7 @@ extern int notifier_call_chain(struct notifier_block **n, unsigned long val, voi
#define SYS_HALT 0x0002 /* Notify of system halt */
#define SYS_POWER_OFF 0x0003 /* Notify of system power off */
+#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */
+
#endif /* __KERNEL__ */
#endif /* _LINUX_NOTIFIER_H */
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 7b02c3c82a33..2a9bbed805ad 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -59,7 +59,7 @@ typedef struct mddev_s mddev_t;
typedef struct mdk_rdev_s mdk_rdev_t;
#if (MINORBITS != 8)
-#error MD doesnt handle bigger kdev yet
+#error MD does not handle bigger kdev yet
#endif
#define MAX_MD_DEVS (1<<MINORBITS) /* Max number of md dev */
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index d8b3fa0a7ba0..4d33fabe04a6 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1937,14 +1937,6 @@ void reiserfs_unmap_buffer(struct buffer_head *) ;
extern struct inode_operations reiserfs_file_inode_operations;
extern struct file_operations reiserfs_file_operations;
extern struct address_space_operations reiserfs_address_space_operations ;
-int get_new_buffer (struct reiserfs_transaction_handle *th, struct buffer_head *,
- struct buffer_head **, struct path *);
-
-
-/* buffer2.c */
-struct buffer_head * reiserfs_getblk (struct super_block *super, int n_block);
-void wait_buffer_until_released (const struct buffer_head * bh);
-struct buffer_head * reiserfs_bread (struct super_block *super, int n_block);
/* fix_nodes.c */
#ifdef CONFIG_REISERFS_CHECK
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 41382c9f8653..2e38ae05d9d2 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -487,6 +487,7 @@ extern unsigned long prof_len;
extern unsigned long prof_shift;
extern void FASTCALL(__wake_up(wait_queue_head_t *q, unsigned int mode, int nr));
+extern void FASTCALL(__wake_up_locked(wait_queue_head_t *q, unsigned int mode));
extern void FASTCALL(__wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr));
extern void FASTCALL(sleep_on(wait_queue_head_t *q));
extern long FASTCALL(sleep_on_timeout(wait_queue_head_t *q,
@@ -504,6 +505,7 @@ extern void FASTCALL(sched_exit(task_t * p));
#define wake_up_interruptible(x) __wake_up((x),TASK_INTERRUPTIBLE, 1)
#define wake_up_interruptible_nr(x, nr) __wake_up((x),TASK_INTERRUPTIBLE, nr)
#define wake_up_interruptible_all(x) __wake_up((x),TASK_INTERRUPTIBLE, 0)
+#define wake_up_locked(x) __wake_up_locked((x), TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE)
#ifdef CONFIG_SMP
#define wake_up_interruptible_sync(x) __wake_up_sync((x),TASK_INTERRUPTIBLE, 1)
#else
@@ -696,6 +698,25 @@ do { \
remove_wait_queue(&wq, &__wait); \
} while (0)
+/*
+ * Must be called with the spinlock in the wait_queue_head_t held.
+ */
+static inline void add_wait_queue_exclusive_locked(wait_queue_head_t *q,
+ wait_queue_t * wait)
+{
+ wait->flags |= WQ_FLAG_EXCLUSIVE;
+ __add_wait_queue_tail(q, wait);
+}
+
+/*
+ * Must be called with the spinlock in the wait_queue_head_t held.
+ */
+static inline void remove_wait_queue_locked(wait_queue_head_t *q,
+ wait_queue_t * wait)
+{
+ __remove_wait_queue(q, wait);
+}
+
#define wait_event_interruptible(wq, condition) \
({ \
int __ret = 0; \
diff --git a/include/linux/serio.h b/include/linux/serio.h
index fae360265d9f..37deb0ca7836 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -50,6 +50,7 @@ struct serio {
unsigned short idversion;
unsigned long type;
+ unsigned long event;
int (*write)(struct serio *, unsigned char);
int (*open)(struct serio *);
@@ -75,6 +76,7 @@ struct serio_dev {
int serio_open(struct serio *serio, struct serio_dev *dev);
void serio_close(struct serio *serio);
void serio_rescan(struct serio *serio);
+void serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags);
void serio_register_port(struct serio *serio);
void serio_unregister_port(struct serio *serio);
@@ -88,9 +90,8 @@ static __inline__ int serio_write(struct serio *serio, unsigned char data)
static __inline__ void serio_dev_write_wakeup(struct serio *serio)
{
- if (serio->dev && serio->dev->write_wakeup) {
+ if (serio->dev && serio->dev->write_wakeup)
serio->dev->write_wakeup(serio);
- }
}
#define SERIO_TIMEOUT 1
diff --git a/include/linux/smb_fs_sb.h b/include/linux/smb_fs_sb.h
index c5db9cd5136c..f2400292dbbb 100644
--- a/include/linux/smb_fs_sb.h
+++ b/include/linux/smb_fs_sb.h
@@ -14,17 +14,42 @@
#include <linux/types.h>
#include <linux/smb.h>
+/*
+ * Upper limit on the total number of active smb_request structs.
+ */
+#define MAX_REQUEST_HARD 256
+
+enum smb_receive_state {
+ SMB_RECV_START, /* No data read, looking for length + sig */
+ SMB_RECV_HEADER, /* Reading the header data */
+ SMB_RECV_HCOMPLETE, /* Done with the header */
+ SMB_RECV_PARAM, /* Reading parameter words */
+ SMB_RECV_DATA, /* Reading data bytes */
+ SMB_RECV_END, /* End of request */
+ SMB_RECV_DROP, /* Dropping this SMB */
+ SMB_RECV_REQUEST, /* Received a request and not a reply */
+};
+
/* structure access macros */
#define server_from_inode(inode) SMB_SB((inode)->i_sb)
#define server_from_dentry(dentry) SMB_SB((dentry)->d_sb)
#define SB_of(server) ((server)->super_block)
struct smb_sb_info {
+ /* List of all smbfs superblocks */
+ struct list_head entry;
+
enum smb_conn_state state;
struct file * sock_file;
+ int conn_error;
+ enum smb_receive_state rstate;
+
+ atomic_t nr_requests;
+ struct list_head xmitq;
+ struct list_head recvq;
+ u16 mid;
struct smb_mount_data_kernel *mnt;
- unsigned char *temp_buf;
/* Connections are counted. Each time a new socket arrives,
* generation is incremented.
@@ -34,13 +59,15 @@ struct smb_sb_info {
struct smb_conn_opt opt;
struct semaphore sem;
- wait_queue_head_t wait;
- __u32 packet_size;
- unsigned char * packet;
unsigned short rcls; /* The error codes we received */
unsigned short err;
+ unsigned char header[SMB_HEADER_LEN + 20*2 + 2];
+ u32 header_len;
+ u32 smb_len;
+ u32 smb_read;
+
/* We use our own data_ready callback, but need the original one */
void *data_ready;
@@ -48,15 +75,16 @@ struct smb_sb_info {
struct nls_table *remote_nls;
struct nls_table *local_nls;
- /* utf8 can make strings longer so we can't do in-place conversion.
- This is a buffer for temporary stuff. We only need one so no need
- to put it on the stack. This points to temp_buf space. */
- char *name_buf;
-
struct smb_ops *ops;
+
struct super_block *super_block;
};
+static inline int
+smb_lock_server_interruptible(struct smb_sb_info *server)
+{
+ return down_interruptible(&(server->sem));
+}
static inline void
smb_lock_server(struct smb_sb_info *server)
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index be4c52c62c1c..d278df00ecb9 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -15,6 +15,7 @@
#include <linux/sunrpc/auth.h>
#include <linux/sunrpc/stats.h>
#include <linux/sunrpc/xdr.h>
+#include <linux/sunrpc/timer.h>
#include <asm/signal.h>
/*
@@ -52,6 +53,8 @@ struct rpc_clnt {
unsigned int cl_flags; /* misc client flags */
unsigned long cl_hardmax; /* max hard timeout */
+ struct rpc_rtt cl_rtt; /* RTO estimator data */
+
struct rpc_portmap cl_pmap; /* port mapping */
struct rpc_wait_queue cl_bindwait; /* waiting on getport() */
@@ -91,6 +94,7 @@ struct rpc_procinfo {
kxdrproc_t p_decode; /* XDR decode function */
unsigned int p_bufsiz; /* req. buffer size */
unsigned int p_count; /* call count */
+ unsigned int p_timer; /* Which RTT timer to use */
};
#define rpcproc_bufsiz(clnt, proc) ((clnt)->cl_procinfo[proc].p_bufsiz)
@@ -98,6 +102,7 @@ struct rpc_procinfo {
#define rpcproc_decode(clnt, proc) ((clnt)->cl_procinfo[proc].p_decode)
#define rpcproc_name(clnt, proc) ((clnt)->cl_procinfo[proc].p_procname)
#define rpcproc_count(clnt, proc) ((clnt)->cl_procinfo[proc].p_count)
+#define rpcproc_timer(clnt, proc) ((clnt)->cl_procinfo[proc].p_timer)
#define RPC_CONGESTED(clnt) (RPCXPRT_CONGESTED((clnt)->cl_xprt))
#define RPC_PEERADDR(clnt) (&(clnt)->cl_xprt->addr)
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index 892565ca4721..ff3a4ad22a13 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -75,9 +75,7 @@ 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 char tk_active : 1,/* Task has been activated */
- tk_wakeup : 1;/* Task waiting to wake up */
+ unsigned char tk_active : 1;/* Task has been activated */
unsigned long tk_runstate; /* Task run status */
#ifdef RPC_DEBUG
unsigned short tk_pid; /* debugging aid */
@@ -181,15 +179,11 @@ 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_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);
-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 *);
diff --git a/include/linux/sunrpc/timer.h b/include/linux/sunrpc/timer.h
new file mode 100644
index 000000000000..35b5a5c25170
--- /dev/null
+++ b/include/linux/sunrpc/timer.h
@@ -0,0 +1,41 @@
+/*
+ * linux/include/linux/sunrpc/timer.h
+ *
+ * Declarations for the RPC transport timer.
+ *
+ * Copyright (C) 2002 Trond Myklebust <trond.myklebust@fys.uio.no>
+ */
+
+#ifndef _LINUX_SUNRPC_TIMER_H
+#define _LINUX_SUNRPC_TIMER_H
+
+#include <asm/atomic.h>
+
+struct rpc_rtt {
+ long timeo; /* default timeout value */
+ long srtt[5]; /* smoothed round trip time << 3 */
+ long sdrtt[5]; /* soothed medium deviation of RTT */
+ atomic_t ntimeouts; /* Global count of the number of timeouts */
+};
+
+
+extern void rpc_init_rtt(struct rpc_rtt *rt, long timeo);
+extern void rpc_update_rtt(struct rpc_rtt *rt, int timer, long m);
+extern long rpc_calc_rto(struct rpc_rtt *rt, int timer);
+
+static inline void rpc_inc_timeo(struct rpc_rtt *rt)
+{
+ atomic_inc(&rt->ntimeouts);
+}
+
+static inline void rpc_clear_timeo(struct rpc_rtt *rt)
+{
+ atomic_set(&rt->ntimeouts, 0);
+}
+
+static inline int rpc_ntimeo(struct rpc_rtt *rt)
+{
+ return atomic_read(&rt->ntimeouts);
+}
+
+#endif /* _LINUX_SUNRPC_TIMER_H */
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index a8de87ccaec9..0a247f460ff7 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -19,7 +19,7 @@
* The transport code maintains an estimate on the maximum number of out-
* standing RPC requests, using a smoothed version of the congestion
* avoidance implemented in 44BSD. This is basically the Van Jacobson
- * slow start algorithm: If a retransmit occurs, the congestion window is
+ * congestion algorithm: If a retransmit occurs, the congestion window is
* halved; otherwise, it is incremented by 1/cwnd when
*
* - a reply is received and
@@ -32,15 +32,13 @@
* Note: on machines with low memory we should probably use a smaller
* MAXREQS value: At 32 outstanding reqs with 8 megs of RAM, fragment
* reassembly will frequently run out of memory.
- * Come Linux 2.3, we'll handle fragments directly.
*/
-#define RPC_MAXCONG 16
-#define RPC_MAXREQS (RPC_MAXCONG + 1)
-#define RPC_CWNDSCALE 256
+#define RPC_MAXCONG (16)
+#define RPC_MAXREQS RPC_MAXCONG
+#define RPC_CWNDSCALE (256)
#define RPC_MAXCWND (RPC_MAXCONG * RPC_CWNDSCALE)
-#define RPC_INITCWND RPC_CWNDSCALE
-#define RPCXPRT_CONGESTED(xprt) \
- ((xprt)->cong >= (xprt)->cwnd)
+#define RPC_INITCWND (RPC_MAXCWND >> 1)
+#define RPCXPRT_CONGESTED(xprt) ((xprt)->cong >= (xprt)->cwnd)
/* Default timeout values */
#define RPC_MAX_UDP_TIMEOUT (60*HZ)
@@ -83,7 +81,10 @@ struct rpc_rqst {
struct rpc_task * rq_task; /* RPC task data */
__u32 rq_xid; /* request XID */
struct rpc_rqst * rq_next; /* free list */
- volatile unsigned char rq_received : 1;/* receive completed */
+ int rq_cong; /* has incremented xprt->cong */
+ int rq_received; /* receive completed */
+
+ struct list_head rq_list;
/*
* For authentication (e.g. auth_des)
@@ -96,9 +97,9 @@ struct rpc_rqst {
u32 rq_bytes_sent; /* Bytes we have sent */
-#ifdef RPC_PROFILE
- unsigned long rq_xtime; /* when transmitted */
-#endif
+ long rq_xtime; /* when transmitted */
+ int rq_ntimeo;
+ int rq_nresend;
};
#define rq_svec rq_snd_buf.head
#define rq_slen rq_snd_buf.len
@@ -120,9 +121,9 @@ struct rpc_xprt {
unsigned long cong; /* current congestion */
unsigned long cwnd; /* congestion window */
- unsigned long congtime; /* hold cwnd until then */
struct rpc_wait_queue sending; /* requests waiting to send */
+ struct rpc_wait_queue resend; /* requests waiting to resend */
struct rpc_wait_queue pending; /* requests in flight */
struct rpc_wait_queue backlog; /* waiting for slot */
struct rpc_rqst * free; /* free slots */
@@ -149,6 +150,8 @@ struct rpc_xprt {
spinlock_t xprt_lock; /* lock xprt info */
struct rpc_task * snd_task; /* Task blocked in send */
+ struct list_head recv;
+
void (*old_data_ready)(struct sock *, int);
void (*old_state_change)(struct sock *);
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 316ec1a6e30c..ccc76b9ba88b 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -56,9 +56,22 @@ extern int register_suspend_notifier(struct notifier_block *);
extern int unregister_suspend_notifier(struct notifier_block *);
extern void refrigerator(unsigned long);
+extern int freeze_processes(void);
+extern void thaw_processes(void);
+
extern unsigned int nr_copy_pages __nosavedata;
extern suspend_pagedir_t *pagedir_nosave __nosavedata;
+/* Communication between kernel/suspend.c and arch/i386/suspend.c */
+
+extern void do_magic_resume_1(void);
+extern void do_magic_resume_2(void);
+extern void do_magic_suspend_1(void);
+extern void do_magic_suspend_2(void);
+
+/* Communication between acpi and arch/i386/suspend.c */
+
+extern void do_suspend_lowlevel(int resume);
#else
#define software_suspend() do { } while(0)
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h
index 1e484e5fd032..ee340cd26eaf 100644
--- a/include/linux/sysrq.h
+++ b/include/linux/sysrq.h
@@ -14,12 +14,10 @@
#include <linux/config.h>
struct pt_regs;
-struct kbd_struct;
struct tty_struct;
struct sysrq_key_op {
- void (*handler)(int, struct pt_regs *,
- struct kbd_struct *, struct tty_struct *);
+ void (*handler)(int, struct pt_regs *, struct tty_struct *);
char *help_msg;
char *action_msg;
};
@@ -31,19 +29,14 @@ struct sysrq_key_op {
* are available -- else NULL's).
*/
-void handle_sysrq(int, struct pt_regs *,
- struct kbd_struct *, struct tty_struct *);
-
+void handle_sysrq(int, struct pt_regs *, struct tty_struct *);
/*
* Nonlocking version of handle sysrq, used by sysrq handlers that need to
* call sysrq handlers
*/
-void __handle_sysrq_nolock(int, struct pt_regs *,
- struct kbd_struct *, struct tty_struct *);
-
-
+void __handle_sysrq_nolock(int, struct pt_regs *, struct tty_struct *);
/*
* Sysrq registration manipulation functions
diff --git a/include/linux/uinput.h b/include/linux/uinput.h
new file mode 100644
index 000000000000..6754ab4e0952
--- /dev/null
+++ b/include/linux/uinput.h
@@ -0,0 +1,78 @@
+#ifndef __UINPUT_H_
+#define __UINPUT_H_
+/*
+ * User level driver support for input subsystem
+ *
+ * Heavily based on evdev.c by Vojtech Pavlik
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
+ *
+ * Changes/Revisions:
+ * 0.1 20/06/2002
+ * - first public version
+ */
+#ifdef __KERNEL__
+#define UINPUT_MINOR 223
+#define UINPUT_NAME "uinput"
+#define UINPUT_BUFFER_SIZE 16
+#define U_MAX_NAME_SIZE 50
+
+#define UIST_CREATED 1
+
+struct uinput_device {
+ struct input_dev *dev;
+ unsigned long state;
+ wait_queue_head_t waitq;
+ unsigned char ready,
+ head,
+ tail;
+ struct input_event buff[UINPUT_BUFFER_SIZE];
+};
+#endif /* __KERNEL__ */
+
+/* ioctl */
+#define UINPUT_IOCTL_BASE 'U'
+#define UI_DEV_CREATE _IO(UINPUT_IOCTL_BASE, 1)
+#define UI_DEV_DESTROY _IO(UINPUT_IOCTL_BASE, 2)
+#define UI_SET_EVBIT _IOW(UINPUT_IOCTL_BASE, 100, int)
+#define UI_SET_KEYBIT _IOW(UINPUT_IOCTL_BASE, 101, int)
+#define UI_SET_RELBIT _IOW(UINPUT_IOCTL_BASE, 102, int)
+#define UI_SET_ABSBIT _IOW(UINPUT_IOCTL_BASE, 103, int)
+#define UI_SET_MSCBIT _IOW(UINPUT_IOCTL_BASE, 104, int)
+#define UI_SET_LEDBIT _IOW(UINPUT_IOCTL_BASE, 105, int)
+#define UI_SET_SNDBIT _IOW(UINPUT_IOCTL_BASE, 106, int)
+#define UI_SET_FFBIT _IOW(UINPUT_IOCTL_BASE, 107, int)
+
+#ifndef NBITS
+#define NBITS(x) ((((x)-1)/(sizeof(long)*8))+1)
+#endif /* NBITS */
+
+#define UINPUT_MAX_NAME_SIZE 80
+struct uinput_user_dev {
+ char name[UINPUT_MAX_NAME_SIZE];
+ unsigned short idbus;
+ unsigned short idvendor;
+ unsigned short idproduct;
+ unsigned short idversion;
+ int ff_effects_max;
+ int absmax[ABS_MAX + 1];
+ int absmin[ABS_MAX + 1];
+ int absfuzz[ABS_MAX + 1];
+ int absflat[ABS_MAX + 1];
+};
+#endif /* __UINPUT_H_ */
+
diff --git a/include/linux/usb.h b/include/linux/usb.h
index b1c39c99e75f..11836df8a6ab 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -466,7 +466,7 @@ const struct usb_device_id *usb_match_id(struct usb_device *dev,
* than changeable ("unstable") ones like bus numbers or device addresses.
*
* With a partial exception for devices connected to USB 2.0 root hubs, these
- * identifiers are also predictable: so long as the device tree isn't changed,
+ * identifiers are also predictable. So long as the device tree isn't changed,
* plugging any USB device into a given hub port always gives it the same path.
* Because of the use of "companion" controllers, devices connected to ports on
* USB 2.0 root hubs (EHCI host controllers) will get one path ID if they are
@@ -722,16 +722,14 @@ extern void usb_deregister_dev(int num_minors, int start_minor);
/*
* urb->transfer_flags:
*
- * FIXME should be URB_* flags
+ * FIXME should _all_ be URB_* flags
*/
-#define USB_DISABLE_SPD 0x0001
-#define USB_ISO_ASAP 0x0002
-#define USB_ASYNC_UNLINK 0x0008
-#define USB_QUEUE_BULK 0x0010
-#define USB_NO_FSBR 0x0020
+#define URB_SHORT_NOT_OK 0x0001 /* report short reads as errors */
+#define USB_ISO_ASAP 0x0002 /* iso-only, urb->start_frame ignored */
+#define USB_ASYNC_UNLINK 0x0008 /* usb_unlink_urb() returns asap */
+#define USB_NO_FSBR 0x0020 /* UHCI-specific */
#define USB_ZERO_PACKET 0x0040 /* Finish bulk OUTs with short packet */
#define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt needed */
- /* ... less overhead for QUEUE_BULK */
#define USB_TIMEOUT_KILLED 0x1000 /* only set by HCD! */
struct usb_iso_packet_descriptor {
@@ -777,9 +775,9 @@ typedef void (*usb_complete_t)(struct urb *);
* @actual_length: This is read in non-iso completion functions, and
* it tells how many bytes (out of transfer_buffer_length) were
* transferred. It will normally be the same as requested, unless
- * either an error was reported or a short read was performed and
- * the USB_DISABLE_SPD transfer flag was used to say that such
- * short reads are not errors.
+ * either an error was reported or a short read was performed.
+ * The URB_SHORT_NOT_OK transfer flag may be used to make such
+ * short reads be reported as errors.
* @setup_packet: Only used for control transfers, this points to eight bytes
* of setup data. Control transfers always start by sending this data
* to the device. Then transfer_buffer is read or written, if needed.
@@ -814,14 +812,10 @@ typedef void (*usb_complete_t)(struct urb *);
*
* All non-isochronous URBs must also initialize
* transfer_buffer and transfer_buffer_length. They may provide the
- * USB_DISABLE_SPD transfer flag, indicating that short reads are
- * not to be treated as errors.
+ * URB_SHORT_NOT_OK transfer flag, indicating that short reads are
+ * to be treated as errors.
*
- * Bulk URBs may pass the USB_QUEUE_BULK transfer flag, telling the host
- * controller driver never to report an error if several bulk requests get
- * queued to the same endpoint. Such queueing supports more efficient use
- * of bus bandwidth, minimizing delays due to interrupts and scheduling,
- * if the host controller hardware is smart enough. Bulk URBs can also
+ * Bulk URBs may
* use the USB_ZERO_PACKET transfer flag, indicating that bulk OUT transfers
* should always terminate with a short packet, even if it means adding an
* extra zero length packet.
@@ -853,7 +847,7 @@ typedef void (*usb_complete_t)(struct urb *);
* the quality of service is only "best effort". Callers provide specially
* allocated URBs, with number_of_packets worth of iso_frame_desc structures
* at the end. Each such packet is an individual ISO transfer. Isochronous
- * URBs are normally queued (no flag like USB_BULK_QUEUE is needed) so that
+ * URBs are normally queued, submitted by drivers to arrange that
* transfers are at least double buffered, and then explicitly resubmitted
* in completion handlers, so
* that data (such as audio or video) streams at as constant a rate as the
@@ -892,7 +886,7 @@ struct urb
struct usb_device *dev; /* (in) pointer to associated device */
unsigned int pipe; /* (in) pipe information */
int status; /* (return) non-ISO status */
- unsigned int transfer_flags; /* (in) USB_DISABLE_SPD | ...*/
+ unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/
void *transfer_buffer; /* (in) associated data buffer */
int transfer_buffer_length; /* (in) data buffer length */
int actual_length; /* (return) actual transfer length */
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h
index 10a508f55a07..de18e956f47b 100644
--- a/include/linux/usbdevice_fs.h
+++ b/include/linux/usbdevice_fs.h
@@ -78,9 +78,8 @@ struct usbdevfs_connectinfo {
unsigned char slow;
};
-#define USBDEVFS_URB_DISABLE_SPD 1
+#define USBDEVFS_URB_SHORT_NOT_OK 1
#define USBDEVFS_URB_ISO_ASAP 2
-#define USBDEVFS_URB_QUEUE_BULK 0x10
#define USBDEVFS_URB_TYPE_ISO 0
#define USBDEVFS_URB_TYPE_INTERRUPT 1
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 227ad0934c79..6f668c171107 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -91,6 +91,5 @@ void complete_change_console(unsigned int new_console);
int vt_waitactive(int vt);
void change_console(unsigned int);
void reset_vc(unsigned int new_console);
-int vt_waitactive(int vt);
#endif /* _VT_KERN_H */