diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-04-29 01:11:23 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-04-29 01:11:23 -0400 |
commit | 7b7e394185014e0f3bd8989cac937003f20ef9ce (patch) | |
tree | 3beda5f979bba0aa9822534e239cf1b45f3be69c /include/linux | |
parent | ddc5d3414593e4d7ad7fbd33e7f7517fcc234544 (diff) | |
parent | 693f7d362055261882659475d2ef022e32edbff1 (diff) |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux')
67 files changed, 2004 insertions, 3372 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index d0cac8b58de7..59e1259b1c40 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -17,6 +17,8 @@ | |||
17 | 17 | ||
18 | #include <asm/scatterlist.h> | 18 | #include <asm/scatterlist.h> |
19 | 19 | ||
20 | struct scsi_ioctl_command; | ||
21 | |||
20 | struct request_queue; | 22 | struct request_queue; |
21 | typedef struct request_queue request_queue_t; | 23 | typedef struct request_queue request_queue_t; |
22 | struct elevator_queue; | 24 | struct elevator_queue; |
@@ -611,6 +613,8 @@ extern void blk_plug_device(request_queue_t *); | |||
611 | extern int blk_remove_plug(request_queue_t *); | 613 | extern int blk_remove_plug(request_queue_t *); |
612 | extern void blk_recount_segments(request_queue_t *, struct bio *); | 614 | extern void blk_recount_segments(request_queue_t *, struct bio *); |
613 | extern int scsi_cmd_ioctl(struct file *, struct gendisk *, unsigned int, void __user *); | 615 | extern int scsi_cmd_ioctl(struct file *, struct gendisk *, unsigned int, void __user *); |
616 | extern int sg_scsi_ioctl(struct file *, struct request_queue *, | ||
617 | struct gendisk *, struct scsi_ioctl_command __user *); | ||
614 | extern void blk_start_queue(request_queue_t *q); | 618 | extern void blk_start_queue(request_queue_t *q); |
615 | extern void blk_stop_queue(request_queue_t *q); | 619 | extern void blk_stop_queue(request_queue_t *q); |
616 | extern void blk_sync_queue(struct request_queue *q); | 620 | extern void blk_sync_queue(struct request_queue *q); |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index de3eb8d8ae26..da2d107fe2cf 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -45,6 +45,7 @@ extern unsigned long __init bootmem_bootmap_pages (unsigned long); | |||
45 | extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend); | 45 | extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend); |
46 | extern void __init free_bootmem (unsigned long addr, unsigned long size); | 46 | extern void __init free_bootmem (unsigned long addr, unsigned long size); |
47 | extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal); | 47 | extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal); |
48 | extern void * __init __alloc_bootmem_nopanic (unsigned long size, unsigned long align, unsigned long goal); | ||
48 | extern void * __init __alloc_bootmem_low(unsigned long size, | 49 | extern void * __init __alloc_bootmem_low(unsigned long size, |
49 | unsigned long align, | 50 | unsigned long align, |
50 | unsigned long goal); | 51 | unsigned long goal); |
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 176e2d371577..047567d34ca7 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
@@ -58,9 +58,8 @@ struct dentry *debugfs_create_blob(const char *name, mode_t mode, | |||
58 | */ | 58 | */ |
59 | 59 | ||
60 | static inline struct dentry *debugfs_create_file(const char *name, mode_t mode, | 60 | static inline struct dentry *debugfs_create_file(const char *name, mode_t mode, |
61 | struct dentry *parent, | 61 | struct dentry *parent, void *data, |
62 | void *data, | 62 | const struct file_operations *fops) |
63 | struct file_operations *fops) | ||
64 | { | 63 | { |
65 | return ERR_PTR(-ENODEV); | 64 | return ERR_PTR(-ENODEV); |
66 | } | 65 | } |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 9b4751aecc23..ff61817082fa 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -21,7 +21,7 @@ enum dma_data_direction { | |||
21 | #define DMA_30BIT_MASK 0x000000003fffffffULL | 21 | #define DMA_30BIT_MASK 0x000000003fffffffULL |
22 | #define DMA_29BIT_MASK 0x000000001fffffffULL | 22 | #define DMA_29BIT_MASK 0x000000001fffffffULL |
23 | #define DMA_28BIT_MASK 0x000000000fffffffULL | 23 | #define DMA_28BIT_MASK 0x000000000fffffffULL |
24 | #define DMA_24BIT_MASK 0x0000000000ffffffULL | 24 | #define DMA_24BIT_MASK 0x0000000000ffffffULL |
25 | 25 | ||
26 | #include <asm/dma-mapping.h> | 26 | #include <asm/dma-mapping.h> |
27 | 27 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4ed7e602d703..3de2bfb2410f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -762,7 +762,7 @@ extern int fcntl_getlease(struct file *filp); | |||
762 | #define SYNC_FILE_RANGE_WRITE 2 | 762 | #define SYNC_FILE_RANGE_WRITE 2 |
763 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 | 763 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 |
764 | extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte, | 764 | extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte, |
765 | int flags); | 765 | unsigned int flags); |
766 | 766 | ||
767 | /* fs/locks.c */ | 767 | /* fs/locks.c */ |
768 | extern void locks_init_lock(struct file_lock *); | 768 | extern void locks_init_lock(struct file_lock *); |
@@ -864,7 +864,7 @@ struct super_block { | |||
864 | */ | 864 | */ |
865 | struct mutex s_vfs_rename_mutex; /* Kludge */ | 865 | struct mutex s_vfs_rename_mutex; /* Kludge */ |
866 | 866 | ||
867 | /* Granuality of c/m/atime in ns. | 867 | /* Granularity of c/m/atime in ns. |
868 | Cannot be worse than a second */ | 868 | Cannot be worse than a second */ |
869 | u32 s_time_gran; | 869 | u32 s_time_gran; |
870 | }; | 870 | }; |
@@ -1039,8 +1039,8 @@ struct file_operations { | |||
1039 | int (*check_flags)(int); | 1039 | int (*check_flags)(int); |
1040 | int (*dir_notify)(struct file *filp, unsigned long arg); | 1040 | int (*dir_notify)(struct file *filp, unsigned long arg); |
1041 | int (*flock) (struct file *, int, struct file_lock *); | 1041 | int (*flock) (struct file *, int, struct file_lock *); |
1042 | ssize_t (*splice_write)(struct inode *, struct file *, size_t, unsigned int); | 1042 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); |
1043 | ssize_t (*splice_read)(struct file *, struct inode *, size_t, unsigned int); | 1043 | ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); |
1044 | }; | 1044 | }; |
1045 | 1045 | ||
1046 | struct inode_operations { | 1046 | struct inode_operations { |
@@ -1611,8 +1611,17 @@ extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor | |||
1611 | extern void do_generic_mapping_read(struct address_space *mapping, | 1611 | extern void do_generic_mapping_read(struct address_space *mapping, |
1612 | struct file_ra_state *, struct file *, | 1612 | struct file_ra_state *, struct file *, |
1613 | loff_t *, read_descriptor_t *, read_actor_t); | 1613 | loff_t *, read_descriptor_t *, read_actor_t); |
1614 | extern ssize_t generic_file_splice_read(struct file *, struct inode *, size_t, unsigned int); | 1614 | |
1615 | extern ssize_t generic_file_splice_write(struct inode *, struct file *, size_t, unsigned int); | 1615 | /* fs/splice.c */ |
1616 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, | ||
1617 | struct pipe_inode_info *, size_t, unsigned int); | ||
1618 | extern ssize_t generic_file_splice_write(struct pipe_inode_info *, | ||
1619 | struct file *, loff_t *, size_t, unsigned int); | ||
1620 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, | ||
1621 | struct file *out, loff_t *, size_t len, unsigned int flags); | ||
1622 | extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, | ||
1623 | size_t len, unsigned int flags); | ||
1624 | |||
1616 | extern void | 1625 | extern void |
1617 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); | 1626 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); |
1618 | extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, | 1627 | extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 10a27f29d692..2ef845b35175 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -105,6 +105,7 @@ struct gendisk { | |||
105 | * disks that can't be partitioned. */ | 105 | * disks that can't be partitioned. */ |
106 | char disk_name[32]; /* name of major driver */ | 106 | char disk_name[32]; /* name of major driver */ |
107 | struct hd_struct **part; /* [indexed by minor] */ | 107 | struct hd_struct **part; /* [indexed by minor] */ |
108 | int part_uevent_suppress; | ||
108 | struct block_device_operations *fops; | 109 | struct block_device_operations *fops; |
109 | struct request_queue *queue; | 110 | struct request_queue *queue; |
110 | void *private_data; | 111 | void *private_data; |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 7851e6b520cf..3ac452945a7d 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -57,6 +57,8 @@ struct vm_area_struct; | |||
57 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ | 57 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ |
58 | __GFP_NOMEMALLOC|__GFP_HARDWALL) | 58 | __GFP_NOMEMALLOC|__GFP_HARDWALL) |
59 | 59 | ||
60 | /* This equals 0, but use constants in case they ever change */ | ||
61 | #define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH) | ||
60 | /* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */ | 62 | /* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */ |
61 | #define GFP_ATOMIC (__GFP_HIGH) | 63 | #define GFP_ATOMIC (__GFP_HIGH) |
62 | #define GFP_NOIO (__GFP_WAIT) | 64 | #define GFP_NOIO (__GFP_WAIT) |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index b20939287613..306acf1dc6d5 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -80,7 +80,7 @@ struct hrtimer_sleeper { | |||
80 | * @first: pointer to the timer node which expires first | 80 | * @first: pointer to the timer node which expires first |
81 | * @resolution: the resolution of the clock, in nanoseconds | 81 | * @resolution: the resolution of the clock, in nanoseconds |
82 | * @get_time: function to retrieve the current time of the clock | 82 | * @get_time: function to retrieve the current time of the clock |
83 | * @get_sofirq_time: function to retrieve the current time from the softirq | 83 | * @get_softirq_time: function to retrieve the current time from the softirq |
84 | * @curr_timer: the timer which is executing a callback right now | 84 | * @curr_timer: the timer which is executing a callback right now |
85 | * @softirq_time: the time when running the hrtimer queue in the softirq | 85 | * @softirq_time: the time when running the hrtimer queue in the softirq |
86 | */ | 86 | */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 8d2db412ba9c..a8bef1d1371c 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1220,7 +1220,6 @@ typedef struct ide_pci_enablebit_s { | |||
1220 | enum { | 1220 | enum { |
1221 | /* Uses ISA control ports not PCI ones. */ | 1221 | /* Uses ISA control ports not PCI ones. */ |
1222 | IDEPCI_FLAG_ISA_PORTS = (1 << 0), | 1222 | IDEPCI_FLAG_ISA_PORTS = (1 << 0), |
1223 | IDEPCI_FLAG_FORCE_PDC = (1 << 1), | ||
1224 | }; | 1223 | }; |
1225 | 1224 | ||
1226 | typedef struct ide_pci_device_s { | 1225 | typedef struct ide_pci_device_s { |
diff --git a/include/linux/init.h b/include/linux/init.h index ed0ac7c39fdc..93dcbe1abb4c 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -245,7 +245,8 @@ void __init parse_early_param(void); | |||
245 | #define __cpuexitdata __exitdata | 245 | #define __cpuexitdata __exitdata |
246 | #endif | 246 | #endif |
247 | 247 | ||
248 | #ifdef CONFIG_MEMORY_HOTPLUG | 248 | #if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) \ |
249 | || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE) | ||
249 | #define __meminit | 250 | #define __meminit |
250 | #define __meminitdata | 251 | #define __meminitdata |
251 | #define __memexit | 252 | #define __memexit |
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 99905e180532..043376920f51 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -36,6 +36,8 @@ | |||
36 | /* LATCH is used in the interval timer and ftape setup. */ | 36 | /* LATCH is used in the interval timer and ftape setup. */ |
37 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ | 37 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ |
38 | 38 | ||
39 | #define LATCH_HPET ((HPET_TICK_RATE + HZ/2) / HZ) | ||
40 | |||
39 | /* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, the we can | 41 | /* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, the we can |
40 | * improve accuracy by shifting LSH bits, hence calculating: | 42 | * improve accuracy by shifting LSH bits, hence calculating: |
41 | * (NOM << LSH) / DEN | 43 | * (NOM << LSH) / DEN |
@@ -51,9 +53,13 @@ | |||
51 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ | 53 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ |
52 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) | 54 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) |
53 | 55 | ||
56 | #define ACTHZ_HPET (SH_DIV (HPET_TICK_RATE, LATCH_HPET, 8)) | ||
57 | |||
54 | /* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */ | 58 | /* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */ |
55 | #define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8)) | 59 | #define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8)) |
56 | 60 | ||
61 | #define TICK_NSEC_HPET (SH_DIV(1000000UL * 1000, ACTHZ_HPET, 8)) | ||
62 | |||
57 | /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ | 63 | /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ |
58 | #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) | 64 | #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) |
59 | 65 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index a3720f973ea5..e1bd0842f6a1 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -176,7 +176,7 @@ static inline void console_verbose(void) | |||
176 | 176 | ||
177 | extern void bust_spinlocks(int yes); | 177 | extern void bust_spinlocks(int yes); |
178 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ | 178 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ |
179 | extern __deprecated_for_modules int panic_timeout; | 179 | extern int panic_timeout; |
180 | extern int panic_on_oops; | 180 | extern int panic_on_oops; |
181 | extern int tainted; | 181 | extern int tainted; |
182 | extern const char *print_tainted(void); | 182 | extern const char *print_tainted(void); |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 4cb1214ec290..c187c53cecd0 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/rwsem.h> | 24 | #include <linux/rwsem.h> |
25 | #include <linux/kref.h> | 25 | #include <linux/kref.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/wait.h> | ||
27 | #include <asm/atomic.h> | 28 | #include <asm/atomic.h> |
28 | 29 | ||
29 | #define KOBJ_NAME_LEN 20 | 30 | #define KOBJ_NAME_LEN 20 |
@@ -56,6 +57,7 @@ struct kobject { | |||
56 | struct kset * kset; | 57 | struct kset * kset; |
57 | struct kobj_type * ktype; | 58 | struct kobj_type * ktype; |
58 | struct dentry * dentry; | 59 | struct dentry * dentry; |
60 | wait_queue_head_t poll; | ||
59 | }; | 61 | }; |
60 | 62 | ||
61 | extern int kobject_set_name(struct kobject *, const char *, ...) | 63 | extern int kobject_set_name(struct kobject *, const char *, ...) |
@@ -255,9 +257,8 @@ struct subsys_attribute { | |||
255 | }; | 257 | }; |
256 | 258 | ||
257 | extern int subsys_create_file(struct subsystem * , struct subsys_attribute *); | 259 | extern int subsys_create_file(struct subsystem * , struct subsys_attribute *); |
258 | extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *); | ||
259 | 260 | ||
260 | #if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) | 261 | #if defined(CONFIG_HOTPLUG) |
261 | void kobject_uevent(struct kobject *kobj, enum kobject_action action); | 262 | void kobject_uevent(struct kobject *kobj, enum kobject_action action); |
262 | 263 | ||
263 | int add_uevent_var(char **envp, int num_envp, int *cur_index, | 264 | int add_uevent_var(char **envp, int num_envp, int *cur_index, |
diff --git a/include/linux/leds.h b/include/linux/leds.h index 4617e75903b0..dc23c7c639f3 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -19,39 +19,38 @@ struct class_device; | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | enum led_brightness { | 21 | enum led_brightness { |
22 | LED_OFF = 0, | 22 | LED_OFF = 0, |
23 | LED_HALF = 127, | 23 | LED_HALF = 127, |
24 | LED_FULL = 255, | 24 | LED_FULL = 255, |
25 | }; | 25 | }; |
26 | 26 | ||
27 | struct led_classdev { | 27 | struct led_classdev { |
28 | const char *name; | 28 | const char *name; |
29 | int brightness; | 29 | int brightness; |
30 | int flags; | 30 | int flags; |
31 | #define LED_SUSPENDED (1 << 0) | ||
32 | 31 | ||
33 | /* A function to set the brightness of the led */ | 32 | #define LED_SUSPENDED (1 << 0) |
34 | void (*brightness_set)(struct led_classdev *led_cdev, | ||
35 | enum led_brightness brightness); | ||
36 | 33 | ||
37 | struct class_device *class_dev; | 34 | /* Set LED brightness level */ |
38 | /* LED Device linked list */ | 35 | void (*brightness_set)(struct led_classdev *led_cdev, |
39 | struct list_head node; | 36 | enum led_brightness brightness); |
37 | |||
38 | struct class_device *class_dev; | ||
39 | struct list_head node; /* LED Device list */ | ||
40 | char *default_trigger; /* Trigger to use */ | ||
40 | 41 | ||
41 | /* Trigger data */ | ||
42 | char *default_trigger; | ||
43 | #ifdef CONFIG_LEDS_TRIGGERS | 42 | #ifdef CONFIG_LEDS_TRIGGERS |
44 | rwlock_t trigger_lock; | ||
45 | /* Protects the trigger data below */ | 43 | /* Protects the trigger data below */ |
44 | rwlock_t trigger_lock; | ||
46 | 45 | ||
47 | struct led_trigger *trigger; | 46 | struct led_trigger *trigger; |
48 | struct list_head trig_list; | 47 | struct list_head trig_list; |
49 | void *trigger_data; | 48 | void *trigger_data; |
50 | #endif | 49 | #endif |
51 | }; | 50 | }; |
52 | 51 | ||
53 | extern int led_classdev_register(struct device *parent, | 52 | extern int led_classdev_register(struct device *parent, |
54 | struct led_classdev *led_cdev); | 53 | struct led_classdev *led_cdev); |
55 | extern void led_classdev_unregister(struct led_classdev *led_cdev); | 54 | extern void led_classdev_unregister(struct led_classdev *led_cdev); |
56 | extern void led_classdev_suspend(struct led_classdev *led_cdev); | 55 | extern void led_classdev_suspend(struct led_classdev *led_cdev); |
57 | extern void led_classdev_resume(struct led_classdev *led_cdev); | 56 | extern void led_classdev_resume(struct led_classdev *led_cdev); |
@@ -65,16 +64,16 @@ extern void led_classdev_resume(struct led_classdev *led_cdev); | |||
65 | 64 | ||
66 | struct led_trigger { | 65 | struct led_trigger { |
67 | /* Trigger Properties */ | 66 | /* Trigger Properties */ |
68 | const char *name; | 67 | const char *name; |
69 | void (*activate)(struct led_classdev *led_cdev); | 68 | void (*activate)(struct led_classdev *led_cdev); |
70 | void (*deactivate)(struct led_classdev *led_cdev); | 69 | void (*deactivate)(struct led_classdev *led_cdev); |
71 | 70 | ||
72 | /* LEDs under control by this trigger (for simple triggers) */ | 71 | /* LEDs under control by this trigger (for simple triggers) */ |
73 | rwlock_t leddev_list_lock; | 72 | rwlock_t leddev_list_lock; |
74 | struct list_head led_cdevs; | 73 | struct list_head led_cdevs; |
75 | 74 | ||
76 | /* Link to next registered trigger */ | 75 | /* Link to next registered trigger */ |
77 | struct list_head next_trig; | 76 | struct list_head next_trig; |
78 | }; | 77 | }; |
79 | 78 | ||
80 | /* Registration functions for complex triggers */ | 79 | /* Registration functions for complex triggers */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 0d61357604d5..b80d2e7fa6d2 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -523,7 +523,6 @@ extern void ata_host_set_remove(struct ata_host_set *host_set); | |||
523 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 523 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
524 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 524 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
525 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 525 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
526 | extern int ata_scsi_error(struct Scsi_Host *host); | ||
527 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); | 526 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); |
528 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); | 527 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); |
529 | extern int ata_scsi_release(struct Scsi_Host *host); | 528 | extern int ata_scsi_release(struct Scsi_Host *host); |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 968b1aa3732c..911206386171 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -58,8 +58,6 @@ extern int add_one_highpage(struct page *page, int pfn, int bad_ppro); | |||
58 | /* need some defines for these for archs that don't support it */ | 58 | /* need some defines for these for archs that don't support it */ |
59 | extern void online_page(struct page *page); | 59 | extern void online_page(struct page *page); |
60 | /* VM interface that may be used by firmware interface */ | 60 | /* VM interface that may be used by firmware interface */ |
61 | extern int add_memory(u64 start, u64 size); | ||
62 | extern int remove_memory(u64 start, u64 size); | ||
63 | extern int online_pages(unsigned long, unsigned long); | 61 | extern int online_pages(unsigned long, unsigned long); |
64 | 62 | ||
65 | /* reasonably generic interface to expand the physical pages in a zone */ | 63 | /* reasonably generic interface to expand the physical pages in a zone */ |
@@ -92,11 +90,6 @@ static inline int mhp_notimplemented(const char *func) | |||
92 | return -ENOSYS; | 90 | return -ENOSYS; |
93 | } | 91 | } |
94 | 92 | ||
95 | static inline int __add_pages(struct zone *zone, unsigned long start_pfn, | ||
96 | unsigned long nr_pages) | ||
97 | { | ||
98 | return mhp_notimplemented(__FUNCTION__); | ||
99 | } | ||
100 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ | 93 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ |
101 | static inline int __remove_pages(struct zone *zone, unsigned long start_pfn, | 94 | static inline int __remove_pages(struct zone *zone, unsigned long start_pfn, |
102 | unsigned long nr_pages) | 95 | unsigned long nr_pages) |
@@ -105,4 +98,8 @@ static inline int __remove_pages(struct zone *zone, unsigned long start_pfn, | |||
105 | dump_stack(); | 98 | dump_stack(); |
106 | return -ENOSYS; | 99 | return -ENOSYS; |
107 | } | 100 | } |
101 | |||
102 | extern int add_memory(u64 start, u64 size); | ||
103 | extern int remove_memory(u64 start, u64 size); | ||
104 | |||
108 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ | 105 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 6aa016f1d3ae..1154684209a4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -229,10 +229,9 @@ struct page { | |||
229 | unsigned long private; /* Mapping-private opaque data: | 229 | unsigned long private; /* Mapping-private opaque data: |
230 | * usually used for buffer_heads | 230 | * usually used for buffer_heads |
231 | * if PagePrivate set; used for | 231 | * if PagePrivate set; used for |
232 | * swp_entry_t if PageSwapCache. | 232 | * swp_entry_t if PageSwapCache; |
233 | * When page is free, this | ||
234 | * indicates order in the buddy | 233 | * indicates order in the buddy |
235 | * system. | 234 | * system if PG_buddy is set. |
236 | */ | 235 | */ |
237 | struct address_space *mapping; /* If low bit clear, points to | 236 | struct address_space *mapping; /* If low bit clear, points to |
238 | * inode address_space, or NULL. | 237 | * inode address_space, or NULL. |
diff --git a/include/linux/mv643xx.h b/include/linux/mv643xx.h index 955d3069d727..edfa012fad3a 100644 --- a/include/linux/mv643xx.h +++ b/include/linux/mv643xx.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #ifndef __ASM_MV643XX_H | 13 | #ifndef __ASM_MV643XX_H |
14 | #define __ASM_MV643XX_H | 14 | #define __ASM_MV643XX_H |
15 | 15 | ||
16 | #ifdef __MIPS__ | 16 | #ifdef __mips__ |
17 | #include <asm/addrspace.h> | 17 | #include <asm/addrspace.h> |
18 | #include <asm/marvell.h> | 18 | #include <asm/marvell.h> |
19 | #endif | 19 | #endif |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 40ccf8cc4239..01db7b88a2b1 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -829,19 +829,21 @@ static inline void netif_rx_schedule(struct net_device *dev) | |||
829 | __netif_rx_schedule(dev); | 829 | __netif_rx_schedule(dev); |
830 | } | 830 | } |
831 | 831 | ||
832 | /* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). | 832 | |
833 | * Do not inline this? | 833 | static inline void __netif_rx_reschedule(struct net_device *dev, int undo) |
834 | */ | 834 | { |
835 | dev->quota += undo; | ||
836 | list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list); | ||
837 | __raise_softirq_irqoff(NET_RX_SOFTIRQ); | ||
838 | } | ||
839 | |||
840 | /* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). */ | ||
835 | static inline int netif_rx_reschedule(struct net_device *dev, int undo) | 841 | static inline int netif_rx_reschedule(struct net_device *dev, int undo) |
836 | { | 842 | { |
837 | if (netif_rx_schedule_prep(dev)) { | 843 | if (netif_rx_schedule_prep(dev)) { |
838 | unsigned long flags; | 844 | unsigned long flags; |
839 | |||
840 | dev->quota += undo; | ||
841 | |||
842 | local_irq_save(flags); | 845 | local_irq_save(flags); |
843 | list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list); | 846 | __netif_rx_reschedule(dev, undo); |
844 | __raise_softirq_irqoff(NET_RX_SOFTIRQ); | ||
845 | local_irq_restore(flags); | 847 | local_irq_restore(flags); |
846 | return 1; | 848 | return 1; |
847 | } | 849 | } |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 412e52ca9720..b31a9bca9361 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -110,6 +110,8 @@ struct nf_info | |||
110 | /* Function to register/unregister hook points. */ | 110 | /* Function to register/unregister hook points. */ |
111 | int nf_register_hook(struct nf_hook_ops *reg); | 111 | int nf_register_hook(struct nf_hook_ops *reg); |
112 | void nf_unregister_hook(struct nf_hook_ops *reg); | 112 | void nf_unregister_hook(struct nf_hook_ops *reg); |
113 | int nf_register_hooks(struct nf_hook_ops *reg, unsigned int n); | ||
114 | void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n); | ||
113 | 115 | ||
114 | /* Functions to register get/setsockopt ranges (non-inclusive). You | 116 | /* Functions to register get/setsockopt ranges (non-inclusive). You |
115 | need to check permissions yourself! */ | 117 | need to check permissions yourself! */ |
@@ -281,16 +283,42 @@ extern void nf_invalidate_cache(int pf); | |||
281 | Returns true or false. */ | 283 | Returns true or false. */ |
282 | extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len); | 284 | extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len); |
283 | 285 | ||
284 | struct nf_queue_rerouter { | 286 | struct nf_afinfo { |
285 | void (*save)(const struct sk_buff *skb, struct nf_info *info); | 287 | unsigned short family; |
286 | int (*reroute)(struct sk_buff **skb, const struct nf_info *info); | 288 | unsigned int (*checksum)(struct sk_buff *skb, unsigned int hook, |
287 | int rer_size; | 289 | unsigned int dataoff, u_int8_t protocol); |
290 | void (*saveroute)(const struct sk_buff *skb, | ||
291 | struct nf_info *info); | ||
292 | int (*reroute)(struct sk_buff **skb, | ||
293 | const struct nf_info *info); | ||
294 | int route_key_size; | ||
288 | }; | 295 | }; |
289 | 296 | ||
290 | #define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info)) | 297 | extern struct nf_afinfo *nf_afinfo[]; |
298 | static inline struct nf_afinfo *nf_get_afinfo(unsigned short family) | ||
299 | { | ||
300 | return rcu_dereference(nf_afinfo[family]); | ||
301 | } | ||
302 | |||
303 | static inline unsigned int | ||
304 | nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff, | ||
305 | u_int8_t protocol, unsigned short family) | ||
306 | { | ||
307 | struct nf_afinfo *afinfo; | ||
308 | unsigned int csum = 0; | ||
309 | |||
310 | rcu_read_lock(); | ||
311 | afinfo = nf_get_afinfo(family); | ||
312 | if (afinfo) | ||
313 | csum = afinfo->checksum(skb, hook, dataoff, protocol); | ||
314 | rcu_read_unlock(); | ||
315 | return csum; | ||
316 | } | ||
291 | 317 | ||
292 | extern int nf_register_queue_rerouter(int pf, struct nf_queue_rerouter *rer); | 318 | extern int nf_register_afinfo(struct nf_afinfo *afinfo); |
293 | extern int nf_unregister_queue_rerouter(int pf); | 319 | extern void nf_unregister_afinfo(struct nf_afinfo *afinfo); |
320 | |||
321 | #define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info)) | ||
294 | 322 | ||
295 | #include <net/flow.h> | 323 | #include <net/flow.h> |
296 | extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); | 324 | extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 1350e47b0234..38701454e197 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -142,6 +142,12 @@ struct xt_counters_info | |||
142 | #define ASSERT_WRITE_LOCK(x) | 142 | #define ASSERT_WRITE_LOCK(x) |
143 | #include <linux/netfilter_ipv4/listhelp.h> | 143 | #include <linux/netfilter_ipv4/listhelp.h> |
144 | 144 | ||
145 | #ifdef CONFIG_COMPAT | ||
146 | #define COMPAT_TO_USER 1 | ||
147 | #define COMPAT_FROM_USER -1 | ||
148 | #define COMPAT_CALC_SIZE 0 | ||
149 | #endif | ||
150 | |||
145 | struct xt_match | 151 | struct xt_match |
146 | { | 152 | { |
147 | struct list_head list; | 153 | struct list_head list; |
@@ -175,6 +181,9 @@ struct xt_match | |||
175 | void (*destroy)(const struct xt_match *match, void *matchinfo, | 181 | void (*destroy)(const struct xt_match *match, void *matchinfo, |
176 | unsigned int matchinfosize); | 182 | unsigned int matchinfosize); |
177 | 183 | ||
184 | /* Called when userspace align differs from kernel space one */ | ||
185 | int (*compat)(void *match, void **dstptr, int *size, int convert); | ||
186 | |||
178 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ | 187 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ |
179 | struct module *me; | 188 | struct module *me; |
180 | 189 | ||
@@ -220,6 +229,9 @@ struct xt_target | |||
220 | void (*destroy)(const struct xt_target *target, void *targinfo, | 229 | void (*destroy)(const struct xt_target *target, void *targinfo, |
221 | unsigned int targinfosize); | 230 | unsigned int targinfosize); |
222 | 231 | ||
232 | /* Called when userspace align differs from kernel space one */ | ||
233 | int (*compat)(void *target, void **dstptr, int *size, int convert); | ||
234 | |||
223 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ | 235 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ |
224 | struct module *me; | 236 | struct module *me; |
225 | 237 | ||
@@ -314,6 +326,65 @@ extern void xt_proto_fini(int af); | |||
314 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); | 326 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); |
315 | extern void xt_free_table_info(struct xt_table_info *info); | 327 | extern void xt_free_table_info(struct xt_table_info *info); |
316 | 328 | ||
329 | #ifdef CONFIG_COMPAT | ||
330 | #include <net/compat.h> | ||
331 | |||
332 | struct compat_xt_entry_match | ||
333 | { | ||
334 | union { | ||
335 | struct { | ||
336 | u_int16_t match_size; | ||
337 | char name[XT_FUNCTION_MAXNAMELEN - 1]; | ||
338 | u_int8_t revision; | ||
339 | } user; | ||
340 | u_int16_t match_size; | ||
341 | } u; | ||
342 | unsigned char data[0]; | ||
343 | }; | ||
344 | |||
345 | struct compat_xt_entry_target | ||
346 | { | ||
347 | union { | ||
348 | struct { | ||
349 | u_int16_t target_size; | ||
350 | char name[XT_FUNCTION_MAXNAMELEN - 1]; | ||
351 | u_int8_t revision; | ||
352 | } user; | ||
353 | u_int16_t target_size; | ||
354 | } u; | ||
355 | unsigned char data[0]; | ||
356 | }; | ||
357 | |||
358 | /* FIXME: this works only on 32 bit tasks | ||
359 | * need to change whole approach in order to calculate align as function of | ||
360 | * current task alignment */ | ||
361 | |||
362 | struct compat_xt_counters | ||
363 | { | ||
364 | #if defined(CONFIG_X86_64) || defined(CONFIG_IA64) | ||
365 | u_int32_t cnt[4]; | ||
366 | #else | ||
367 | u_int64_t cnt[2]; | ||
368 | #endif | ||
369 | }; | ||
370 | |||
371 | struct compat_xt_counters_info | ||
372 | { | ||
373 | char name[XT_TABLE_MAXNAMELEN]; | ||
374 | compat_uint_t num_counters; | ||
375 | struct compat_xt_counters counters[0]; | ||
376 | }; | ||
377 | |||
378 | #define COMPAT_XT_ALIGN(s) (((s) + (__alignof__(struct compat_xt_counters)-1)) \ | ||
379 | & ~(__alignof__(struct compat_xt_counters)-1)) | ||
380 | |||
381 | extern void xt_compat_lock(int af); | ||
382 | extern void xt_compat_unlock(int af); | ||
383 | extern int xt_compat_match(void *match, void **dstptr, int *size, int convert); | ||
384 | extern int xt_compat_target(void *target, void **dstptr, int *size, | ||
385 | int convert); | ||
386 | |||
387 | #endif /* CONFIG_COMPAT */ | ||
317 | #endif /* __KERNEL__ */ | 388 | #endif /* __KERNEL__ */ |
318 | 389 | ||
319 | #endif /* _X_TABLES_H */ | 390 | #endif /* _X_TABLES_H */ |
diff --git a/include/linux/netfilter/xt_esp.h b/include/linux/netfilter/xt_esp.h new file mode 100644 index 000000000000..9380fb1c27da --- /dev/null +++ b/include/linux/netfilter/xt_esp.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef _XT_ESP_H | ||
2 | #define _XT_ESP_H | ||
3 | |||
4 | struct xt_esp | ||
5 | { | ||
6 | u_int32_t spis[2]; /* Security Parameter Index */ | ||
7 | u_int8_t invflags; /* Inverse flags */ | ||
8 | }; | ||
9 | |||
10 | /* Values for "invflags" field in struct xt_esp. */ | ||
11 | #define XT_ESP_INV_SPI 0x01 /* Invert the sense of spi. */ | ||
12 | #define XT_ESP_INV_MASK 0x01 /* All possible flags. */ | ||
13 | |||
14 | #endif /*_XT_ESP_H*/ | ||
diff --git a/include/linux/netfilter/xt_multiport.h b/include/linux/netfilter/xt_multiport.h new file mode 100644 index 000000000000..d49ee4183710 --- /dev/null +++ b/include/linux/netfilter/xt_multiport.h | |||
@@ -0,0 +1,30 @@ | |||
1 | #ifndef _XT_MULTIPORT_H | ||
2 | #define _XT_MULTIPORT_H | ||
3 | |||
4 | enum xt_multiport_flags | ||
5 | { | ||
6 | XT_MULTIPORT_SOURCE, | ||
7 | XT_MULTIPORT_DESTINATION, | ||
8 | XT_MULTIPORT_EITHER | ||
9 | }; | ||
10 | |||
11 | #define XT_MULTI_PORTS 15 | ||
12 | |||
13 | /* Must fit inside union xt_matchinfo: 16 bytes */ | ||
14 | struct xt_multiport | ||
15 | { | ||
16 | u_int8_t flags; /* Type of comparison */ | ||
17 | u_int8_t count; /* Number of ports */ | ||
18 | u_int16_t ports[XT_MULTI_PORTS]; /* Ports */ | ||
19 | }; | ||
20 | |||
21 | struct xt_multiport_v1 | ||
22 | { | ||
23 | u_int8_t flags; /* Type of comparison */ | ||
24 | u_int8_t count; /* Number of ports */ | ||
25 | u_int16_t ports[XT_MULTI_PORTS]; /* Ports */ | ||
26 | u_int8_t pflags[XT_MULTI_PORTS]; /* Port flags */ | ||
27 | u_int8_t invert; /* Invert flag */ | ||
28 | }; | ||
29 | |||
30 | #endif /*_XT_MULTIPORT_H*/ | ||
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index 43c09d790b83..85301c5e8d24 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h | |||
@@ -80,6 +80,8 @@ enum nf_ip_hook_priorities { | |||
80 | #ifdef __KERNEL__ | 80 | #ifdef __KERNEL__ |
81 | extern int ip_route_me_harder(struct sk_buff **pskb); | 81 | extern int ip_route_me_harder(struct sk_buff **pskb); |
82 | extern int ip_xfrm_me_harder(struct sk_buff **pskb); | 82 | extern int ip_xfrm_me_harder(struct sk_buff **pskb); |
83 | extern unsigned int nf_ip_checksum(struct sk_buff *skb, unsigned int hook, | ||
84 | unsigned int dataoff, u_int8_t protocol); | ||
83 | #endif /*__KERNEL__*/ | 85 | #endif /*__KERNEL__*/ |
84 | 86 | ||
85 | #endif /*__LINUX_IP_NETFILTER_H*/ | 87 | #endif /*__LINUX_IP_NETFILTER_H*/ |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_h323.h b/include/linux/netfilter_ipv4/ip_conntrack_h323.h index 0987cea53840..eace86bd2adb 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_h323.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_h323.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h> | ||
7 | |||
6 | #define RAS_PORT 1719 | 8 | #define RAS_PORT 1719 |
7 | #define Q931_PORT 1720 | 9 | #define Q931_PORT 1720 |
8 | #define H323_RTP_CHANNEL_MAX 4 /* Audio, video, FAX and other */ | 10 | #define H323_RTP_CHANNEL_MAX 4 /* Audio, video, FAX and other */ |
@@ -25,6 +27,56 @@ struct ip_ct_h323_master { | |||
25 | }; | 27 | }; |
26 | }; | 28 | }; |
27 | 29 | ||
30 | struct ip_conntrack_expect; | ||
31 | |||
32 | extern int get_h225_addr(unsigned char *data, TransportAddress * addr, | ||
33 | u_int32_t * ip, u_int16_t * port); | ||
34 | extern void ip_conntrack_h245_expect(struct ip_conntrack *new, | ||
35 | struct ip_conntrack_expect *this); | ||
36 | extern void ip_conntrack_q931_expect(struct ip_conntrack *new, | ||
37 | struct ip_conntrack_expect *this); | ||
38 | extern int (*set_h245_addr_hook) (struct sk_buff ** pskb, | ||
39 | unsigned char **data, int dataoff, | ||
40 | H245_TransportAddress * addr, | ||
41 | u_int32_t ip, u_int16_t port); | ||
42 | extern int (*set_h225_addr_hook) (struct sk_buff ** pskb, | ||
43 | unsigned char **data, int dataoff, | ||
44 | TransportAddress * addr, | ||
45 | u_int32_t ip, u_int16_t port); | ||
46 | extern int (*set_sig_addr_hook) (struct sk_buff ** pskb, | ||
47 | struct ip_conntrack * ct, | ||
48 | enum ip_conntrack_info ctinfo, | ||
49 | unsigned char **data, | ||
50 | TransportAddress * addr, int count); | ||
51 | extern int (*set_ras_addr_hook) (struct sk_buff ** pskb, | ||
52 | struct ip_conntrack * ct, | ||
53 | enum ip_conntrack_info ctinfo, | ||
54 | unsigned char **data, | ||
55 | TransportAddress * addr, int count); | ||
56 | extern int (*nat_rtp_rtcp_hook) (struct sk_buff ** pskb, | ||
57 | struct ip_conntrack * ct, | ||
58 | enum ip_conntrack_info ctinfo, | ||
59 | unsigned char **data, int dataoff, | ||
60 | H245_TransportAddress * addr, | ||
61 | u_int16_t port, u_int16_t rtp_port, | ||
62 | struct ip_conntrack_expect * rtp_exp, | ||
63 | struct ip_conntrack_expect * rtcp_exp); | ||
64 | extern int (*nat_t120_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, | ||
65 | enum ip_conntrack_info ctinfo, | ||
66 | unsigned char **data, int dataoff, | ||
67 | H245_TransportAddress * addr, u_int16_t port, | ||
68 | struct ip_conntrack_expect * exp); | ||
69 | extern int (*nat_h245_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, | ||
70 | enum ip_conntrack_info ctinfo, | ||
71 | unsigned char **data, int dataoff, | ||
72 | TransportAddress * addr, u_int16_t port, | ||
73 | struct ip_conntrack_expect * exp); | ||
74 | extern int (*nat_q931_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, | ||
75 | enum ip_conntrack_info ctinfo, | ||
76 | unsigned char **data, TransportAddress * addr, | ||
77 | int idx, u_int16_t port, | ||
78 | struct ip_conntrack_expect * exp); | ||
79 | |||
28 | #endif | 80 | #endif |
29 | 81 | ||
30 | #endif | 82 | #endif |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h new file mode 100644 index 000000000000..0bd828081c0c --- /dev/null +++ b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h | |||
@@ -0,0 +1,98 @@ | |||
1 | /**************************************************************************** | ||
2 | * ip_conntrack_helper_h323_asn1.h - BER and PER decoding library for H.323 | ||
3 | * conntrack/NAT module. | ||
4 | * | ||
5 | * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@hotmail.com> | ||
6 | * | ||
7 | * This source code is licensed under General Public License version 2. | ||
8 | * | ||
9 | * | ||
10 | * This library is based on H.225 version 4, H.235 version 2 and H.245 | ||
11 | * version 7. It is extremely optimized to decode only the absolutely | ||
12 | * necessary objects in a signal for Linux kernel NAT module use, so don't | ||
13 | * expect it to be a full ASN.1 library. | ||
14 | * | ||
15 | * Features: | ||
16 | * | ||
17 | * 1. Small. The total size of code plus data is less than 20 KB (IA32). | ||
18 | * 2. Fast. Decoding Netmeeting's Setup signal 1 million times on a PIII 866 | ||
19 | * takes only 3.9 seconds. | ||
20 | * 3. No memory allocation. It uses a static object. No need to initialize or | ||
21 | * cleanup. | ||
22 | * 4. Thread safe. | ||
23 | * 5. Support embedded architectures that has no misaligned memory access | ||
24 | * support. | ||
25 | * | ||
26 | * Limitations: | ||
27 | * | ||
28 | * 1. At most 30 faststart entries. Actually this is limited by ethernet's MTU. | ||
29 | * If a Setup signal contains more than 30 faststart, the packet size will | ||
30 | * very likely exceed the MTU size, then the TPKT will be fragmented. I | ||
31 | * don't know how to handle this in a Netfilter module. Anybody can help? | ||
32 | * Although I think 30 is enough for most of the cases. | ||
33 | * 2. IPv4 addresses only. | ||
34 | * | ||
35 | ****************************************************************************/ | ||
36 | |||
37 | #ifndef _IP_CONNTRACK_HELPER_H323_ASN1_H_ | ||
38 | #define _IP_CONNTRACK_HELPER_H323_ASN1_H_ | ||
39 | |||
40 | /***************************************************************************** | ||
41 | * H.323 Types | ||
42 | ****************************************************************************/ | ||
43 | #include "ip_conntrack_helper_h323_types.h" | ||
44 | |||
45 | typedef struct { | ||
46 | enum { | ||
47 | Q931_NationalEscape = 0x00, | ||
48 | Q931_Alerting = 0x01, | ||
49 | Q931_CallProceeding = 0x02, | ||
50 | Q931_Connect = 0x07, | ||
51 | Q931_ConnectAck = 0x0F, | ||
52 | Q931_Progress = 0x03, | ||
53 | Q931_Setup = 0x05, | ||
54 | Q931_SetupAck = 0x0D, | ||
55 | Q931_Resume = 0x26, | ||
56 | Q931_ResumeAck = 0x2E, | ||
57 | Q931_ResumeReject = 0x22, | ||
58 | Q931_Suspend = 0x25, | ||
59 | Q931_SuspendAck = 0x2D, | ||
60 | Q931_SuspendReject = 0x21, | ||
61 | Q931_UserInformation = 0x20, | ||
62 | Q931_Disconnect = 0x45, | ||
63 | Q931_Release = 0x4D, | ||
64 | Q931_ReleaseComplete = 0x5A, | ||
65 | Q931_Restart = 0x46, | ||
66 | Q931_RestartAck = 0x4E, | ||
67 | Q931_Segment = 0x60, | ||
68 | Q931_CongestionCtrl = 0x79, | ||
69 | Q931_Information = 0x7B, | ||
70 | Q931_Notify = 0x6E, | ||
71 | Q931_Status = 0x7D, | ||
72 | Q931_StatusEnquiry = 0x75, | ||
73 | Q931_Facility = 0x62 | ||
74 | } MessageType; | ||
75 | H323_UserInformation UUIE; | ||
76 | } Q931; | ||
77 | |||
78 | /***************************************************************************** | ||
79 | * Decode Functions Return Codes | ||
80 | ****************************************************************************/ | ||
81 | |||
82 | #define H323_ERROR_NONE 0 /* Decoded successfully */ | ||
83 | #define H323_ERROR_STOP 1 /* Decoding stopped, not really an error */ | ||
84 | #define H323_ERROR_BOUND -1 | ||
85 | #define H323_ERROR_RANGE -2 | ||
86 | |||
87 | |||
88 | /***************************************************************************** | ||
89 | * Decode Functions | ||
90 | ****************************************************************************/ | ||
91 | |||
92 | int DecodeRasMessage(unsigned char *buf, size_t sz, RasMessage * ras); | ||
93 | int DecodeQ931(unsigned char *buf, size_t sz, Q931 * q931); | ||
94 | int DecodeMultimediaSystemControlMessage(unsigned char *buf, size_t sz, | ||
95 | MultimediaSystemControlMessage * | ||
96 | mscm); | ||
97 | |||
98 | #endif | ||
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h new file mode 100644 index 000000000000..cc98f7aa5abe --- /dev/null +++ b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h | |||
@@ -0,0 +1,938 @@ | |||
1 | /* Generated by Jing Min Zhao's ASN.1 parser, Mar 15 2006 | ||
2 | * | ||
3 | * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net> | ||
4 | * | ||
5 | * This source code is licensed under General Public License version 2. | ||
6 | */ | ||
7 | |||
8 | typedef struct TransportAddress_ipAddress { /* SEQUENCE */ | ||
9 | int options; /* No use */ | ||
10 | unsigned ip; | ||
11 | } TransportAddress_ipAddress; | ||
12 | |||
13 | typedef struct TransportAddress { /* CHOICE */ | ||
14 | enum { | ||
15 | eTransportAddress_ipAddress, | ||
16 | eTransportAddress_ipSourceRoute, | ||
17 | eTransportAddress_ipxAddress, | ||
18 | eTransportAddress_ip6Address, | ||
19 | eTransportAddress_netBios, | ||
20 | eTransportAddress_nsap, | ||
21 | eTransportAddress_nonStandardAddress, | ||
22 | } choice; | ||
23 | union { | ||
24 | TransportAddress_ipAddress ipAddress; | ||
25 | }; | ||
26 | } TransportAddress; | ||
27 | |||
28 | typedef struct DataProtocolCapability { /* CHOICE */ | ||
29 | enum { | ||
30 | eDataProtocolCapability_nonStandard, | ||
31 | eDataProtocolCapability_v14buffered, | ||
32 | eDataProtocolCapability_v42lapm, | ||
33 | eDataProtocolCapability_hdlcFrameTunnelling, | ||
34 | eDataProtocolCapability_h310SeparateVCStack, | ||
35 | eDataProtocolCapability_h310SingleVCStack, | ||
36 | eDataProtocolCapability_transparent, | ||
37 | eDataProtocolCapability_segmentationAndReassembly, | ||
38 | eDataProtocolCapability_hdlcFrameTunnelingwSAR, | ||
39 | eDataProtocolCapability_v120, | ||
40 | eDataProtocolCapability_separateLANStack, | ||
41 | eDataProtocolCapability_v76wCompression, | ||
42 | eDataProtocolCapability_tcp, | ||
43 | eDataProtocolCapability_udp, | ||
44 | } choice; | ||
45 | } DataProtocolCapability; | ||
46 | |||
47 | typedef struct DataApplicationCapability_application { /* CHOICE */ | ||
48 | enum { | ||
49 | eDataApplicationCapability_application_nonStandard, | ||
50 | eDataApplicationCapability_application_t120, | ||
51 | eDataApplicationCapability_application_dsm_cc, | ||
52 | eDataApplicationCapability_application_userData, | ||
53 | eDataApplicationCapability_application_t84, | ||
54 | eDataApplicationCapability_application_t434, | ||
55 | eDataApplicationCapability_application_h224, | ||
56 | eDataApplicationCapability_application_nlpid, | ||
57 | eDataApplicationCapability_application_dsvdControl, | ||
58 | eDataApplicationCapability_application_h222DataPartitioning, | ||
59 | eDataApplicationCapability_application_t30fax, | ||
60 | eDataApplicationCapability_application_t140, | ||
61 | eDataApplicationCapability_application_t38fax, | ||
62 | eDataApplicationCapability_application_genericDataCapability, | ||
63 | } choice; | ||
64 | union { | ||
65 | DataProtocolCapability t120; | ||
66 | }; | ||
67 | } DataApplicationCapability_application; | ||
68 | |||
69 | typedef struct DataApplicationCapability { /* SEQUENCE */ | ||
70 | int options; /* No use */ | ||
71 | DataApplicationCapability_application application; | ||
72 | } DataApplicationCapability; | ||
73 | |||
74 | typedef struct DataType { /* CHOICE */ | ||
75 | enum { | ||
76 | eDataType_nonStandard, | ||
77 | eDataType_nullData, | ||
78 | eDataType_videoData, | ||
79 | eDataType_audioData, | ||
80 | eDataType_data, | ||
81 | eDataType_encryptionData, | ||
82 | eDataType_h235Control, | ||
83 | eDataType_h235Media, | ||
84 | eDataType_multiplexedStream, | ||
85 | } choice; | ||
86 | union { | ||
87 | DataApplicationCapability data; | ||
88 | }; | ||
89 | } DataType; | ||
90 | |||
91 | typedef struct UnicastAddress_iPAddress { /* SEQUENCE */ | ||
92 | int options; /* No use */ | ||
93 | unsigned network; | ||
94 | } UnicastAddress_iPAddress; | ||
95 | |||
96 | typedef struct UnicastAddress { /* CHOICE */ | ||
97 | enum { | ||
98 | eUnicastAddress_iPAddress, | ||
99 | eUnicastAddress_iPXAddress, | ||
100 | eUnicastAddress_iP6Address, | ||
101 | eUnicastAddress_netBios, | ||
102 | eUnicastAddress_iPSourceRouteAddress, | ||
103 | eUnicastAddress_nsap, | ||
104 | eUnicastAddress_nonStandardAddress, | ||
105 | } choice; | ||
106 | union { | ||
107 | UnicastAddress_iPAddress iPAddress; | ||
108 | }; | ||
109 | } UnicastAddress; | ||
110 | |||
111 | typedef struct H245_TransportAddress { /* CHOICE */ | ||
112 | enum { | ||
113 | eH245_TransportAddress_unicastAddress, | ||
114 | eH245_TransportAddress_multicastAddress, | ||
115 | } choice; | ||
116 | union { | ||
117 | UnicastAddress unicastAddress; | ||
118 | }; | ||
119 | } H245_TransportAddress; | ||
120 | |||
121 | typedef struct H2250LogicalChannelParameters { /* SEQUENCE */ | ||
122 | enum { | ||
123 | eH2250LogicalChannelParameters_nonStandard = (1 << 31), | ||
124 | eH2250LogicalChannelParameters_associatedSessionID = | ||
125 | (1 << 30), | ||
126 | eH2250LogicalChannelParameters_mediaChannel = (1 << 29), | ||
127 | eH2250LogicalChannelParameters_mediaGuaranteedDelivery = | ||
128 | (1 << 28), | ||
129 | eH2250LogicalChannelParameters_mediaControlChannel = | ||
130 | (1 << 27), | ||
131 | eH2250LogicalChannelParameters_mediaControlGuaranteedDelivery | ||
132 | = (1 << 26), | ||
133 | eH2250LogicalChannelParameters_silenceSuppression = (1 << 25), | ||
134 | eH2250LogicalChannelParameters_destination = (1 << 24), | ||
135 | eH2250LogicalChannelParameters_dynamicRTPPayloadType = | ||
136 | (1 << 23), | ||
137 | eH2250LogicalChannelParameters_mediaPacketization = (1 << 22), | ||
138 | eH2250LogicalChannelParameters_transportCapability = | ||
139 | (1 << 21), | ||
140 | eH2250LogicalChannelParameters_redundancyEncoding = (1 << 20), | ||
141 | eH2250LogicalChannelParameters_source = (1 << 19), | ||
142 | } options; | ||
143 | H245_TransportAddress mediaChannel; | ||
144 | H245_TransportAddress mediaControlChannel; | ||
145 | } H2250LogicalChannelParameters; | ||
146 | |||
147 | typedef struct OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters { /* CHOICE */ | ||
148 | enum { | ||
149 | eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h222LogicalChannelParameters, | ||
150 | eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h223LogicalChannelParameters, | ||
151 | eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_v76LogicalChannelParameters, | ||
152 | eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters, | ||
153 | eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_none, | ||
154 | } choice; | ||
155 | union { | ||
156 | H2250LogicalChannelParameters h2250LogicalChannelParameters; | ||
157 | }; | ||
158 | } OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters; | ||
159 | |||
160 | typedef struct OpenLogicalChannel_forwardLogicalChannelParameters { /* SEQUENCE */ | ||
161 | enum { | ||
162 | eOpenLogicalChannel_forwardLogicalChannelParameters_portNumber | ||
163 | = (1 << 31), | ||
164 | eOpenLogicalChannel_forwardLogicalChannelParameters_forwardLogicalChannelDependency | ||
165 | = (1 << 30), | ||
166 | eOpenLogicalChannel_forwardLogicalChannelParameters_replacementFor | ||
167 | = (1 << 29), | ||
168 | } options; | ||
169 | DataType dataType; | ||
170 | OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters | ||
171 | multiplexParameters; | ||
172 | } OpenLogicalChannel_forwardLogicalChannelParameters; | ||
173 | |||
174 | typedef struct OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters { /* CHOICE */ | ||
175 | enum { | ||
176 | eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h223LogicalChannelParameters, | ||
177 | eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_v76LogicalChannelParameters, | ||
178 | eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters, | ||
179 | } choice; | ||
180 | union { | ||
181 | H2250LogicalChannelParameters h2250LogicalChannelParameters; | ||
182 | }; | ||
183 | } OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters; | ||
184 | |||
185 | typedef struct OpenLogicalChannel_reverseLogicalChannelParameters { /* SEQUENCE */ | ||
186 | enum { | ||
187 | eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters | ||
188 | = (1 << 31), | ||
189 | eOpenLogicalChannel_reverseLogicalChannelParameters_reverseLogicalChannelDependency | ||
190 | = (1 << 30), | ||
191 | eOpenLogicalChannel_reverseLogicalChannelParameters_replacementFor | ||
192 | = (1 << 29), | ||
193 | } options; | ||
194 | OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters | ||
195 | multiplexParameters; | ||
196 | } OpenLogicalChannel_reverseLogicalChannelParameters; | ||
197 | |||
198 | typedef struct NetworkAccessParameters_networkAddress { /* CHOICE */ | ||
199 | enum { | ||
200 | eNetworkAccessParameters_networkAddress_q2931Address, | ||
201 | eNetworkAccessParameters_networkAddress_e164Address, | ||
202 | eNetworkAccessParameters_networkAddress_localAreaAddress, | ||
203 | } choice; | ||
204 | union { | ||
205 | H245_TransportAddress localAreaAddress; | ||
206 | }; | ||
207 | } NetworkAccessParameters_networkAddress; | ||
208 | |||
209 | typedef struct NetworkAccessParameters { /* SEQUENCE */ | ||
210 | enum { | ||
211 | eNetworkAccessParameters_distribution = (1 << 31), | ||
212 | eNetworkAccessParameters_externalReference = (1 << 30), | ||
213 | eNetworkAccessParameters_t120SetupProcedure = (1 << 29), | ||
214 | } options; | ||
215 | NetworkAccessParameters_networkAddress networkAddress; | ||
216 | } NetworkAccessParameters; | ||
217 | |||
218 | typedef struct OpenLogicalChannel { /* SEQUENCE */ | ||
219 | enum { | ||
220 | eOpenLogicalChannel_reverseLogicalChannelParameters = | ||
221 | (1 << 31), | ||
222 | eOpenLogicalChannel_separateStack = (1 << 30), | ||
223 | eOpenLogicalChannel_encryptionSync = (1 << 29), | ||
224 | } options; | ||
225 | OpenLogicalChannel_forwardLogicalChannelParameters | ||
226 | forwardLogicalChannelParameters; | ||
227 | OpenLogicalChannel_reverseLogicalChannelParameters | ||
228 | reverseLogicalChannelParameters; | ||
229 | NetworkAccessParameters separateStack; | ||
230 | } OpenLogicalChannel; | ||
231 | |||
232 | typedef struct Setup_UUIE_fastStart { /* SEQUENCE OF */ | ||
233 | int count; | ||
234 | OpenLogicalChannel item[30]; | ||
235 | } Setup_UUIE_fastStart; | ||
236 | |||
237 | typedef struct Setup_UUIE { /* SEQUENCE */ | ||
238 | enum { | ||
239 | eSetup_UUIE_h245Address = (1 << 31), | ||
240 | eSetup_UUIE_sourceAddress = (1 << 30), | ||
241 | eSetup_UUIE_destinationAddress = (1 << 29), | ||
242 | eSetup_UUIE_destCallSignalAddress = (1 << 28), | ||
243 | eSetup_UUIE_destExtraCallInfo = (1 << 27), | ||
244 | eSetup_UUIE_destExtraCRV = (1 << 26), | ||
245 | eSetup_UUIE_callServices = (1 << 25), | ||
246 | eSetup_UUIE_sourceCallSignalAddress = (1 << 24), | ||
247 | eSetup_UUIE_remoteExtensionAddress = (1 << 23), | ||
248 | eSetup_UUIE_callIdentifier = (1 << 22), | ||
249 | eSetup_UUIE_h245SecurityCapability = (1 << 21), | ||
250 | eSetup_UUIE_tokens = (1 << 20), | ||
251 | eSetup_UUIE_cryptoTokens = (1 << 19), | ||
252 | eSetup_UUIE_fastStart = (1 << 18), | ||
253 | eSetup_UUIE_mediaWaitForConnect = (1 << 17), | ||
254 | eSetup_UUIE_canOverlapSend = (1 << 16), | ||
255 | eSetup_UUIE_endpointIdentifier = (1 << 15), | ||
256 | eSetup_UUIE_multipleCalls = (1 << 14), | ||
257 | eSetup_UUIE_maintainConnection = (1 << 13), | ||
258 | eSetup_UUIE_connectionParameters = (1 << 12), | ||
259 | eSetup_UUIE_language = (1 << 11), | ||
260 | eSetup_UUIE_presentationIndicator = (1 << 10), | ||
261 | eSetup_UUIE_screeningIndicator = (1 << 9), | ||
262 | eSetup_UUIE_serviceControl = (1 << 8), | ||
263 | eSetup_UUIE_symmetricOperationRequired = (1 << 7), | ||
264 | eSetup_UUIE_capacity = (1 << 6), | ||
265 | eSetup_UUIE_circuitInfo = (1 << 5), | ||
266 | eSetup_UUIE_desiredProtocols = (1 << 4), | ||
267 | eSetup_UUIE_neededFeatures = (1 << 3), | ||
268 | eSetup_UUIE_desiredFeatures = (1 << 2), | ||
269 | eSetup_UUIE_supportedFeatures = (1 << 1), | ||
270 | eSetup_UUIE_parallelH245Control = (1 << 0), | ||
271 | } options; | ||
272 | TransportAddress h245Address; | ||
273 | TransportAddress destCallSignalAddress; | ||
274 | TransportAddress sourceCallSignalAddress; | ||
275 | Setup_UUIE_fastStart fastStart; | ||
276 | } Setup_UUIE; | ||
277 | |||
278 | typedef struct CallProceeding_UUIE_fastStart { /* SEQUENCE OF */ | ||
279 | int count; | ||
280 | OpenLogicalChannel item[30]; | ||
281 | } CallProceeding_UUIE_fastStart; | ||
282 | |||
283 | typedef struct CallProceeding_UUIE { /* SEQUENCE */ | ||
284 | enum { | ||
285 | eCallProceeding_UUIE_h245Address = (1 << 31), | ||
286 | eCallProceeding_UUIE_callIdentifier = (1 << 30), | ||
287 | eCallProceeding_UUIE_h245SecurityMode = (1 << 29), | ||
288 | eCallProceeding_UUIE_tokens = (1 << 28), | ||
289 | eCallProceeding_UUIE_cryptoTokens = (1 << 27), | ||
290 | eCallProceeding_UUIE_fastStart = (1 << 26), | ||
291 | eCallProceeding_UUIE_multipleCalls = (1 << 25), | ||
292 | eCallProceeding_UUIE_maintainConnection = (1 << 24), | ||
293 | eCallProceeding_UUIE_fastConnectRefused = (1 << 23), | ||
294 | eCallProceeding_UUIE_featureSet = (1 << 22), | ||
295 | } options; | ||
296 | TransportAddress h245Address; | ||
297 | CallProceeding_UUIE_fastStart fastStart; | ||
298 | } CallProceeding_UUIE; | ||
299 | |||
300 | typedef struct Connect_UUIE_fastStart { /* SEQUENCE OF */ | ||
301 | int count; | ||
302 | OpenLogicalChannel item[30]; | ||
303 | } Connect_UUIE_fastStart; | ||
304 | |||
305 | typedef struct Connect_UUIE { /* SEQUENCE */ | ||
306 | enum { | ||
307 | eConnect_UUIE_h245Address = (1 << 31), | ||
308 | eConnect_UUIE_callIdentifier = (1 << 30), | ||
309 | eConnect_UUIE_h245SecurityMode = (1 << 29), | ||
310 | eConnect_UUIE_tokens = (1 << 28), | ||
311 | eConnect_UUIE_cryptoTokens = (1 << 27), | ||
312 | eConnect_UUIE_fastStart = (1 << 26), | ||
313 | eConnect_UUIE_multipleCalls = (1 << 25), | ||
314 | eConnect_UUIE_maintainConnection = (1 << 24), | ||
315 | eConnect_UUIE_language = (1 << 23), | ||
316 | eConnect_UUIE_connectedAddress = (1 << 22), | ||
317 | eConnect_UUIE_presentationIndicator = (1 << 21), | ||
318 | eConnect_UUIE_screeningIndicator = (1 << 20), | ||
319 | eConnect_UUIE_fastConnectRefused = (1 << 19), | ||
320 | eConnect_UUIE_serviceControl = (1 << 18), | ||
321 | eConnect_UUIE_capacity = (1 << 17), | ||
322 | eConnect_UUIE_featureSet = (1 << 16), | ||
323 | } options; | ||
324 | TransportAddress h245Address; | ||
325 | Connect_UUIE_fastStart fastStart; | ||
326 | } Connect_UUIE; | ||
327 | |||
328 | typedef struct Alerting_UUIE_fastStart { /* SEQUENCE OF */ | ||
329 | int count; | ||
330 | OpenLogicalChannel item[30]; | ||
331 | } Alerting_UUIE_fastStart; | ||
332 | |||
333 | typedef struct Alerting_UUIE { /* SEQUENCE */ | ||
334 | enum { | ||
335 | eAlerting_UUIE_h245Address = (1 << 31), | ||
336 | eAlerting_UUIE_callIdentifier = (1 << 30), | ||
337 | eAlerting_UUIE_h245SecurityMode = (1 << 29), | ||
338 | eAlerting_UUIE_tokens = (1 << 28), | ||
339 | eAlerting_UUIE_cryptoTokens = (1 << 27), | ||
340 | eAlerting_UUIE_fastStart = (1 << 26), | ||
341 | eAlerting_UUIE_multipleCalls = (1 << 25), | ||
342 | eAlerting_UUIE_maintainConnection = (1 << 24), | ||
343 | eAlerting_UUIE_alertingAddress = (1 << 23), | ||
344 | eAlerting_UUIE_presentationIndicator = (1 << 22), | ||
345 | eAlerting_UUIE_screeningIndicator = (1 << 21), | ||
346 | eAlerting_UUIE_fastConnectRefused = (1 << 20), | ||
347 | eAlerting_UUIE_serviceControl = (1 << 19), | ||
348 | eAlerting_UUIE_capacity = (1 << 18), | ||
349 | eAlerting_UUIE_featureSet = (1 << 17), | ||
350 | } options; | ||
351 | TransportAddress h245Address; | ||
352 | Alerting_UUIE_fastStart fastStart; | ||
353 | } Alerting_UUIE; | ||
354 | |||
355 | typedef struct Information_UUIE_fastStart { /* SEQUENCE OF */ | ||
356 | int count; | ||
357 | OpenLogicalChannel item[30]; | ||
358 | } Information_UUIE_fastStart; | ||
359 | |||
360 | typedef struct Information_UUIE { /* SEQUENCE */ | ||
361 | enum { | ||
362 | eInformation_UUIE_callIdentifier = (1 << 31), | ||
363 | eInformation_UUIE_tokens = (1 << 30), | ||
364 | eInformation_UUIE_cryptoTokens = (1 << 29), | ||
365 | eInformation_UUIE_fastStart = (1 << 28), | ||
366 | eInformation_UUIE_fastConnectRefused = (1 << 27), | ||
367 | eInformation_UUIE_circuitInfo = (1 << 26), | ||
368 | } options; | ||
369 | Information_UUIE_fastStart fastStart; | ||
370 | } Information_UUIE; | ||
371 | |||
372 | typedef struct FacilityReason { /* CHOICE */ | ||
373 | enum { | ||
374 | eFacilityReason_routeCallToGatekeeper, | ||
375 | eFacilityReason_callForwarded, | ||
376 | eFacilityReason_routeCallToMC, | ||
377 | eFacilityReason_undefinedReason, | ||
378 | eFacilityReason_conferenceListChoice, | ||
379 | eFacilityReason_startH245, | ||
380 | eFacilityReason_noH245, | ||
381 | eFacilityReason_newTokens, | ||
382 | eFacilityReason_featureSetUpdate, | ||
383 | eFacilityReason_forwardedElements, | ||
384 | eFacilityReason_transportedInformation, | ||
385 | } choice; | ||
386 | } FacilityReason; | ||
387 | |||
388 | typedef struct Facility_UUIE_fastStart { /* SEQUENCE OF */ | ||
389 | int count; | ||
390 | OpenLogicalChannel item[30]; | ||
391 | } Facility_UUIE_fastStart; | ||
392 | |||
393 | typedef struct Facility_UUIE { /* SEQUENCE */ | ||
394 | enum { | ||
395 | eFacility_UUIE_alternativeAddress = (1 << 31), | ||
396 | eFacility_UUIE_alternativeAliasAddress = (1 << 30), | ||
397 | eFacility_UUIE_conferenceID = (1 << 29), | ||
398 | eFacility_UUIE_callIdentifier = (1 << 28), | ||
399 | eFacility_UUIE_destExtraCallInfo = (1 << 27), | ||
400 | eFacility_UUIE_remoteExtensionAddress = (1 << 26), | ||
401 | eFacility_UUIE_tokens = (1 << 25), | ||
402 | eFacility_UUIE_cryptoTokens = (1 << 24), | ||
403 | eFacility_UUIE_conferences = (1 << 23), | ||
404 | eFacility_UUIE_h245Address = (1 << 22), | ||
405 | eFacility_UUIE_fastStart = (1 << 21), | ||
406 | eFacility_UUIE_multipleCalls = (1 << 20), | ||
407 | eFacility_UUIE_maintainConnection = (1 << 19), | ||
408 | eFacility_UUIE_fastConnectRefused = (1 << 18), | ||
409 | eFacility_UUIE_serviceControl = (1 << 17), | ||
410 | eFacility_UUIE_circuitInfo = (1 << 16), | ||
411 | eFacility_UUIE_featureSet = (1 << 15), | ||
412 | eFacility_UUIE_destinationInfo = (1 << 14), | ||
413 | eFacility_UUIE_h245SecurityMode = (1 << 13), | ||
414 | } options; | ||
415 | FacilityReason reason; | ||
416 | TransportAddress h245Address; | ||
417 | Facility_UUIE_fastStart fastStart; | ||
418 | } Facility_UUIE; | ||
419 | |||
420 | typedef struct Progress_UUIE_fastStart { /* SEQUENCE OF */ | ||
421 | int count; | ||
422 | OpenLogicalChannel item[30]; | ||
423 | } Progress_UUIE_fastStart; | ||
424 | |||
425 | typedef struct Progress_UUIE { /* SEQUENCE */ | ||
426 | enum { | ||
427 | eProgress_UUIE_h245Address = (1 << 31), | ||
428 | eProgress_UUIE_h245SecurityMode = (1 << 30), | ||
429 | eProgress_UUIE_tokens = (1 << 29), | ||
430 | eProgress_UUIE_cryptoTokens = (1 << 28), | ||
431 | eProgress_UUIE_fastStart = (1 << 27), | ||
432 | eProgress_UUIE_multipleCalls = (1 << 26), | ||
433 | eProgress_UUIE_maintainConnection = (1 << 25), | ||
434 | eProgress_UUIE_fastConnectRefused = (1 << 24), | ||
435 | } options; | ||
436 | TransportAddress h245Address; | ||
437 | Progress_UUIE_fastStart fastStart; | ||
438 | } Progress_UUIE; | ||
439 | |||
440 | typedef struct H323_UU_PDU_h323_message_body { /* CHOICE */ | ||
441 | enum { | ||
442 | eH323_UU_PDU_h323_message_body_setup, | ||
443 | eH323_UU_PDU_h323_message_body_callProceeding, | ||
444 | eH323_UU_PDU_h323_message_body_connect, | ||
445 | eH323_UU_PDU_h323_message_body_alerting, | ||
446 | eH323_UU_PDU_h323_message_body_information, | ||
447 | eH323_UU_PDU_h323_message_body_releaseComplete, | ||
448 | eH323_UU_PDU_h323_message_body_facility, | ||
449 | eH323_UU_PDU_h323_message_body_progress, | ||
450 | eH323_UU_PDU_h323_message_body_empty, | ||
451 | eH323_UU_PDU_h323_message_body_status, | ||
452 | eH323_UU_PDU_h323_message_body_statusInquiry, | ||
453 | eH323_UU_PDU_h323_message_body_setupAcknowledge, | ||
454 | eH323_UU_PDU_h323_message_body_notify, | ||
455 | } choice; | ||
456 | union { | ||
457 | Setup_UUIE setup; | ||
458 | CallProceeding_UUIE callProceeding; | ||
459 | Connect_UUIE connect; | ||
460 | Alerting_UUIE alerting; | ||
461 | Information_UUIE information; | ||
462 | Facility_UUIE facility; | ||
463 | Progress_UUIE progress; | ||
464 | }; | ||
465 | } H323_UU_PDU_h323_message_body; | ||
466 | |||
467 | typedef struct RequestMessage { /* CHOICE */ | ||
468 | enum { | ||
469 | eRequestMessage_nonStandard, | ||
470 | eRequestMessage_masterSlaveDetermination, | ||
471 | eRequestMessage_terminalCapabilitySet, | ||
472 | eRequestMessage_openLogicalChannel, | ||
473 | eRequestMessage_closeLogicalChannel, | ||
474 | eRequestMessage_requestChannelClose, | ||
475 | eRequestMessage_multiplexEntrySend, | ||
476 | eRequestMessage_requestMultiplexEntry, | ||
477 | eRequestMessage_requestMode, | ||
478 | eRequestMessage_roundTripDelayRequest, | ||
479 | eRequestMessage_maintenanceLoopRequest, | ||
480 | eRequestMessage_communicationModeRequest, | ||
481 | eRequestMessage_conferenceRequest, | ||
482 | eRequestMessage_multilinkRequest, | ||
483 | eRequestMessage_logicalChannelRateRequest, | ||
484 | } choice; | ||
485 | union { | ||
486 | OpenLogicalChannel openLogicalChannel; | ||
487 | }; | ||
488 | } RequestMessage; | ||
489 | |||
490 | typedef struct OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters { /* CHOICE */ | ||
491 | enum { | ||
492 | eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters_h222LogicalChannelParameters, | ||
493 | eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters, | ||
494 | } choice; | ||
495 | union { | ||
496 | H2250LogicalChannelParameters h2250LogicalChannelParameters; | ||
497 | }; | ||
498 | } OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters; | ||
499 | |||
500 | typedef struct OpenLogicalChannelAck_reverseLogicalChannelParameters { /* SEQUENCE */ | ||
501 | enum { | ||
502 | eOpenLogicalChannelAck_reverseLogicalChannelParameters_portNumber | ||
503 | = (1 << 31), | ||
504 | eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters | ||
505 | = (1 << 30), | ||
506 | eOpenLogicalChannelAck_reverseLogicalChannelParameters_replacementFor | ||
507 | = (1 << 29), | ||
508 | } options; | ||
509 | OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters | ||
510 | multiplexParameters; | ||
511 | } OpenLogicalChannelAck_reverseLogicalChannelParameters; | ||
512 | |||
513 | typedef struct H2250LogicalChannelAckParameters { /* SEQUENCE */ | ||
514 | enum { | ||
515 | eH2250LogicalChannelAckParameters_nonStandard = (1 << 31), | ||
516 | eH2250LogicalChannelAckParameters_sessionID = (1 << 30), | ||
517 | eH2250LogicalChannelAckParameters_mediaChannel = (1 << 29), | ||
518 | eH2250LogicalChannelAckParameters_mediaControlChannel = | ||
519 | (1 << 28), | ||
520 | eH2250LogicalChannelAckParameters_dynamicRTPPayloadType = | ||
521 | (1 << 27), | ||
522 | eH2250LogicalChannelAckParameters_flowControlToZero = | ||
523 | (1 << 26), | ||
524 | eH2250LogicalChannelAckParameters_portNumber = (1 << 25), | ||
525 | } options; | ||
526 | H245_TransportAddress mediaChannel; | ||
527 | H245_TransportAddress mediaControlChannel; | ||
528 | } H2250LogicalChannelAckParameters; | ||
529 | |||
530 | typedef struct OpenLogicalChannelAck_forwardMultiplexAckParameters { /* CHOICE */ | ||
531 | enum { | ||
532 | eOpenLogicalChannelAck_forwardMultiplexAckParameters_h2250LogicalChannelAckParameters, | ||
533 | } choice; | ||
534 | union { | ||
535 | H2250LogicalChannelAckParameters | ||
536 | h2250LogicalChannelAckParameters; | ||
537 | }; | ||
538 | } OpenLogicalChannelAck_forwardMultiplexAckParameters; | ||
539 | |||
540 | typedef struct OpenLogicalChannelAck { /* SEQUENCE */ | ||
541 | enum { | ||
542 | eOpenLogicalChannelAck_reverseLogicalChannelParameters = | ||
543 | (1 << 31), | ||
544 | eOpenLogicalChannelAck_separateStack = (1 << 30), | ||
545 | eOpenLogicalChannelAck_forwardMultiplexAckParameters = | ||
546 | (1 << 29), | ||
547 | eOpenLogicalChannelAck_encryptionSync = (1 << 28), | ||
548 | } options; | ||
549 | OpenLogicalChannelAck_reverseLogicalChannelParameters | ||
550 | reverseLogicalChannelParameters; | ||
551 | OpenLogicalChannelAck_forwardMultiplexAckParameters | ||
552 | forwardMultiplexAckParameters; | ||
553 | } OpenLogicalChannelAck; | ||
554 | |||
555 | typedef struct ResponseMessage { /* CHOICE */ | ||
556 | enum { | ||
557 | eResponseMessage_nonStandard, | ||
558 | eResponseMessage_masterSlaveDeterminationAck, | ||
559 | eResponseMessage_masterSlaveDeterminationReject, | ||
560 | eResponseMessage_terminalCapabilitySetAck, | ||
561 | eResponseMessage_terminalCapabilitySetReject, | ||
562 | eResponseMessage_openLogicalChannelAck, | ||
563 | eResponseMessage_openLogicalChannelReject, | ||
564 | eResponseMessage_closeLogicalChannelAck, | ||
565 | eResponseMessage_requestChannelCloseAck, | ||
566 | eResponseMessage_requestChannelCloseReject, | ||
567 | eResponseMessage_multiplexEntrySendAck, | ||
568 | eResponseMessage_multiplexEntrySendReject, | ||
569 | eResponseMessage_requestMultiplexEntryAck, | ||
570 | eResponseMessage_requestMultiplexEntryReject, | ||
571 | eResponseMessage_requestModeAck, | ||
572 | eResponseMessage_requestModeReject, | ||
573 | eResponseMessage_roundTripDelayResponse, | ||
574 | eResponseMessage_maintenanceLoopAck, | ||
575 | eResponseMessage_maintenanceLoopReject, | ||
576 | eResponseMessage_communicationModeResponse, | ||
577 | eResponseMessage_conferenceResponse, | ||
578 | eResponseMessage_multilinkResponse, | ||
579 | eResponseMessage_logicalChannelRateAcknowledge, | ||
580 | eResponseMessage_logicalChannelRateReject, | ||
581 | } choice; | ||
582 | union { | ||
583 | OpenLogicalChannelAck openLogicalChannelAck; | ||
584 | }; | ||
585 | } ResponseMessage; | ||
586 | |||
587 | typedef struct MultimediaSystemControlMessage { /* CHOICE */ | ||
588 | enum { | ||
589 | eMultimediaSystemControlMessage_request, | ||
590 | eMultimediaSystemControlMessage_response, | ||
591 | eMultimediaSystemControlMessage_command, | ||
592 | eMultimediaSystemControlMessage_indication, | ||
593 | } choice; | ||
594 | union { | ||
595 | RequestMessage request; | ||
596 | ResponseMessage response; | ||
597 | }; | ||
598 | } MultimediaSystemControlMessage; | ||
599 | |||
600 | typedef struct H323_UU_PDU_h245Control { /* SEQUENCE OF */ | ||
601 | int count; | ||
602 | MultimediaSystemControlMessage item[4]; | ||
603 | } H323_UU_PDU_h245Control; | ||
604 | |||
605 | typedef struct H323_UU_PDU { /* SEQUENCE */ | ||
606 | enum { | ||
607 | eH323_UU_PDU_nonStandardData = (1 << 31), | ||
608 | eH323_UU_PDU_h4501SupplementaryService = (1 << 30), | ||
609 | eH323_UU_PDU_h245Tunneling = (1 << 29), | ||
610 | eH323_UU_PDU_h245Control = (1 << 28), | ||
611 | eH323_UU_PDU_nonStandardControl = (1 << 27), | ||
612 | eH323_UU_PDU_callLinkage = (1 << 26), | ||
613 | eH323_UU_PDU_tunnelledSignallingMessage = (1 << 25), | ||
614 | eH323_UU_PDU_provisionalRespToH245Tunneling = (1 << 24), | ||
615 | eH323_UU_PDU_stimulusControl = (1 << 23), | ||
616 | eH323_UU_PDU_genericData = (1 << 22), | ||
617 | } options; | ||
618 | H323_UU_PDU_h323_message_body h323_message_body; | ||
619 | H323_UU_PDU_h245Control h245Control; | ||
620 | } H323_UU_PDU; | ||
621 | |||
622 | typedef struct H323_UserInformation { /* SEQUENCE */ | ||
623 | enum { | ||
624 | eH323_UserInformation_user_data = (1 << 31), | ||
625 | } options; | ||
626 | H323_UU_PDU h323_uu_pdu; | ||
627 | } H323_UserInformation; | ||
628 | |||
629 | typedef struct GatekeeperRequest { /* SEQUENCE */ | ||
630 | enum { | ||
631 | eGatekeeperRequest_nonStandardData = (1 << 31), | ||
632 | eGatekeeperRequest_gatekeeperIdentifier = (1 << 30), | ||
633 | eGatekeeperRequest_callServices = (1 << 29), | ||
634 | eGatekeeperRequest_endpointAlias = (1 << 28), | ||
635 | eGatekeeperRequest_alternateEndpoints = (1 << 27), | ||
636 | eGatekeeperRequest_tokens = (1 << 26), | ||
637 | eGatekeeperRequest_cryptoTokens = (1 << 25), | ||
638 | eGatekeeperRequest_authenticationCapability = (1 << 24), | ||
639 | eGatekeeperRequest_algorithmOIDs = (1 << 23), | ||
640 | eGatekeeperRequest_integrity = (1 << 22), | ||
641 | eGatekeeperRequest_integrityCheckValue = (1 << 21), | ||
642 | eGatekeeperRequest_supportsAltGK = (1 << 20), | ||
643 | eGatekeeperRequest_featureSet = (1 << 19), | ||
644 | eGatekeeperRequest_genericData = (1 << 18), | ||
645 | } options; | ||
646 | TransportAddress rasAddress; | ||
647 | } GatekeeperRequest; | ||
648 | |||
649 | typedef struct GatekeeperConfirm { /* SEQUENCE */ | ||
650 | enum { | ||
651 | eGatekeeperConfirm_nonStandardData = (1 << 31), | ||
652 | eGatekeeperConfirm_gatekeeperIdentifier = (1 << 30), | ||
653 | eGatekeeperConfirm_alternateGatekeeper = (1 << 29), | ||
654 | eGatekeeperConfirm_authenticationMode = (1 << 28), | ||
655 | eGatekeeperConfirm_tokens = (1 << 27), | ||
656 | eGatekeeperConfirm_cryptoTokens = (1 << 26), | ||
657 | eGatekeeperConfirm_algorithmOID = (1 << 25), | ||
658 | eGatekeeperConfirm_integrity = (1 << 24), | ||
659 | eGatekeeperConfirm_integrityCheckValue = (1 << 23), | ||
660 | eGatekeeperConfirm_featureSet = (1 << 22), | ||
661 | eGatekeeperConfirm_genericData = (1 << 21), | ||
662 | } options; | ||
663 | TransportAddress rasAddress; | ||
664 | } GatekeeperConfirm; | ||
665 | |||
666 | typedef struct RegistrationRequest_callSignalAddress { /* SEQUENCE OF */ | ||
667 | int count; | ||
668 | TransportAddress item[10]; | ||
669 | } RegistrationRequest_callSignalAddress; | ||
670 | |||
671 | typedef struct RegistrationRequest_rasAddress { /* SEQUENCE OF */ | ||
672 | int count; | ||
673 | TransportAddress item[10]; | ||
674 | } RegistrationRequest_rasAddress; | ||
675 | |||
676 | typedef struct RegistrationRequest { /* SEQUENCE */ | ||
677 | enum { | ||
678 | eRegistrationRequest_nonStandardData = (1 << 31), | ||
679 | eRegistrationRequest_terminalAlias = (1 << 30), | ||
680 | eRegistrationRequest_gatekeeperIdentifier = (1 << 29), | ||
681 | eRegistrationRequest_alternateEndpoints = (1 << 28), | ||
682 | eRegistrationRequest_timeToLive = (1 << 27), | ||
683 | eRegistrationRequest_tokens = (1 << 26), | ||
684 | eRegistrationRequest_cryptoTokens = (1 << 25), | ||
685 | eRegistrationRequest_integrityCheckValue = (1 << 24), | ||
686 | eRegistrationRequest_keepAlive = (1 << 23), | ||
687 | eRegistrationRequest_endpointIdentifier = (1 << 22), | ||
688 | eRegistrationRequest_willSupplyUUIEs = (1 << 21), | ||
689 | eRegistrationRequest_maintainConnection = (1 << 20), | ||
690 | eRegistrationRequest_alternateTransportAddresses = (1 << 19), | ||
691 | eRegistrationRequest_additiveRegistration = (1 << 18), | ||
692 | eRegistrationRequest_terminalAliasPattern = (1 << 17), | ||
693 | eRegistrationRequest_supportsAltGK = (1 << 16), | ||
694 | eRegistrationRequest_usageReportingCapability = (1 << 15), | ||
695 | eRegistrationRequest_multipleCalls = (1 << 14), | ||
696 | eRegistrationRequest_supportedH248Packages = (1 << 13), | ||
697 | eRegistrationRequest_callCreditCapability = (1 << 12), | ||
698 | eRegistrationRequest_capacityReportingCapability = (1 << 11), | ||
699 | eRegistrationRequest_capacity = (1 << 10), | ||
700 | eRegistrationRequest_featureSet = (1 << 9), | ||
701 | eRegistrationRequest_genericData = (1 << 8), | ||
702 | } options; | ||
703 | RegistrationRequest_callSignalAddress callSignalAddress; | ||
704 | RegistrationRequest_rasAddress rasAddress; | ||
705 | unsigned timeToLive; | ||
706 | } RegistrationRequest; | ||
707 | |||
708 | typedef struct RegistrationConfirm_callSignalAddress { /* SEQUENCE OF */ | ||
709 | int count; | ||
710 | TransportAddress item[10]; | ||
711 | } RegistrationConfirm_callSignalAddress; | ||
712 | |||
713 | typedef struct RegistrationConfirm { /* SEQUENCE */ | ||
714 | enum { | ||
715 | eRegistrationConfirm_nonStandardData = (1 << 31), | ||
716 | eRegistrationConfirm_terminalAlias = (1 << 30), | ||
717 | eRegistrationConfirm_gatekeeperIdentifier = (1 << 29), | ||
718 | eRegistrationConfirm_alternateGatekeeper = (1 << 28), | ||
719 | eRegistrationConfirm_timeToLive = (1 << 27), | ||
720 | eRegistrationConfirm_tokens = (1 << 26), | ||
721 | eRegistrationConfirm_cryptoTokens = (1 << 25), | ||
722 | eRegistrationConfirm_integrityCheckValue = (1 << 24), | ||
723 | eRegistrationConfirm_willRespondToIRR = (1 << 23), | ||
724 | eRegistrationConfirm_preGrantedARQ = (1 << 22), | ||
725 | eRegistrationConfirm_maintainConnection = (1 << 21), | ||
726 | eRegistrationConfirm_serviceControl = (1 << 20), | ||
727 | eRegistrationConfirm_supportsAdditiveRegistration = (1 << 19), | ||
728 | eRegistrationConfirm_terminalAliasPattern = (1 << 18), | ||
729 | eRegistrationConfirm_supportedPrefixes = (1 << 17), | ||
730 | eRegistrationConfirm_usageSpec = (1 << 16), | ||
731 | eRegistrationConfirm_featureServerAlias = (1 << 15), | ||
732 | eRegistrationConfirm_capacityReportingSpec = (1 << 14), | ||
733 | eRegistrationConfirm_featureSet = (1 << 13), | ||
734 | eRegistrationConfirm_genericData = (1 << 12), | ||
735 | } options; | ||
736 | RegistrationConfirm_callSignalAddress callSignalAddress; | ||
737 | unsigned timeToLive; | ||
738 | } RegistrationConfirm; | ||
739 | |||
740 | typedef struct UnregistrationRequest_callSignalAddress { /* SEQUENCE OF */ | ||
741 | int count; | ||
742 | TransportAddress item[10]; | ||
743 | } UnregistrationRequest_callSignalAddress; | ||
744 | |||
745 | typedef struct UnregistrationRequest { /* SEQUENCE */ | ||
746 | enum { | ||
747 | eUnregistrationRequest_endpointAlias = (1 << 31), | ||
748 | eUnregistrationRequest_nonStandardData = (1 << 30), | ||
749 | eUnregistrationRequest_endpointIdentifier = (1 << 29), | ||
750 | eUnregistrationRequest_alternateEndpoints = (1 << 28), | ||
751 | eUnregistrationRequest_gatekeeperIdentifier = (1 << 27), | ||
752 | eUnregistrationRequest_tokens = (1 << 26), | ||
753 | eUnregistrationRequest_cryptoTokens = (1 << 25), | ||
754 | eUnregistrationRequest_integrityCheckValue = (1 << 24), | ||
755 | eUnregistrationRequest_reason = (1 << 23), | ||
756 | eUnregistrationRequest_endpointAliasPattern = (1 << 22), | ||
757 | eUnregistrationRequest_supportedPrefixes = (1 << 21), | ||
758 | eUnregistrationRequest_alternateGatekeeper = (1 << 20), | ||
759 | eUnregistrationRequest_genericData = (1 << 19), | ||
760 | } options; | ||
761 | UnregistrationRequest_callSignalAddress callSignalAddress; | ||
762 | } UnregistrationRequest; | ||
763 | |||
764 | typedef struct AdmissionRequest { /* SEQUENCE */ | ||
765 | enum { | ||
766 | eAdmissionRequest_callModel = (1 << 31), | ||
767 | eAdmissionRequest_destinationInfo = (1 << 30), | ||
768 | eAdmissionRequest_destCallSignalAddress = (1 << 29), | ||
769 | eAdmissionRequest_destExtraCallInfo = (1 << 28), | ||
770 | eAdmissionRequest_srcCallSignalAddress = (1 << 27), | ||
771 | eAdmissionRequest_nonStandardData = (1 << 26), | ||
772 | eAdmissionRequest_callServices = (1 << 25), | ||
773 | eAdmissionRequest_canMapAlias = (1 << 24), | ||
774 | eAdmissionRequest_callIdentifier = (1 << 23), | ||
775 | eAdmissionRequest_srcAlternatives = (1 << 22), | ||
776 | eAdmissionRequest_destAlternatives = (1 << 21), | ||
777 | eAdmissionRequest_gatekeeperIdentifier = (1 << 20), | ||
778 | eAdmissionRequest_tokens = (1 << 19), | ||
779 | eAdmissionRequest_cryptoTokens = (1 << 18), | ||
780 | eAdmissionRequest_integrityCheckValue = (1 << 17), | ||
781 | eAdmissionRequest_transportQOS = (1 << 16), | ||
782 | eAdmissionRequest_willSupplyUUIEs = (1 << 15), | ||
783 | eAdmissionRequest_callLinkage = (1 << 14), | ||
784 | eAdmissionRequest_gatewayDataRate = (1 << 13), | ||
785 | eAdmissionRequest_capacity = (1 << 12), | ||
786 | eAdmissionRequest_circuitInfo = (1 << 11), | ||
787 | eAdmissionRequest_desiredProtocols = (1 << 10), | ||
788 | eAdmissionRequest_desiredTunnelledProtocol = (1 << 9), | ||
789 | eAdmissionRequest_featureSet = (1 << 8), | ||
790 | eAdmissionRequest_genericData = (1 << 7), | ||
791 | } options; | ||
792 | TransportAddress destCallSignalAddress; | ||
793 | TransportAddress srcCallSignalAddress; | ||
794 | } AdmissionRequest; | ||
795 | |||
796 | typedef struct AdmissionConfirm { /* SEQUENCE */ | ||
797 | enum { | ||
798 | eAdmissionConfirm_irrFrequency = (1 << 31), | ||
799 | eAdmissionConfirm_nonStandardData = (1 << 30), | ||
800 | eAdmissionConfirm_destinationInfo = (1 << 29), | ||
801 | eAdmissionConfirm_destExtraCallInfo = (1 << 28), | ||
802 | eAdmissionConfirm_destinationType = (1 << 27), | ||
803 | eAdmissionConfirm_remoteExtensionAddress = (1 << 26), | ||
804 | eAdmissionConfirm_alternateEndpoints = (1 << 25), | ||
805 | eAdmissionConfirm_tokens = (1 << 24), | ||
806 | eAdmissionConfirm_cryptoTokens = (1 << 23), | ||
807 | eAdmissionConfirm_integrityCheckValue = (1 << 22), | ||
808 | eAdmissionConfirm_transportQOS = (1 << 21), | ||
809 | eAdmissionConfirm_willRespondToIRR = (1 << 20), | ||
810 | eAdmissionConfirm_uuiesRequested = (1 << 19), | ||
811 | eAdmissionConfirm_language = (1 << 18), | ||
812 | eAdmissionConfirm_alternateTransportAddresses = (1 << 17), | ||
813 | eAdmissionConfirm_useSpecifiedTransport = (1 << 16), | ||
814 | eAdmissionConfirm_circuitInfo = (1 << 15), | ||
815 | eAdmissionConfirm_usageSpec = (1 << 14), | ||
816 | eAdmissionConfirm_supportedProtocols = (1 << 13), | ||
817 | eAdmissionConfirm_serviceControl = (1 << 12), | ||
818 | eAdmissionConfirm_multipleCalls = (1 << 11), | ||
819 | eAdmissionConfirm_featureSet = (1 << 10), | ||
820 | eAdmissionConfirm_genericData = (1 << 9), | ||
821 | } options; | ||
822 | TransportAddress destCallSignalAddress; | ||
823 | } AdmissionConfirm; | ||
824 | |||
825 | typedef struct LocationRequest { /* SEQUENCE */ | ||
826 | enum { | ||
827 | eLocationRequest_endpointIdentifier = (1 << 31), | ||
828 | eLocationRequest_nonStandardData = (1 << 30), | ||
829 | eLocationRequest_sourceInfo = (1 << 29), | ||
830 | eLocationRequest_canMapAlias = (1 << 28), | ||
831 | eLocationRequest_gatekeeperIdentifier = (1 << 27), | ||
832 | eLocationRequest_tokens = (1 << 26), | ||
833 | eLocationRequest_cryptoTokens = (1 << 25), | ||
834 | eLocationRequest_integrityCheckValue = (1 << 24), | ||
835 | eLocationRequest_desiredProtocols = (1 << 23), | ||
836 | eLocationRequest_desiredTunnelledProtocol = (1 << 22), | ||
837 | eLocationRequest_featureSet = (1 << 21), | ||
838 | eLocationRequest_genericData = (1 << 20), | ||
839 | eLocationRequest_hopCount = (1 << 19), | ||
840 | eLocationRequest_circuitInfo = (1 << 18), | ||
841 | } options; | ||
842 | TransportAddress replyAddress; | ||
843 | } LocationRequest; | ||
844 | |||
845 | typedef struct LocationConfirm { /* SEQUENCE */ | ||
846 | enum { | ||
847 | eLocationConfirm_nonStandardData = (1 << 31), | ||
848 | eLocationConfirm_destinationInfo = (1 << 30), | ||
849 | eLocationConfirm_destExtraCallInfo = (1 << 29), | ||
850 | eLocationConfirm_destinationType = (1 << 28), | ||
851 | eLocationConfirm_remoteExtensionAddress = (1 << 27), | ||
852 | eLocationConfirm_alternateEndpoints = (1 << 26), | ||
853 | eLocationConfirm_tokens = (1 << 25), | ||
854 | eLocationConfirm_cryptoTokens = (1 << 24), | ||
855 | eLocationConfirm_integrityCheckValue = (1 << 23), | ||
856 | eLocationConfirm_alternateTransportAddresses = (1 << 22), | ||
857 | eLocationConfirm_supportedProtocols = (1 << 21), | ||
858 | eLocationConfirm_multipleCalls = (1 << 20), | ||
859 | eLocationConfirm_featureSet = (1 << 19), | ||
860 | eLocationConfirm_genericData = (1 << 18), | ||
861 | eLocationConfirm_circuitInfo = (1 << 17), | ||
862 | eLocationConfirm_serviceControl = (1 << 16), | ||
863 | } options; | ||
864 | TransportAddress callSignalAddress; | ||
865 | TransportAddress rasAddress; | ||
866 | } LocationConfirm; | ||
867 | |||
868 | typedef struct InfoRequestResponse_callSignalAddress { /* SEQUENCE OF */ | ||
869 | int count; | ||
870 | TransportAddress item[10]; | ||
871 | } InfoRequestResponse_callSignalAddress; | ||
872 | |||
873 | typedef struct InfoRequestResponse { /* SEQUENCE */ | ||
874 | enum { | ||
875 | eInfoRequestResponse_nonStandardData = (1 << 31), | ||
876 | eInfoRequestResponse_endpointAlias = (1 << 30), | ||
877 | eInfoRequestResponse_perCallInfo = (1 << 29), | ||
878 | eInfoRequestResponse_tokens = (1 << 28), | ||
879 | eInfoRequestResponse_cryptoTokens = (1 << 27), | ||
880 | eInfoRequestResponse_integrityCheckValue = (1 << 26), | ||
881 | eInfoRequestResponse_needResponse = (1 << 25), | ||
882 | eInfoRequestResponse_capacity = (1 << 24), | ||
883 | eInfoRequestResponse_irrStatus = (1 << 23), | ||
884 | eInfoRequestResponse_unsolicited = (1 << 22), | ||
885 | eInfoRequestResponse_genericData = (1 << 21), | ||
886 | } options; | ||
887 | TransportAddress rasAddress; | ||
888 | InfoRequestResponse_callSignalAddress callSignalAddress; | ||
889 | } InfoRequestResponse; | ||
890 | |||
891 | typedef struct RasMessage { /* CHOICE */ | ||
892 | enum { | ||
893 | eRasMessage_gatekeeperRequest, | ||
894 | eRasMessage_gatekeeperConfirm, | ||
895 | eRasMessage_gatekeeperReject, | ||
896 | eRasMessage_registrationRequest, | ||
897 | eRasMessage_registrationConfirm, | ||
898 | eRasMessage_registrationReject, | ||
899 | eRasMessage_unregistrationRequest, | ||
900 | eRasMessage_unregistrationConfirm, | ||
901 | eRasMessage_unregistrationReject, | ||
902 | eRasMessage_admissionRequest, | ||
903 | eRasMessage_admissionConfirm, | ||
904 | eRasMessage_admissionReject, | ||
905 | eRasMessage_bandwidthRequest, | ||
906 | eRasMessage_bandwidthConfirm, | ||
907 | eRasMessage_bandwidthReject, | ||
908 | eRasMessage_disengageRequest, | ||
909 | eRasMessage_disengageConfirm, | ||
910 | eRasMessage_disengageReject, | ||
911 | eRasMessage_locationRequest, | ||
912 | eRasMessage_locationConfirm, | ||
913 | eRasMessage_locationReject, | ||
914 | eRasMessage_infoRequest, | ||
915 | eRasMessage_infoRequestResponse, | ||
916 | eRasMessage_nonStandardMessage, | ||
917 | eRasMessage_unknownMessageResponse, | ||
918 | eRasMessage_requestInProgress, | ||
919 | eRasMessage_resourcesAvailableIndicate, | ||
920 | eRasMessage_resourcesAvailableConfirm, | ||
921 | eRasMessage_infoRequestAck, | ||
922 | eRasMessage_infoRequestNak, | ||
923 | eRasMessage_serviceControlIndication, | ||
924 | eRasMessage_serviceControlResponse, | ||
925 | } choice; | ||
926 | union { | ||
927 | GatekeeperRequest gatekeeperRequest; | ||
928 | GatekeeperConfirm gatekeeperConfirm; | ||
929 | RegistrationRequest registrationRequest; | ||
930 | RegistrationConfirm registrationConfirm; | ||
931 | UnregistrationRequest unregistrationRequest; | ||
932 | AdmissionRequest admissionRequest; | ||
933 | AdmissionConfirm admissionConfirm; | ||
934 | LocationRequest locationRequest; | ||
935 | LocationConfirm locationConfirm; | ||
936 | InfoRequestResponse infoRequestResponse; | ||
937 | }; | ||
938 | } RasMessage; | ||
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index d5b8c0d6a12b..c0dac16e1902 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -316,5 +316,23 @@ extern unsigned int ipt_do_table(struct sk_buff **pskb, | |||
316 | void *userdata); | 316 | void *userdata); |
317 | 317 | ||
318 | #define IPT_ALIGN(s) XT_ALIGN(s) | 318 | #define IPT_ALIGN(s) XT_ALIGN(s) |
319 | |||
320 | #ifdef CONFIG_COMPAT | ||
321 | #include <net/compat.h> | ||
322 | |||
323 | struct compat_ipt_entry | ||
324 | { | ||
325 | struct ipt_ip ip; | ||
326 | compat_uint_t nfcache; | ||
327 | u_int16_t target_offset; | ||
328 | u_int16_t next_offset; | ||
329 | compat_uint_t comefrom; | ||
330 | struct compat_xt_counters counters; | ||
331 | unsigned char elems[0]; | ||
332 | }; | ||
333 | |||
334 | #define COMPAT_IPT_ALIGN(s) COMPAT_XT_ALIGN(s) | ||
335 | |||
336 | #endif /* CONFIG_COMPAT */ | ||
319 | #endif /*__KERNEL__*/ | 337 | #endif /*__KERNEL__*/ |
320 | #endif /* _IPTABLES_H */ | 338 | #endif /* _IPTABLES_H */ |
diff --git a/include/linux/netfilter_ipv4/ipt_esp.h b/include/linux/netfilter_ipv4/ipt_esp.h index c782a83e53e0..78296e7eeff9 100644 --- a/include/linux/netfilter_ipv4/ipt_esp.h +++ b/include/linux/netfilter_ipv4/ipt_esp.h | |||
@@ -1,16 +1,10 @@ | |||
1 | #ifndef _IPT_ESP_H | 1 | #ifndef _IPT_ESP_H |
2 | #define _IPT_ESP_H | 2 | #define _IPT_ESP_H |
3 | 3 | ||
4 | struct ipt_esp | 4 | #include <linux/netfilter/xt_esp.h> |
5 | { | ||
6 | u_int32_t spis[2]; /* Security Parameter Index */ | ||
7 | u_int8_t invflags; /* Inverse flags */ | ||
8 | }; | ||
9 | 5 | ||
10 | 6 | #define ipt_esp xt_esp | |
11 | 7 | #define IPT_ESP_INV_SPI XT_ESP_INV_SPI | |
12 | /* Values for "invflags" field in struct ipt_esp. */ | 8 | #define IPT_ESP_INV_MASK XT_ESP_INV_MASK |
13 | #define IPT_ESP_INV_SPI 0x01 /* Invert the sense of spi. */ | ||
14 | #define IPT_ESP_INV_MASK 0x01 /* All possible flags. */ | ||
15 | 9 | ||
16 | #endif /*_IPT_ESP_H*/ | 10 | #endif /*_IPT_ESP_H*/ |
diff --git a/include/linux/netfilter_ipv4/ipt_multiport.h b/include/linux/netfilter_ipv4/ipt_multiport.h index e6b6fff811df..55fe85eca88c 100644 --- a/include/linux/netfilter_ipv4/ipt_multiport.h +++ b/include/linux/netfilter_ipv4/ipt_multiport.h | |||
@@ -1,30 +1,15 @@ | |||
1 | #ifndef _IPT_MULTIPORT_H | 1 | #ifndef _IPT_MULTIPORT_H |
2 | #define _IPT_MULTIPORT_H | 2 | #define _IPT_MULTIPORT_H |
3 | #include <linux/netfilter_ipv4/ip_tables.h> | ||
4 | 3 | ||
5 | enum ipt_multiport_flags | 4 | #include <linux/netfilter/xt_multiport.h> |
6 | { | ||
7 | IPT_MULTIPORT_SOURCE, | ||
8 | IPT_MULTIPORT_DESTINATION, | ||
9 | IPT_MULTIPORT_EITHER | ||
10 | }; | ||
11 | 5 | ||
12 | #define IPT_MULTI_PORTS 15 | 6 | #define IPT_MULTIPORT_SOURCE XT_MULTIPORT_SOURCE |
7 | #define IPT_MULTIPORT_DESTINATION XT_MULTIPORT_DESTINATION | ||
8 | #define IPT_MULTIPORT_EITHER XT_MULTIPORT_EITHER | ||
13 | 9 | ||
14 | /* Must fit inside union ipt_matchinfo: 16 bytes */ | 10 | #define IPT_MULTI_PORTS XT_MULTI_PORTS |
15 | struct ipt_multiport | 11 | |
16 | { | 12 | #define ipt_multiport xt_multiport |
17 | u_int8_t flags; /* Type of comparison */ | 13 | #define ipt_multiport_v1 xt_multiport_v1 |
18 | u_int8_t count; /* Number of ports */ | ||
19 | u_int16_t ports[IPT_MULTI_PORTS]; /* Ports */ | ||
20 | }; | ||
21 | 14 | ||
22 | struct ipt_multiport_v1 | ||
23 | { | ||
24 | u_int8_t flags; /* Type of comparison */ | ||
25 | u_int8_t count; /* Number of ports */ | ||
26 | u_int16_t ports[IPT_MULTI_PORTS]; /* Ports */ | ||
27 | u_int8_t pflags[IPT_MULTI_PORTS]; /* Port flags */ | ||
28 | u_int8_t invert; /* Invert flag */ | ||
29 | }; | ||
30 | #endif /*_IPT_MULTIPORT_H*/ | 15 | #endif /*_IPT_MULTIPORT_H*/ |
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index 14f2bd010884..52a7b9e76428 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h | |||
@@ -73,6 +73,9 @@ enum nf_ip6_hook_priorities { | |||
73 | }; | 73 | }; |
74 | 74 | ||
75 | #ifdef CONFIG_NETFILTER | 75 | #ifdef CONFIG_NETFILTER |
76 | extern unsigned int nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, | ||
77 | unsigned int dataoff, u_int8_t protocol); | ||
78 | |||
76 | extern int ipv6_netfilter_init(void); | 79 | extern int ipv6_netfilter_init(void); |
77 | extern void ipv6_netfilter_fini(void); | 80 | extern void ipv6_netfilter_fini(void); |
78 | #else /* CONFIG_NETFILTER */ | 81 | #else /* CONFIG_NETFILTER */ |
diff --git a/include/linux/netfilter_ipv6/ip6t_esp.h b/include/linux/netfilter_ipv6/ip6t_esp.h index a91b6abc8079..f62eaf53c16c 100644 --- a/include/linux/netfilter_ipv6/ip6t_esp.h +++ b/include/linux/netfilter_ipv6/ip6t_esp.h | |||
@@ -1,14 +1,10 @@ | |||
1 | #ifndef _IP6T_ESP_H | 1 | #ifndef _IP6T_ESP_H |
2 | #define _IP6T_ESP_H | 2 | #define _IP6T_ESP_H |
3 | 3 | ||
4 | struct ip6t_esp | 4 | #include <linux/netfilter/xt_esp.h> |
5 | { | ||
6 | u_int32_t spis[2]; /* Security Parameter Index */ | ||
7 | u_int8_t invflags; /* Inverse flags */ | ||
8 | }; | ||
9 | 5 | ||
10 | /* Values for "invflags" field in struct ip6t_esp. */ | 6 | #define ip6t_esp xt_esp |
11 | #define IP6T_ESP_INV_SPI 0x01 /* Invert the sense of spi. */ | 7 | #define IP6T_ESP_INV_SPI XT_ESP_INV_SPI |
12 | #define IP6T_ESP_INV_MASK 0x01 /* All possible flags. */ | 8 | #define IP6T_ESP_INV_MASK XT_ESP_INV_MASK |
13 | 9 | ||
14 | #endif /*_IP6T_ESP_H*/ | 10 | #endif /*_IP6T_ESP_H*/ |
diff --git a/include/linux/netfilter_ipv6/ip6t_multiport.h b/include/linux/netfilter_ipv6/ip6t_multiport.h index efe4954a8681..042c92661cee 100644 --- a/include/linux/netfilter_ipv6/ip6t_multiport.h +++ b/include/linux/netfilter_ipv6/ip6t_multiport.h | |||
@@ -1,21 +1,14 @@ | |||
1 | #ifndef _IP6T_MULTIPORT_H | 1 | #ifndef _IP6T_MULTIPORT_H |
2 | #define _IP6T_MULTIPORT_H | 2 | #define _IP6T_MULTIPORT_H |
3 | #include <linux/netfilter_ipv6/ip6_tables.h> | ||
4 | 3 | ||
5 | enum ip6t_multiport_flags | 4 | #include <linux/netfilter/xt_multiport.h> |
6 | { | ||
7 | IP6T_MULTIPORT_SOURCE, | ||
8 | IP6T_MULTIPORT_DESTINATION, | ||
9 | IP6T_MULTIPORT_EITHER | ||
10 | }; | ||
11 | 5 | ||
12 | #define IP6T_MULTI_PORTS 15 | 6 | #define IP6T_MULTIPORT_SOURCE XT_MULTIPORT_SOURCE |
7 | #define IP6T_MULTIPORT_DESTINATION XT_MULTIPORT_DESTINATION | ||
8 | #define IP6T_MULTIPORT_EITHER XT_MULTIPORT_EITHER | ||
13 | 9 | ||
14 | /* Must fit inside union ip6t_matchinfo: 16 bytes */ | 10 | #define IP6T_MULTI_PORTS XT_MULTI_PORTS |
15 | struct ip6t_multiport | 11 | |
16 | { | 12 | #define ip6t_multiport xt_multiport |
17 | u_int8_t flags; /* Type of comparison */ | 13 | |
18 | u_int8_t count; /* Number of ports */ | 14 | #endif /*_IP6T_MULTIPORT_H*/ |
19 | u_int16_t ports[IP6T_MULTI_PORTS]; /* Ports */ | ||
20 | }; | ||
21 | #endif /*_IPT_MULTIPORT_H*/ | ||
diff --git a/include/linux/numa.h b/include/linux/numa.h index f0c539bd3cfc..e481feb1bfd8 100644 --- a/include/linux/numa.h +++ b/include/linux/numa.h | |||
@@ -3,11 +3,9 @@ | |||
3 | 3 | ||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | 5 | ||
6 | #ifndef CONFIG_FLATMEM | 6 | #ifdef CONFIG_NODES_SHIFT |
7 | #include <asm/numnodes.h> | 7 | #define NODES_SHIFT CONFIG_NODES_SHIFT |
8 | #endif | 8 | #else |
9 | |||
10 | #ifndef NODES_SHIFT | ||
11 | #define NODES_SHIFT 0 | 9 | #define NODES_SHIFT 0 |
12 | #endif | 10 | #endif |
13 | 11 | ||
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 9ea629c02a4b..d276a4e2f825 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -48,8 +48,20 @@ | |||
48 | 48 | ||
49 | /* | 49 | /* |
50 | * Don't use the *_dontuse flags. Use the macros. Otherwise you'll break | 50 | * Don't use the *_dontuse flags. Use the macros. Otherwise you'll break |
51 | * locked- and dirty-page accounting. The top eight bits of page->flags are | 51 | * locked- and dirty-page accounting. |
52 | * used for page->zone, so putting flag bits there doesn't work. | 52 | * |
53 | * The page flags field is split into two parts, the main flags area | ||
54 | * which extends from the low bits upwards, and the fields area which | ||
55 | * extends from the high bits downwards. | ||
56 | * | ||
57 | * | FIELD | ... | FLAGS | | ||
58 | * N-1 ^ 0 | ||
59 | * (N-FLAGS_RESERVED) | ||
60 | * | ||
61 | * The fields area is reserved for fields mapping zone, node and SPARSEMEM | ||
62 | * section. The boundry between these two areas is defined by | ||
63 | * FLAGS_RESERVED which defines the width of the fields section | ||
64 | * (see linux/mmzone.h). New flags must _not_ overlap with this area. | ||
53 | */ | 65 | */ |
54 | #define PG_locked 0 /* Page is locked. Don't touch. */ | 66 | #define PG_locked 0 /* Page is locked. Don't touch. */ |
55 | #define PG_error 1 | 67 | #define PG_error 1 |
@@ -74,7 +86,9 @@ | |||
74 | #define PG_mappedtodisk 16 /* Has blocks allocated on-disk */ | 86 | #define PG_mappedtodisk 16 /* Has blocks allocated on-disk */ |
75 | #define PG_reclaim 17 /* To be reclaimed asap */ | 87 | #define PG_reclaim 17 /* To be reclaimed asap */ |
76 | #define PG_nosave_free 18 /* Free, should not be written */ | 88 | #define PG_nosave_free 18 /* Free, should not be written */ |
77 | #define PG_uncached 19 /* Page has been mapped as uncached */ | 89 | #define PG_buddy 19 /* Page is free, on buddy lists */ |
90 | |||
91 | #define PG_uncached 20 /* Page has been mapped as uncached */ | ||
78 | 92 | ||
79 | /* | 93 | /* |
80 | * Global page accounting. One instance per CPU. Only unsigned longs are | 94 | * Global page accounting. One instance per CPU. Only unsigned longs are |
@@ -317,6 +331,10 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta); | |||
317 | #define SetPageNosaveFree(page) set_bit(PG_nosave_free, &(page)->flags) | 331 | #define SetPageNosaveFree(page) set_bit(PG_nosave_free, &(page)->flags) |
318 | #define ClearPageNosaveFree(page) clear_bit(PG_nosave_free, &(page)->flags) | 332 | #define ClearPageNosaveFree(page) clear_bit(PG_nosave_free, &(page)->flags) |
319 | 333 | ||
334 | #define PageBuddy(page) test_bit(PG_buddy, &(page)->flags) | ||
335 | #define __SetPageBuddy(page) __set_bit(PG_buddy, &(page)->flags) | ||
336 | #define __ClearPageBuddy(page) __clear_bit(PG_buddy, &(page)->flags) | ||
337 | |||
320 | #define PageMappedToDisk(page) test_bit(PG_mappedtodisk, &(page)->flags) | 338 | #define PageMappedToDisk(page) test_bit(PG_mappedtodisk, &(page)->flags) |
321 | #define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags) | 339 | #define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags) |
322 | #define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags) | 340 | #define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags) |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 9539efd4f7e6..7a1af574dedf 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -78,6 +78,8 @@ extern struct page * find_or_create_page(struct address_space *mapping, | |||
78 | unsigned long index, gfp_t gfp_mask); | 78 | unsigned long index, gfp_t gfp_mask); |
79 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, | 79 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, |
80 | unsigned int nr_pages, struct page **pages); | 80 | unsigned int nr_pages, struct page **pages); |
81 | unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start, | ||
82 | unsigned int nr_pages, struct page **pages); | ||
81 | unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, | 83 | unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, |
82 | int tag, unsigned int nr_pages, struct page **pages); | 84 | int tag, unsigned int nr_pages, struct page **pages); |
83 | 85 | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 0aad5a378e95..3a6a4e37a482 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -97,7 +97,13 @@ enum pci_channel_state { | |||
97 | 97 | ||
98 | typedef unsigned short __bitwise pci_bus_flags_t; | 98 | typedef unsigned short __bitwise pci_bus_flags_t; |
99 | enum pci_bus_flags { | 99 | enum pci_bus_flags { |
100 | PCI_BUS_FLAGS_NO_MSI = (pci_bus_flags_t) 1, | 100 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, |
101 | }; | ||
102 | |||
103 | struct pci_cap_saved_state { | ||
104 | struct hlist_node next; | ||
105 | char cap_nr; | ||
106 | u32 data[0]; | ||
101 | }; | 107 | }; |
102 | 108 | ||
103 | /* | 109 | /* |
@@ -159,6 +165,7 @@ struct pci_dev { | |||
159 | unsigned int block_ucfg_access:1; /* userspace config space access is blocked */ | 165 | unsigned int block_ucfg_access:1; /* userspace config space access is blocked */ |
160 | 166 | ||
161 | u32 saved_config_space[16]; /* config space saved at suspend time */ | 167 | u32 saved_config_space[16]; /* config space saved at suspend time */ |
168 | struct hlist_head saved_cap_space; | ||
162 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ | 169 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ |
163 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ | 170 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ |
164 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 171 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
@@ -169,6 +176,30 @@ struct pci_dev { | |||
169 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 176 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
170 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) | 177 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) |
171 | 178 | ||
179 | static inline struct pci_cap_saved_state *pci_find_saved_cap( | ||
180 | struct pci_dev *pci_dev,char cap) | ||
181 | { | ||
182 | struct pci_cap_saved_state *tmp; | ||
183 | struct hlist_node *pos; | ||
184 | |||
185 | hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) { | ||
186 | if (tmp->cap_nr == cap) | ||
187 | return tmp; | ||
188 | } | ||
189 | return NULL; | ||
190 | } | ||
191 | |||
192 | static inline void pci_add_saved_cap(struct pci_dev *pci_dev, | ||
193 | struct pci_cap_saved_state *new_cap) | ||
194 | { | ||
195 | hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space); | ||
196 | } | ||
197 | |||
198 | static inline void pci_remove_saved_cap(struct pci_cap_saved_state *cap) | ||
199 | { | ||
200 | hlist_del(&cap->next); | ||
201 | } | ||
202 | |||
172 | /* | 203 | /* |
173 | * For PCI devices, the region numbers are assigned this way: | 204 | * For PCI devices, the region numbers are assigned this way: |
174 | * | 205 | * |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 870fe38378b1..d6fe048376ab 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -356,6 +356,10 @@ | |||
356 | #define PCI_DEVICE_ID_ATI_IXP300_SATA 0x436e | 356 | #define PCI_DEVICE_ID_ATI_IXP300_SATA 0x436e |
357 | #define PCI_DEVICE_ID_ATI_IXP400_IDE 0x4376 | 357 | #define PCI_DEVICE_ID_ATI_IXP400_IDE 0x4376 |
358 | #define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379 | 358 | #define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379 |
359 | #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a | ||
360 | #define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380 | ||
361 | #define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381 | ||
362 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c | ||
359 | 363 | ||
360 | #define PCI_VENDOR_ID_VLSI 0x1004 | 364 | #define PCI_VENDOR_ID_VLSI 0x1004 |
361 | #define PCI_DEVICE_ID_VLSI_82C592 0x0005 | 365 | #define PCI_DEVICE_ID_VLSI_82C592 0x0005 |
@@ -497,7 +501,8 @@ | |||
497 | #define PCI_DEVICE_ID_AMD_8111_SMBUS 0x746b | 501 | #define PCI_DEVICE_ID_AMD_8111_SMBUS 0x746b |
498 | #define PCI_DEVICE_ID_AMD_8111_AUDIO 0x746d | 502 | #define PCI_DEVICE_ID_AMD_8111_AUDIO 0x746d |
499 | #define PCI_DEVICE_ID_AMD_8151_0 0x7454 | 503 | #define PCI_DEVICE_ID_AMD_8151_0 0x7454 |
500 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7450 | 504 | #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 |
505 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 | ||
501 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 | 506 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 |
502 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 | 507 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 |
503 | #define PCI_DEVICE_ID_AMD_CS5536_AUDIO 0x2093 | 508 | #define PCI_DEVICE_ID_AMD_CS5536_AUDIO 0x2093 |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 75c7f55023ab..0008d4bd4059 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -5,11 +5,14 @@ | |||
5 | 5 | ||
6 | #define PIPE_BUFFERS (16) | 6 | #define PIPE_BUFFERS (16) |
7 | 7 | ||
8 | #define PIPE_BUF_FLAG_STOLEN 0x01 | ||
9 | #define PIPE_BUF_FLAG_LRU 0x02 | ||
10 | |||
8 | struct pipe_buffer { | 11 | struct pipe_buffer { |
9 | struct page *page; | 12 | struct page *page; |
10 | unsigned int offset, len; | 13 | unsigned int offset, len; |
11 | struct pipe_buf_operations *ops; | 14 | struct pipe_buf_operations *ops; |
12 | unsigned int stolen; | 15 | unsigned int flags; |
13 | }; | 16 | }; |
14 | 17 | ||
15 | struct pipe_buf_operations { | 18 | struct pipe_buf_operations { |
@@ -18,6 +21,7 @@ struct pipe_buf_operations { | |||
18 | void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *); | 21 | void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *); |
19 | void (*release)(struct pipe_inode_info *, struct pipe_buffer *); | 22 | void (*release)(struct pipe_inode_info *, struct pipe_buffer *); |
20 | int (*steal)(struct pipe_inode_info *, struct pipe_buffer *); | 23 | int (*steal)(struct pipe_inode_info *, struct pipe_buffer *); |
24 | void (*get)(struct pipe_inode_info *, struct pipe_buffer *); | ||
21 | }; | 25 | }; |
22 | 26 | ||
23 | struct pipe_inode_info { | 27 | struct pipe_inode_info { |
@@ -33,32 +37,45 @@ struct pipe_inode_info { | |||
33 | unsigned int w_counter; | 37 | unsigned int w_counter; |
34 | struct fasync_struct *fasync_readers; | 38 | struct fasync_struct *fasync_readers; |
35 | struct fasync_struct *fasync_writers; | 39 | struct fasync_struct *fasync_writers; |
40 | struct inode *inode; | ||
36 | }; | 41 | }; |
37 | 42 | ||
38 | /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual | 43 | /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual |
39 | memory allocation, whereas PIPE_BUF makes atomicity guarantees. */ | 44 | memory allocation, whereas PIPE_BUF makes atomicity guarantees. */ |
40 | #define PIPE_SIZE PAGE_SIZE | 45 | #define PIPE_SIZE PAGE_SIZE |
41 | 46 | ||
42 | #define PIPE_MUTEX(inode) (&(inode).i_mutex) | ||
43 | #define PIPE_WAIT(inode) (&(inode).i_pipe->wait) | ||
44 | #define PIPE_READERS(inode) ((inode).i_pipe->readers) | ||
45 | #define PIPE_WRITERS(inode) ((inode).i_pipe->writers) | ||
46 | #define PIPE_WAITING_WRITERS(inode) ((inode).i_pipe->waiting_writers) | ||
47 | #define PIPE_RCOUNTER(inode) ((inode).i_pipe->r_counter) | ||
48 | #define PIPE_WCOUNTER(inode) ((inode).i_pipe->w_counter) | ||
49 | #define PIPE_FASYNC_READERS(inode) (&((inode).i_pipe->fasync_readers)) | ||
50 | #define PIPE_FASYNC_WRITERS(inode) (&((inode).i_pipe->fasync_writers)) | ||
51 | |||
52 | /* Drop the inode semaphore and wait for a pipe event, atomically */ | 47 | /* Drop the inode semaphore and wait for a pipe event, atomically */ |
53 | void pipe_wait(struct inode * inode); | 48 | void pipe_wait(struct pipe_inode_info *pipe); |
54 | 49 | ||
55 | struct inode* pipe_new(struct inode* inode); | 50 | struct pipe_inode_info * alloc_pipe_info(struct inode * inode); |
56 | void free_pipe_info(struct inode* inode); | 51 | void free_pipe_info(struct inode * inode); |
52 | void __free_pipe_info(struct pipe_inode_info *); | ||
57 | 53 | ||
58 | /* | 54 | /* |
59 | * splice is tied to pipes as a transport (at least for now), so we'll just | 55 | * splice is tied to pipes as a transport (at least for now), so we'll just |
60 | * add the splice flags here. | 56 | * add the splice flags here. |
61 | */ | 57 | */ |
62 | #define SPLICE_F_MOVE (0x01) /* move pages instead of copying */ | 58 | #define SPLICE_F_MOVE (0x01) /* move pages instead of copying */ |
59 | #define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */ | ||
60 | /* we may still block on the fd we splice */ | ||
61 | /* from/to, of course */ | ||
62 | #define SPLICE_F_MORE (0x04) /* expect more data */ | ||
63 | |||
64 | /* | ||
65 | * Passed to the actors | ||
66 | */ | ||
67 | struct splice_desc { | ||
68 | unsigned int len, total_len; /* current and remaining length */ | ||
69 | unsigned int flags; /* splice flags */ | ||
70 | struct file *file; /* file to read/write */ | ||
71 | loff_t pos; /* file position */ | ||
72 | }; | ||
73 | |||
74 | typedef int (splice_actor)(struct pipe_inode_info *, struct pipe_buffer *, | ||
75 | struct splice_desc *); | ||
76 | |||
77 | extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *, | ||
78 | loff_t *, size_t, unsigned int, | ||
79 | splice_actor *); | ||
63 | 80 | ||
64 | #endif | 81 | #endif |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 6df2585c0169..66be58902b17 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -199,6 +199,12 @@ extern int device_suspend(pm_message_t state); | |||
199 | 199 | ||
200 | extern int dpm_runtime_suspend(struct device *, pm_message_t); | 200 | extern int dpm_runtime_suspend(struct device *, pm_message_t); |
201 | extern void dpm_runtime_resume(struct device *); | 201 | extern void dpm_runtime_resume(struct device *); |
202 | extern void __suspend_report_result(const char *function, void *fn, int ret); | ||
203 | |||
204 | #define suspend_report_result(fn, ret) \ | ||
205 | do { \ | ||
206 | __suspend_report_result(__FUNCTION__, fn, ret); \ | ||
207 | } while (0) | ||
202 | 208 | ||
203 | #else /* !CONFIG_PM */ | 209 | #else /* !CONFIG_PM */ |
204 | 210 | ||
@@ -219,6 +225,8 @@ static inline void dpm_runtime_resume(struct device * dev) | |||
219 | { | 225 | { |
220 | } | 226 | } |
221 | 227 | ||
228 | #define suspend_report_result(fn, ret) do { } while (0) | ||
229 | |||
222 | #endif | 230 | #endif |
223 | 231 | ||
224 | /* changes to device_may_wakeup take effect on the next pm state change. | 232 | /* changes to device_may_wakeup take effect on the next pm state change. |
diff --git a/include/linux/pm_legacy.h b/include/linux/pm_legacy.h index 1252b45face1..008932d73c35 100644 --- a/include/linux/pm_legacy.h +++ b/include/linux/pm_legacy.h | |||
@@ -16,11 +16,6 @@ struct pm_dev __deprecated * | |||
16 | pm_register(pm_dev_t type, unsigned long id, pm_callback callback); | 16 | pm_register(pm_dev_t type, unsigned long id, pm_callback callback); |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * Unregister a device with power management | ||
20 | */ | ||
21 | void __deprecated pm_unregister(struct pm_dev *dev); | ||
22 | |||
23 | /* | ||
24 | * Unregister all devices with matching callback | 19 | * Unregister all devices with matching callback |
25 | */ | 20 | */ |
26 | void __deprecated pm_unregister_all(pm_callback callback); | 21 | void __deprecated pm_unregister_all(pm_callback callback); |
@@ -41,8 +36,6 @@ static inline struct pm_dev *pm_register(pm_dev_t type, | |||
41 | return NULL; | 36 | return NULL; |
42 | } | 37 | } |
43 | 38 | ||
44 | static inline void pm_unregister(struct pm_dev *dev) {} | ||
45 | |||
46 | static inline void pm_unregister_all(pm_callback callback) {} | 39 | static inline void pm_unregister_all(pm_callback callback) {} |
47 | 40 | ||
48 | static inline int pm_send_all(pm_request_t rqst, void *data) | 41 | static inline int pm_send_all(pm_request_t rqst, void *data) |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 135871df9911..4b47a0253425 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -79,7 +79,7 @@ struct kcore_list { | |||
79 | struct vmcore { | 79 | struct vmcore { |
80 | struct list_head list; | 80 | struct list_head list; |
81 | unsigned long long paddr; | 81 | unsigned long long paddr; |
82 | unsigned long size; | 82 | unsigned long long size; |
83 | loff_t offset; | 83 | loff_t offset; |
84 | }; | 84 | }; |
85 | 85 | ||
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index 774e1acfb8c4..f1fbae7e390e 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
@@ -227,8 +227,8 @@ struct mdp_superblock_1 { | |||
227 | */ | 227 | */ |
228 | 228 | ||
229 | /* These are only valid with feature bit '4' */ | 229 | /* These are only valid with feature bit '4' */ |
230 | __u64 reshape_position; /* next address in array-space for reshape */ | ||
231 | __u32 new_level; /* new level we are reshaping to */ | 230 | __u32 new_level; /* new level we are reshaping to */ |
231 | __u64 reshape_position; /* next address in array-space for reshape */ | ||
232 | __u32 delta_disks; /* change in number of raid_disks */ | 232 | __u32 delta_disks; /* change in number of raid_disks */ |
233 | __u32 new_layout; /* new layout */ | 233 | __u32 new_layout; /* new layout */ |
234 | __u32 new_chunk; /* new chunk size (bytes) */ | 234 | __u32 new_chunk; /* new chunk size (bytes) */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 541f4828f5e7..29b7d4f87d20 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -684,6 +684,7 @@ static inline void prefetch_stack(struct task_struct *t) { } | |||
684 | 684 | ||
685 | struct audit_context; /* See audit.c */ | 685 | struct audit_context; /* See audit.c */ |
686 | struct mempolicy; | 686 | struct mempolicy; |
687 | struct pipe_inode_info; | ||
687 | 688 | ||
688 | enum sleep_type { | 689 | enum sleep_type { |
689 | SLEEP_NORMAL, | 690 | SLEEP_NORMAL, |
@@ -882,6 +883,11 @@ struct task_struct { | |||
882 | 883 | ||
883 | atomic_t fs_excl; /* holding fs exclusive resources */ | 884 | atomic_t fs_excl; /* holding fs exclusive resources */ |
884 | struct rcu_head rcu; | 885 | struct rcu_head rcu; |
886 | |||
887 | /* | ||
888 | * cache last used pipe for splice | ||
889 | */ | ||
890 | struct pipe_inode_info *splice_pipe; | ||
885 | }; | 891 | }; |
886 | 892 | ||
887 | static inline pid_t process_group(struct task_struct *tsk) | 893 | static inline pid_t process_group(struct task_struct *tsk) |
@@ -905,7 +911,6 @@ static inline int pid_alive(struct task_struct *p) | |||
905 | extern void free_task(struct task_struct *tsk); | 911 | extern void free_task(struct task_struct *tsk); |
906 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) | 912 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) |
907 | 913 | ||
908 | extern void __put_task_struct_cb(struct rcu_head *rhp); | ||
909 | extern void __put_task_struct(struct task_struct *t); | 914 | extern void __put_task_struct(struct task_struct *t); |
910 | 915 | ||
911 | static inline void put_task_struct(struct task_struct *t) | 916 | static inline void put_task_struct(struct task_struct *t) |
@@ -1187,8 +1192,7 @@ extern void wait_task_inactive(task_t * p); | |||
1187 | #define remove_parent(p) list_del_init(&(p)->sibling) | 1192 | #define remove_parent(p) list_del_init(&(p)->sibling) |
1188 | #define add_parent(p) list_add_tail(&(p)->sibling,&(p)->parent->children) | 1193 | #define add_parent(p) list_add_tail(&(p)->sibling,&(p)->parent->children) |
1189 | 1194 | ||
1190 | #define next_task(p) list_entry((p)->tasks.next, struct task_struct, tasks) | 1195 | #define next_task(p) list_entry(rcu_dereference((p)->tasks.next), struct task_struct, tasks) |
1191 | #define prev_task(p) list_entry((p)->tasks.prev, struct task_struct, tasks) | ||
1192 | 1196 | ||
1193 | #define for_each_process(p) \ | 1197 | #define for_each_process(p) \ |
1194 | for (p = &init_task ; (p = next_task(p)) != &init_task ; ) | 1198 | for (p = &init_task ; (p = next_task(p)) != &init_task ; ) |
@@ -1203,9 +1207,10 @@ extern void wait_task_inactive(task_t * p); | |||
1203 | #define while_each_thread(g, t) \ | 1207 | #define while_each_thread(g, t) \ |
1204 | while ((t = next_thread(t)) != g) | 1208 | while ((t = next_thread(t)) != g) |
1205 | 1209 | ||
1206 | #define thread_group_leader(p) (p->pid == p->tgid) | 1210 | /* de_thread depends on thread_group_leader not being a pid based check */ |
1211 | #define thread_group_leader(p) (p == p->group_leader) | ||
1207 | 1212 | ||
1208 | static inline task_t *next_thread(task_t *p) | 1213 | static inline task_t *next_thread(const task_t *p) |
1209 | { | 1214 | { |
1210 | return list_entry(rcu_dereference(p->thread_group.next), | 1215 | return list_entry(rcu_dereference(p->thread_group.next), |
1211 | task_t, thread_group); | 1216 | task_t, thread_group); |
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h index 6336987dae62..2925e66a6732 100644 --- a/include/linux/screen_info.h +++ b/include/linux/screen_info.h | |||
@@ -41,7 +41,8 @@ struct screen_info { | |||
41 | u16 vesapm_off; /* 0x30 */ | 41 | u16 vesapm_off; /* 0x30 */ |
42 | u16 pages; /* 0x32 */ | 42 | u16 pages; /* 0x32 */ |
43 | u16 vesa_attributes; /* 0x34 */ | 43 | u16 vesa_attributes; /* 0x34 */ |
44 | /* 0x36 -- 0x3f reserved for future expansion */ | 44 | u32 capabilities; /* 0x36 */ |
45 | /* 0x3a -- 0x3f reserved for future expansion */ | ||
45 | }; | 46 | }; |
46 | 47 | ||
47 | extern struct screen_info screen_info; | 48 | extern struct screen_info screen_info; |
diff --git a/include/linux/sdla_asy.h b/include/linux/sdla_asy.h deleted file mode 100644 index f62242537c86..000000000000 --- a/include/linux/sdla_asy.h +++ /dev/null | |||
@@ -1,226 +0,0 @@ | |||
1 | /***************************************************************************** | ||
2 | * sdla_asy.h Header file for the Sangoma S508/S514 asynchronous code API | ||
3 | * | ||
4 | * Author: Gideon Hack | ||
5 | * | ||
6 | * Copyright: (c) 2000 Sangoma Technologies Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version | ||
11 | * 2 of the License, or (at your option) any later version. | ||
12 | * ============================================================================ | ||
13 | * | ||
14 | * Jan 28, 2000 Gideon Hack Initial Version | ||
15 | * | ||
16 | *****************************************************************************/ | ||
17 | |||
18 | |||
19 | #ifndef _WANPIPE_ASYNC_H | ||
20 | #define _WANPIPE_ASYNC_H | ||
21 | |||
22 | /* ---------------------------------------------------------------------------- | ||
23 | * Interface commands | ||
24 | * --------------------------------------------------------------------------*/ | ||
25 | |||
26 | #define SET_ASY_CONFIGURATION 0xE2 /* set the asychronous operational configuration */ | ||
27 | #define READ_ASY_CONFIGURATION 0xE3 /* read the current asychronous operational configuration */ | ||
28 | #define ENABLE_ASY_COMMUNICATIONS 0xE4 /* enable asychronous communications */ | ||
29 | #define DISABLE_ASY_COMMUNICATIONS 0xE5 /* disable asychronous communications */ | ||
30 | #define READ_ASY_OPERATIONAL_STATS 0xE7 /* retrieve the asychronous operational statistics */ | ||
31 | #define FLUSH_ASY_OPERATIONAL_STATS 0xE8 /* flush the asychronous operational statistics */ | ||
32 | #define TRANSMIT_ASY_BREAK_SIGNAL 0xEC /* transmit an asychronous break signal */ | ||
33 | |||
34 | |||
35 | |||
36 | /* ---------------------------------------------------------------------------- | ||
37 | * Return codes from interface commands | ||
38 | * --------------------------------------------------------------------------*/ | ||
39 | |||
40 | #define COMMAND_INVALID_FOR_PORT 0x50 /* the command is invalid for the selected port */ | ||
41 | #define DISABLE_ASY_COMMS_BEFORE_CFG 0xE1 /* communications must be disabled before setting the configuration */ | ||
42 | #define ASY_COMMS_ENABLED 0xE1 /* communications are currently enabled */ | ||
43 | #define ASY_COMMS_DISABLED 0xE1 /* communications are currently disabled */ | ||
44 | #define ASY_CFG_BEFORE_COMMS_ENABLED 0xE2 /* perform a SET_ASY_CONFIGURATION before enabling comms */ | ||
45 | #define LGTH_ASY_CFG_DATA_INVALID 0xE2 /* the length of the passed configuration data is invalid */ | ||
46 | #define INVALID_ASY_CFG_DATA 0xE3 /* the passed configuration data is invalid */ | ||
47 | #define ASY_BREAK_SIGNAL_BUSY 0xEC /* a break signal is being transmitted */ | ||
48 | |||
49 | |||
50 | |||
51 | /* ---------------------------------------------------------------------------- | ||
52 | * Constants for the SET_ASY_CONFIGURATION/READ_ASY_CONFIGURATION command | ||
53 | * --------------------------------------------------------------------------*/ | ||
54 | |||
55 | /* the asynchronous configuration structure */ | ||
56 | typedef struct { | ||
57 | unsigned long baud_rate PACKED; /* the baud rate */ | ||
58 | unsigned short line_config_options PACKED; /* line configuration options */ | ||
59 | unsigned short modem_config_options PACKED; /* modem configuration options */ | ||
60 | unsigned short asy_API_options PACKED; /* asynchronous API options */ | ||
61 | unsigned short asy_protocol_options PACKED; /* asynchronous protocol options */ | ||
62 | unsigned short Tx_bits_per_char PACKED; /* number of bits per tx character */ | ||
63 | unsigned short Rx_bits_per_char PACKED; /* number of bits per received character */ | ||
64 | unsigned short stop_bits PACKED; /* number of stop bits per character */ | ||
65 | unsigned short parity PACKED; /* parity definition */ | ||
66 | unsigned short break_timer PACKED; /* the break signal timer */ | ||
67 | unsigned short asy_Rx_inter_char_timer PACKED; /* the receive inter-character timer */ | ||
68 | unsigned short asy_Rx_complete_length PACKED; /* the receive 'buffer complete' length */ | ||
69 | unsigned short XON_char PACKED; /* the XON character */ | ||
70 | unsigned short XOFF_char PACKED; /* the XOFF character */ | ||
71 | unsigned short asy_statistics_options PACKED; /* async operational stat options */ | ||
72 | unsigned long ptr_shared_mem_info_struct PACKED;/* ptr to the shared memory area information structure */ | ||
73 | unsigned long ptr_asy_Tx_stat_el_cfg_struct PACKED;/* ptr to the transmit status element configuration structure */ | ||
74 | unsigned long ptr_asy_Rx_stat_el_cfg_struct PACKED;/* ptr to the receive status element configuration structure */ | ||
75 | } ASY_CONFIGURATION_STRUCT; | ||
76 | |||
77 | /* permitted minimum and maximum values for setting the asynchronous configuration */ | ||
78 | #define MIN_ASY_BAUD_RATE 50 /* maximum baud rate */ | ||
79 | #define MAX_ASY_BAUD_RATE 250000 /* minimum baud rate */ | ||
80 | #define MIN_ASY_BITS_PER_CHAR 5 /* minimum number of bits per character */ | ||
81 | #define MAX_ASY_BITS_PER_CHAR 8 /* maximum number of bits per character */ | ||
82 | #define MIN_BREAK_TMR_VAL 0 /* minimum break signal timer */ | ||
83 | #define MAX_BREAK_TMR_VAL 5000 /* maximum break signal timer */ | ||
84 | #define MIN_ASY_RX_INTER_CHAR_TMR 0 /* minimum receive inter-character timer */ | ||
85 | #define MAX_ASY_RX_INTER_CHAR_TMR 30000 /* maximum receive inter-character timer */ | ||
86 | #define MIN_ASY_RX_CPLT_LENGTH 0 /* minimum receive 'length complete' value */ | ||
87 | #define MAX_ASY_RX_CPLT_LENGTH 2000 /* maximum receive 'length complete' value */ | ||
88 | |||
89 | /* bit settings for the 'asy_API_options' */ | ||
90 | #define ASY_RX_DATA_TRANSPARENT 0x0001 /* do not strip parity and unused bits from received characters */ | ||
91 | |||
92 | /* bit settings for the 'asy_protocol_options' */ | ||
93 | #define ASY_RTS_HS_FOR_RX 0x0001 /* RTS handshaking is used for reception control */ | ||
94 | #define ASY_XON_XOFF_HS_FOR_RX 0x0002 /* XON/XOFF handshaking is used for reception control */ | ||
95 | #define ASY_XON_XOFF_HS_FOR_TX 0x0004 /* XON/XOFF handshaking is used for transmission control */ | ||
96 | #define ASY_DCD_HS_FOR_TX 0x0008 /* DCD handshaking is used for transmission control */ | ||
97 | #define ASY_CTS_HS_FOR_TX 0x0020 /* CTS handshaking is used for transmission control */ | ||
98 | |||
99 | /* bit settings for the 'stop_bits' definition */ | ||
100 | #define ONE_STOP_BIT 1 /* representation for 1 stop bit */ | ||
101 | #define TWO_STOP_BITS 2 /* representation for 2 stop bits */ | ||
102 | #define ONE_AND_A_HALF_STOP_BITS 3 /* representation for 1.5 stop bits */ | ||
103 | |||
104 | /* bit settings for the 'parity' definition */ | ||
105 | #define NO_PARITY 0 /* representation for no parity */ | ||
106 | #define ODD_PARITY 1 /* representation for odd parity */ | ||
107 | #define EVEN_PARITY 2 /* representation for even parity */ | ||
108 | |||
109 | |||
110 | |||
111 | /* ---------------------------------------------------------------------------- | ||
112 | * Constants for the READ_COMMS_ERROR_STATS command (asynchronous mode) | ||
113 | * --------------------------------------------------------------------------*/ | ||
114 | |||
115 | /* the communications error statistics structure */ | ||
116 | typedef struct { | ||
117 | unsigned short Rx_overrun_err_count PACKED; /* receiver overrun error count */ | ||
118 | unsigned short Rx_parity_err_count PACKED; /* parity errors received count */ | ||
119 | unsigned short Rx_framing_err_count PACKED; /* framing errors received count */ | ||
120 | unsigned short comms_err_stat_reserved_1 PACKED;/* reserved for later use */ | ||
121 | unsigned short comms_err_stat_reserved_2 PACKED;/* reserved for later use */ | ||
122 | unsigned short comms_err_stat_reserved_3 PACKED;/* reserved for later use */ | ||
123 | unsigned short comms_err_stat_reserved_4 PACKED;/* reserved for later use */ | ||
124 | unsigned short comms_err_stat_reserved_5 PACKED;/* reserved for later use */ | ||
125 | unsigned short DCD_state_change_count PACKED; /* DCD state change count */ | ||
126 | unsigned short CTS_state_change_count PACKED; /* CTS state change count */ | ||
127 | } ASY_COMMS_ERROR_STATS_STRUCT; | ||
128 | |||
129 | |||
130 | |||
131 | /* ---------------------------------------------------------------------------- | ||
132 | * Constants for the READ_ASY_OPERATIONAL_STATS command | ||
133 | * --------------------------------------------------------------------------*/ | ||
134 | |||
135 | /* the asynchronous operational statistics structure */ | ||
136 | typedef struct { | ||
137 | |||
138 | /* Data transmission statistics */ | ||
139 | unsigned long Data_blocks_Tx_count PACKED;/* number of blocks transmitted */ | ||
140 | unsigned long Data_bytes_Tx_count PACKED;/* number of bytes transmitted */ | ||
141 | unsigned long Data_Tx_throughput PACKED;/* transmit throughput */ | ||
142 | unsigned long no_ms_for_Data_Tx_thruput_comp PACKED;/* millisecond time used for the Tx throughput computation */ | ||
143 | unsigned long Tx_Data_discard_lgth_err_count PACKED;/* number of Data blocks discarded (length error) */ | ||
144 | unsigned long reserved_Data_frm_Tx_stat1 PACKED;/* reserved for later use */ | ||
145 | unsigned long reserved_Data_frm_Tx_stat2 PACKED;/* reserved for later use */ | ||
146 | unsigned long reserved_Data_frm_Tx_stat3 PACKED;/* reserved for later use */ | ||
147 | |||
148 | /* Data reception statistics */ | ||
149 | unsigned long Data_blocks_Rx_count PACKED;/* number of blocks received */ | ||
150 | unsigned long Data_bytes_Rx_count PACKED;/* number of bytes received */ | ||
151 | unsigned long Data_Rx_throughput PACKED;/* receive throughput */ | ||
152 | unsigned long no_ms_for_Data_Rx_thruput_comp PACKED;/* millisecond time used for the Rx throughput computation */ | ||
153 | unsigned long Rx_Data_bytes_discard_count PACKED;/* received Data bytes discarded */ | ||
154 | unsigned long reserved_Data_frm_Rx_stat1 PACKED;/* reserved for later use */ | ||
155 | |||
156 | /* handshaking protocol statistics */ | ||
157 | unsigned short XON_chars_Tx_count PACKED; /* number of XON characters transmitted */ | ||
158 | unsigned short XOFF_chars_Tx_count PACKED; /* number of XOFF characters transmitted */ | ||
159 | unsigned short XON_chars_Rx_count PACKED; /* number of XON characters received */ | ||
160 | unsigned short XOFF_chars_Rx_count PACKED; /* number of XOFF characters received */ | ||
161 | unsigned short Tx_halt_modem_low_count PACKED; /* number of times Tx halted (modem line low) */ | ||
162 | unsigned short Rx_halt_RTS_low_count PACKED; /* number of times Rx halted by setting RTS low */ | ||
163 | unsigned long reserved_handshaking_stat1 PACKED;/* reserved for later use */ | ||
164 | |||
165 | /* break statistics */ | ||
166 | unsigned short break_Tx_count PACKED; /* number of break sequences transmitted */ | ||
167 | unsigned short break_Rx_count PACKED; /* number of break sequences received */ | ||
168 | unsigned long reserved_break_stat1 PACKED;/* reserved for later use */ | ||
169 | |||
170 | /* miscellaneous statistics */ | ||
171 | unsigned long reserved_misc_stat1 PACKED; /* reserved for later use */ | ||
172 | unsigned long reserved_misc_stat2 PACKED; /* reserved for later use */ | ||
173 | |||
174 | } ASY_OPERATIONAL_STATS_STRUCT; | ||
175 | |||
176 | |||
177 | |||
178 | /* ---------------------------------------------------------------------------- | ||
179 | * Constants for Data transmission | ||
180 | * --------------------------------------------------------------------------*/ | ||
181 | |||
182 | /* the Data block transmit status element configuration structure */ | ||
183 | typedef struct { | ||
184 | unsigned short number_Tx_status_elements PACKED; /* number of transmit status elements */ | ||
185 | unsigned long base_addr_Tx_status_elements PACKED; /* base address of the transmit element list */ | ||
186 | unsigned long next_Tx_status_element_to_use PACKED; /* pointer to the next transmit element to be used */ | ||
187 | } ASY_TX_STATUS_EL_CFG_STRUCT; | ||
188 | |||
189 | |||
190 | /* the Data block transmit status element structure */ | ||
191 | typedef struct { | ||
192 | unsigned char opp_flag PACKED; /* opp flag */ | ||
193 | unsigned short data_length PACKED; /* length of the block to be transmitted */ | ||
194 | unsigned char reserved_1 PACKED; /* reserved for internal use */ | ||
195 | unsigned long reserved_2 PACKED; /* reserved for internal use */ | ||
196 | unsigned long reserved_3 PACKED; /* reserved for internal use */ | ||
197 | unsigned long ptr_data_bfr PACKED; /* pointer to the data area */ | ||
198 | } ASY_DATA_TX_STATUS_EL_STRUCT; | ||
199 | |||
200 | |||
201 | |||
202 | /* ---------------------------------------------------------------------------- | ||
203 | * Constants for Data reception | ||
204 | * --------------------------------------------------------------------------*/ | ||
205 | |||
206 | /* the Data block receive status element configuration structure */ | ||
207 | typedef struct { | ||
208 | unsigned short number_Rx_status_elements PACKED;/* number of receive status elements */ | ||
209 | unsigned long base_addr_Rx_status_elements PACKED;/* base address of the receive element list */ | ||
210 | unsigned long next_Rx_status_element_to_use PACKED;/* pointer to the next receive element to be used */ | ||
211 | unsigned long base_addr_Rx_buffer PACKED;/* base address of the receive data buffer */ | ||
212 | unsigned long end_addr_Rx_buffer PACKED;/* end address of the receive data buffer */ | ||
213 | } ASY_RX_STATUS_EL_CFG_STRUCT; | ||
214 | |||
215 | /* the Data block receive status element structure */ | ||
216 | typedef struct { | ||
217 | unsigned char opp_flag PACKED; /* opp flag */ | ||
218 | unsigned short data_length PACKED; /* length of the received data block */ | ||
219 | unsigned char reserved_1 PACKED; /* reserved for internal use */ | ||
220 | unsigned short time_stamp PACKED; /* receive time stamp (HDLC_STREAMING_MODE) */ | ||
221 | unsigned short data_buffered PACKED; /* the number of data bytes still buffered */ | ||
222 | unsigned long reserved_2 PACKED; /* reserved for internal use */ | ||
223 | unsigned long ptr_data_bfr PACKED; /* pointer to the data area */ | ||
224 | } ASY_DATA_RX_STATUS_EL_STRUCT; | ||
225 | |||
226 | #endif | ||
diff --git a/include/linux/sdla_chdlc.h b/include/linux/sdla_chdlc.h deleted file mode 100644 index d2e35a299034..000000000000 --- a/include/linux/sdla_chdlc.h +++ /dev/null | |||
@@ -1,813 +0,0 @@ | |||
1 | /************************************************************************* | ||
2 | sdla_chdlc.h Sangoma Cisco HDLC firmware API definitions | ||
3 | |||
4 | Author: Gideon Hack | ||
5 | Nenad Corbic <ncorbic@sangoma.com> | ||
6 | |||
7 | Copyright: (c) 1995-2000 Sangoma Technologies Inc. | ||
8 | |||
9 | This program is free software; you can redistribute it and/or | ||
10 | modify it under the term of the GNU General Public License | ||
11 | as published by the Free Software Foundation; either version | ||
12 | 2 of the License, or (at your option) any later version. | ||
13 | |||
14 | =========================================================================== | ||
15 | Oct 04, 1999 Nenad Corbic Updated API support | ||
16 | Jun 02, 1999 Gideon Hack Changes for S514 usage. | ||
17 | Oct 28, 1998 Jaspreet Singh Made changes for Dual Port CHDLC. | ||
18 | Jun 11, 1998 David Fong Initial version. | ||
19 | =========================================================================== | ||
20 | |||
21 | Organization | ||
22 | - Compatibility notes | ||
23 | - Constants defining the shared memory control block (mailbox) | ||
24 | - Interface commands | ||
25 | - Return code from interface commands | ||
26 | - Constants for the commands (structures for casting data) | ||
27 | - UDP Management constants and structures | ||
28 | |||
29 | *************************************************************************/ | ||
30 | |||
31 | #ifndef _SDLA_CHDLC_H | ||
32 | # define _SDLC_CHDLC_H | ||
33 | |||
34 | /*------------------------------------------------------------------------ | ||
35 | Notes: | ||
36 | |||
37 | All structres defined in this file are byte-aligned. | ||
38 | |||
39 | Compiler Platform | ||
40 | ------------------------ | ||
41 | GNU C Linux | ||
42 | |||
43 | ------------------------------------------------------------------------*/ | ||
44 | |||
45 | #ifndef PACKED | ||
46 | #define PACKED __attribute__((packed)) | ||
47 | #endif /* PACKED */ | ||
48 | |||
49 | |||
50 | /* ---------------------------------------------------------------------------- | ||
51 | * Constants defining the shared memory control block (mailbox) | ||
52 | * --------------------------------------------------------------------------*/ | ||
53 | |||
54 | #define PRI_BASE_ADDR_MB_STRUCT 0xE000 /* the base address of the mailbox structure on the adapter */ | ||
55 | #define SEC_BASE_ADDR_MB_STRUCT 0xE800 /* the base address of the mailbox structure on the adapter */ | ||
56 | #define SIZEOF_MB_DATA_BFR 2032 /* the size of the actual mailbox data area */ | ||
57 | #define NUMBER_MB_RESERVED_BYTES 0x0B /* the number of reserved bytes in the mailbox header area */ | ||
58 | |||
59 | |||
60 | #define MIN_LGTH_CHDLC_DATA_CFG 300 /* min length of the CHDLC data field (for configuration purposes) */ | ||
61 | #define PRI_MAX_NO_DATA_BYTES_IN_FRAME 15354 /* PRIMARY - max length of the CHDLC data field */ | ||
62 | |||
63 | typedef struct { | ||
64 | unsigned char opp_flag PACKED; /* the opp flag */ | ||
65 | unsigned char command PACKED; /* the user command */ | ||
66 | unsigned short buffer_length PACKED; /* the data length */ | ||
67 | unsigned char return_code PACKED; /* the return code */ | ||
68 | unsigned char MB_reserved[NUMBER_MB_RESERVED_BYTES] PACKED; /* reserved for later */ | ||
69 | unsigned char data[SIZEOF_MB_DATA_BFR] PACKED; /* the data area */ | ||
70 | } CHDLC_MAILBOX_STRUCT; | ||
71 | |||
72 | typedef struct { | ||
73 | pid_t pid_num PACKED; | ||
74 | CHDLC_MAILBOX_STRUCT cmdarea PACKED; | ||
75 | |||
76 | } CMDBLOCK_STRUCT; | ||
77 | |||
78 | |||
79 | |||
80 | |||
81 | /* ---------------------------------------------------------------------------- | ||
82 | * Interface commands | ||
83 | * --------------------------------------------------------------------------*/ | ||
84 | |||
85 | /* global interface commands */ | ||
86 | #define READ_GLOBAL_EXCEPTION_CONDITION 0x01 | ||
87 | #define SET_GLOBAL_CONFIGURATION 0x02 | ||
88 | #define READ_GLOBAL_CONFIGURATION 0x03 | ||
89 | #define READ_GLOBAL_STATISTICS 0x04 | ||
90 | #define FLUSH_GLOBAL_STATISTICS 0x05 | ||
91 | #define SET_MODEM_STATUS 0x06 /* set status of DTR or RTS */ | ||
92 | #define READ_MODEM_STATUS 0x07 /* read status of CTS and DCD */ | ||
93 | #define READ_COMMS_ERROR_STATS 0x08 | ||
94 | #define FLUSH_COMMS_ERROR_STATS 0x09 | ||
95 | #define SET_TRACE_CONFIGURATION 0x0A /* set the line trace config */ | ||
96 | #define READ_TRACE_CONFIGURATION 0x0B /* read the line trace config */ | ||
97 | #define READ_TRACE_STATISTICS 0x0C /* read the trace statistics */ | ||
98 | #define FLUSH_TRACE_STATISTICS 0x0D /* flush the trace statistics */ | ||
99 | #define FT1_MONITOR_STATUS_CTRL 0x1C /* set the status of the S508/FT1 monitoring */ | ||
100 | #define SET_FT1_CONFIGURATION 0x18 /* set the FT1 configuration */ | ||
101 | #define READ_FT1_CONFIGURATION 0x19 /* read the FT1 configuration */ | ||
102 | #define TRANSMIT_ASYNC_DATA_TO_FT1 0x1A /* output asynchronous data to the FT1 */ | ||
103 | #define RECEIVE_ASYNC_DATA_FROM_FT1 0x1B /* receive asynchronous data from the FT1 */ | ||
104 | #define FT1_MONITOR_STATUS_CTRL 0x1C /* set the status of the FT1 monitoring */ | ||
105 | |||
106 | #define READ_FT1_OPERATIONAL_STATS 0x1D /* read the S508/FT1 operational statistics */ | ||
107 | #define SET_FT1_MODE 0x1E /* set the operational mode of the S508/FT1 module */ | ||
108 | |||
109 | /* CHDLC-level interface commands */ | ||
110 | #define READ_CHDLC_CODE_VERSION 0x20 | ||
111 | #define READ_CHDLC_EXCEPTION_CONDITION 0x21 /* read exception condition from the adapter */ | ||
112 | #define SET_CHDLC_CONFIGURATION 0x22 | ||
113 | #define READ_CHDLC_CONFIGURATION 0x23 | ||
114 | #define ENABLE_CHDLC_COMMUNICATIONS 0x24 | ||
115 | #define DISABLE_CHDLC_COMMUNICATIONS 0x25 | ||
116 | #define READ_CHDLC_LINK_STATUS 0x26 | ||
117 | #define READ_CHDLC_OPERATIONAL_STATS 0x27 | ||
118 | #define FLUSH_CHDLC_OPERATIONAL_STATS 0x28 | ||
119 | #define SET_CHDLC_INTERRUPT_TRIGGERS 0x30 /* set application interrupt triggers */ | ||
120 | #define READ_CHDLC_INTERRUPT_TRIGGERS 0x31 /* read application interrupt trigger configuration */ | ||
121 | |||
122 | /* Special UDP drivers management commands */ | ||
123 | #define CPIPE_ENABLE_TRACING 0x50 | ||
124 | #define CPIPE_DISABLE_TRACING 0x51 | ||
125 | #define CPIPE_GET_TRACE_INFO 0x52 | ||
126 | #define CPIPE_GET_IBA_DATA 0x53 | ||
127 | #define CPIPE_FT1_READ_STATUS 0x54 | ||
128 | #define CPIPE_DRIVER_STAT_IFSEND 0x55 | ||
129 | #define CPIPE_DRIVER_STAT_INTR 0x56 | ||
130 | #define CPIPE_DRIVER_STAT_GEN 0x57 | ||
131 | #define CPIPE_FLUSH_DRIVER_STATS 0x58 | ||
132 | #define CPIPE_ROUTER_UP_TIME 0x59 | ||
133 | |||
134 | /* Driver specific commands for API */ | ||
135 | #define CHDLC_READ_TRACE_DATA 0xE4 /* read trace data */ | ||
136 | #define TRACE_ALL 0x00 | ||
137 | #define TRACE_PROT 0x01 | ||
138 | #define TRACE_DATA 0x02 | ||
139 | |||
140 | #define DISCARD_RX_ERROR_FRAMES 0x0001 | ||
141 | |||
142 | /* ---------------------------------------------------------------------------- | ||
143 | * Return codes from interface commands | ||
144 | * --------------------------------------------------------------------------*/ | ||
145 | |||
146 | #define COMMAND_OK 0x00 | ||
147 | |||
148 | /* return codes from global interface commands */ | ||
149 | #define NO_GLOBAL_EXCEP_COND_TO_REPORT 0x01 /* there is no CHDLC exception condition to report */ | ||
150 | #define LGTH_GLOBAL_CFG_DATA_INVALID 0x01 /* the length of the passed global configuration data is invalid */ | ||
151 | #define LGTH_TRACE_CFG_DATA_INVALID 0x01 /* the length of the passed trace configuration data is invalid */ | ||
152 | #define IRQ_TIMEOUT_VALUE_INVALID 0x02 /* an invalid application IRQ timeout value was selected */ | ||
153 | #define TRACE_CONFIG_INVALID 0x02 /* the passed line trace configuration is invalid */ | ||
154 | #define ADAPTER_OPERATING_FREQ_INVALID 0x03 /* an invalid adapter operating frequency was selected */ | ||
155 | #define TRC_DEAC_TMR_INVALID 0x03 /* the trace deactivation timer is invalid */ | ||
156 | #define S508_FT1_ADPTR_NOT_PRESENT 0x0C /* the S508/FT1 adapter is not present */ | ||
157 | #define INVALID_FT1_STATUS_SELECTION 0x0D /* the S508/FT1 status selection is invalid */ | ||
158 | #define FT1_OP_STATS_NOT_ENABLED 0x0D /* the FT1 operational statistics have not been enabled */ | ||
159 | #define FT1_OP_STATS_NOT_AVAILABLE 0x0E /* the FT1 operational statistics are not currently available */ | ||
160 | #define S508_FT1_MODE_SELECTION_BUSY 0x0E /* the S508/FT1 adapter is busy selecting the operational mode */ | ||
161 | |||
162 | /* return codes from command READ_GLOBAL_EXCEPTION_CONDITION */ | ||
163 | #define EXCEP_MODEM_STATUS_CHANGE 0x10 /* a modem status change occurred */ | ||
164 | #define EXCEP_TRC_DISABLED 0x11 /* the trace has been disabled */ | ||
165 | #define EXCEP_IRQ_TIMEOUT 0x12 /* IRQ timeout */ | ||
166 | |||
167 | /* return codes from CHDLC-level interface commands */ | ||
168 | #define NO_CHDLC_EXCEP_COND_TO_REPORT 0x21 /* there is no CHDLC exception condition to report */ | ||
169 | #define CHDLC_COMMS_DISABLED 0x21 /* communications are not currently enabled */ | ||
170 | #define CHDLC_COMMS_ENABLED 0x21 /* communications are currently enabled */ | ||
171 | #define DISABLE_CHDLC_COMMS_BEFORE_CFG 0x21 /* CHDLC communications must be disabled before setting the configuration */ | ||
172 | #define ENABLE_CHDLC_COMMS_BEFORE_CONN 0x21 /* communications must be enabled before using the CHDLC_CONNECT conmmand */ | ||
173 | #define CHDLC_CFG_BEFORE_COMMS_ENABLED 0x22 /* perform a SET_CHDLC_CONFIGURATION before enabling comms */ | ||
174 | #define LGTH_CHDLC_CFG_DATA_INVALID 0x22 /* the length of the passed CHDLC configuration data is invalid */ | ||
175 | #define LGTH_INT_TRIGGERS_DATA_INVALID 0x22 /* the length of the passed interrupt trigger data is invalid */ | ||
176 | #define INVALID_IRQ_SELECTED 0x23 /* in invalid IRQ was selected in the SET_CHDLC_INTERRUPT_TRIGGERS */ | ||
177 | #define INVALID_CHDLC_CFG_DATA 0x23 /* the passed CHDLC configuration data is invalid */ | ||
178 | #define IRQ_TMR_VALUE_INVALID 0x24 /* an invalid application IRQ timer value was selected */ | ||
179 | #define LARGER_PERCENT_TX_BFR_REQUIRED 0x24 /* a larger Tx buffer percentage is required */ | ||
180 | #define LARGER_PERCENT_RX_BFR_REQUIRED 0x25 /* a larger Rx buffer percentage is required */ | ||
181 | #define S514_BOTH_PORTS_SAME_CLK_MODE 0x26 /* S514 - both ports must have same clock mode */ | ||
182 | #define INVALID_CMND_HDLC_STREAM_MODE 0x4E /* the CHDLC interface command is invalid for HDLC streaming mode */ | ||
183 | #define INVALID_CHDLC_COMMAND 0x4F /* the defined CHDLC interface command is invalid */ | ||
184 | |||
185 | /* return codes from command READ_CHDLC_EXCEPTION_CONDITION */ | ||
186 | #define EXCEP_LINK_ACTIVE 0x30 /* the CHDLC link has become active */ | ||
187 | #define EXCEP_LINK_INACTIVE_MODEM 0x31 /* the CHDLC link has become inactive (modem status) */ | ||
188 | #define EXCEP_LINK_INACTIVE_KPALV 0x32 /* the CHDLC link has become inactive (keepalive status) */ | ||
189 | #define EXCEP_IP_ADDRESS_DISCOVERED 0x33 /* the IP address has been discovered */ | ||
190 | #define EXCEP_LOOPBACK_CONDITION 0x34 /* a loopback condition has occurred */ | ||
191 | |||
192 | |||
193 | /* return code from command CHDLC_SEND_WAIT and CHDLC_SEND_NO_WAIT */ | ||
194 | #define LINK_DISCONNECTED 0x21 | ||
195 | #define NO_TX_BFRS_AVAIL 0x24 | ||
196 | |||
197 | |||
198 | /* ---------------------------------------------------------------------------- | ||
199 | * Constants for the SET_GLOBAL_CONFIGURATION/READ_GLOBAL_CONFIGURATION commands | ||
200 | * --------------------------------------------------------------------------*/ | ||
201 | |||
202 | /* the global configuration structure */ | ||
203 | typedef struct { | ||
204 | unsigned short adapter_config_options PACKED; /* adapter config options */ | ||
205 | unsigned short app_IRQ_timeout PACKED; /* application IRQ timeout */ | ||
206 | unsigned long adapter_operating_frequency PACKED; /* adapter operating frequency */ | ||
207 | } GLOBAL_CONFIGURATION_STRUCT; | ||
208 | |||
209 | /* settings for the 'app_IRQ_timeout' */ | ||
210 | #define MAX_APP_IRQ_TIMEOUT_VALUE 5000 /* the maximum permitted IRQ timeout */ | ||
211 | |||
212 | |||
213 | |||
214 | /* ---------------------------------------------------------------------------- | ||
215 | * Constants for the READ_GLOBAL_STATISTICS command | ||
216 | * --------------------------------------------------------------------------*/ | ||
217 | |||
218 | /* the global statistics structure */ | ||
219 | typedef struct { | ||
220 | unsigned short app_IRQ_timeout_count PACKED; | ||
221 | } GLOBAL_STATS_STRUCT; | ||
222 | |||
223 | |||
224 | |||
225 | /* ---------------------------------------------------------------------------- | ||
226 | * Constants for the READ_COMMS_ERROR_STATS command | ||
227 | * --------------------------------------------------------------------------*/ | ||
228 | |||
229 | /* the communications error statistics structure */ | ||
230 | typedef struct { | ||
231 | unsigned short Rx_overrun_err_count PACKED; | ||
232 | unsigned short CRC_err_count PACKED; /* receiver CRC error count */ | ||
233 | unsigned short Rx_abort_count PACKED; /* abort frames recvd count */ | ||
234 | unsigned short Rx_dis_pri_bfrs_full_count PACKED;/* receiver disabled */ | ||
235 | unsigned short comms_err_stat_reserved_1 PACKED;/* reserved for later */ | ||
236 | unsigned short sec_Tx_abort_msd_Tx_int_count PACKED; /* secondary - abort frames transmitted count (missed Tx interrupt) */ | ||
237 | unsigned short missed_Tx_und_int_count PACKED; /* missed tx underrun interrupt count */ | ||
238 | unsigned short sec_Tx_abort_count PACKED; /*secondary-abort frames tx count */ | ||
239 | unsigned short DCD_state_change_count PACKED; /* DCD state change */ | ||
240 | unsigned short CTS_state_change_count PACKED; /* CTS state change */ | ||
241 | } COMMS_ERROR_STATS_STRUCT; | ||
242 | |||
243 | |||
244 | |||
245 | /* ---------------------------------------------------------------------------- | ||
246 | * Constants used for line tracing | ||
247 | * --------------------------------------------------------------------------*/ | ||
248 | |||
249 | /* the trace configuration structure (SET_TRACE_CONFIGURATION/READ_TRACE_CONFIGURATION commands) */ | ||
250 | typedef struct { | ||
251 | unsigned char trace_config PACKED; /* trace configuration */ | ||
252 | unsigned short trace_deactivation_timer PACKED; /* trace deactivation timer */ | ||
253 | unsigned long ptr_trace_stat_el_cfg_struct PACKED; /* a pointer to the line trace element configuration structure */ | ||
254 | } LINE_TRACE_CONFIG_STRUCT; | ||
255 | |||
256 | /* 'trace_config' bit settings */ | ||
257 | #define TRACE_INACTIVE 0x00 /* trace is inactive */ | ||
258 | #define TRACE_ACTIVE 0x01 /* trace is active */ | ||
259 | #define TRACE_DELAY_MODE 0x04 /* operate the trace in delay mode */ | ||
260 | #define TRACE_DATA_FRAMES 0x08 /* trace Data frames */ | ||
261 | #define TRACE_SLARP_FRAMES 0x10 /* trace SLARP frames */ | ||
262 | #define TRACE_CDP_FRAMES 0x20 /* trace CDP frames */ | ||
263 | |||
264 | /* the line trace status element configuration structure */ | ||
265 | typedef struct { | ||
266 | unsigned short number_trace_status_elements PACKED; /* number of line trace elements */ | ||
267 | unsigned long base_addr_trace_status_elements PACKED; /* base address of the trace element list */ | ||
268 | unsigned long next_trace_element_to_use PACKED; /* pointer to the next trace element to be used */ | ||
269 | unsigned long base_addr_trace_buffer PACKED; /* base address of the trace data buffer */ | ||
270 | unsigned long end_addr_trace_buffer PACKED; /* end address of the trace data buffer */ | ||
271 | } TRACE_STATUS_EL_CFG_STRUCT; | ||
272 | |||
273 | /* the line trace status element structure */ | ||
274 | typedef struct { | ||
275 | unsigned char opp_flag PACKED; /* opp flag */ | ||
276 | unsigned short trace_length PACKED; /* trace length */ | ||
277 | unsigned char trace_type PACKED; /* trace type */ | ||
278 | unsigned short trace_time_stamp PACKED; /* time stamp */ | ||
279 | unsigned short trace_reserved_1 PACKED; /* reserved for later use */ | ||
280 | unsigned long trace_reserved_2 PACKED; /* reserved for later use */ | ||
281 | unsigned long ptr_data_bfr PACKED; /* ptr to the trace data buffer */ | ||
282 | } TRACE_STATUS_ELEMENT_STRUCT; | ||
283 | |||
284 | /* "trace_type" bit settings */ | ||
285 | #define TRACE_INCOMING 0x00 | ||
286 | #define TRACE_OUTGOINGING 0x01 | ||
287 | #define TRACE_INCOMING_ABORTED 0x10 | ||
288 | #define TRACE_INCOMING_CRC_ERROR 0x20 | ||
289 | #define TRACE_INCOMING_OVERRUN_ERROR 0x40 | ||
290 | |||
291 | |||
292 | |||
293 | /* the line trace statistics structure */ | ||
294 | typedef struct { | ||
295 | unsigned long frames_traced_count PACKED; /* number of frames traced */ | ||
296 | unsigned long trc_frms_not_recorded_count PACKED; /* number of trace frames discarded */ | ||
297 | } LINE_TRACE_STATS_STRUCT; | ||
298 | |||
299 | |||
300 | /* ---------------------------------------------------------------------------- | ||
301 | * Constants for the FT1_MONITOR_STATUS_CTRL command | ||
302 | * --------------------------------------------------------------------------*/ | ||
303 | |||
304 | #define DISABLE_FT1_STATUS_STATISTICS 0x00 /* disable the FT1 status and statistics monitoring */ | ||
305 | #define ENABLE_READ_FT1_STATUS 0x01 /* read the FT1 operational status */ | ||
306 | #define ENABLE_READ_FT1_OP_STATS 0x02 /* read the FT1 operational statistics */ | ||
307 | #define FLUSH_FT1_OP_STATS 0x04 /* flush the FT1 operational statistics */ | ||
308 | |||
309 | |||
310 | |||
311 | |||
312 | /* ---------------------------------------------------------------------------- | ||
313 | * Constants for the SET_CHDLC_CONFIGURATION command | ||
314 | * --------------------------------------------------------------------------*/ | ||
315 | |||
316 | /* the CHDLC configuration structure */ | ||
317 | typedef struct { | ||
318 | unsigned long baud_rate PACKED; /* the baud rate */ | ||
319 | unsigned short line_config_options PACKED; /* line configuration options */ | ||
320 | unsigned short modem_config_options PACKED; /* modem configration options */ | ||
321 | unsigned short modem_status_timer PACKED; /* timer for monitoring modem status changes */ | ||
322 | unsigned short CHDLC_API_options PACKED; /* CHDLC API options */ | ||
323 | unsigned short CHDLC_protocol_options PACKED; /* CHDLC protocol options */ | ||
324 | unsigned short percent_data_buffer_for_Tx PACKED; /* percentage data buffering used for Tx */ | ||
325 | unsigned short CHDLC_statistics_options PACKED; /* CHDLC operational statistics options */ | ||
326 | unsigned short max_CHDLC_data_field_length PACKED; /* the maximum length of the CHDLC Data field */ | ||
327 | unsigned short transmit_keepalive_timer PACKED; /* the transmit keepalive timer */ | ||
328 | unsigned short receive_keepalive_timer PACKED; /* the receive keepalive timer */ | ||
329 | unsigned short keepalive_error_tolerance PACKED; /* the receive keepalive error tolerance */ | ||
330 | unsigned short SLARP_request_timer PACKED; /* the SLARP request timer */ | ||
331 | unsigned long IP_address PACKED; /* the IP address */ | ||
332 | unsigned long IP_netmask PACKED; /* the IP netmask */ | ||
333 | unsigned long ptr_shared_mem_info_struct PACKED; /* a pointer to the shared memory area information structure */ | ||
334 | unsigned long ptr_CHDLC_Tx_stat_el_cfg_struct PACKED; /* a pointer to the transmit status element configuration structure */ | ||
335 | unsigned long ptr_CHDLC_Rx_stat_el_cfg_struct PACKED; /* a pointer to the receive status element configuration structure */ | ||
336 | } CHDLC_CONFIGURATION_STRUCT; | ||
337 | |||
338 | /* settings for the 'line_config_options' */ | ||
339 | #define INTERFACE_LEVEL_V35 0x0000 /* V.35 interface level */ | ||
340 | #define INTERFACE_LEVEL_RS232 0x0001 /* RS-232 interface level */ | ||
341 | |||
342 | /* settings for the 'modem_config_options' */ | ||
343 | |||
344 | #define DONT_RAISE_DTR_RTS_ON_EN_COMMS 0x0001 | ||
345 | /* don't automatically raise DTR and RTS when performing an | ||
346 | ENABLE_CHDLC_COMMUNICATIONS command */ | ||
347 | |||
348 | #define DONT_REPORT_CHG_IN_MODEM_STAT 0x0002 | ||
349 | /* don't report changes in modem status to the application */ | ||
350 | |||
351 | |||
352 | /* bit settings for the 'CHDLC_protocol_options' byte */ | ||
353 | |||
354 | #define IGNORE_DCD_FOR_LINK_STAT 0x0001 | ||
355 | /* ignore DCD in determining the CHDLC link status */ | ||
356 | |||
357 | #define IGNORE_CTS_FOR_LINK_STAT 0x0002 | ||
358 | /* ignore CTS in determining the CHDLC link status */ | ||
359 | |||
360 | #define IGNORE_KPALV_FOR_LINK_STAT 0x0004 | ||
361 | /* ignore keepalive frames in determining the CHDLC link status */ | ||
362 | |||
363 | #define SINGLE_TX_BUFFER 0x4000 | ||
364 | /* configure a single transmit buffer */ | ||
365 | |||
366 | #define HDLC_STREAMING_MODE 0x8000 | ||
367 | |||
368 | /* settings for the 'CHDLC_statistics_options' */ | ||
369 | |||
370 | #define CHDLC_TX_DATA_BYTE_COUNT_STAT 0x0001 | ||
371 | /* record the number of Data bytes transmitted */ | ||
372 | |||
373 | #define CHDLC_RX_DATA_BYTE_COUNT_STAT 0x0002 | ||
374 | /* record the number of Data bytes received */ | ||
375 | |||
376 | #define CHDLC_TX_THROUGHPUT_STAT 0x0004 | ||
377 | /* compute the Data frame transmit throughput */ | ||
378 | |||
379 | #define CHDLC_RX_THROUGHPUT_STAT 0x0008 | ||
380 | /* compute the Data frame receive throughput */ | ||
381 | |||
382 | |||
383 | /* permitted minimum and maximum values for setting the CHDLC configuration */ | ||
384 | #define PRI_MAX_BAUD_RATE_S508 2666666 /* PRIMARY - maximum baud rate (S508) */ | ||
385 | #define SEC_MAX_BAUD_RATE_S508 258064 /* SECONDARY - maximum baud rate (S508) */ | ||
386 | #define PRI_MAX_BAUD_RATE_S514 2750000 /* PRIMARY - maximum baud rate (S508) */ | ||
387 | #define SEC_MAX_BAUD_RATE_S514 515625 /* SECONDARY - maximum baud rate (S508) */ | ||
388 | |||
389 | #define MIN_MODEM_TIMER 0 /* minimum modem status timer */ | ||
390 | #define MAX_MODEM_TIMER 5000 /* maximum modem status timer */ | ||
391 | |||
392 | #define SEC_MAX_NO_DATA_BYTES_IN_FRAME 2048 /* SECONDARY - max length of the CHDLC data field */ | ||
393 | |||
394 | #define MIN_Tx_KPALV_TIMER 0 /* minimum transmit keepalive timer */ | ||
395 | #define MAX_Tx_KPALV_TIMER 60000 /* maximum transmit keepalive timer */ | ||
396 | #define DEFAULT_Tx_KPALV_TIMER 10000 /* default transmit keepalive timer */ | ||
397 | |||
398 | #define MIN_Rx_KPALV_TIMER 10 /* minimum receive keepalive timer */ | ||
399 | #define MAX_Rx_KPALV_TIMER 60000 /* maximum receive keepalive timer */ | ||
400 | #define DEFAULT_Rx_KPALV_TIMER 10000 /* default receive keepalive timer */ | ||
401 | |||
402 | #define MIN_KPALV_ERR_TOL 1 /* min kpalv error tolerance count */ | ||
403 | #define MAX_KPALV_ERR_TOL 20 /* max kpalv error tolerance count */ | ||
404 | #define DEFAULT_KPALV_ERR_TOL 3 /* default value */ | ||
405 | |||
406 | #define MIN_SLARP_REQ_TIMER 0 /* min transmit SLARP Request timer */ | ||
407 | #define MAX_SLARP_REQ_TIMER 60000 /* max transmit SLARP Request timer */ | ||
408 | #define DEFAULT_SLARP_REQ_TIMER 0 /* default value -- no SLARP */ | ||
409 | |||
410 | |||
411 | |||
412 | /* ---------------------------------------------------------------------------- | ||
413 | * Constants for the READ_CHDLC_LINK_STATUS command | ||
414 | * --------------------------------------------------------------------------*/ | ||
415 | |||
416 | /* the CHDLC status structure */ | ||
417 | typedef struct { | ||
418 | unsigned char CHDLC_link_status PACKED; /* CHDLC link status */ | ||
419 | unsigned char no_Data_frms_for_app PACKED; /* number of Data frames available for the application */ | ||
420 | unsigned char receiver_status PACKED; /* enabled/disabled */ | ||
421 | unsigned char SLARP_state PACKED; /* internal SLARP state */ | ||
422 | } CHDLC_LINK_STATUS_STRUCT; | ||
423 | |||
424 | /* settings for the 'CHDLC_link_status' variable */ | ||
425 | #define CHDLC_LINK_INACTIVE 0x00 /* the CHDLC link is inactive */ | ||
426 | #define CHDLC_LINK_ACTIVE 0x01 /* the CHDLC link is active */ | ||
427 | |||
428 | |||
429 | |||
430 | /* ---------------------------------------------------------------------------- | ||
431 | * Constants for the READ_CHDLC_OPERATIONAL_STATS command | ||
432 | * --------------------------------------------------------------------------*/ | ||
433 | |||
434 | /* the CHDLC operational statistics structure */ | ||
435 | typedef struct { | ||
436 | |||
437 | /* Data frame transmission statistics */ | ||
438 | unsigned long Data_frames_Tx_count PACKED; /* # of frames transmitted */ | ||
439 | unsigned long Data_bytes_Tx_count PACKED; /* # of bytes transmitted */ | ||
440 | unsigned long Data_Tx_throughput PACKED; /* transmit throughput */ | ||
441 | unsigned long no_ms_for_Data_Tx_thruput_comp PACKED; /* millisecond time used for the Tx throughput computation */ | ||
442 | unsigned long Tx_Data_discard_lgth_err_count PACKED; /* number of Data frames discarded (length error) */ | ||
443 | unsigned long reserved_Data_frm_Tx_stat1 PACKED; /* reserved for later */ | ||
444 | unsigned long reserved_Data_frm_Tx_stat2 PACKED; /* reserved for later */ | ||
445 | unsigned long reserved_Data_frm_Tx_stat3 PACKED; /* reserved for later */ | ||
446 | |||
447 | /* Data frame reception statistics */ | ||
448 | unsigned long Data_frames_Rx_count PACKED; /* number of frames received */ | ||
449 | unsigned long Data_bytes_Rx_count PACKED; /* number of bytes received */ | ||
450 | unsigned long Data_Rx_throughput PACKED; /* receive throughput */ | ||
451 | unsigned long no_ms_for_Data_Rx_thruput_comp PACKED; /* millisecond time used for the Rx throughput computation */ | ||
452 | unsigned long Rx_Data_discard_short_count PACKED; /* received Data frames discarded (too short) */ | ||
453 | unsigned long Rx_Data_discard_long_count PACKED; /* received Data frames discarded (too long) */ | ||
454 | unsigned long Rx_Data_discard_inactive_count PACKED; /* received Data frames discarded (link inactive) */ | ||
455 | unsigned long reserved_Data_frm_Rx_stat1 PACKED; /* reserved for later */ | ||
456 | |||
457 | /* SLARP frame transmission/reception statistics */ | ||
458 | unsigned long CHDLC_SLARP_REQ_Tx_count PACKED; /* number of SLARP Request frames transmitted */ | ||
459 | unsigned long CHDLC_SLARP_REQ_Rx_count PACKED; /* number of SLARP Request frames received */ | ||
460 | unsigned long CHDLC_SLARP_REPLY_Tx_count PACKED; /* number of SLARP Reply frames transmitted */ | ||
461 | unsigned long CHDLC_SLARP_REPLY_Rx_count PACKED; /* number of SLARP Reply frames received */ | ||
462 | unsigned long CHDLC_SLARP_KPALV_Tx_count PACKED; /* number of SLARP keepalive frames transmitted */ | ||
463 | unsigned long CHDLC_SLARP_KPALV_Rx_count PACKED; /* number of SLARP keepalive frames received */ | ||
464 | unsigned long reserved_SLARP_stat1 PACKED; /* reserved for later */ | ||
465 | unsigned long reserved_SLARP_stat2 PACKED; /* reserved for later */ | ||
466 | |||
467 | /* CDP frame transmission/reception statistics */ | ||
468 | unsigned long CHDLC_CDP_Tx_count PACKED; /* number of CDP frames transmitted */ | ||
469 | unsigned long CHDLC_CDP_Rx_count PACKED; /* number of CDP frames received */ | ||
470 | unsigned long reserved_CDP_stat1 PACKED; /* reserved for later */ | ||
471 | unsigned long reserved_CDP_stat2 PACKED; /* reserved for later */ | ||
472 | unsigned long reserved_CDP_stat3 PACKED; /* reserved for later */ | ||
473 | unsigned long reserved_CDP_stat4 PACKED; /* reserved for later */ | ||
474 | unsigned long reserved_CDP_stat5 PACKED; /* reserved for later */ | ||
475 | unsigned long reserved_CDP_stat6 PACKED; /* reserved for later */ | ||
476 | |||
477 | /* Incoming frames with a format error statistics */ | ||
478 | unsigned short Rx_frm_incomp_CHDLC_hdr_count PACKED; /* frames received of with incomplete Cisco HDLC header */ | ||
479 | unsigned short Rx_frms_too_long_count PACKED; /* frames received of excessive length count */ | ||
480 | unsigned short Rx_invalid_CHDLC_addr_count PACKED; /* frames received with an invalid CHDLC address count */ | ||
481 | unsigned short Rx_invalid_CHDLC_ctrl_count PACKED; /* frames received with an invalid CHDLC control field count */ | ||
482 | unsigned short Rx_invalid_CHDLC_type_count PACKED; /* frames received of an invalid CHDLC frame type count */ | ||
483 | unsigned short Rx_SLARP_invalid_code_count PACKED; /* SLARP frame received with an invalid packet code */ | ||
484 | unsigned short Rx_SLARP_Reply_bad_IP_addr PACKED; /* SLARP Reply received - bad IP address */ | ||
485 | unsigned short Rx_SLARP_Reply_bad_netmask PACKED; /* SLARP Reply received - bad netmask */ | ||
486 | unsigned long reserved_frm_format_err1 PACKED; /* reserved for later */ | ||
487 | unsigned long reserved_frm_format_err2 PACKED; /* reserved for later */ | ||
488 | unsigned long reserved_frm_format_err3 PACKED; /* reserved for later */ | ||
489 | unsigned long reserved_frm_format_err4 PACKED; /* reserved for later */ | ||
490 | |||
491 | /* CHDLC timeout/retry statistics */ | ||
492 | unsigned short SLARP_Rx_keepalive_TO_count PACKED; /* timeout count for incoming SLARP frames */ | ||
493 | unsigned short SLARP_Request_TO_count PACKED; /* timeout count for SLARP Request frames */ | ||
494 | unsigned long To_retry_reserved_stat1 PACKED; /* reserved for later */ | ||
495 | unsigned long To_retry_reserved_stat2 PACKED; /* reserved for later */ | ||
496 | unsigned long To_retry_reserved_stat3 PACKED; /* reserved for later */ | ||
497 | |||
498 | /* CHDLC link active/inactive and loopback statistics */ | ||
499 | unsigned short link_active_count PACKED; /* number of times that the link went active */ | ||
500 | unsigned short link_inactive_modem_count PACKED; /* number of times that the link went inactive (modem failure) */ | ||
501 | unsigned short link_inactive_keepalive_count PACKED; /* number of times that the link went inactive (keepalive failure) */ | ||
502 | unsigned short link_looped_count PACKED; /* link looped count */ | ||
503 | unsigned long link_status_reserved_stat1 PACKED; /* reserved for later use */ | ||
504 | unsigned long link_status_reserved_stat2 PACKED; /* reserved for later use */ | ||
505 | |||
506 | /* miscellaneous statistics */ | ||
507 | unsigned long reserved_misc_stat1 PACKED; /* reserved for later */ | ||
508 | unsigned long reserved_misc_stat2 PACKED; /* reserved for later */ | ||
509 | unsigned long reserved_misc_stat3 PACKED; /* reserved for later */ | ||
510 | unsigned long reserved_misc_stat4 PACKED; /* reserved for later */ | ||
511 | |||
512 | } CHDLC_OPERATIONAL_STATS_STRUCT; | ||
513 | |||
514 | |||
515 | |||
516 | /* ---------------------------------------------------------------------------- | ||
517 | * Constants for using application interrupts | ||
518 | * --------------------------------------------------------------------------*/ | ||
519 | |||
520 | /* the structure used for the SET_CHDLC_INTERRUPT_TRIGGERS/READ_CHDLC_INTERRUPT_TRIGGERS command */ | ||
521 | typedef struct { | ||
522 | unsigned char CHDLC_interrupt_triggers PACKED; /* CHDLC interrupt trigger configuration */ | ||
523 | unsigned char IRQ PACKED; /* IRQ to be used */ | ||
524 | unsigned short interrupt_timer PACKED; /* interrupt timer */ | ||
525 | unsigned short misc_interrupt_bits PACKED; /* miscellaneous bits */ | ||
526 | } CHDLC_INT_TRIGGERS_STRUCT; | ||
527 | |||
528 | /* 'CHDLC_interrupt_triggers' bit settings */ | ||
529 | #define APP_INT_ON_RX_FRAME 0x01 /* interrupt on Data frame reception */ | ||
530 | #define APP_INT_ON_TX_FRAME 0x02 /* interrupt when an Data frame may be transmitted */ | ||
531 | #define APP_INT_ON_COMMAND_COMPLETE 0x04 /* interrupt when an interface command is complete */ | ||
532 | #define APP_INT_ON_TIMER 0x08 /* interrupt on a defined millisecond timeout */ | ||
533 | #define APP_INT_ON_GLOBAL_EXCEP_COND 0x10 /* interrupt on a global exception condition */ | ||
534 | #define APP_INT_ON_CHDLC_EXCEP_COND 0x20 /* interrupt on an CHDLC exception condition */ | ||
535 | #define APP_INT_ON_TRACE_DATA_AVAIL 0x80 /* interrupt when trace data is available */ | ||
536 | |||
537 | /* interrupt types indicated at 'interrupt_type' byte of the INTERRUPT_INFORMATION_STRUCT */ | ||
538 | #define NO_APP_INTS_PEND 0x00 /* no interrups are pending */ | ||
539 | #define RX_APP_INT_PEND 0x01 /* a receive interrupt is pending */ | ||
540 | #define TX_APP_INT_PEND 0x02 /* a transmit interrupt is pending */ | ||
541 | #define COMMAND_COMPLETE_APP_INT_PEND 0x04 /* a 'command complete' interrupt is pending */ | ||
542 | #define TIMER_APP_INT_PEND 0x08 /* a timer interrupt is pending */ | ||
543 | #define GLOBAL_EXCEP_COND_APP_INT_PEND 0x10 /* a global exception condition interrupt is pending */ | ||
544 | #define CHDLC_EXCEP_COND_APP_INT_PEND 0x20 /* an CHDLC exception condition interrupt is pending */ | ||
545 | #define TRACE_DATA_AVAIL_APP_INT_PEND 0x80 /* a trace data available interrupt is pending */ | ||
546 | |||
547 | |||
548 | /* modem status changes */ | ||
549 | #define DCD_HIGH 0x08 | ||
550 | #define CTS_HIGH 0x20 | ||
551 | |||
552 | |||
553 | /* ---------------------------------------------------------------------------- | ||
554 | * Constants for Data frame transmission | ||
555 | * --------------------------------------------------------------------------*/ | ||
556 | |||
557 | /* the Data frame transmit status element configuration structure */ | ||
558 | typedef struct { | ||
559 | unsigned short number_Tx_status_elements PACKED; /* number of transmit status elements */ | ||
560 | unsigned long base_addr_Tx_status_elements PACKED; /* base address of the transmit element list */ | ||
561 | unsigned long next_Tx_status_element_to_use PACKED; /* pointer to the next transmit element to be used */ | ||
562 | } CHDLC_TX_STATUS_EL_CFG_STRUCT; | ||
563 | |||
564 | /* the Data frame transmit status element structure */ | ||
565 | typedef struct { | ||
566 | unsigned char opp_flag PACKED; /* opp flag */ | ||
567 | unsigned short frame_length PACKED; /* length of the frame to be transmitted */ | ||
568 | unsigned char reserved_1 PACKED; /* reserved for internal use */ | ||
569 | unsigned long reserved_2 PACKED; /* reserved for internal use */ | ||
570 | unsigned long reserved_3 PACKED; /* reserved for internal use */ | ||
571 | unsigned long ptr_data_bfr PACKED; /* pointer to the data area */ | ||
572 | } CHDLC_DATA_TX_STATUS_EL_STRUCT; | ||
573 | |||
574 | |||
575 | |||
576 | /* ---------------------------------------------------------------------------- | ||
577 | * Constants for Data frame reception | ||
578 | * --------------------------------------------------------------------------*/ | ||
579 | |||
580 | /* the Data frame receive status element configuration structure */ | ||
581 | typedef struct { | ||
582 | unsigned short number_Rx_status_elements PACKED; /* number of receive status elements */ | ||
583 | unsigned long base_addr_Rx_status_elements PACKED; /* base address of the receive element list */ | ||
584 | unsigned long next_Rx_status_element_to_use PACKED; /* pointer to the next receive element to be used */ | ||
585 | unsigned long base_addr_Rx_buffer PACKED; /* base address of the receive data buffer */ | ||
586 | unsigned long end_addr_Rx_buffer PACKED; /* end address of the receive data buffer */ | ||
587 | } CHDLC_RX_STATUS_EL_CFG_STRUCT; | ||
588 | |||
589 | /* the Data frame receive status element structure */ | ||
590 | typedef struct { | ||
591 | unsigned char opp_flag PACKED; /* opp flag */ | ||
592 | unsigned short frame_length PACKED; /* length of the received frame */ | ||
593 | unsigned char error_flag PACKED; /* frame errors (HDLC_STREAMING_MODE)*/ | ||
594 | unsigned short time_stamp PACKED; /* receive time stamp (HDLC_STREAMING_MODE) */ | ||
595 | unsigned long reserved_1 PACKED; /* reserved for internal use */ | ||
596 | unsigned short reserved_2 PACKED; /* reserved for internal use */ | ||
597 | unsigned long ptr_data_bfr PACKED; /* pointer to the data area */ | ||
598 | } CHDLC_DATA_RX_STATUS_EL_STRUCT; | ||
599 | |||
600 | |||
601 | |||
602 | /* ---------------------------------------------------------------------------- | ||
603 | * Constants defining the shared memory information area | ||
604 | * --------------------------------------------------------------------------*/ | ||
605 | |||
606 | /* the global information structure */ | ||
607 | typedef struct { | ||
608 | unsigned char global_status PACKED; /* global status */ | ||
609 | unsigned char modem_status PACKED; /* current modem status */ | ||
610 | unsigned char global_excep_conditions PACKED; /* global exception conditions */ | ||
611 | unsigned char glob_info_reserved[5] PACKED; /* reserved */ | ||
612 | unsigned char codename[4] PACKED; /* Firmware name */ | ||
613 | unsigned char codeversion[4] PACKED; /* Firmware version */ | ||
614 | } GLOBAL_INFORMATION_STRUCT; | ||
615 | |||
616 | /* the CHDLC information structure */ | ||
617 | typedef struct { | ||
618 | unsigned char CHDLC_status PACKED; /* CHDLC status */ | ||
619 | unsigned char CHDLC_excep_conditions PACKED; /* CHDLC exception conditions */ | ||
620 | unsigned char CHDLC_info_reserved[14] PACKED; /* reserved */ | ||
621 | } CHDLC_INFORMATION_STRUCT; | ||
622 | |||
623 | /* the interrupt information structure */ | ||
624 | typedef struct { | ||
625 | unsigned char interrupt_type PACKED; /* type of interrupt triggered */ | ||
626 | unsigned char interrupt_permission PACKED; /* interrupt permission mask */ | ||
627 | unsigned char int_info_reserved[14] PACKED; /* reserved */ | ||
628 | } INTERRUPT_INFORMATION_STRUCT; | ||
629 | |||
630 | /* the S508/FT1 information structure */ | ||
631 | typedef struct { | ||
632 | unsigned char parallel_port_A_input PACKED; /* input - parallel port A */ | ||
633 | unsigned char parallel_port_B_input PACKED; /* input - parallel port B */ | ||
634 | unsigned char FT1_info_reserved[14] PACKED; /* reserved */ | ||
635 | } FT1_INFORMATION_STRUCT; | ||
636 | |||
637 | /* the shared memory area information structure */ | ||
638 | typedef struct { | ||
639 | GLOBAL_INFORMATION_STRUCT global_info_struct PACKED; /* the global information structure */ | ||
640 | CHDLC_INFORMATION_STRUCT CHDLC_info_struct PACKED; /* the CHDLC information structure */ | ||
641 | INTERRUPT_INFORMATION_STRUCT interrupt_info_struct PACKED; /* the interrupt information structure */ | ||
642 | FT1_INFORMATION_STRUCT FT1_info_struct PACKED; /* the S508/FT1 information structure */ | ||
643 | } SHARED_MEMORY_INFO_STRUCT; | ||
644 | |||
645 | /* ---------------------------------------------------------------------------- | ||
646 | * UDP Management constants and structures | ||
647 | * --------------------------------------------------------------------------*/ | ||
648 | |||
649 | /* The embedded control block for UDP mgmt | ||
650 | This is essentially a mailbox structure, without the large data field */ | ||
651 | |||
652 | typedef struct { | ||
653 | unsigned char opp_flag PACKED; /* the opp flag */ | ||
654 | unsigned char command PACKED; /* the user command */ | ||
655 | unsigned short buffer_length PACKED; /* the data length */ | ||
656 | unsigned char return_code PACKED; /* the return code */ | ||
657 | unsigned char MB_reserved[NUMBER_MB_RESERVED_BYTES] PACKED; /* reserved for later */ | ||
658 | } cblock_t; | ||
659 | |||
660 | |||
661 | /* UDP management packet layout (data area of ip packet) */ | ||
662 | /* | ||
663 | typedef struct { | ||
664 | unsigned char signature[8] PACKED; | ||
665 | unsigned char request_reply PACKED; | ||
666 | unsigned char id PACKED; | ||
667 | unsigned char reserved[6] PACKED; | ||
668 | cblock_t cblock PACKED; | ||
669 | unsigned char num_frames PACKED; | ||
670 | unsigned char ismoredata PACKED; | ||
671 | unsigned char data[SIZEOF_MB_DATA_BFR] PACKED; | ||
672 | } udp_management_packet_t; | ||
673 | |||
674 | */ | ||
675 | |||
676 | typedef struct { | ||
677 | unsigned char num_frames PACKED; | ||
678 | unsigned char ismoredata PACKED; | ||
679 | } trace_info_t; | ||
680 | |||
681 | typedef struct { | ||
682 | ip_pkt_t ip_pkt PACKED; | ||
683 | udp_pkt_t udp_pkt PACKED; | ||
684 | wp_mgmt_t wp_mgmt PACKED; | ||
685 | cblock_t cblock PACKED; | ||
686 | trace_info_t trace_info PACKED; | ||
687 | unsigned char data[SIZEOF_MB_DATA_BFR] PACKED; | ||
688 | } chdlc_udp_pkt_t; | ||
689 | |||
690 | typedef struct ft1_exec_cmd{ | ||
691 | unsigned char command PACKED; /* the user command */ | ||
692 | unsigned short buffer_length PACKED; /* the data length */ | ||
693 | unsigned char return_code PACKED; /* the return code */ | ||
694 | unsigned char MB_reserved[NUMBER_MB_RESERVED_BYTES] PACKED; | ||
695 | } ft1_exec_cmd_t; | ||
696 | |||
697 | typedef struct { | ||
698 | unsigned char opp_flag PACKED; | ||
699 | ft1_exec_cmd_t cmd PACKED; | ||
700 | unsigned char data[SIZEOF_MB_DATA_BFR] PACKED; | ||
701 | } ft1_exec_t; | ||
702 | |||
703 | #define UDPMGMT_SIGNATURE "CTPIPEAB" | ||
704 | |||
705 | |||
706 | /* UDP/IP packet (for UDP management) layout */ | ||
707 | /* | ||
708 | typedef struct { | ||
709 | unsigned char reserved[2] PACKED; | ||
710 | unsigned short ip_length PACKED; | ||
711 | unsigned char reserved2[4] PACKED; | ||
712 | unsigned char ip_ttl PACKED; | ||
713 | unsigned char ip_protocol PACKED; | ||
714 | unsigned short ip_checksum PACKED; | ||
715 | unsigned long ip_src_address PACKED; | ||
716 | unsigned long ip_dst_address PACKED; | ||
717 | unsigned short udp_src_port PACKED; | ||
718 | unsigned short udp_dst_port PACKED; | ||
719 | unsigned short udp_length PACKED; | ||
720 | unsigned short udp_checksum PACKED; | ||
721 | udp_management_packet_t um_packet PACKED; | ||
722 | } ip_packet_t; | ||
723 | */ | ||
724 | |||
725 | /* valid ip_protocol for UDP management */ | ||
726 | #define UDPMGMT_UDP_PROTOCOL 0x11 | ||
727 | |||
728 | |||
729 | typedef struct { | ||
730 | unsigned char status PACKED; | ||
731 | unsigned char data_avail PACKED; | ||
732 | unsigned short real_length PACKED; | ||
733 | unsigned short time_stamp PACKED; | ||
734 | unsigned char data[1] PACKED; | ||
735 | } trace_pkt_t; | ||
736 | |||
737 | typedef struct { | ||
738 | unsigned char error_flag PACKED; | ||
739 | unsigned short time_stamp PACKED; | ||
740 | unsigned char reserved[13] PACKED; | ||
741 | } api_rx_hdr_t; | ||
742 | |||
743 | typedef struct { | ||
744 | api_rx_hdr_t api_rx_hdr PACKED; | ||
745 | void * data PACKED; | ||
746 | } api_rx_element_t; | ||
747 | |||
748 | typedef struct { | ||
749 | unsigned char attr PACKED; | ||
750 | unsigned char reserved[15] PACKED; | ||
751 | } api_tx_hdr_t; | ||
752 | |||
753 | typedef struct { | ||
754 | api_tx_hdr_t api_tx_hdr PACKED; | ||
755 | void * data PACKED; | ||
756 | } api_tx_element_t; | ||
757 | |||
758 | /* ---------------------------------------------------------------------------- | ||
759 | * Constants for the SET_FT1_CONFIGURATION/READ_FT1_CONFIGURATION command | ||
760 | * --------------------------------------------------------------------------*/ | ||
761 | |||
762 | /* the FT1 configuration structure */ | ||
763 | typedef struct { | ||
764 | unsigned short framing_mode; | ||
765 | unsigned short encoding_mode; | ||
766 | unsigned short line_build_out; | ||
767 | unsigned short channel_base; | ||
768 | unsigned short baud_rate_kbps; /* the baud rate (in kbps) */ | ||
769 | unsigned short clock_mode; | ||
770 | } ft1_config_t; | ||
771 | |||
772 | /* settings for the 'framing_mode' */ | ||
773 | #define ESF_FRAMING 0x00 /* ESF framing */ | ||
774 | #define D4_FRAMING 0x01 /* D4 framing */ | ||
775 | |||
776 | /* settings for the 'encoding_mode' */ | ||
777 | #define B8ZS_ENCODING 0x00 /* B8ZS encoding */ | ||
778 | #define AMI_ENCODING 0x01 /* AMI encoding */ | ||
779 | |||
780 | /* settings for the 'line_build_out' */ | ||
781 | #define LN_BLD_CSU_0dB_DSX1_0_to_133 0x00 /* set build out to CSU (0db) or DSX-1 (0-133ft) */ | ||
782 | #define LN_BLD_DSX1_133_to_266 0x01 /* set build out DSX-1 (133-266ft) */ | ||
783 | #define LN_BLD_DSX1_266_to_399 0x02 /* set build out DSX-1 (266-399ft) */ | ||
784 | #define LN_BLD_DSX1_399_to_533 0x03 /* set build out DSX-1 (399-533ft) */ | ||
785 | #define LN_BLD_DSX1_533_to_655 0x04 /* set build out DSX-1 (533-655ft) */ | ||
786 | #define LN_BLD_CSU_NEG_7dB 0x05 /* set build out to CSU (-7.5db) */ | ||
787 | #define LN_BLD_CSU_NEG_15dB 0x06 /* set build out to CSU (-15db) */ | ||
788 | #define LN_BLD_CSU_NEG_22dB 0x07 /* set build out to CSU (-22.5db) */ | ||
789 | |||
790 | /* settings for the 'channel_base' */ | ||
791 | #define MIN_CHANNEL_BASE_VALUE 1 /* the minimum permitted channel base value */ | ||
792 | #define MAX_CHANNEL_BASE_VALUE 24 /* the maximum permitted channel base value */ | ||
793 | |||
794 | /* settings for the 'baud_rate_kbps' */ | ||
795 | #define MIN_BAUD_RATE_KBPS 0 /* the minimum permitted baud rate (kbps) */ | ||
796 | #define MAX_BAUD_RATE_KBPS 1536 /* the maximum permitted baud rate (kbps) */ | ||
797 | #define BAUD_RATE_FT1_AUTO_CONFIG 0xFFFF /* the baud rate used to trigger an automatic FT1 configuration */ | ||
798 | |||
799 | /* settings for the 'clock_mode' */ | ||
800 | #define CLOCK_MODE_NORMAL 0x00 /* clock mode set to normal (slave) */ | ||
801 | #define CLOCK_MODE_MASTER 0x01 /* clock mode set to master */ | ||
802 | |||
803 | |||
804 | #define BAUD_RATE_FT1_AUTO_CONFIG 0xFFFF | ||
805 | #define AUTO_FT1_CONFIG_NOT_COMPLETE 0x08 | ||
806 | #define AUTO_FT1_CFG_FAIL_OP_MODE 0x0C | ||
807 | #define AUTO_FT1_CFG_FAIL_INVALID_LINE 0x0D | ||
808 | |||
809 | |||
810 | #ifdef _MSC_ | ||
811 | # pragma pack() | ||
812 | #endif | ||
813 | #endif /* _SDLA_CHDLC_H */ | ||
diff --git a/include/linux/sdla_ppp.h b/include/linux/sdla_ppp.h deleted file mode 100644 index 6f3923179c29..000000000000 --- a/include/linux/sdla_ppp.h +++ /dev/null | |||
@@ -1,575 +0,0 @@ | |||
1 | /***************************************************************************** | ||
2 | * sdla_ppp.h Sangoma PPP firmware API definitions. | ||
3 | * | ||
4 | * Author: Nenad Corbic <ncorbic@sangoma.com> | ||
5 | * | ||
6 | * Copyright: (c) 1995-1997 Sangoma Technologies Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version | ||
11 | * 2 of the License, or (at your option) any later version. | ||
12 | * ============================================================================ | ||
13 | * Feb 24, 2000 Nenad Corbic v2.1.2 | ||
14 | * Jan 06, 1997 Gene Kozin v2.0 | ||
15 | * Apr 11, 1996 Gene Kozin Initial version. | ||
16 | *****************************************************************************/ | ||
17 | #ifndef _SDLA_PPP_H | ||
18 | #define _SDLA_PPP_H | ||
19 | |||
20 | /*---------------------------------------------------------------------------- | ||
21 | * Notes: | ||
22 | * ------ | ||
23 | * 1. All structures defined in this file are byte-alined. | ||
24 | * | ||
25 | * Compiler Platform | ||
26 | * -------- -------- | ||
27 | * GNU C Linux | ||
28 | */ | ||
29 | |||
30 | #ifndef PACKED | ||
31 | # define PACKED __attribute__((packed)) | ||
32 | #endif /* PACKED */ | ||
33 | |||
34 | /* Adapter memory layout and important constants */ | ||
35 | #define PPP508_MB_VECT 0xE000 /* mailbox window vector */ | ||
36 | #define PPP508_MB_OFFS 0 /* mailbox offset */ | ||
37 | #define PPP508_FLG_OFFS 0x1000 /* status flags offset */ | ||
38 | #define PPP508_BUF_OFFS 0x1100 /* buffer info block offset */ | ||
39 | #define PPP514_MB_OFFS 0xE000 /* mailbox offset */ | ||
40 | #define PPP514_FLG_OFFS 0xF000 /* status flags offset */ | ||
41 | #define PPP514_BUF_OFFS 0xF100 /* buffer info block offset */ | ||
42 | |||
43 | #define PPP_MAX_DATA 1008 /* command block data buffer length */ | ||
44 | |||
45 | /****** Data Structures *****************************************************/ | ||
46 | |||
47 | /*---------------------------------------------------------------------------- | ||
48 | * PPP Command Block. | ||
49 | */ | ||
50 | typedef struct ppp_cmd{ | ||
51 | unsigned char command PACKED; /* command code */ | ||
52 | unsigned short length PACKED; /* length of data buffer */ | ||
53 | unsigned char result PACKED; /* return code */ | ||
54 | unsigned char rsrv[11] PACKED; /* reserved for future use */ | ||
55 | } ppp_cmd_t; | ||
56 | |||
57 | typedef struct cblock{ | ||
58 | unsigned char opp_flag PACKED; | ||
59 | unsigned char command PACKED; /* command code */ | ||
60 | unsigned short length PACKED; /* length of data buffer */ | ||
61 | unsigned char result PACKED; /* return code */ | ||
62 | unsigned char rsrv[11] PACKED; /* reserved for future use */ | ||
63 | } cblock_t; | ||
64 | |||
65 | typedef struct ppp_udp_pkt{ | ||
66 | ip_pkt_t ip_pkt PACKED; | ||
67 | udp_pkt_t udp_pkt PACKED; | ||
68 | wp_mgmt_t wp_mgmt PACKED; | ||
69 | cblock_t cblock PACKED; | ||
70 | unsigned char data[MAX_LGTH_UDP_MGNT_PKT] PACKED; | ||
71 | } ppp_udp_pkt_t; | ||
72 | |||
73 | typedef struct { | ||
74 | unsigned char status PACKED; | ||
75 | unsigned char data_avail PACKED; | ||
76 | unsigned short real_length PACKED; | ||
77 | unsigned short time_stamp PACKED; | ||
78 | unsigned char data[1] PACKED; | ||
79 | } trace_pkt_t; | ||
80 | |||
81 | |||
82 | typedef struct { | ||
83 | unsigned char opp_flag PACKED; | ||
84 | unsigned char trace_type PACKED; | ||
85 | unsigned short trace_length PACKED; | ||
86 | unsigned short trace_data_ptr PACKED; | ||
87 | unsigned short trace_time_stamp PACKED; | ||
88 | } trace_element_t; | ||
89 | |||
90 | /* 'command' field defines */ | ||
91 | #define PPP_READ_CODE_VERSION 0x10 /* configuration commands */ | ||
92 | #define PPP_SET_CONFIG 0x05 | ||
93 | #define PPP_READ_CONFIG 0x06 | ||
94 | #define PPP_SET_INTR_FLAGS 0x20 | ||
95 | #define PPP_READ_INTR_FLAGS 0x21 | ||
96 | #define PPP_SET_INBOUND_AUTH 0x30 | ||
97 | #define PPP_SET_OUTBOUND_AUTH 0x31 | ||
98 | #define PPP_GET_CONNECTION_INFO 0x32 | ||
99 | |||
100 | #define PPP_COMM_ENABLE 0x03 /* operational commands */ | ||
101 | #define PPP_COMM_DISABLE 0x04 | ||
102 | #define PPP_SEND_SIGN_FRAME 0x23 | ||
103 | #define PPP_READ_SIGN_RESPONSE 0x24 | ||
104 | #define PPP_DATALINE_MONITOR 0x33 | ||
105 | |||
106 | #define PPP_READ_STATISTICS 0x07 /* statistics commands */ | ||
107 | #define PPP_FLUSH_STATISTICS 0x08 | ||
108 | #define PPP_READ_ERROR_STATS 0x09 | ||
109 | #define PPP_FLUSH_ERROR_STATS 0x0A | ||
110 | #define PPP_READ_PACKET_STATS 0x12 | ||
111 | #define PPP_FLUSH_PACKET_STATS 0x13 | ||
112 | #define PPP_READ_LCP_STATS 0x14 | ||
113 | #define PPP_FLUSH_LCP_STATS 0x15 | ||
114 | #define PPP_READ_LPBK_STATS 0x16 | ||
115 | #define PPP_FLUSH_LPBK_STATS 0x17 | ||
116 | #define PPP_READ_IPCP_STATS 0x18 | ||
117 | #define PPP_FLUSH_IPCP_STATS 0x19 | ||
118 | #define PPP_READ_IPXCP_STATS 0x1A | ||
119 | #define PPP_FLUSH_IPXCP_STATS 0x1B | ||
120 | #define PPP_READ_PAP_STATS 0x1C | ||
121 | #define PPP_FLUSH_PAP_STATS 0x1D | ||
122 | #define PPP_READ_CHAP_STATS 0x1E | ||
123 | #define PPP_FLUSH_CHAP_STATS 0x1F | ||
124 | |||
125 | /* 'result' field defines */ | ||
126 | #define PPPRES_OK 0x00 /* command executed successfully */ | ||
127 | #define PPPRES_INVALID_STATE 0x09 /* invalid command in this context */ | ||
128 | |||
129 | /*---------------------------------------------------------------------------- | ||
130 | * PPP Mailbox. | ||
131 | * This structure is located at offset PPP???_MB_OFFS into PPP???_MB_VECT | ||
132 | */ | ||
133 | typedef struct ppp_mbox | ||
134 | { | ||
135 | unsigned char flag PACKED; /* 00h: command execution flag */ | ||
136 | ppp_cmd_t cmd PACKED; /* 01h: command block */ | ||
137 | unsigned char data[1] PACKED; /* 10h: variable length data buffer */ | ||
138 | } ppp_mbox_t; | ||
139 | |||
140 | /*---------------------------------------------------------------------------- | ||
141 | * PPP Status Flags. | ||
142 | * This structure is located at offset PPP???_FLG_OFFS into | ||
143 | * PPP???_MB_VECT. | ||
144 | */ | ||
145 | typedef struct ppp_flags | ||
146 | { | ||
147 | unsigned char iflag PACKED; /* 00: interrupt flag */ | ||
148 | unsigned char imask PACKED; /* 01: interrupt mask */ | ||
149 | unsigned char resrv PACKED; | ||
150 | unsigned char mstatus PACKED; /* 03: modem status */ | ||
151 | unsigned char lcp_state PACKED; /* 04: LCP state */ | ||
152 | unsigned char ppp_phase PACKED; /* 05: PPP phase */ | ||
153 | unsigned char ip_state PACKED; /* 06: IPCP state */ | ||
154 | unsigned char ipx_state PACKED; /* 07: IPXCP state */ | ||
155 | unsigned char pap_state PACKED; /* 08: PAP state */ | ||
156 | unsigned char chap_state PACKED; /* 09: CHAP state */ | ||
157 | unsigned short disc_cause PACKED; /* 0A: disconnection cause */ | ||
158 | } ppp_flags_t; | ||
159 | |||
160 | /* 'iflag' defines */ | ||
161 | #define PPP_INTR_RXRDY 0x01 /* Rx ready */ | ||
162 | #define PPP_INTR_TXRDY 0x02 /* Tx ready */ | ||
163 | #define PPP_INTR_MODEM 0x04 /* modem status change (DCD, CTS) */ | ||
164 | #define PPP_INTR_CMD 0x08 /* interface command completed */ | ||
165 | #define PPP_INTR_DISC 0x10 /* data link disconnected */ | ||
166 | #define PPP_INTR_OPEN 0x20 /* data link open */ | ||
167 | #define PPP_INTR_DROP_DTR 0x40 /* DTR drop timeout expired */ | ||
168 | #define PPP_INTR_TIMER 0x80 /* timer interrupt */ | ||
169 | |||
170 | |||
171 | /* 'mstatus' defines */ | ||
172 | #define PPP_MDM_DCD 0x08 /* mdm_status: DCD */ | ||
173 | #define PPP_MDM_CTS 0x20 /* mdm_status: CTS */ | ||
174 | |||
175 | /* 'disc_cause' defines */ | ||
176 | #define PPP_LOCAL_TERMINATION 0x0001 /* Local Request by PPP termination phase */ | ||
177 | #define PPP_DCD_CTS_DROP 0x0002 /* DCD and/or CTS dropped. Link down */ | ||
178 | #define PPP_REMOTE_TERMINATION 0x0800 /* Remote Request by PPP termination phase */ | ||
179 | |||
180 | /* 'misc_config_bits' defines */ | ||
181 | #define DONT_RE_TX_ABORTED_I_FRAMES 0x01 | ||
182 | #define TX_FRM_BYTE_COUNT_STATS 0x02 | ||
183 | #define RX_FRM_BYTE_COUNT_STATS 0x04 | ||
184 | #define TIME_STAMP_IN_RX_FRAMES 0x08 | ||
185 | #define NON_STD_ADPTR_FREQ 0x10 | ||
186 | #define INTERFACE_LEVEL_RS232 0x20 | ||
187 | #define AUTO_LINK_RECOVERY 0x100 | ||
188 | #define DONT_TERMINATE_LNK_MAX_CONFIG 0x200 | ||
189 | |||
190 | /* 'authentication options' defines */ | ||
191 | #define NO_AUTHENTICATION 0x00 | ||
192 | #define INBOUND_AUTH 0x80 | ||
193 | #define PAP_AUTH 0x01 | ||
194 | #define CHAP_AUTH 0x02 | ||
195 | |||
196 | /* 'ip options' defines */ | ||
197 | #define L_AND_R_IP_NO_ASSIG 0x00 | ||
198 | #define L_IP_LOCAL_ASSIG 0x01 | ||
199 | #define L_IP_REMOTE_ASSIG 0x02 | ||
200 | #define R_IP_LOCAL_ASSIG 0x04 | ||
201 | #define R_IP_REMOTE_ASSIG 0x08 | ||
202 | #define ENABLE_IP 0x80 | ||
203 | |||
204 | /* 'ipx options' defines */ | ||
205 | #define ROUTING_PROT_DEFAULT 0x20 | ||
206 | #define ENABLE_IPX 0x80 | ||
207 | #define DISABLE_IPX 0x00 | ||
208 | |||
209 | /*---------------------------------------------------------------------------- | ||
210 | * PPP Buffer Info. | ||
211 | * This structure is located at offset PPP508_BUF_OFFS into | ||
212 | * PPP508_MB_VECT. | ||
213 | */ | ||
214 | typedef struct ppp508_buf_info | ||
215 | { | ||
216 | unsigned short txb_num PACKED; /* 00: number of transmit buffers */ | ||
217 | unsigned long txb_ptr PACKED; /* 02: pointer to the buffer ctl. */ | ||
218 | unsigned long txb_nxt PACKED; | ||
219 | unsigned char rsrv1[22] PACKED; | ||
220 | unsigned short rxb_num PACKED; /* 20: number of receive buffers */ | ||
221 | unsigned long rxb_ptr PACKED; /* 22: pointer to the buffer ctl. */ | ||
222 | unsigned long rxb1_ptr PACKED; /* 26: pointer to the first buf.ctl. */ | ||
223 | unsigned long rxb_base PACKED; /* 2A: pointer to the buffer base */ | ||
224 | unsigned char rsrv2[2] PACKED; | ||
225 | unsigned long rxb_end PACKED; /* 30: pointer to the buffer end */ | ||
226 | } ppp508_buf_info_t; | ||
227 | |||
228 | /*---------------------------------------------------------------------------- | ||
229 | * Transmit/Receive Buffer Control Block. | ||
230 | */ | ||
231 | typedef struct ppp_buf_ctl | ||
232 | { | ||
233 | unsigned char flag PACKED; /* 00: 'buffer ready' flag */ | ||
234 | unsigned short length PACKED; /* 01: length of data */ | ||
235 | unsigned char reserved1[1] PACKED; /* 03: */ | ||
236 | unsigned char proto PACKED; /* 04: protocol */ | ||
237 | unsigned short timestamp PACKED; /* 05: time stamp (Rx only) */ | ||
238 | unsigned char reserved2[5] PACKED; /* 07: */ | ||
239 | union | ||
240 | { | ||
241 | unsigned short o_p[2]; /* 1C: buffer offset & page (S502) */ | ||
242 | unsigned long ptr; /* 1C: buffer pointer (S508) */ | ||
243 | } buf PACKED; | ||
244 | } ppp_buf_ctl_t; | ||
245 | |||
246 | /*---------------------------------------------------------------------------- | ||
247 | * S508 Adapter Configuration Block (passed to the PPP_SET_CONFIG command). | ||
248 | */ | ||
249 | typedef struct ppp508_conf | ||
250 | { | ||
251 | unsigned long line_speed PACKED; /* 00: baud rate, bps */ | ||
252 | unsigned short txbuf_percent PACKED; /* 04: % of Tx buffer */ | ||
253 | unsigned short conf_flags PACKED; /* 06: configuration bits */ | ||
254 | unsigned short mtu_local PACKED; /* 08: local MTU */ | ||
255 | unsigned short mtu_remote PACKED; /* 0A: remote MTU */ | ||
256 | unsigned short restart_tmr PACKED; /* 0C: restart timer */ | ||
257 | unsigned short auth_rsrt_tmr PACKED; /* 0E: authentication timer */ | ||
258 | unsigned short auth_wait_tmr PACKED; /* 10: authentication timer */ | ||
259 | unsigned short mdm_fail_tmr PACKED; /* 12: modem failure timer */ | ||
260 | unsigned short dtr_drop_tmr PACKED; /* 14: DTR drop timer */ | ||
261 | unsigned short connect_tmout PACKED; /* 16: connection timeout */ | ||
262 | unsigned short conf_retry PACKED; /* 18: max. retry */ | ||
263 | unsigned short term_retry PACKED; /* 1A: max. retry */ | ||
264 | unsigned short fail_retry PACKED; /* 1C: max. retry */ | ||
265 | unsigned short auth_retry PACKED; /* 1E: max. retry */ | ||
266 | unsigned char auth_options PACKED; /* 20: authentication opt. */ | ||
267 | unsigned char ip_options PACKED; /* 21: IP options */ | ||
268 | unsigned long ip_local PACKED; /* 22: local IP address */ | ||
269 | unsigned long ip_remote PACKED; /* 26: remote IP address */ | ||
270 | unsigned char ipx_options PACKED; /* 2A: IPX options */ | ||
271 | unsigned char ipx_netno[4] PACKED; /* 2B: IPX net number */ | ||
272 | unsigned char ipx_local[6] PACKED; /* 2F: local IPX node number*/ | ||
273 | unsigned char ipx_remote[6] PACKED; /* 35: remote IPX node num.*/ | ||
274 | unsigned char ipx_router[48] PACKED; /* 3B: IPX router name*/ | ||
275 | unsigned long alt_cpu_clock PACKED; /* 6B: */ | ||
276 | } ppp508_conf_t; | ||
277 | |||
278 | /*---------------------------------------------------------------------------- | ||
279 | * S508 Adapter Read Connection Information Block | ||
280 | * Returned by the PPP_GET_CONNECTION_INFO command | ||
281 | */ | ||
282 | typedef struct ppp508_connect_info | ||
283 | { | ||
284 | unsigned short mru PACKED; /* 00-01 Remote Max Rec' Unit */ | ||
285 | unsigned char ip_options PACKED; /* 02: Negotiated ip options */ | ||
286 | unsigned long ip_local PACKED; /* 03-06: local IP address */ | ||
287 | unsigned long ip_remote PACKED; /* 07-0A: remote IP address */ | ||
288 | unsigned char ipx_options PACKED; /* 0B: Negotiated ipx options */ | ||
289 | unsigned char ipx_netno[4] PACKED; /* 0C-0F: IPX net number */ | ||
290 | unsigned char ipx_local[6] PACKED; /* 10-1F: local IPX node # */ | ||
291 | unsigned char ipx_remote[6] PACKED; /* 16-1B: remote IPX node # */ | ||
292 | unsigned char ipx_router[48] PACKED; /* 1C-4B: IPX router name */ | ||
293 | unsigned char auth_status PACKED; /* 4C: Authentication Status */ | ||
294 | unsigned char inbd_auth_peerID[1] PACKED; /* 4D: variable length inbound authenticated peer ID */ | ||
295 | } ppp508_connect_info_t; | ||
296 | |||
297 | /* 'line_speed' field */ | ||
298 | #define PPP_BITRATE_1200 0x01 | ||
299 | #define PPP_BITRATE_2400 0x02 | ||
300 | #define PPP_BITRATE_4800 0x03 | ||
301 | #define PPP_BITRATE_9600 0x04 | ||
302 | #define PPP_BITRATE_19200 0x05 | ||
303 | #define PPP_BITRATE_38400 0x06 | ||
304 | #define PPP_BITRATE_45000 0x07 | ||
305 | #define PPP_BITRATE_56000 0x08 | ||
306 | #define PPP_BITRATE_64000 0x09 | ||
307 | #define PPP_BITRATE_74000 0x0A | ||
308 | #define PPP_BITRATE_112000 0x0B | ||
309 | #define PPP_BITRATE_128000 0x0C | ||
310 | #define PPP_BITRATE_156000 0x0D | ||
311 | |||
312 | /* Defines for the 'conf_flags' field */ | ||
313 | #define PPP_IGNORE_TX_ABORT 0x01 /* don't re-transmit aborted frames */ | ||
314 | #define PPP_ENABLE_TX_STATS 0x02 /* enable Tx statistics */ | ||
315 | #define PPP_ENABLE_RX_STATS 0x04 /* enable Rx statistics */ | ||
316 | #define PPP_ENABLE_TIMESTAMP 0x08 /* enable timestamp */ | ||
317 | |||
318 | /* 'ip_options' defines */ | ||
319 | #define PPP_LOCAL_IP_LOCAL 0x01 | ||
320 | #define PPP_LOCAL_IP_REMOTE 0x02 | ||
321 | #define PPP_REMOTE_IP_LOCAL 0x04 | ||
322 | #define PPP_REMOTE_IP_REMOTE 0x08 | ||
323 | |||
324 | /* 'ipx_options' defines */ | ||
325 | #define PPP_REMOTE_IPX_NETNO 0x01 | ||
326 | #define PPP_REMOTE_IPX_LOCAL 0x02 | ||
327 | #define PPP_REMOTE_IPX_REMOTE 0x04 | ||
328 | #define PPP_IPX_ROUTE_RIP_SAP 0x08 | ||
329 | #define PPP_IPX_ROUTE_NLSP 0x10 | ||
330 | #define PPP_IPX_ROUTE_DEFAULT 0x20 | ||
331 | #define PPP_IPX_CONF_COMPLETE 0x40 | ||
332 | #define PPP_IPX_ENABLE 0x80 | ||
333 | |||
334 | /*---------------------------------------------------------------------------- | ||
335 | * S508 Adapter Configuration Block (returned by the PPP_READ_CONFIG command). | ||
336 | */ | ||
337 | typedef struct ppp508_get_conf | ||
338 | { | ||
339 | unsigned long bps PACKED; /* 00: baud rate, bps */ | ||
340 | ppp508_conf_t conf PACKED; /* 04: requested config. */ | ||
341 | unsigned short txb_num PACKED; /* 6F: number of Tx buffers */ | ||
342 | unsigned short rxb_num PACKED; /* 71: number of Rx buffers */ | ||
343 | } ppp508_get_conf_t; | ||
344 | |||
345 | /*---------------------------------------------------------------------------- | ||
346 | * S508 Operational Statistics (returned by the PPP_READ_STATISTIC command). | ||
347 | */ | ||
348 | typedef struct ppp508_stats | ||
349 | { | ||
350 | unsigned short reserved1 PACKED; /* 00: */ | ||
351 | unsigned short rx_bad_len PACKED; /* 02: */ | ||
352 | unsigned short reserved2 PACKED; /* 04: */ | ||
353 | unsigned long tx_frames PACKED; /* 06: */ | ||
354 | unsigned long tx_bytes PACKED; /* 0A: */ | ||
355 | unsigned long rx_frames PACKED; /* 0E: */ | ||
356 | unsigned long rx_bytes PACKED; /* 12: */ | ||
357 | } ppp508_stats_t; | ||
358 | |||
359 | /*---------------------------------------------------------------------------- | ||
360 | * Adapter Error Statistics (returned by the PPP_READ_ERROR_STATS command). | ||
361 | */ | ||
362 | typedef struct ppp_err_stats | ||
363 | { | ||
364 | unsigned char rx_overrun PACKED; /* 00: Rx overrun errors */ | ||
365 | unsigned char rx_bad_crc PACKED; /* 01: Rx CRC errors */ | ||
366 | unsigned char rx_abort PACKED; /* 02: Rx aborted frames */ | ||
367 | unsigned char rx_lost PACKED; /* 03: Rx frames lost */ | ||
368 | unsigned char tx_abort PACKED; /* 04: Tx aborted frames */ | ||
369 | unsigned char tx_underrun PACKED; /* 05: Tx underrun errors */ | ||
370 | unsigned char tx_missed_intr PACKED; /* 06: Tx underruns missed */ | ||
371 | unsigned char reserved PACKED; /* 07: Tx underruns missed */ | ||
372 | unsigned char dcd_trans PACKED; /* 08: DCD transitions */ | ||
373 | unsigned char cts_trans PACKED; /* 09: CTS transitions */ | ||
374 | } ppp_err_stats_t; | ||
375 | |||
376 | /*---------------------------------------------------------------------------- | ||
377 | * Packet Statistics (returned by the PPP_READ_PACKET_STATS command). | ||
378 | */ | ||
379 | typedef struct ppp_pkt_stats | ||
380 | { | ||
381 | unsigned short rx_bad_header PACKED; /* 00: */ | ||
382 | unsigned short rx_prot_unknwn PACKED; /* 02: */ | ||
383 | unsigned short rx_too_large PACKED; /* 04: */ | ||
384 | unsigned short rx_lcp PACKED; /* 06: */ | ||
385 | unsigned short tx_lcp PACKED; /* 08: */ | ||
386 | unsigned short rx_ipcp PACKED; /* 0A: */ | ||
387 | unsigned short tx_ipcp PACKED; /* 0C: */ | ||
388 | unsigned short rx_ipxcp PACKED; /* 0E: */ | ||
389 | unsigned short tx_ipxcp PACKED; /* 10: */ | ||
390 | unsigned short rx_pap PACKED; /* 12: */ | ||
391 | unsigned short tx_pap PACKED; /* 14: */ | ||
392 | unsigned short rx_chap PACKED; /* 16: */ | ||
393 | unsigned short tx_chap PACKED; /* 18: */ | ||
394 | unsigned short rx_lqr PACKED; /* 1A: */ | ||
395 | unsigned short tx_lqr PACKED; /* 1C: */ | ||
396 | unsigned short rx_ip PACKED; /* 1E: */ | ||
397 | unsigned short tx_ip PACKED; /* 20: */ | ||
398 | unsigned short rx_ipx PACKED; /* 22: */ | ||
399 | unsigned short tx_ipx PACKED; /* 24: */ | ||
400 | } ppp_pkt_stats_t; | ||
401 | |||
402 | /*---------------------------------------------------------------------------- | ||
403 | * LCP Statistics (returned by the PPP_READ_LCP_STATS command). | ||
404 | */ | ||
405 | typedef struct ppp_lcp_stats | ||
406 | { | ||
407 | unsigned short rx_unknown PACKED; /* 00: unknown LCP type */ | ||
408 | unsigned short rx_conf_rqst PACKED; /* 02: Configure-Request */ | ||
409 | unsigned short rx_conf_ack PACKED; /* 04: Configure-Ack */ | ||
410 | unsigned short rx_conf_nak PACKED; /* 06: Configure-Nak */ | ||
411 | unsigned short rx_conf_rej PACKED; /* 08: Configure-Reject */ | ||
412 | unsigned short rx_term_rqst PACKED; /* 0A: Terminate-Request */ | ||
413 | unsigned short rx_term_ack PACKED; /* 0C: Terminate-Ack */ | ||
414 | unsigned short rx_code_rej PACKED; /* 0E: Code-Reject */ | ||
415 | unsigned short rx_proto_rej PACKED; /* 10: Protocol-Reject */ | ||
416 | unsigned short rx_echo_rqst PACKED; /* 12: Echo-Request */ | ||
417 | unsigned short rx_echo_reply PACKED; /* 14: Echo-Reply */ | ||
418 | unsigned short rx_disc_rqst PACKED; /* 16: Discard-Request */ | ||
419 | unsigned short tx_conf_rqst PACKED; /* 18: Configure-Request */ | ||
420 | unsigned short tx_conf_ack PACKED; /* 1A: Configure-Ack */ | ||
421 | unsigned short tx_conf_nak PACKED; /* 1C: Configure-Nak */ | ||
422 | unsigned short tx_conf_rej PACKED; /* 1E: Configure-Reject */ | ||
423 | unsigned short tx_term_rqst PACKED; /* 20: Terminate-Request */ | ||
424 | unsigned short tx_term_ack PACKED; /* 22: Terminate-Ack */ | ||
425 | unsigned short tx_code_rej PACKED; /* 24: Code-Reject */ | ||
426 | unsigned short tx_proto_rej PACKED; /* 26: Protocol-Reject */ | ||
427 | unsigned short tx_echo_rqst PACKED; /* 28: Echo-Request */ | ||
428 | unsigned short tx_echo_reply PACKED; /* 2A: Echo-Reply */ | ||
429 | unsigned short tx_disc_rqst PACKED; /* 2E: Discard-Request */ | ||
430 | unsigned short rx_too_large PACKED; /* 30: packets too large */ | ||
431 | unsigned short rx_ack_inval PACKED; /* 32: invalid Conf-Ack */ | ||
432 | unsigned short rx_rej_inval PACKED; /* 34: invalid Conf-Reject */ | ||
433 | unsigned short rx_rej_badid PACKED; /* 36: Conf-Reject w/bad ID */ | ||
434 | } ppp_lcp_stats_t; | ||
435 | |||
436 | /*---------------------------------------------------------------------------- | ||
437 | * Loopback Error Statistics (returned by the PPP_READ_LPBK_STATS command). | ||
438 | */ | ||
439 | typedef struct ppp_lpbk_stats | ||
440 | { | ||
441 | unsigned short conf_magic PACKED; /* 00: */ | ||
442 | unsigned short loc_echo_rqst PACKED; /* 02: */ | ||
443 | unsigned short rem_echo_rqst PACKED; /* 04: */ | ||
444 | unsigned short loc_echo_reply PACKED; /* 06: */ | ||
445 | unsigned short rem_echo_reply PACKED; /* 08: */ | ||
446 | unsigned short loc_disc_rqst PACKED; /* 0A: */ | ||
447 | unsigned short rem_disc_rqst PACKED; /* 0C: */ | ||
448 | unsigned short echo_tx_collsn PACKED; /* 0E: */ | ||
449 | unsigned short echo_rx_collsn PACKED; /* 10: */ | ||
450 | } ppp_lpbk_stats_t; | ||
451 | |||
452 | /*---------------------------------------------------------------------------- | ||
453 | * Protocol Statistics (returned by the PPP_READ_IPCP_STATS and | ||
454 | * PPP_READ_IPXCP_STATS commands). | ||
455 | */ | ||
456 | typedef struct ppp_prot_stats | ||
457 | { | ||
458 | unsigned short rx_unknown PACKED; /* 00: unknown type */ | ||
459 | unsigned short rx_conf_rqst PACKED; /* 02: Configure-Request */ | ||
460 | unsigned short rx_conf_ack PACKED; /* 04: Configure-Ack */ | ||
461 | unsigned short rx_conf_nak PACKED; /* 06: Configure-Nak */ | ||
462 | unsigned short rx_conf_rej PACKED; /* 08: Configure-Reject */ | ||
463 | unsigned short rx_term_rqst PACKED; /* 0A: Terminate-Request */ | ||
464 | unsigned short rx_term_ack PACKED; /* 0C: Terminate-Ack */ | ||
465 | unsigned short rx_code_rej PACKED; /* 0E: Code-Reject */ | ||
466 | unsigned short reserved PACKED; /* 10: */ | ||
467 | unsigned short tx_conf_rqst PACKED; /* 12: Configure-Request */ | ||
468 | unsigned short tx_conf_ack PACKED; /* 14: Configure-Ack */ | ||
469 | unsigned short tx_conf_nak PACKED; /* 16: Configure-Nak */ | ||
470 | unsigned short tx_conf_rej PACKED; /* 18: Configure-Reject */ | ||
471 | unsigned short tx_term_rqst PACKED; /* 1A: Terminate-Request */ | ||
472 | unsigned short tx_term_ack PACKED; /* 1C: Terminate-Ack */ | ||
473 | unsigned short tx_code_rej PACKED; /* 1E: Code-Reject */ | ||
474 | unsigned short rx_too_large PACKED; /* 20: packets too large */ | ||
475 | unsigned short rx_ack_inval PACKED; /* 22: invalid Conf-Ack */ | ||
476 | unsigned short rx_rej_inval PACKED; /* 24: invalid Conf-Reject */ | ||
477 | unsigned short rx_rej_badid PACKED; /* 26: Conf-Reject w/bad ID */ | ||
478 | } ppp_prot_stats_t; | ||
479 | |||
480 | /*---------------------------------------------------------------------------- | ||
481 | * PAP Statistics (returned by the PPP_READ_PAP_STATS command). | ||
482 | */ | ||
483 | typedef struct ppp_pap_stats | ||
484 | { | ||
485 | unsigned short rx_unknown PACKED; /* 00: unknown type */ | ||
486 | unsigned short rx_auth_rqst PACKED; /* 02: Authenticate-Request */ | ||
487 | unsigned short rx_auth_ack PACKED; /* 04: Authenticate-Ack */ | ||
488 | unsigned short rx_auth_nak PACKED; /* 06: Authenticate-Nak */ | ||
489 | unsigned short reserved PACKED; /* 08: */ | ||
490 | unsigned short tx_auth_rqst PACKED; /* 0A: Authenticate-Request */ | ||
491 | unsigned short tx_auth_ack PACKED; /* 0C: Authenticate-Ack */ | ||
492 | unsigned short tx_auth_nak PACKED; /* 0E: Authenticate-Nak */ | ||
493 | unsigned short rx_too_large PACKED; /* 10: packets too large */ | ||
494 | unsigned short rx_bad_peerid PACKED; /* 12: invalid peer ID */ | ||
495 | unsigned short rx_bad_passwd PACKED; /* 14: invalid password */ | ||
496 | } ppp_pap_stats_t; | ||
497 | |||
498 | /*---------------------------------------------------------------------------- | ||
499 | * CHAP Statistics (returned by the PPP_READ_CHAP_STATS command). | ||
500 | */ | ||
501 | typedef struct ppp_chap_stats | ||
502 | { | ||
503 | unsigned short rx_unknown PACKED; /* 00: unknown type */ | ||
504 | unsigned short rx_challenge PACKED; /* 02: Authenticate-Request */ | ||
505 | unsigned short rx_response PACKED; /* 04: Authenticate-Ack */ | ||
506 | unsigned short rx_success PACKED; /* 06: Authenticate-Nak */ | ||
507 | unsigned short rx_failure PACKED; /* 08: Authenticate-Nak */ | ||
508 | unsigned short reserved PACKED; /* 0A: */ | ||
509 | unsigned short tx_challenge PACKED; /* 0C: Authenticate-Request */ | ||
510 | unsigned short tx_response PACKED; /* 0E: Authenticate-Ack */ | ||
511 | unsigned short tx_success PACKED; /* 10: Authenticate-Nak */ | ||
512 | unsigned short tx_failure PACKED; /* 12: Authenticate-Nak */ | ||
513 | unsigned short rx_too_large PACKED; /* 14: packets too large */ | ||
514 | unsigned short rx_bad_peerid PACKED; /* 16: invalid peer ID */ | ||
515 | unsigned short rx_bad_passwd PACKED; /* 18: invalid password */ | ||
516 | unsigned short rx_bad_md5 PACKED; /* 1A: invalid MD5 format */ | ||
517 | unsigned short rx_bad_resp PACKED; /* 1C: invalid response */ | ||
518 | } ppp_chap_stats_t; | ||
519 | |||
520 | /*---------------------------------------------------------------------------- | ||
521 | * Connection Information (returned by the PPP_GET_CONNECTION_INFO command). | ||
522 | */ | ||
523 | typedef struct ppp_conn_info | ||
524 | { | ||
525 | unsigned short remote_mru PACKED; /* 00: */ | ||
526 | unsigned char ip_options PACKED; /* 02: */ | ||
527 | unsigned char ip_local[4] PACKED; /* 03: */ | ||
528 | unsigned char ip_remote[4] PACKED; /* 07: */ | ||
529 | unsigned char ipx_options PACKED; /* 0B: */ | ||
530 | unsigned char ipx_network[4] PACKED; /* 0C: */ | ||
531 | unsigned char ipx_local[6] PACKED; /* 10: */ | ||
532 | unsigned char ipx_remote[6] PACKED; /* 16: */ | ||
533 | unsigned char ipx_router[48] PACKED; /* 1C: */ | ||
534 | unsigned char auth_status PACKED; /* 4C: */ | ||
535 | unsigned char peer_id[0] PACKED; /* 4D: */ | ||
536 | } ppp_conn_info_t; | ||
537 | |||
538 | /* Data structure for SET_TRIGGER_INTR command | ||
539 | */ | ||
540 | |||
541 | typedef struct ppp_intr_info{ | ||
542 | unsigned char i_enable PACKED; /* 0 Interrupt enable bits */ | ||
543 | unsigned char irq PACKED; /* 1 Irq number */ | ||
544 | unsigned short timer_len PACKED; /* 2 Timer delay */ | ||
545 | } ppp_intr_info_t; | ||
546 | |||
547 | |||
548 | #define FT1_MONITOR_STATUS_CTRL 0x80 | ||
549 | #define SET_FT1_MODE 0x81 | ||
550 | |||
551 | |||
552 | |||
553 | /* Special UDP drivers management commands */ | ||
554 | #define PPIPE_ENABLE_TRACING 0x20 | ||
555 | #define PPIPE_DISABLE_TRACING 0x21 | ||
556 | #define PPIPE_GET_TRACE_INFO 0x22 | ||
557 | #define PPIPE_GET_IBA_DATA 0x23 | ||
558 | #define PPIPE_KILL_BOARD 0x24 | ||
559 | #define PPIPE_FT1_READ_STATUS 0x25 | ||
560 | #define PPIPE_DRIVER_STAT_IFSEND 0x26 | ||
561 | #define PPIPE_DRIVER_STAT_INTR 0x27 | ||
562 | #define PPIPE_DRIVER_STAT_GEN 0x28 | ||
563 | #define PPIPE_FLUSH_DRIVER_STATS 0x29 | ||
564 | #define PPIPE_ROUTER_UP_TIME 0x30 | ||
565 | |||
566 | #define DISABLE_TRACING 0x00 | ||
567 | #define TRACE_SIGNALLING_FRAMES 0x01 | ||
568 | #define TRACE_DATA_FRAMES 0x02 | ||
569 | |||
570 | |||
571 | |||
572 | #ifdef _MSC_ | ||
573 | # pragma pack() | ||
574 | #endif | ||
575 | #endif /* _SDLA_PPP_H */ | ||
diff --git a/include/linux/sdla_x25.h b/include/linux/sdla_x25.h deleted file mode 100644 index 57db980e27ad..000000000000 --- a/include/linux/sdla_x25.h +++ /dev/null | |||
@@ -1,772 +0,0 @@ | |||
1 | /***************************************************************************** | ||
2 | * sdla_x25.h Sangoma X.25 firmware API definitions. | ||
3 | * | ||
4 | * Author: Nenad Corbic <ncorbic@sangoma.com> | ||
5 | * | ||
6 | * Copyright: (c) 1995-2000 Sangoma Technologies Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version | ||
11 | 2 of the License, or (at your option) any later version. | ||
12 | * ============================================================================ | ||
13 | * Feb 28, 2000 Nenad Corbic Updated for socket based x25api | ||
14 | * Dec 13, 1996 Gene Kozin Initial version | ||
15 | *****************************************************************************/ | ||
16 | #ifndef _SDLA_X25_H | ||
17 | #define _SDLA_X25_H | ||
18 | |||
19 | /*---------------------------------------------------------------------------- | ||
20 | * Notes: | ||
21 | * ------ | ||
22 | * 1. All structures defined in this file are byte-alined. | ||
23 | * Compiler Platform | ||
24 | * -------- -------- | ||
25 | * GNU C Linux | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | #ifndef PACKED | ||
30 | # define PACKED __attribute__((packed)) | ||
31 | #endif /* PACKED */ | ||
32 | |||
33 | /****** CONSTANTS DEFINITIONS ***********************************************/ | ||
34 | |||
35 | #define X25_MAX_CHAN 255 /* max number of open X.25 circuits */ | ||
36 | #define X25_MAX_DATA 1024 /* max length of X.25 data buffer */ | ||
37 | /* | ||
38 | * X.25 shared memory layout. | ||
39 | */ | ||
40 | #define X25_MBOX_OFFS 0x16B0 /* general mailbox block */ | ||
41 | #define X25_RXMBOX_OFFS 0x1AD0 /* receive mailbox */ | ||
42 | #define X25_STATUS_OFFS 0x1EF0 /* X.25 status structure */ | ||
43 | #define X25_MB_VECTOR 0xE000 /* S514 mailbox window vecotr */ | ||
44 | #define X25_MISC_HDLC_BITS 0x1F00 /*X.25 miscallaneous HDLC bits */ | ||
45 | |||
46 | /* code levels */ | ||
47 | #define HDLC_LEVEL 0x01 | ||
48 | #define X25_LEVEL 0x02 | ||
49 | #define X25_AND_HDLC_LEVEL 0x03 | ||
50 | #define DO_HDLC_LEVEL_ERROR_CHECKING 0x04 | ||
51 | |||
52 | /****** DATA STRUCTURES *****************************************************/ | ||
53 | |||
54 | /*---------------------------------------------------------------------------- | ||
55 | * X.25 Command Block. | ||
56 | */ | ||
57 | typedef struct X25Cmd | ||
58 | { | ||
59 | unsigned char command PACKED; /* command code */ | ||
60 | unsigned short length PACKED; /* transfer data length */ | ||
61 | unsigned char result PACKED; /* return code */ | ||
62 | unsigned char pf PACKED; /* P/F bit */ | ||
63 | unsigned short lcn PACKED; /* logical channel */ | ||
64 | unsigned char qdm PACKED; /* Q/D/M bits */ | ||
65 | unsigned char cause PACKED; /* cause field */ | ||
66 | unsigned char diagn PACKED; /* diagnostics */ | ||
67 | unsigned char pktType PACKED; /* packet type */ | ||
68 | unsigned char resrv[4] PACKED; /* reserved */ | ||
69 | } TX25Cmd; | ||
70 | |||
71 | /* | ||
72 | * Defines for the 'command' field. | ||
73 | */ | ||
74 | /*----- General commands --------------*/ | ||
75 | #define X25_SET_GLOBAL_VARS 0x0B /* set global variables */ | ||
76 | #define X25_READ_MODEM_STATUS 0x0C /* read modem status */ | ||
77 | #define X25_READ_CODE_VERSION 0x15 /* read firmware version number */ | ||
78 | #define X25_TRACE_CONFIGURE 0x14 /* configure trace facility */ | ||
79 | #define X25_READ_TRACE_DATA 0x16 /* read trace data */ | ||
80 | #define X25_SET_INTERRUPT_MODE 0x17 /* set interrupt generation mode */ | ||
81 | #define X25_READ_INTERRUPT_MODE 0x18 /* read interrupt generation mode */ | ||
82 | /*----- HDLC-level commands -----------*/ | ||
83 | #define X25_HDLC_LINK_CONFIGURE 0x01 /* configure HDLC link level */ | ||
84 | #define X25_HDLC_LINK_OPEN 0x02 /* open HDLC link */ | ||
85 | #define X25_HDLC_LINK_CLOSE 0x03 /* close HDLC link */ | ||
86 | #define X25_HDLC_LINK_SETUP 0x04 /* set up HDLC link */ | ||
87 | #define X25_HDLC_LINK_DISC 0x05 /* disconnect DHLC link */ | ||
88 | #define X25_HDLC_LINK_STATUS 0x06 /* read DHLC link status */ | ||
89 | #define X25_HDLC_READ_STATS 0x07 /* read operational statistics */ | ||
90 | #define X25_HDLC_FLUSH_STATS 0x08 /* flush operational statistics */ | ||
91 | #define X25_HDLC_READ_COMM_ERR 0x09 /* read error statistics */ | ||
92 | #define X25_HDLC_FLUSH_COMM_ERR 0x0A /* flush error statistics */ | ||
93 | #define X25_HDLC_FLUSH_BUFFERS 0x0D /* flush HDLC-level data buffers */ | ||
94 | #define X25_HDLC_SPRVS_CNT_STAT 0x0F /* read surervisory count status */ | ||
95 | #define X25_HDLC_SEND_UI_FRAME 0x10 /* send unnumbered information frame */ | ||
96 | #define X25_HDLC_WRITE 0x11 /* send HDLC information frame */ | ||
97 | #define X25_HDLC_READ 0x21 /* read HDLC information frame */ | ||
98 | #define X25_HDLC_READ_CONFIG 0x12 /* read HDLC configuration */ | ||
99 | #define X25_HDLC_SET_CONFIG 0x13 /* set HDLC configuration */ | ||
100 | #define SET_PROTOCOL_LEVEL 0x1F /* set protocol level */ | ||
101 | /*----- X.25-level commands -----------*/ | ||
102 | #define X25_READ 0x22 /* read X.25 packet */ | ||
103 | #define X25_WRITE 0x23 /* send X.25 packet */ | ||
104 | #define X25_PLACE_CALL 0x30 /* place a call on SVC */ | ||
105 | #define X25_ACCEPT_CALL 0x31 /* accept incomming call */ | ||
106 | #define X25_CLEAR_CALL 0x32 /* clear call */ | ||
107 | #define X25_CLEAR_CONFRM 0x33 /* send clear confirmation packet */ | ||
108 | #define X25_RESET 0x34 /* send reset request packet */ | ||
109 | #define X25_RESET_CONFRM 0x35 /* send reset confirmation packet */ | ||
110 | #define X25_RESTART 0x36 /* send restart request packet */ | ||
111 | #define X25_RESTART_CONFRM 0x37 /* send restart confirmation packet */ | ||
112 | #define X25_INTERRUPT 0x38 /* send interrupt request packet */ | ||
113 | #define X25_INTERRUPT_CONFRM 0x39 /* send interrupt confirmation pkt */ | ||
114 | #define X25_REGISTRATION_RQST 0x3A /* send registration request packet */ | ||
115 | #define X25_REGISTRATION_CONFRM 0x3B /* send registration confirmation */ | ||
116 | #define X25_IS_DATA_AVAILABLE 0x40 /* querry receive queue */ | ||
117 | #define X25_INCOMMING_CALL_CTL 0x41 /* select incomming call options */ | ||
118 | #define X25_CONFIGURE_PVC 0x42 /* configure PVC */ | ||
119 | #define X25_GET_ACTIVE_CHANNELS 0x43 /* get a list of active circuits */ | ||
120 | #define X25_READ_CHANNEL_CONFIG 0x44 /* read virt. circuit configuration */ | ||
121 | #define X25_FLUSH_DATA_BUFFERS 0x45 /* flush X.25-level data buffers */ | ||
122 | #define X25_READ_HISTORY_TABLE 0x46 /* read asynchronous event log */ | ||
123 | #define X25_HISTORY_TABLE_CTL 0x47 /* control asynchronous event log */ | ||
124 | #define X25_GET_TX_D_BIT_STATUS 0x48 /* is packet with D-bit acknowleged */ | ||
125 | #define X25_READ_STATISTICS 0x49 /* read X.25-level statistics */ | ||
126 | #define X25_FLUSH_STATISTICS 0x4A /* flush X.25-level statistics */ | ||
127 | #define X25_READ_CONFIGURATION 0x50 /* read HDLC & X.25 configuration */ | ||
128 | #define X25_SET_CONFIGURATION 0x51 /* set HDLC & X.25 configuration */ | ||
129 | |||
130 | /* | ||
131 | * Defines for the 'result' field. | ||
132 | */ | ||
133 | /*----- General results ---------------*/ | ||
134 | #define X25RES_OK 0x00 | ||
135 | #define X25RES_ERROR 0x01 | ||
136 | #define X25RES_LINK_NOT_IN_ABM 0x02 /* link is not in ABM mode */ | ||
137 | #define X25RES_LINK_CLOSED 0x03 | ||
138 | #define X25RES_INVAL_LENGTH 0x04 | ||
139 | #define X25RES_INVAL_CMD 0x05 | ||
140 | #define X25RES_UNNUMBERED_FRAME 0x06 /* unnunbered frame received */ | ||
141 | #define X25RES_FRM_REJECT_MODE 0x07 /* link is in Frame Reject mode */ | ||
142 | #define X25RES_MODEM_FAILURE 0x08 /* DCD and/or CTS dropped */ | ||
143 | #define X25RES_N2_RETRY_LIMIT 0x09 /* N2 retry limit has been exceeded */ | ||
144 | #define X25RES_INVAL_LCN 0x30 /* invalid logical channel number */ | ||
145 | #define X25RES_INVAL_STATE 0x31 /* channel is not in data xfer mode */ | ||
146 | #define X25RES_INVAL_DATA_LEN 0x32 /* invalid data length */ | ||
147 | #define X25RES_NOT_READY 0x33 /* no data available / buffers full */ | ||
148 | #define X25RES_NETWORK_DOWN 0x34 | ||
149 | #define X25RES_CHANNEL_IN_USE 0x35 /* there is data queued on this LCN */ | ||
150 | #define X25RES_REGST_NOT_SUPPRT 0x36 /* registration not supported */ | ||
151 | #define X25RES_INVAL_FORMAT 0x37 /* invalid packet format */ | ||
152 | #define X25RES_D_BIT_NOT_SUPPRT 0x38 /* D-bit pragmatics not supported */ | ||
153 | #define X25RES_FACIL_NOT_SUPPRT 0x39 /* Call facility not supported */ | ||
154 | #define X25RES_INVAL_CALL_ARG 0x3A /* errorneous call arguments */ | ||
155 | #define X25RES_INVAL_CALL_DATA 0x3B /* errorneous call user data */ | ||
156 | #define X25RES_ASYNC_PACKET 0x40 /* asynchronous packet received */ | ||
157 | #define X25RES_PROTO_VIOLATION 0x41 /* protocol violation occurred */ | ||
158 | #define X25RES_PKT_TIMEOUT 0x42 /* X.25 packet time out */ | ||
159 | #define X25RES_PKT_RETRY_LIMIT 0x43 /* X.25 packet retry limit exceeded */ | ||
160 | /*----- Command-dependent results -----*/ | ||
161 | #define X25RES_LINK_DISC 0x00 /* HDLC_LINK_STATUS */ | ||
162 | #define X25RES_LINK_IN_ABM 0x01 /* HDLC_LINK_STATUS */ | ||
163 | #define X25RES_NO_DATA 0x01 /* HDLC_READ/READ_TRACE_DATA*/ | ||
164 | #define X25RES_TRACE_INACTIVE 0x02 /* READ_TRACE_DATA */ | ||
165 | #define X25RES_LINK_IS_OPEN 0x01 /* HDLC_LINK_OPEN */ | ||
166 | #define X25RES_LINK_IS_DISC 0x02 /* HDLC_LINK_DISC */ | ||
167 | #define X25RES_LINK_IS_CLOSED 0x03 /* HDLC_LINK_CLOSE */ | ||
168 | #define X25RES_INVAL_PARAM 0x31 /* INCOMMING_CALL_CTL */ | ||
169 | #define X25RES_INVAL_CONFIG 0x35 /* REGISTR_RQST/CONFRM */ | ||
170 | |||
171 | /* | ||
172 | * Defines for the 'qdm_bits' field. | ||
173 | */ | ||
174 | #define X25CMD_Q_BIT_MASK 0x04 | ||
175 | #define X25CMD_D_BIT_MASK 0x02 | ||
176 | #define X25CMD_M_BIT_MASK 0x01 | ||
177 | |||
178 | /* | ||
179 | * Defines for the 'pkt_type' field. | ||
180 | */ | ||
181 | /*----- Asynchronous events ------*/ | ||
182 | #define ASE_CLEAR_RQST 0x02 | ||
183 | #define ASE_RESET_RQST 0x04 | ||
184 | #define ASE_RESTART_RQST 0x08 | ||
185 | #define ASE_INTERRUPT 0x10 | ||
186 | #define ASE_DTE_REGISTR_RQST 0x20 | ||
187 | #define ASE_CALL_RQST 0x30 | ||
188 | #define ASE_CALL_ACCEPTED 0x31 | ||
189 | #define ASE_CLEAR_CONFRM 0x32 | ||
190 | #define ASE_RESET_CONFRM 0x33 | ||
191 | #define ASE_RESTART_CONFRM 0x34 | ||
192 | #define ASE_INTERRUPT_CONFRM 0x35 | ||
193 | #define ASE_DCE_REGISTR_CONFRM 0x36 | ||
194 | #define ASE_DIAGNOSTIC 0x37 | ||
195 | #define ASE_CALL_AUTO_CLEAR 0x38 | ||
196 | #define AUTO_RESPONSE_FLAG 0x80 | ||
197 | /*----- Time-Out events ----------*/ | ||
198 | #define TOE_RESTART_RQST 0x03 | ||
199 | #define TOE_CALL_RQST 0x05 | ||
200 | #define TOE_CLEAR_RQST 0x08 | ||
201 | #define TOE_RESET_RQST 0x0A | ||
202 | /*----- Protocol Violation events */ | ||
203 | #define PVE_CLEAR_RQST 0x32 | ||
204 | #define PVE_RESET_RQST 0x33 | ||
205 | #define PVE_RESTART_RQST 0x34 | ||
206 | #define PVE_DIAGNOSTIC 0x37 | ||
207 | |||
208 | #define INTR_ON_RX_FRAME 0x01 | ||
209 | #define INTR_ON_TX_FRAME 0x02 | ||
210 | #define INTR_ON_MODEM_STATUS_CHANGE 0x04 | ||
211 | #define INTR_ON_COMMAND_COMPLETE 0x08 | ||
212 | #define INTR_ON_X25_ASY_TRANSACTION 0x10 | ||
213 | #define INTR_ON_TIMER 0x40 | ||
214 | #define DIRECT_RX_INTR_USAGE 0x80 | ||
215 | |||
216 | #define NO_INTR_PENDING 0x00 | ||
217 | #define RX_INTR_PENDING 0x01 | ||
218 | #define TX_INTR_PENDING 0x02 | ||
219 | #define MODEM_INTR_PENDING 0x04 | ||
220 | #define COMMAND_COMPLETE_INTR_PENDING 0x08 | ||
221 | #define X25_ASY_TRANS_INTR_PENDING 0x10 | ||
222 | #define TIMER_INTR_PENDING 0x40 | ||
223 | |||
224 | /*---------------------------------------------------------------------------- | ||
225 | * X.25 Mailbox. | ||
226 | * This structure is located at offsets X25_MBOX_OFFS and X25_RXMBOX_OFFS | ||
227 | * into shared memory window. | ||
228 | */ | ||
229 | typedef struct X25Mbox | ||
230 | { | ||
231 | unsigned char opflag PACKED; /* 00h: execution flag */ | ||
232 | TX25Cmd cmd PACKED; /* 01h: command block */ | ||
233 | unsigned char data[1] PACKED; /* 10h: data buffer */ | ||
234 | } TX25Mbox; | ||
235 | |||
236 | /*---------------------------------------------------------------------------- | ||
237 | * X.25 Time Stamp Structure. | ||
238 | */ | ||
239 | typedef struct X25TimeStamp | ||
240 | { | ||
241 | unsigned char month PACKED; | ||
242 | unsigned char date PACKED; | ||
243 | unsigned char sec PACKED; | ||
244 | unsigned char min PACKED; | ||
245 | unsigned char hour PACKED; | ||
246 | } TX25TimeStamp; | ||
247 | |||
248 | /*---------------------------------------------------------------------------- | ||
249 | * X.25 Status Block. | ||
250 | * This structure is located at offset X25_STATUS_OFF into shared memory | ||
251 | * window. | ||
252 | */ | ||
253 | typedef struct X25Status | ||
254 | { | ||
255 | unsigned short pvc_map PACKED; /* 00h: PVC map */ | ||
256 | unsigned short icc_map PACKED; /* 02h: Incomming Chan. map */ | ||
257 | unsigned short twc_map PACKED; /* 04h: Two-way Cnan. map */ | ||
258 | unsigned short ogc_map PACKED; /* 06h: Outgoing Chan. map */ | ||
259 | TX25TimeStamp tstamp PACKED; /* 08h: timestamp (BCD) */ | ||
260 | unsigned char iflags PACKED; /* 0Dh: interrupt flags */ | ||
261 | unsigned char imask PACKED; /* 0Eh: interrupt mask */ | ||
262 | unsigned char resrv PACKED; /* 0Eh: */ | ||
263 | unsigned char gflags PACKED; /* 10h: misc. HDLC/X25 flags */ | ||
264 | unsigned char cflags[X25_MAX_CHAN] PACKED; /* channel status bytes */ | ||
265 | } TX25Status; | ||
266 | |||
267 | /* | ||
268 | * Bitmasks for the 'iflags' field. | ||
269 | */ | ||
270 | #define X25_RX_INTR 0x01 /* receive interrupt */ | ||
271 | #define X25_TX_INTR 0x02 /* transmit interrupt */ | ||
272 | #define X25_MODEM_INTR 0x04 /* modem status interrupt (CTS/DCD) */ | ||
273 | #define X25_EVENT_INTR 0x10 /* asyncronous event encountered */ | ||
274 | #define X25_CMD_INTR 0x08 /* interface command complete */ | ||
275 | |||
276 | /* | ||
277 | * Bitmasks for the 'gflags' field. | ||
278 | */ | ||
279 | #define X25_HDLC_ABM 0x01 /* HDLC is in ABM mode */ | ||
280 | #define X25_RX_READY 0x02 /* X.25 data available */ | ||
281 | #define X25_TRACE_READY 0x08 /* trace data available */ | ||
282 | #define X25_EVENT_IND 0x20 /* asynchronous event indicator */ | ||
283 | #define X25_TX_READY 0x40 /* space is available in Tx buf.*/ | ||
284 | |||
285 | /* | ||
286 | * Bitmasks for the 'cflags' field. | ||
287 | */ | ||
288 | #define X25_XFER_MODE 0x80 /* channel is in data transfer mode */ | ||
289 | #define X25_TXWIN_OPEN 0x40 /* transmit window open */ | ||
290 | #define X25_RXBUF_MASK 0x3F /* number of data buffers available */ | ||
291 | |||
292 | /***************************************************************************** | ||
293 | * Following definitions structurize contents of the TX25Mbox.data field for | ||
294 | * different X.25 interface commands. | ||
295 | ****************************************************************************/ | ||
296 | |||
297 | /* --------------------------------------------------------------------------- | ||
298 | * X25_SET_GLOBAL_VARS Command. | ||
299 | */ | ||
300 | typedef struct X25GlobalVars | ||
301 | { | ||
302 | unsigned char resrv PACKED; /* 00h: reserved */ | ||
303 | unsigned char dtrCtl PACKED; /* 01h: DTR control code */ | ||
304 | unsigned char resErr PACKED; /* 01h: '1' - reset modem error */ | ||
305 | } TX25GlobalVars; | ||
306 | |||
307 | /* | ||
308 | * Defines for the 'dtrCtl' field. | ||
309 | */ | ||
310 | #define X25_RAISE_DTR 0x01 | ||
311 | #define X25_DROP_DTR 0x02 | ||
312 | |||
313 | /* --------------------------------------------------------------------------- | ||
314 | * X25_READ_MODEM_STATUS Command. | ||
315 | */ | ||
316 | typedef struct X25ModemStatus | ||
317 | { | ||
318 | unsigned char status PACKED; /* 00h: modem status */ | ||
319 | } TX25ModemStatus; | ||
320 | |||
321 | /* | ||
322 | * Defines for the 'status' field. | ||
323 | */ | ||
324 | #define X25_CTS_MASK 0x20 | ||
325 | #define X25_DCD_MASK 0x08 | ||
326 | |||
327 | /* --------------------------------------------------------------------------- | ||
328 | * X25_HDLC_LINK_STATUS Command. | ||
329 | */ | ||
330 | typedef struct X25LinkStatus | ||
331 | { | ||
332 | unsigned char txQueued PACKED; /* 00h: queued Tx I-frames*/ | ||
333 | unsigned char rxQueued PACKED; /* 01h: queued Rx I-frames*/ | ||
334 | unsigned char station PACKED; /* 02h: DTE/DCE config. */ | ||
335 | unsigned char reserved PACKED; /* 03h: reserved */ | ||
336 | unsigned char sfTally PACKED; /* 04h: supervisory frame tally */ | ||
337 | } TX25LinkStatus; | ||
338 | |||
339 | /* | ||
340 | * Defines for the 'station' field. | ||
341 | */ | ||
342 | #define X25_STATION_DTE 0x01 /* station configured as DTE */ | ||
343 | #define X25_STATION_DCE 0x02 /* station configured as DCE */ | ||
344 | |||
345 | /* --------------------------------------------------------------------------- | ||
346 | * X25_HDLC_READ_STATS Command. | ||
347 | */ | ||
348 | typedef struct HdlcStats | ||
349 | { /* a number of ... */ | ||
350 | unsigned short rxIFrames PACKED; /* 00h: ready Rx I-frames */ | ||
351 | unsigned short rxNoseq PACKED; /* 02h: frms out-of-sequence */ | ||
352 | unsigned short rxNodata PACKED; /* 04h: I-frms without data */ | ||
353 | unsigned short rxDiscarded PACKED; /* 06h: discarded frames */ | ||
354 | unsigned short rxTooLong PACKED; /* 08h: frames too long */ | ||
355 | unsigned short rxBadAddr PACKED; /* 0Ah: frms with inval.addr*/ | ||
356 | unsigned short txAcked PACKED; /* 0Ch: acknowledged I-frms */ | ||
357 | unsigned short txRetransm PACKED; /* 0Eh: re-transmit. I-frms */ | ||
358 | unsigned short t1Timeout PACKED; /* 10h: T1 timeouts */ | ||
359 | unsigned short rxSABM PACKED; /* 12h: received SABM frames */ | ||
360 | unsigned short rxDISC PACKED; /* 14h: received DISC frames */ | ||
361 | unsigned short rxDM PACKED; /* 16h: received DM frames */ | ||
362 | unsigned short rxFRMR PACKED; /* 18h: FRMR frames received */ | ||
363 | unsigned short txSABM PACKED; /* 1Ah: transm. SABM frames*/ | ||
364 | unsigned short txDISC PACKED; /* 1Ch: transm. DISC frames*/ | ||
365 | unsigned short txDM PACKED; /* 1Eh: transm. DM frames */ | ||
366 | unsigned short txFRMR PACKED; /* 20h: transm. FRMR frames*/ | ||
367 | } THdlcStats; | ||
368 | |||
369 | /* --------------------------------------------------------------------------- | ||
370 | * X25_HDLC_READ_COMM_ERR Command. | ||
371 | */ | ||
372 | typedef struct HdlcCommErr | ||
373 | { /* a number of ... */ | ||
374 | unsigned char rxOverrun PACKED; /* 00h: Rx overrun errors */ | ||
375 | unsigned char rxBadCrc PACKED; /* 01h: Rx CRC errors */ | ||
376 | unsigned char rxAborted PACKED; /* 02h: Rx aborted frames */ | ||
377 | unsigned char rxDropped PACKED; /* 03h: frames lost */ | ||
378 | unsigned char txAborted PACKED; /* 04h: Tx aborted frames */ | ||
379 | unsigned char txUnderrun PACKED; /* 05h: Tx underrun errors */ | ||
380 | unsigned char txMissIntr PACKED; /* 06h: missed underrun ints */ | ||
381 | unsigned char reserved PACKED; /* 07h: reserved */ | ||
382 | unsigned char droppedDCD PACKED; /* 08h: times DCD dropped */ | ||
383 | unsigned char droppedCTS PACKED; /* 09h: times CTS dropped */ | ||
384 | } THdlcCommErr; | ||
385 | |||
386 | /* --------------------------------------------------------------------------- | ||
387 | * X25_SET_CONFIGURATION & X25_READ_CONFIGURATION Commands. | ||
388 | */ | ||
389 | typedef struct X25Config | ||
390 | { | ||
391 | unsigned char baudRate PACKED; /* 00h: */ | ||
392 | unsigned char t1 PACKED; /* 01h: */ | ||
393 | unsigned char t2 PACKED; /* 02h: */ | ||
394 | unsigned char n2 PACKED; /* 03h: */ | ||
395 | unsigned short hdlcMTU PACKED; /* 04h: */ | ||
396 | unsigned char hdlcWindow PACKED; /* 06h: */ | ||
397 | unsigned char t4 PACKED; /* 07h: */ | ||
398 | unsigned char autoModem PACKED; /* 08h: */ | ||
399 | unsigned char autoHdlc PACKED; /* 09h: */ | ||
400 | unsigned char hdlcOptions PACKED; /* 0Ah: */ | ||
401 | unsigned char station PACKED; /* 0Bh: */ | ||
402 | unsigned char pktWindow PACKED; /* 0Ch: */ | ||
403 | unsigned short defPktSize PACKED; /* 0Dh: */ | ||
404 | unsigned short pktMTU PACKED; /* 0Fh: */ | ||
405 | unsigned short loPVC PACKED; /* 11h: */ | ||
406 | unsigned short hiPVC PACKED; /* 13h: */ | ||
407 | unsigned short loIncommingSVC PACKED; /* 15h: */ | ||
408 | unsigned short hiIncommingSVC PACKED; /* 17h: */ | ||
409 | unsigned short loTwoWaySVC PACKED; /* 19h: */ | ||
410 | unsigned short hiTwoWaySVC PACKED; /* 1Bh: */ | ||
411 | unsigned short loOutgoingSVC PACKED; /* 1Dh: */ | ||
412 | unsigned short hiOutgoingSVC PACKED; /* 1Fh: */ | ||
413 | unsigned short options PACKED; /* 21h: */ | ||
414 | unsigned char responseOpt PACKED; /* 23h: */ | ||
415 | unsigned short facil1 PACKED; /* 24h: */ | ||
416 | unsigned short facil2 PACKED; /* 26h: */ | ||
417 | unsigned short ccittFacil PACKED; /* 28h: */ | ||
418 | unsigned short otherFacil PACKED; /* 2Ah: */ | ||
419 | unsigned short ccittCompat PACKED; /* 2Ch: */ | ||
420 | unsigned char t10t20 PACKED; /* 2Eh: */ | ||
421 | unsigned char t11t21 PACKED; /* 2Fh: */ | ||
422 | unsigned char t12t22 PACKED; /* 30h: */ | ||
423 | unsigned char t13t23 PACKED; /* 31h: */ | ||
424 | unsigned char t16t26 PACKED; /* 32H: */ | ||
425 | unsigned char t28 PACKED; /* 33h: */ | ||
426 | unsigned char r10r20 PACKED; /* 34h: */ | ||
427 | unsigned char r12r22 PACKED; /* 35h: */ | ||
428 | unsigned char r13r23 PACKED; /* 36h: */ | ||
429 | } TX25Config; | ||
430 | |||
431 | /* --------------------------------------------------------------------------- | ||
432 | * X25_READ_CHANNEL_CONFIG Command. | ||
433 | */ | ||
434 | typedef struct X25ChanAlloc /*----- Channel allocation -*/ | ||
435 | { | ||
436 | unsigned short loPVC PACKED; /* 00h: lowest PVC number */ | ||
437 | unsigned short hiPVC PACKED; /* 02h: highest PVC number */ | ||
438 | unsigned short loIncommingSVC PACKED; /* 04h: lowest incoming SVC */ | ||
439 | unsigned short hiIncommingSVC PACKED; /* 06h: highest incoming SVC */ | ||
440 | unsigned short loTwoWaySVC PACKED; /* 08h: lowest two-way SVC */ | ||
441 | unsigned short hiTwoWaySVC PACKED; /* 0Ah: highest two-way SVC */ | ||
442 | unsigned short loOutgoingSVC PACKED; /* 0Ch: lowest outgoing SVC */ | ||
443 | unsigned short hiOutgoingSVC PACKED; /* 0Eh: highest outgoing SVC */ | ||
444 | } TX25ChanAlloc; | ||
445 | |||
446 | typedef struct X25ChanCfg /*------ Channel configuration -----*/ | ||
447 | { | ||
448 | unsigned char type PACKED; /* 00h: channel type */ | ||
449 | unsigned char txConf PACKED; /* 01h: Tx packet and window sizes */ | ||
450 | unsigned char rxConf PACKED; /* 01h: Rx packet and window sizes */ | ||
451 | } TX25ChanCfg; | ||
452 | |||
453 | /* | ||
454 | * Defines for the 'type' field. | ||
455 | */ | ||
456 | #define X25_PVC 0x01 /* PVC */ | ||
457 | #define X25_SVC_IN 0x03 /* Incoming SVC */ | ||
458 | #define X25_SVC_TWOWAY 0x07 /* Two-way SVC */ | ||
459 | #define X25_SVC_OUT 0x0B /* Outgoing SVC */ | ||
460 | |||
461 | /*---------------------------------------------------------------------------- | ||
462 | * X25_READ_STATISTICS Command. | ||
463 | */ | ||
464 | typedef struct X25Stats | ||
465 | { /* number of packets Tx/Rx'ed */ | ||
466 | unsigned short txRestartRqst PACKED; /* 00h: Restart Request */ | ||
467 | unsigned short rxRestartRqst PACKED; /* 02h: Restart Request */ | ||
468 | unsigned short txRestartConf PACKED; /* 04h: Restart Confirmation */ | ||
469 | unsigned short rxRestartConf PACKED; /* 06h: Restart Confirmation */ | ||
470 | unsigned short txResetRqst PACKED; /* 08h: Reset Request */ | ||
471 | unsigned short rxResetRqst PACKED; /* 0Ah: Reset Request */ | ||
472 | unsigned short txResetConf PACKED; /* 0Ch: Reset Confirmation */ | ||
473 | unsigned short rxResetConf PACKED; /* 0Eh: Reset Confirmation */ | ||
474 | unsigned short txCallRequest PACKED; /* 10h: Call Request */ | ||
475 | unsigned short rxCallRequest PACKED; /* 12h: Call Request */ | ||
476 | unsigned short txCallAccept PACKED; /* 14h: Call Accept */ | ||
477 | unsigned short rxCallAccept PACKED; /* 16h: Call Accept */ | ||
478 | unsigned short txClearRqst PACKED; /* 18h: Clear Request */ | ||
479 | unsigned short rxClearRqst PACKED; /* 1Ah: Clear Request */ | ||
480 | unsigned short txClearConf PACKED; /* 1Ch: Clear Confirmation */ | ||
481 | unsigned short rxClearConf PACKED; /* 1Eh: Clear Confirmation */ | ||
482 | unsigned short txDiagnostic PACKED; /* 20h: Diagnostic */ | ||
483 | unsigned short rxDiagnostic PACKED; /* 22h: Diagnostic */ | ||
484 | unsigned short txRegRqst PACKED; /* 24h: Registration Request */ | ||
485 | unsigned short rxRegRqst PACKED; /* 26h: Registration Request */ | ||
486 | unsigned short txRegConf PACKED; /* 28h: Registration Confirm.*/ | ||
487 | unsigned short rxRegConf PACKED; /* 2Ah: Registration Confirm.*/ | ||
488 | unsigned short txInterrupt PACKED; /* 2Ch: Interrupt */ | ||
489 | unsigned short rxInterrupt PACKED; /* 2Eh: Interrupt */ | ||
490 | unsigned short txIntrConf PACKED; /* 30h: Interrupt Confirm. */ | ||
491 | unsigned short rxIntrConf PACKED; /* 32h: Interrupt Confirm. */ | ||
492 | unsigned short txData PACKED; /* 34h: Data */ | ||
493 | unsigned short rxData PACKED; /* 36h: Data */ | ||
494 | unsigned short txRR PACKED; /* 38h: RR */ | ||
495 | unsigned short rxRR PACKED; /* 3Ah: RR */ | ||
496 | unsigned short txRNR PACKED; /* 3Ch: RNR */ | ||
497 | unsigned short rxRNR PACKED; /* 3Eh: RNR */ | ||
498 | } TX25Stats; | ||
499 | |||
500 | /*---------------------------------------------------------------------------- | ||
501 | * X25_READ_HISTORY_TABLE Command. | ||
502 | */ | ||
503 | typedef struct X25EventLog | ||
504 | { | ||
505 | unsigned char type PACKED; /* 00h: transaction type */ | ||
506 | unsigned short lcn PACKED; /* 01h: logical channel num */ | ||
507 | unsigned char packet PACKED; /* 03h: async packet type */ | ||
508 | unsigned char cause PACKED; /* 04h: X.25 cause field */ | ||
509 | unsigned char diag PACKED; /* 05h: X.25 diag field */ | ||
510 | TX25TimeStamp ts PACKED; /* 06h: time stamp */ | ||
511 | } TX25EventLog; | ||
512 | |||
513 | /* | ||
514 | * Defines for the 'type' field. | ||
515 | */ | ||
516 | #define X25LOG_INCOMMING 0x00 | ||
517 | #define X25LOG_APPLICATION 0x01 | ||
518 | #define X25LOG_AUTOMATIC 0x02 | ||
519 | #define X25LOG_ERROR 0x04 | ||
520 | #define X25LOG_TIMEOUT 0x08 | ||
521 | #define X25LOG_RECOVERY 0x10 | ||
522 | |||
523 | /* | ||
524 | * Defines for the 'packet' field. | ||
525 | */ | ||
526 | #define X25LOG_CALL_RQST 0x0B | ||
527 | #define X25LOG_CALL_ACCEPTED 0x0F | ||
528 | #define X25LOG_CLEAR_RQST 0x13 | ||
529 | #define X25LOG_CLEAR_CONFRM 0x17 | ||
530 | #define X25LOG_RESET_RQST 0x1B | ||
531 | #define X25LOG_RESET_CONFRM 0x1F | ||
532 | #define X25LOG_RESTART_RQST 0xFB | ||
533 | #define X25LOG_RESTART_COMFRM 0xFF | ||
534 | #define X25LOG_DIAGNOSTIC 0xF1 | ||
535 | #define X25LOG_DTE_REG_RQST 0xF3 | ||
536 | #define X25LOG_DTE_REG_COMFRM 0xF7 | ||
537 | |||
538 | /* --------------------------------------------------------------------------- | ||
539 | * X25_TRACE_CONFIGURE Command. | ||
540 | */ | ||
541 | typedef struct X25TraceCfg | ||
542 | { | ||
543 | unsigned char flags PACKED; /* 00h: trace configuration flags */ | ||
544 | unsigned char timeout PACKED; /* 01h: timeout for trace delay mode*/ | ||
545 | } TX25TraceCfg; | ||
546 | |||
547 | /* | ||
548 | * Defines for the 'flags' field. | ||
549 | */ | ||
550 | #define X25_TRC_ENABLE 0x01 /* bit0: '1' - trace enabled */ | ||
551 | #define X25_TRC_TIMESTAMP 0x02 /* bit1: '1' - time stamping enabled*/ | ||
552 | #define X25_TRC_DELAY 0x04 /* bit2: '1' - trace delay enabled */ | ||
553 | #define X25_TRC_DATA 0x08 /* bit3: '1' - trace data packets */ | ||
554 | #define X25_TRC_SUPERVISORY 0x10 /* bit4: '1' - trace suprvisory pkts*/ | ||
555 | #define X25_TRC_ASYNCHRONOUS 0x20 /* bit5: '1' - trace asynch. packets*/ | ||
556 | #define X25_TRC_HDLC 0x40 /* bit6: '1' - trace all packets */ | ||
557 | #define X25_TRC_READ 0x80 /* bit7: '1' - get current config. */ | ||
558 | |||
559 | /* --------------------------------------------------------------------------- | ||
560 | * X25_READ_TRACE_DATA Command. | ||
561 | */ | ||
562 | typedef struct X25Trace /*----- Trace data structure -------*/ | ||
563 | { | ||
564 | unsigned short length PACKED; /* 00h: trace data length */ | ||
565 | unsigned char type PACKED; /* 02h: trace type */ | ||
566 | unsigned char lost_cnt PACKED; /* 03h: N of traces lost */ | ||
567 | TX25TimeStamp tstamp PACKED; /* 04h: mon/date/sec/min/hour */ | ||
568 | unsigned short millisec PACKED; /* 09h: ms time stamp */ | ||
569 | unsigned char data[0] PACKED; /* 0Bh: traced frame */ | ||
570 | } TX25Trace; | ||
571 | |||
572 | /* | ||
573 | * Defines for the 'type' field. | ||
574 | */ | ||
575 | #define X25_TRC_TYPE_MASK 0x0F /* bits 0..3: trace type */ | ||
576 | #define X25_TRC_TYPE_RX_FRAME 0x00 /* received frame trace */ | ||
577 | #define X25_TRC_TYPE_TX_FRAME 0x01 /* transmitted frame */ | ||
578 | #define X25_TRC_TYPE_ERR_FRAME 0x02 /* error frame */ | ||
579 | |||
580 | #define X25_TRC_ERROR_MASK 0xF0 /* bits 4..7: error code */ | ||
581 | #define X25_TRCERR_RX_ABORT 0x10 /* receive abort error */ | ||
582 | #define X25_TRCERR_RX_BADCRC 0x20 /* receive CRC error */ | ||
583 | #define X25_TRCERR_RX_OVERRUN 0x30 /* receiver overrun error */ | ||
584 | #define X25_TRCERR_RX_TOO_LONG 0x40 /* excessive frame length error */ | ||
585 | #define X25_TRCERR_TX_ABORT 0x70 /* aborted frame transmittion error */ | ||
586 | #define X25_TRCERR_TX_UNDERRUN 0x80 /* transmit underrun error */ | ||
587 | |||
588 | /***************************************************************************** | ||
589 | * Following definitions describe HDLC frame and X.25 packet formats. | ||
590 | ****************************************************************************/ | ||
591 | |||
592 | typedef struct HDLCFrame /*----- DHLC Frame Format ----------*/ | ||
593 | { | ||
594 | unsigned char addr PACKED; /* address field */ | ||
595 | unsigned char cntl PACKED; /* control field */ | ||
596 | unsigned char data[0] PACKED; | ||
597 | } THDLCFrame; | ||
598 | |||
599 | typedef struct X25Pkt /*----- X.25 Paket Format ----------*/ | ||
600 | { | ||
601 | unsigned char lcn_hi PACKED; /* 4 MSB of Logical Channel Number */ | ||
602 | unsigned char lcn_lo PACKED; /* 8 LSB of Logical Channel Number */ | ||
603 | unsigned char type PACKED; | ||
604 | unsigned char data[0] PACKED; | ||
605 | } TX25Pkt; | ||
606 | |||
607 | /* | ||
608 | * Defines for the 'lcn_hi' field. | ||
609 | */ | ||
610 | #define X25_Q_BIT_MASK 0x80 /* Data Qualifier Bit mask */ | ||
611 | #define X25_D_BIT_MASK 0x40 /* Delivery Confirmation Bit mask */ | ||
612 | #define X25_M_BITS_MASK 0x30 /* Modulo Bits mask */ | ||
613 | #define X25_LCN_MSB_MASK 0x0F /* LCN most significant bits mask */ | ||
614 | |||
615 | /* | ||
616 | * Defines for the 'type' field. | ||
617 | */ | ||
618 | #define X25PKT_DATA 0x01 /* Data packet mask */ | ||
619 | #define X25PKT_SUPERVISORY 0x02 /* Supervisory packet mask */ | ||
620 | #define X25PKT_CALL_RQST 0x0B /* Call Request/Incoming */ | ||
621 | #define X25PKT_CALL_ACCEPTED 0x0F /* Call Accepted/Connected */ | ||
622 | #define X25PKT_CLEAR_RQST 0x13 /* Clear Request/Indication */ | ||
623 | #define X25PKT_CLEAR_CONFRM 0x17 /* Clear Confirmation */ | ||
624 | #define X25PKT_RESET_RQST 0x1B /* Reset Request/Indication */ | ||
625 | #define X25PKT_RESET_CONFRM 0x1F /* Reset Confirmation */ | ||
626 | #define X25PKT_RESTART_RQST 0xFB /* Restart Request/Indication */ | ||
627 | #define X25PKT_RESTART_CONFRM 0xFF /* Restart Confirmation */ | ||
628 | #define X25PKT_INTERRUPT 0x23 /* Interrupt */ | ||
629 | #define X25PKT_INTERRUPT_CONFRM 0x27 /* Interrupt Confirmation */ | ||
630 | #define X25PKT_DIAGNOSTIC 0xF1 /* Diagnostic */ | ||
631 | #define X25PKT_REGISTR_RQST 0xF3 /* Registration Request */ | ||
632 | #define X25PKT_REGISTR_CONFRM 0xF7 /* Registration Confirmation */ | ||
633 | #define X25PKT_RR_MASKED 0x01 /* Receive Ready packet after masking */ | ||
634 | #define X25PKT_RNR_MASKED 0x05 /* Receive Not Ready after masking */ | ||
635 | |||
636 | |||
637 | typedef struct { | ||
638 | TX25Cmd cmd PACKED; | ||
639 | char data[X25_MAX_DATA] PACKED; | ||
640 | } mbox_cmd_t; | ||
641 | |||
642 | |||
643 | typedef struct { | ||
644 | unsigned char qdm PACKED; /* Q/D/M bits */ | ||
645 | unsigned char cause PACKED; /* cause field */ | ||
646 | unsigned char diagn PACKED; /* diagnostics */ | ||
647 | unsigned char pktType PACKED; | ||
648 | unsigned short length PACKED; | ||
649 | unsigned char result PACKED; | ||
650 | unsigned short lcn PACKED; | ||
651 | char reserved[7] PACKED; | ||
652 | }x25api_hdr_t; | ||
653 | |||
654 | |||
655 | typedef struct { | ||
656 | x25api_hdr_t hdr PACKED; | ||
657 | char data[X25_MAX_DATA] PACKED; | ||
658 | }x25api_t; | ||
659 | |||
660 | |||
661 | /* | ||
662 | * XPIPEMON Definitions | ||
663 | */ | ||
664 | |||
665 | /* valid ip_protocol for UDP management */ | ||
666 | #define UDPMGMT_UDP_PROTOCOL 0x11 | ||
667 | #define UDPMGMT_XPIPE_SIGNATURE "XLINK8ND" | ||
668 | #define UDPMGMT_DRVRSTATS_SIGNATURE "DRVSTATS" | ||
669 | |||
670 | /* values for request/reply byte */ | ||
671 | #define UDPMGMT_REQUEST 0x01 | ||
672 | #define UDPMGMT_REPLY 0x02 | ||
673 | #define UDP_OFFSET 12 | ||
674 | |||
675 | |||
676 | typedef struct { | ||
677 | unsigned char opp_flag PACKED; /* the opp flag */ | ||
678 | unsigned char command PACKED; /* command code */ | ||
679 | unsigned short length PACKED; /* transfer data length */ | ||
680 | unsigned char result PACKED; /* return code */ | ||
681 | unsigned char pf PACKED; /* P/F bit */ | ||
682 | unsigned short lcn PACKED; /* logical channel */ | ||
683 | unsigned char qdm PACKED; /* Q/D/M bits */ | ||
684 | unsigned char cause PACKED; /* cause field */ | ||
685 | unsigned char diagn PACKED; /* diagnostics */ | ||
686 | unsigned char pktType PACKED; /* packet type */ | ||
687 | unsigned char resrv[4] PACKED; /* reserved */ | ||
688 | } cblock_t; | ||
689 | |||
690 | typedef struct { | ||
691 | ip_pkt_t ip_pkt PACKED; | ||
692 | udp_pkt_t udp_pkt PACKED; | ||
693 | wp_mgmt_t wp_mgmt PACKED; | ||
694 | cblock_t cblock PACKED; | ||
695 | unsigned char data[4080] PACKED; | ||
696 | } x25_udp_pkt_t; | ||
697 | |||
698 | |||
699 | typedef struct read_hdlc_stat { | ||
700 | unsigned short inf_frames_rx_ok PACKED; | ||
701 | unsigned short inf_frames_rx_out_of_seq PACKED; | ||
702 | unsigned short inf_frames_rx_no_data PACKED; | ||
703 | unsigned short inf_frames_rx_dropped PACKED; | ||
704 | unsigned short inf_frames_rx_data_too_long PACKED; | ||
705 | unsigned short inf_frames_rx_invalid_addr PACKED; | ||
706 | unsigned short inf_frames_tx_ok PACKED; | ||
707 | unsigned short inf_frames_tx_retransmit PACKED; | ||
708 | unsigned short T1_timeouts PACKED; | ||
709 | unsigned short SABM_frames_rx PACKED; | ||
710 | unsigned short DISC_frames_rx PACKED; | ||
711 | unsigned short DM_frames_rx PACKED; | ||
712 | unsigned short FRMR_frames_rx PACKED; | ||
713 | unsigned short SABM_frames_tx PACKED; | ||
714 | unsigned short DISC_frames_tx PACKED; | ||
715 | unsigned short DM_frames_tx PACKED; | ||
716 | unsigned short FRMR_frames_tx PACKED; | ||
717 | } read_hdlc_stat_t; | ||
718 | |||
719 | typedef struct read_comms_err_stats{ | ||
720 | unsigned char overrun_err_rx PACKED; | ||
721 | unsigned char CRC_err PACKED; | ||
722 | unsigned char abort_frames_rx PACKED; | ||
723 | unsigned char frames_dropped_buf_full PACKED; | ||
724 | unsigned char abort_frames_tx PACKED; | ||
725 | unsigned char transmit_underruns PACKED; | ||
726 | unsigned char missed_tx_underruns_intr PACKED; | ||
727 | unsigned char reserved PACKED; | ||
728 | unsigned char DCD_drop PACKED; | ||
729 | unsigned char CTS_drop PACKED; | ||
730 | } read_comms_err_stats_t; | ||
731 | |||
732 | typedef struct trace_data { | ||
733 | unsigned short length PACKED; | ||
734 | unsigned char type PACKED; | ||
735 | unsigned char trace_dropped PACKED; | ||
736 | unsigned char reserved[5] PACKED; | ||
737 | unsigned short timestamp PACKED; | ||
738 | unsigned char data PACKED; | ||
739 | } trace_data_t; | ||
740 | |||
741 | enum {UDP_XPIPE_TYPE}; | ||
742 | |||
743 | #define XPIPE_ENABLE_TRACING 0x14 | ||
744 | #define XPIPE_DISABLE_TRACING 0x14 | ||
745 | #define XPIPE_GET_TRACE_INFO 0x16 | ||
746 | #define XPIPE_FT1_READ_STATUS 0x74 | ||
747 | #define XPIPE_DRIVER_STAT_IFSEND 0x75 | ||
748 | #define XPIPE_DRIVER_STAT_INTR 0x76 | ||
749 | #define XPIPE_DRIVER_STAT_GEN 0x77 | ||
750 | #define XPIPE_FLUSH_DRIVER_STATS 0x78 | ||
751 | #define XPIPE_ROUTER_UP_TIME 0x79 | ||
752 | #define XPIPE_SET_FT1_MODE 0x81 | ||
753 | #define XPIPE_FT1_STATUS_CTRL 0x80 | ||
754 | |||
755 | |||
756 | /* error messages */ | ||
757 | #define NO_BUFFS_OR_CLOSED_WIN 0x33 | ||
758 | #define DATA_LENGTH_TOO_BIG 0x32 | ||
759 | #define NO_DATA_AVAILABLE 0x33 | ||
760 | #define Z80_TIMEOUT_ERROR 0x0a | ||
761 | #define NO_BUFFS 0x08 | ||
762 | |||
763 | |||
764 | /* Trace options */ | ||
765 | #define TRACE_DEFAULT 0x03 | ||
766 | #define TRACE_SUPERVISOR_FRMS 0x10 | ||
767 | #define TRACE_ASYNC_FRMS 0x20 | ||
768 | #define TRACE_ALL_HDLC_FRMS 0x40 | ||
769 | #define TRACE_DATA_FRMS 0x08 | ||
770 | |||
771 | |||
772 | #endif /* _SDLA_X25_H */ | ||
diff --git a/include/linux/sdladrv.h b/include/linux/sdladrv.h deleted file mode 100644 index c85e103d5e7b..000000000000 --- a/include/linux/sdladrv.h +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | /***************************************************************************** | ||
2 | * sdladrv.h SDLA Support Module. Kernel API Definitions. | ||
3 | * | ||
4 | * Author: Gideon Hack | ||
5 | * | ||
6 | * Copyright: (c) 1995-2000 Sangoma Technologies Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version | ||
11 | * 2 of the License, or (at your option) any later version. | ||
12 | * ============================================================================ | ||
13 | * Jun 02, 1999 Gideon Hack Added support for the S514 PCI adapter. | ||
14 | * Dec 11, 1996 Gene Kozin Complete overhaul. | ||
15 | * Oct 17, 1996 Gene Kozin Minor bug fixes. | ||
16 | * Jun 12, 1996 Gene Kozin Added support for S503 card. | ||
17 | * Dec 06, 1995 Gene Kozin Initial version. | ||
18 | *****************************************************************************/ | ||
19 | #ifndef _SDLADRV_H | ||
20 | #define _SDLADRV_H | ||
21 | |||
22 | |||
23 | #define SDLA_MAXIORANGE 4 /* maximum I/O port range */ | ||
24 | #define SDLA_WINDOWSIZE 0x2000 /* default dual-port memory window size */ | ||
25 | /****** Data Structures *****************************************************/ | ||
26 | |||
27 | /*---------------------------------------------------------------------------- | ||
28 | * Adapter hardware configuration. Pointer to this structure is passed to all | ||
29 | * APIs. | ||
30 | */ | ||
31 | typedef struct sdlahw | ||
32 | { | ||
33 | unsigned type; /* adapter type */ | ||
34 | unsigned fwid; /* firmware ID */ | ||
35 | unsigned port; /* adapter I/O port base */ | ||
36 | int irq; /* interrupt request level */ | ||
37 | char S514_cpu_no[1]; /* PCI CPU Number */ | ||
38 | unsigned char S514_slot_no; /* PCI Slot Number */ | ||
39 | char auto_pci_cfg; /* Autodetect PCI Slot */ | ||
40 | struct pci_dev *pci_dev; /* PCI device */ | ||
41 | void * dpmbase; /* dual-port memory base */ | ||
42 | unsigned dpmsize; /* dual-port memory size */ | ||
43 | unsigned pclk; /* CPU clock rate, kHz */ | ||
44 | unsigned long memory; /* memory size */ | ||
45 | unsigned long vector; /* local offset of the DPM window */ | ||
46 | unsigned io_range; /* I/O port range */ | ||
47 | unsigned char regs[SDLA_MAXIORANGE]; /* was written to registers */ | ||
48 | unsigned reserved[5]; | ||
49 | } sdlahw_t; | ||
50 | |||
51 | /****** Function Prototypes *************************************************/ | ||
52 | |||
53 | extern int sdla_setup (sdlahw_t* hw, void* sfm, unsigned len); | ||
54 | extern int sdla_down (sdlahw_t* hw); | ||
55 | extern void S514_intack (sdlahw_t* hw, u32 int_status); | ||
56 | extern void read_S514_int_stat (sdlahw_t* hw, u32* int_status); | ||
57 | extern int sdla_mapmem (sdlahw_t* hw, unsigned long addr); | ||
58 | extern int sdla_peek (sdlahw_t* hw, unsigned long addr, void* buf, | ||
59 | unsigned len); | ||
60 | extern int sdla_poke (sdlahw_t* hw, unsigned long addr, void* buf, | ||
61 | unsigned len); | ||
62 | extern int sdla_exec (void* opflag); | ||
63 | |||
64 | extern unsigned wanpipe_hw_probe(void); | ||
65 | |||
66 | #endif /* _SDLADRV_H */ | ||
diff --git a/include/linux/sdlapci.h b/include/linux/sdlapci.h deleted file mode 100644 index 6f7c904f188d..000000000000 --- a/include/linux/sdlapci.h +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /***************************************************************************** | ||
2 | * sdlapci.h WANPIPE(tm) Multiprotocol WAN Link Driver. | ||
3 | * Definitions for the SDLA PCI adapter. | ||
4 | * | ||
5 | * Author: Gideon Hack <ghack@sangoma.com> | ||
6 | * | ||
7 | * Copyright: (c) 1999-2000 Sangoma Technologies Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; either version | ||
12 | * 2 of the License, or (at your option) any later version. | ||
13 | * ============================================================================ | ||
14 | * Jun 02, 1999 Gideon Hack Initial version. | ||
15 | *****************************************************************************/ | ||
16 | #ifndef _SDLAPCI_H | ||
17 | #define _SDLAPCI_H | ||
18 | |||
19 | /****** Defines *************************************************************/ | ||
20 | |||
21 | /* Definitions for identifying and finding S514 PCI adapters */ | ||
22 | #define V3_VENDOR_ID 0x11B0 /* V3 vendor ID number */ | ||
23 | #define V3_DEVICE_ID 0x0002 /* V3 device ID number */ | ||
24 | #define SANGOMA_SUBSYS_VENDOR 0x4753 /* ID for Sangoma */ | ||
25 | #define PCI_DEV_SLOT_MASK 0x1F /* mask for slot numbering */ | ||
26 | #define PCI_IRQ_NOT_ALLOCATED 0xFF /* interrupt line for no IRQ */ | ||
27 | |||
28 | /* Local PCI register offsets */ | ||
29 | #define PCI_VENDOR_ID_WORD 0x00 /* vendor ID */ | ||
30 | #define PCI_IO_BASE_DWORD 0x10 /* IO base */ | ||
31 | #define PCI_MEM_BASE0_DWORD 0x14 /* memory base - apperture 0 */ | ||
32 | #define PCI_MEM_BASE1_DWORD 0x18 /* memory base - apperture 1 */ | ||
33 | #define PCI_SUBSYS_VENDOR_WORD 0x2C /* subsystem vendor ID */ | ||
34 | #define PCI_INT_LINE_BYTE 0x3C /* interrupt line */ | ||
35 | #define PCI_INT_PIN_BYTE 0x3D /* interrupt pin */ | ||
36 | #define PCI_MAP0_DWORD 0x40 /* PCI to local bus address 0 */ | ||
37 | #define PCI_MAP1_DWORD 0x44 /* PCI to local bus address 1 */ | ||
38 | #define PCI_INT_STATUS 0x48 /* interrupt status */ | ||
39 | #define PCI_INT_CONFIG 0x4C /* interrupt configuration */ | ||
40 | |||
41 | /* Local PCI register usage */ | ||
42 | #define PCI_MEMORY_ENABLE 0x00000003 /* enable PCI memory */ | ||
43 | #define PCI_CPU_A_MEM_DISABLE 0x00000002 /* disable CPU A memory */ | ||
44 | #define PCI_CPU_B_MEM_DISABLE 0x00100002 /* disable CPU B memory */ | ||
45 | #define PCI_ENABLE_IRQ_CPU_A 0x005A0004 /* enable IRQ for CPU A */ | ||
46 | #define PCI_ENABLE_IRQ_CPU_B 0x005A0008 /* enable IRQ for CPU B */ | ||
47 | #define PCI_DISABLE_IRQ_CPU_A 0x00000004 /* disable IRQ for CPU A */ | ||
48 | #define PCI_DISABLE_IRQ_CPU_B 0x00000008 /* disable IRQ for CPU B */ | ||
49 | |||
50 | /* Setting for the Interrupt Status register */ | ||
51 | #define IRQ_CPU_A 0x04 /* IRQ for CPU A */ | ||
52 | #define IRQ_CPU_B 0x08 /* IRQ for CPU B */ | ||
53 | |||
54 | /* The maximum size of the S514 memory */ | ||
55 | #define MAX_SIZEOF_S514_MEMORY (256 * 1024) | ||
56 | |||
57 | /* S514 control register offsets within the memory address space */ | ||
58 | #define S514_CTRL_REG_BYTE 0x80000 | ||
59 | |||
60 | /* S514 adapter control bytes */ | ||
61 | #define S514_CPU_HALT 0x00 | ||
62 | #define S514_CPU_START 0x01 | ||
63 | |||
64 | /* The maximum number of S514 adapters supported */ | ||
65 | #define MAX_S514_CARDS 20 | ||
66 | |||
67 | #define PCI_CARD_TYPE 0x2E | ||
68 | #define S514_DUAL_CPU 0x12 | ||
69 | #define S514_SINGLE_CPU 0x11 | ||
70 | |||
71 | #endif /* _SDLAPCI_H */ | ||
72 | |||
diff --git a/include/linux/sdlasfm.h b/include/linux/sdlasfm.h deleted file mode 100644 index 94aaa8ada667..000000000000 --- a/include/linux/sdlasfm.h +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | /***************************************************************************** | ||
2 | * sdlasfm.h WANPIPE(tm) Multiprotocol WAN Link Driver. | ||
3 | * Definitions for the SDLA Firmware Module (SFM). | ||
4 | * | ||
5 | * Author: Gideon Hack | ||
6 | * | ||
7 | * Copyright: (c) 1995-1999 Sangoma Technologies Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; either version | ||
12 | * 2 of the License, or (at your option) any later version. | ||
13 | * ============================================================================ | ||
14 | * Jun 02, 1999 Gideon Hack Added support for the S514 adapter. | ||
15 | * Dec 11, 1996 Gene Kozin Cosmetic changes | ||
16 | * Apr 16, 1996 Gene Kozin Changed adapter & firmware IDs. Version 2 | ||
17 | * Dec 15, 1995 Gene Kozin Structures chaned | ||
18 | * Nov 09, 1995 Gene Kozin Initial version. | ||
19 | *****************************************************************************/ | ||
20 | #ifndef _SDLASFM_H | ||
21 | #define _SDLASFM_H | ||
22 | |||
23 | /****** Defines *************************************************************/ | ||
24 | |||
25 | #define SFM_VERSION 2 | ||
26 | #define SFM_SIGNATURE "SFM - Sangoma SDLA Firmware Module" | ||
27 | |||
28 | /* min/max */ | ||
29 | #define SFM_IMAGE_SIZE 0x8000 /* max size of SDLA code image file */ | ||
30 | #define SFM_DESCR_LEN 256 /* max length of description string */ | ||
31 | #define SFM_MAX_SDLA 16 /* max number of compatible adapters */ | ||
32 | |||
33 | /* Adapter types */ | ||
34 | #define SDLA_S502A 5020 | ||
35 | #define SDLA_S502E 5021 | ||
36 | #define SDLA_S503 5030 | ||
37 | #define SDLA_S508 5080 | ||
38 | #define SDLA_S507 5070 | ||
39 | #define SDLA_S509 5090 | ||
40 | #define SDLA_S514 5140 | ||
41 | |||
42 | /* S514 PCI adapter CPU numbers */ | ||
43 | #define S514_CPU_A 'A' | ||
44 | #define S514_CPU_B 'B' | ||
45 | |||
46 | |||
47 | /* Firmware identification numbers: | ||
48 | * 0 .. 999 Test & Diagnostics | ||
49 | * 1000 .. 1999 Streaming HDLC | ||
50 | * 2000 .. 2999 Bisync | ||
51 | * 3000 .. 3999 SDLC | ||
52 | * 4000 .. 4999 HDLC | ||
53 | * 5000 .. 5999 X.25 | ||
54 | * 6000 .. 6999 Frame Relay | ||
55 | * 7000 .. 7999 PPP | ||
56 | * 8000 .. 8999 Cisco HDLC | ||
57 | */ | ||
58 | #define SFID_CALIB502 200 | ||
59 | #define SFID_STRM502 1200 | ||
60 | #define SFID_STRM508 1800 | ||
61 | #define SFID_BSC502 2200 | ||
62 | #define SFID_SDLC502 3200 | ||
63 | #define SFID_HDLC502 4200 | ||
64 | #define SFID_HDLC508 4800 | ||
65 | #define SFID_X25_502 5200 | ||
66 | #define SFID_X25_508 5800 | ||
67 | #define SFID_FR502 6200 | ||
68 | #define SFID_FR508 6800 | ||
69 | #define SFID_PPP502 7200 | ||
70 | #define SFID_PPP508 7800 | ||
71 | #define SFID_PPP514 7140 | ||
72 | #define SFID_CHDLC508 8800 | ||
73 | #define SFID_CHDLC514 8140 | ||
74 | |||
75 | /****** Data Types **********************************************************/ | ||
76 | |||
77 | typedef struct sfm_info /* firmware module information */ | ||
78 | { | ||
79 | unsigned short codeid; /* firmware ID */ | ||
80 | unsigned short version; /* firmaware version number */ | ||
81 | unsigned short adapter[SFM_MAX_SDLA]; /* compatible adapter types */ | ||
82 | unsigned long memsize; /* minimum memory size */ | ||
83 | unsigned short reserved[2]; /* reserved */ | ||
84 | unsigned short startoffs; /* entry point offset */ | ||
85 | unsigned short winoffs; /* dual-port memory window offset */ | ||
86 | unsigned short codeoffs; /* code load offset */ | ||
87 | unsigned short codesize; /* code size */ | ||
88 | unsigned short dataoffs; /* configuration data load offset */ | ||
89 | unsigned short datasize; /* configuration data size */ | ||
90 | } sfm_info_t; | ||
91 | |||
92 | typedef struct sfm /* SDLA firmware file structire */ | ||
93 | { | ||
94 | char signature[80]; /* SFM file signature */ | ||
95 | unsigned short version; /* file format version */ | ||
96 | unsigned short checksum; /* info + image */ | ||
97 | unsigned short reserved[6]; /* reserved */ | ||
98 | char descr[SFM_DESCR_LEN]; /* description string */ | ||
99 | sfm_info_t info; /* firmware module info */ | ||
100 | unsigned char image[1]; /* code image (variable size) */ | ||
101 | } sfm_t; | ||
102 | |||
103 | #endif /* _SDLASFM_H */ | ||
104 | |||
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index fca9b0fb5b4e..5a095572881d 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -73,7 +73,7 @@ static inline int write_tryseqlock(seqlock_t *sl) | |||
73 | } | 73 | } |
74 | 74 | ||
75 | /* Start of read calculation -- fetch last complete writer token */ | 75 | /* Start of read calculation -- fetch last complete writer token */ |
76 | static inline unsigned read_seqbegin(const seqlock_t *sl) | 76 | static __always_inline unsigned read_seqbegin(const seqlock_t *sl) |
77 | { | 77 | { |
78 | unsigned ret = sl->sequence; | 78 | unsigned ret = sl->sequence; |
79 | smp_rmb(); | 79 | smp_rmb(); |
@@ -88,7 +88,7 @@ static inline unsigned read_seqbegin(const seqlock_t *sl) | |||
88 | * | 88 | * |
89 | * Using xor saves one conditional branch. | 89 | * Using xor saves one conditional branch. |
90 | */ | 90 | */ |
91 | static inline int read_seqretry(const seqlock_t *sl, unsigned iv) | 91 | static __always_inline int read_seqretry(const seqlock_t *sl, unsigned iv) |
92 | { | 92 | { |
93 | smp_rmb(); | 93 | smp_rmb(); |
94 | return (iv & 1) | (sl->sequence ^ iv); | 94 | return (iv & 1) | (sl->sequence ^ iv); |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 162a8fd10b29..70739f51a09f 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -14,10 +14,12 @@ | |||
14 | * | 14 | * |
15 | * SA_INTERRUPT is also used by the irq handling routines. | 15 | * SA_INTERRUPT is also used by the irq handling routines. |
16 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | 16 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. |
17 | * SA_PROBEIRQ is set by callers when they expect sharing mismatches to occur | ||
17 | */ | 18 | */ |
18 | #define SA_PROBE SA_ONESHOT | ||
19 | #define SA_SAMPLE_RANDOM SA_RESTART | 19 | #define SA_SAMPLE_RANDOM SA_RESTART |
20 | #define SA_SHIRQ 0x04000000 | 20 | #define SA_SHIRQ 0x04000000 |
21 | #define SA_PROBEIRQ 0x08000000 | ||
22 | |||
21 | /* | 23 | /* |
22 | * As above, these correspond to the IORESOURCE_IRQ_* defines in | 24 | * As above, these correspond to the IORESOURCE_IRQ_* defines in |
23 | * linux/ioport.h to select the interrupt line behaviour. When | 25 | * linux/ioport.h to select the interrupt line behaviour. When |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index c4619a428d9b..f8f234708b98 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -344,6 +344,13 @@ extern void skb_over_panic(struct sk_buff *skb, int len, | |||
344 | void *here); | 344 | void *here); |
345 | extern void skb_under_panic(struct sk_buff *skb, int len, | 345 | extern void skb_under_panic(struct sk_buff *skb, int len, |
346 | void *here); | 346 | void *here); |
347 | extern void skb_truesize_bug(struct sk_buff *skb); | ||
348 | |||
349 | static inline void skb_truesize_check(struct sk_buff *skb) | ||
350 | { | ||
351 | if (unlikely((int)skb->truesize < sizeof(struct sk_buff) + skb->len)) | ||
352 | skb_truesize_bug(skb); | ||
353 | } | ||
347 | 354 | ||
348 | extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, | 355 | extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, |
349 | int getfrag(void *from, char *to, int offset, | 356 | int getfrag(void *from, char *to, int offset, |
diff --git a/include/linux/string.h b/include/linux/string.h index dee221429ad0..c61306da8c52 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -13,11 +13,6 @@ | |||
13 | extern "C" { | 13 | extern "C" { |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | extern char * strpbrk(const char *,const char *); | ||
17 | extern char * strsep(char **,const char *); | ||
18 | extern __kernel_size_t strspn(const char *,const char *); | ||
19 | extern __kernel_size_t strcspn(const char *,const char *); | ||
20 | |||
21 | extern char *strndup_user(const char __user *, long); | 16 | extern char *strndup_user(const char __user *, long); |
22 | 17 | ||
23 | /* | 18 | /* |
@@ -70,6 +65,18 @@ extern __kernel_size_t strlen(const char *); | |||
70 | #ifndef __HAVE_ARCH_STRNLEN | 65 | #ifndef __HAVE_ARCH_STRNLEN |
71 | extern __kernel_size_t strnlen(const char *,__kernel_size_t); | 66 | extern __kernel_size_t strnlen(const char *,__kernel_size_t); |
72 | #endif | 67 | #endif |
68 | #ifndef __HAVE_ARCH_STRPBRK | ||
69 | extern char * strpbrk(const char *,const char *); | ||
70 | #endif | ||
71 | #ifndef __HAVE_ARCH_STRSEP | ||
72 | extern char * strsep(char **,const char *); | ||
73 | #endif | ||
74 | #ifndef __HAVE_ARCH_STRSPN | ||
75 | extern __kernel_size_t strspn(const char *,const char *); | ||
76 | #endif | ||
77 | #ifndef __HAVE_ARCH_STRCSPN | ||
78 | extern __kernel_size_t strcspn(const char *,const char *); | ||
79 | #endif | ||
73 | 80 | ||
74 | #ifndef __HAVE_ARCH_MEMSET | 81 | #ifndef __HAVE_ARCH_MEMSET |
75 | extern void * memset(void *,int,__kernel_size_t); | 82 | extern void * memset(void *,int,__kernel_size_t); |
diff --git a/include/linux/sunrpc/metrics.h b/include/linux/sunrpc/metrics.h index 8f96e9dc369a..77f78e56c481 100644 --- a/include/linux/sunrpc/metrics.h +++ b/include/linux/sunrpc/metrics.h | |||
@@ -69,9 +69,21 @@ struct rpc_clnt; | |||
69 | /* | 69 | /* |
70 | * EXPORTed functions for managing rpc_iostats structures | 70 | * EXPORTed functions for managing rpc_iostats structures |
71 | */ | 71 | */ |
72 | |||
73 | #ifdef CONFIG_PROC_FS | ||
74 | |||
72 | struct rpc_iostats * rpc_alloc_iostats(struct rpc_clnt *); | 75 | struct rpc_iostats * rpc_alloc_iostats(struct rpc_clnt *); |
73 | void rpc_count_iostats(struct rpc_task *); | 76 | void rpc_count_iostats(struct rpc_task *); |
74 | void rpc_print_iostats(struct seq_file *, struct rpc_clnt *); | 77 | void rpc_print_iostats(struct seq_file *, struct rpc_clnt *); |
75 | void rpc_free_iostats(struct rpc_iostats *); | 78 | void rpc_free_iostats(struct rpc_iostats *); |
76 | 79 | ||
80 | #else /* CONFIG_PROC_FS */ | ||
81 | |||
82 | static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; } | ||
83 | static inline void rpc_count_iostats(struct rpc_task *task) {} | ||
84 | static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {} | ||
85 | static inline void rpc_free_iostats(struct rpc_iostats *stats) {} | ||
86 | |||
87 | #endif /* CONFIG_PROC_FS */ | ||
88 | |||
77 | #endif /* _LINUX_SUNRPC_METRICS_H */ | 89 | #endif /* _LINUX_SUNRPC_METRICS_H */ |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 50cab2a09f28..503564384545 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -197,15 +197,16 @@ svc_take_res_page(struct svc_rqst *rqstp) | |||
197 | return rqstp->rq_respages[rqstp->rq_resused++]; | 197 | return rqstp->rq_respages[rqstp->rq_resused++]; |
198 | } | 198 | } |
199 | 199 | ||
200 | static inline int svc_take_page(struct svc_rqst *rqstp) | 200 | static inline void svc_take_page(struct svc_rqst *rqstp) |
201 | { | 201 | { |
202 | if (rqstp->rq_arghi <= rqstp->rq_argused) | 202 | if (rqstp->rq_arghi <= rqstp->rq_argused) { |
203 | return -ENOMEM; | 203 | WARN_ON(1); |
204 | return; | ||
205 | } | ||
204 | rqstp->rq_arghi--; | 206 | rqstp->rq_arghi--; |
205 | rqstp->rq_respages[rqstp->rq_resused] = | 207 | rqstp->rq_respages[rqstp->rq_resused] = |
206 | rqstp->rq_argpages[rqstp->rq_arghi]; | 208 | rqstp->rq_argpages[rqstp->rq_arghi]; |
207 | rqstp->rq_resused++; | 209 | rqstp->rq_resused++; |
208 | return 0; | ||
209 | } | 210 | } |
210 | 211 | ||
211 | static inline void svc_pushback_allpages(struct svc_rqst *rqstp) | 212 | static inline void svc_pushback_allpages(struct svc_rqst *rqstp) |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 7eebbab7160b..e8bbe8118de8 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -53,6 +53,7 @@ struct rpc_timeout { | |||
53 | 53 | ||
54 | struct rpc_task; | 54 | struct rpc_task; |
55 | struct rpc_xprt; | 55 | struct rpc_xprt; |
56 | struct seq_file; | ||
56 | 57 | ||
57 | /* | 58 | /* |
58 | * This describes a complete RPC request | 59 | * This describes a complete RPC request |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 54eac8a39a4c..5b1fdf1cff4f 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -155,6 +155,7 @@ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct * | |||
155 | /* linux/mm/page_alloc.c */ | 155 | /* linux/mm/page_alloc.c */ |
156 | extern unsigned long totalram_pages; | 156 | extern unsigned long totalram_pages; |
157 | extern unsigned long totalhigh_pages; | 157 | extern unsigned long totalhigh_pages; |
158 | extern unsigned long totalreserve_pages; | ||
158 | extern long nr_swap_pages; | 159 | extern long nr_swap_pages; |
159 | extern unsigned int nr_free_pages(void); | 160 | extern unsigned int nr_free_pages(void); |
160 | extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat); | 161 | extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 5717147596b6..3996960fc565 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -569,9 +569,17 @@ asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, | |||
569 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, | 569 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, |
570 | int flags, int mode); | 570 | int flags, int mode); |
571 | asmlinkage long sys_unshare(unsigned long unshare_flags); | 571 | asmlinkage long sys_unshare(unsigned long unshare_flags); |
572 | asmlinkage long sys_splice(int fdin, int fdout, size_t len, | 572 | |
573 | unsigned int flags); | 573 | asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, |
574 | int fd_out, loff_t __user *off_out, | ||
575 | size_t len, unsigned int flags); | ||
576 | |||
577 | asmlinkage long sys_vmsplice(int fd, const struct iovec __user *iov, | ||
578 | unsigned long nr_segs, unsigned int flags); | ||
579 | |||
580 | asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags); | ||
581 | |||
574 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, | 582 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, |
575 | int flags); | 583 | unsigned int flags); |
576 | 584 | ||
577 | #endif | 585 | #endif |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 392da5a6dacb..1ea5d3cda6ae 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -74,6 +74,7 @@ struct sysfs_dirent { | |||
74 | umode_t s_mode; | 74 | umode_t s_mode; |
75 | struct dentry * s_dentry; | 75 | struct dentry * s_dentry; |
76 | struct iattr * s_iattr; | 76 | struct iattr * s_iattr; |
77 | atomic_t s_event; | ||
77 | }; | 78 | }; |
78 | 79 | ||
79 | #define SYSFS_ROOT 0x0001 | 80 | #define SYSFS_ROOT 0x0001 |
@@ -117,6 +118,7 @@ int sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr); | |||
117 | 118 | ||
118 | int sysfs_create_group(struct kobject *, const struct attribute_group *); | 119 | int sysfs_create_group(struct kobject *, const struct attribute_group *); |
119 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); | 120 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); |
121 | void sysfs_notify(struct kobject * k, char *dir, char *attr); | ||
120 | 122 | ||
121 | #else /* CONFIG_SYSFS */ | 123 | #else /* CONFIG_SYSFS */ |
122 | 124 | ||
@@ -185,6 +187,10 @@ static inline void sysfs_remove_group(struct kobject * k, const struct attribute | |||
185 | ; | 187 | ; |
186 | } | 188 | } |
187 | 189 | ||
190 | static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) | ||
191 | { | ||
192 | } | ||
193 | |||
188 | #endif /* CONFIG_SYSFS */ | 194 | #endif /* CONFIG_SYSFS */ |
189 | 195 | ||
190 | #endif /* _SYSFS_H_ */ | 196 | #endif /* _SYSFS_H_ */ |
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index 0976a163b459..31548303ee37 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h | |||
@@ -6,9 +6,10 @@ extern int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *c | |||
6 | extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size); | 6 | extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size); |
7 | extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size); | 7 | extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size); |
8 | extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size); | 8 | extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size); |
9 | void tty_schedule_flip(struct tty_struct *tty); | ||
9 | 10 | ||
10 | static inline int tty_insert_flip_char(struct tty_struct *tty, | 11 | static inline int tty_insert_flip_char(struct tty_struct *tty, |
11 | unsigned char ch, char flag) | 12 | unsigned char ch, char flag) |
12 | { | 13 | { |
13 | struct tty_buffer *tb = tty->buf.tail; | 14 | struct tty_buffer *tb = tty->buf.tail; |
14 | if (tb && tb->active && tb->used < tb->size) { | 15 | if (tb && tb->active && tb->used < tb->size) { |
@@ -19,26 +20,4 @@ static inline int tty_insert_flip_char(struct tty_struct *tty, | |||
19 | return tty_insert_flip_string_flags(tty, &ch, &flag, 1); | 20 | return tty_insert_flip_string_flags(tty, &ch, &flag, 1); |
20 | } | 21 | } |
21 | 22 | ||
22 | static inline void tty_schedule_flip(struct tty_struct *tty) | ||
23 | { | ||
24 | unsigned long flags; | ||
25 | spin_lock_irqsave(&tty->buf.lock, flags); | ||
26 | if (tty->buf.tail != NULL) { | ||
27 | tty->buf.tail->active = 0; | ||
28 | tty->buf.tail->commit = tty->buf.tail->used; | ||
29 | } | ||
30 | spin_unlock_irqrestore(&tty->buf.lock, flags); | ||
31 | schedule_delayed_work(&tty->buf.work, 1); | ||
32 | } | ||
33 | |||
34 | #undef _INLINE_ | ||
35 | |||
36 | |||
37 | #endif /* _LINUX_TTY_FLIP_H */ | 23 | #endif /* _LINUX_TTY_FLIP_H */ |
38 | |||
39 | |||
40 | |||
41 | |||
42 | |||
43 | |||
44 | |||
diff --git a/include/linux/usb/net2280.h b/include/linux/usb/net2280.h new file mode 100644 index 000000000000..c602f884f182 --- /dev/null +++ b/include/linux/usb/net2280.h | |||
@@ -0,0 +1,444 @@ | |||
1 | /* | ||
2 | * NetChip 2280 high/full speed USB device controller. | ||
3 | * Unlike many such controllers, this one talks PCI. | ||
4 | */ | ||
5 | #ifndef __LINUX_USB_NET2280_H | ||
6 | #define __LINUX_USB_NET2280_H | ||
7 | |||
8 | /* | ||
9 | * Copyright (C) 2002 NetChip Technology, Inc. (http://www.netchip.com) | ||
10 | * Copyright (C) 2003 David Brownell | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation; either version 2 of the License, or | ||
15 | * (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | */ | ||
26 | |||
27 | /*-------------------------------------------------------------------------*/ | ||
28 | |||
29 | /* NET2280 MEMORY MAPPED REGISTERS | ||
30 | * | ||
31 | * The register layout came from the chip documentation, and the bit | ||
32 | * number definitions were extracted from chip specification. | ||
33 | * | ||
34 | * Use the shift operator ('<<') to build bit masks, with readl/writel | ||
35 | * to access the registers through PCI. | ||
36 | */ | ||
37 | |||
38 | /* main registers, BAR0 + 0x0000 */ | ||
39 | struct net2280_regs { | ||
40 | // offset 0x0000 | ||
41 | u32 devinit; | ||
42 | #define LOCAL_CLOCK_FREQUENCY 8 | ||
43 | #define FORCE_PCI_RESET 7 | ||
44 | #define PCI_ID 6 | ||
45 | #define PCI_ENABLE 5 | ||
46 | #define FIFO_SOFT_RESET 4 | ||
47 | #define CFG_SOFT_RESET 3 | ||
48 | #define PCI_SOFT_RESET 2 | ||
49 | #define USB_SOFT_RESET 1 | ||
50 | #define M8051_RESET 0 | ||
51 | u32 eectl; | ||
52 | #define EEPROM_ADDRESS_WIDTH 23 | ||
53 | #define EEPROM_CHIP_SELECT_ACTIVE 22 | ||
54 | #define EEPROM_PRESENT 21 | ||
55 | #define EEPROM_VALID 20 | ||
56 | #define EEPROM_BUSY 19 | ||
57 | #define EEPROM_CHIP_SELECT_ENABLE 18 | ||
58 | #define EEPROM_BYTE_READ_START 17 | ||
59 | #define EEPROM_BYTE_WRITE_START 16 | ||
60 | #define EEPROM_READ_DATA 8 | ||
61 | #define EEPROM_WRITE_DATA 0 | ||
62 | u32 eeclkfreq; | ||
63 | u32 _unused0; | ||
64 | // offset 0x0010 | ||
65 | |||
66 | u32 pciirqenb0; /* interrupt PCI master ... */ | ||
67 | #define SETUP_PACKET_INTERRUPT_ENABLE 7 | ||
68 | #define ENDPOINT_F_INTERRUPT_ENABLE 6 | ||
69 | #define ENDPOINT_E_INTERRUPT_ENABLE 5 | ||
70 | #define ENDPOINT_D_INTERRUPT_ENABLE 4 | ||
71 | #define ENDPOINT_C_INTERRUPT_ENABLE 3 | ||
72 | #define ENDPOINT_B_INTERRUPT_ENABLE 2 | ||
73 | #define ENDPOINT_A_INTERRUPT_ENABLE 1 | ||
74 | #define ENDPOINT_0_INTERRUPT_ENABLE 0 | ||
75 | u32 pciirqenb1; | ||
76 | #define PCI_INTERRUPT_ENABLE 31 | ||
77 | #define POWER_STATE_CHANGE_INTERRUPT_ENABLE 27 | ||
78 | #define PCI_ARBITER_TIMEOUT_INTERRUPT_ENABLE 26 | ||
79 | #define PCI_PARITY_ERROR_INTERRUPT_ENABLE 25 | ||
80 | #define PCI_MASTER_ABORT_RECEIVED_INTERRUPT_ENABLE 20 | ||
81 | #define PCI_TARGET_ABORT_RECEIVED_INTERRUPT_ENABLE 19 | ||
82 | #define PCI_TARGET_ABORT_ASSERTED_INTERRUPT_ENABLE 18 | ||
83 | #define PCI_RETRY_ABORT_INTERRUPT_ENABLE 17 | ||
84 | #define PCI_MASTER_CYCLE_DONE_INTERRUPT_ENABLE 16 | ||
85 | #define GPIO_INTERRUPT_ENABLE 13 | ||
86 | #define DMA_D_INTERRUPT_ENABLE 12 | ||
87 | #define DMA_C_INTERRUPT_ENABLE 11 | ||
88 | #define DMA_B_INTERRUPT_ENABLE 10 | ||
89 | #define DMA_A_INTERRUPT_ENABLE 9 | ||
90 | #define EEPROM_DONE_INTERRUPT_ENABLE 8 | ||
91 | #define VBUS_INTERRUPT_ENABLE 7 | ||
92 | #define CONTROL_STATUS_INTERRUPT_ENABLE 6 | ||
93 | #define ROOT_PORT_RESET_INTERRUPT_ENABLE 4 | ||
94 | #define SUSPEND_REQUEST_INTERRUPT_ENABLE 3 | ||
95 | #define SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE 2 | ||
96 | #define RESUME_INTERRUPT_ENABLE 1 | ||
97 | #define SOF_INTERRUPT_ENABLE 0 | ||
98 | u32 cpu_irqenb0; /* ... or onboard 8051 */ | ||
99 | #define SETUP_PACKET_INTERRUPT_ENABLE 7 | ||
100 | #define ENDPOINT_F_INTERRUPT_ENABLE 6 | ||
101 | #define ENDPOINT_E_INTERRUPT_ENABLE 5 | ||
102 | #define ENDPOINT_D_INTERRUPT_ENABLE 4 | ||
103 | #define ENDPOINT_C_INTERRUPT_ENABLE 3 | ||
104 | #define ENDPOINT_B_INTERRUPT_ENABLE 2 | ||
105 | #define ENDPOINT_A_INTERRUPT_ENABLE 1 | ||
106 | #define ENDPOINT_0_INTERRUPT_ENABLE 0 | ||
107 | u32 cpu_irqenb1; | ||
108 | #define CPU_INTERRUPT_ENABLE 31 | ||
109 | #define POWER_STATE_CHANGE_INTERRUPT_ENABLE 27 | ||
110 | #define PCI_ARBITER_TIMEOUT_INTERRUPT_ENABLE 26 | ||
111 | #define PCI_PARITY_ERROR_INTERRUPT_ENABLE 25 | ||
112 | #define PCI_INTA_INTERRUPT_ENABLE 24 | ||
113 | #define PCI_PME_INTERRUPT_ENABLE 23 | ||
114 | #define PCI_SERR_INTERRUPT_ENABLE 22 | ||
115 | #define PCI_PERR_INTERRUPT_ENABLE 21 | ||
116 | #define PCI_MASTER_ABORT_RECEIVED_INTERRUPT_ENABLE 20 | ||
117 | #define PCI_TARGET_ABORT_RECEIVED_INTERRUPT_ENABLE 19 | ||
118 | #define PCI_RETRY_ABORT_INTERRUPT_ENABLE 17 | ||
119 | #define PCI_MASTER_CYCLE_DONE_INTERRUPT_ENABLE 16 | ||
120 | #define GPIO_INTERRUPT_ENABLE 13 | ||
121 | #define DMA_D_INTERRUPT_ENABLE 12 | ||
122 | #define DMA_C_INTERRUPT_ENABLE 11 | ||
123 | #define DMA_B_INTERRUPT_ENABLE 10 | ||
124 | #define DMA_A_INTERRUPT_ENABLE 9 | ||
125 | #define EEPROM_DONE_INTERRUPT_ENABLE 8 | ||
126 | #define VBUS_INTERRUPT_ENABLE 7 | ||
127 | #define CONTROL_STATUS_INTERRUPT_ENABLE 6 | ||
128 | #define ROOT_PORT_RESET_INTERRUPT_ENABLE 4 | ||
129 | #define SUSPEND_REQUEST_INTERRUPT_ENABLE 3 | ||
130 | #define SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE 2 | ||
131 | #define RESUME_INTERRUPT_ENABLE 1 | ||
132 | #define SOF_INTERRUPT_ENABLE 0 | ||
133 | |||
134 | // offset 0x0020 | ||
135 | u32 _unused1; | ||
136 | u32 usbirqenb1; | ||
137 | #define USB_INTERRUPT_ENABLE 31 | ||
138 | #define POWER_STATE_CHANGE_INTERRUPT_ENABLE 27 | ||
139 | #define PCI_ARBITER_TIMEOUT_INTERRUPT_ENABLE 26 | ||
140 | #define PCI_PARITY_ERROR_INTERRUPT_ENABLE 25 | ||
141 | #define PCI_INTA_INTERRUPT_ENABLE 24 | ||
142 | #define PCI_PME_INTERRUPT_ENABLE 23 | ||
143 | #define PCI_SERR_INTERRUPT_ENABLE 22 | ||
144 | #define PCI_PERR_INTERRUPT_ENABLE 21 | ||
145 | #define PCI_MASTER_ABORT_RECEIVED_INTERRUPT_ENABLE 20 | ||
146 | #define PCI_TARGET_ABORT_RECEIVED_INTERRUPT_ENABLE 19 | ||
147 | #define PCI_RETRY_ABORT_INTERRUPT_ENABLE 17 | ||
148 | #define PCI_MASTER_CYCLE_DONE_INTERRUPT_ENABLE 16 | ||
149 | #define GPIO_INTERRUPT_ENABLE 13 | ||
150 | #define DMA_D_INTERRUPT_ENABLE 12 | ||
151 | #define DMA_C_INTERRUPT_ENABLE 11 | ||
152 | #define DMA_B_INTERRUPT_ENABLE 10 | ||
153 | #define DMA_A_INTERRUPT_ENABLE 9 | ||
154 | #define EEPROM_DONE_INTERRUPT_ENABLE 8 | ||
155 | #define VBUS_INTERRUPT_ENABLE 7 | ||
156 | #define CONTROL_STATUS_INTERRUPT_ENABLE 6 | ||
157 | #define ROOT_PORT_RESET_INTERRUPT_ENABLE 4 | ||
158 | #define SUSPEND_REQUEST_INTERRUPT_ENABLE 3 | ||
159 | #define SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE 2 | ||
160 | #define RESUME_INTERRUPT_ENABLE 1 | ||
161 | #define SOF_INTERRUPT_ENABLE 0 | ||
162 | u32 irqstat0; | ||
163 | #define INTA_ASSERTED 12 | ||
164 | #define SETUP_PACKET_INTERRUPT 7 | ||
165 | #define ENDPOINT_F_INTERRUPT 6 | ||
166 | #define ENDPOINT_E_INTERRUPT 5 | ||
167 | #define ENDPOINT_D_INTERRUPT 4 | ||
168 | #define ENDPOINT_C_INTERRUPT 3 | ||
169 | #define ENDPOINT_B_INTERRUPT 2 | ||
170 | #define ENDPOINT_A_INTERRUPT 1 | ||
171 | #define ENDPOINT_0_INTERRUPT 0 | ||
172 | u32 irqstat1; | ||
173 | #define POWER_STATE_CHANGE_INTERRUPT 27 | ||
174 | #define PCI_ARBITER_TIMEOUT_INTERRUPT 26 | ||
175 | #define PCI_PARITY_ERROR_INTERRUPT 25 | ||
176 | #define PCI_INTA_INTERRUPT 24 | ||
177 | #define PCI_PME_INTERRUPT 23 | ||
178 | #define PCI_SERR_INTERRUPT 22 | ||
179 | #define PCI_PERR_INTERRUPT 21 | ||
180 | #define PCI_MASTER_ABORT_RECEIVED_INTERRUPT 20 | ||
181 | #define PCI_TARGET_ABORT_RECEIVED_INTERRUPT 19 | ||
182 | #define PCI_RETRY_ABORT_INTERRUPT 17 | ||
183 | #define PCI_MASTER_CYCLE_DONE_INTERRUPT 16 | ||
184 | #define SOF_DOWN_INTERRUPT 14 | ||
185 | #define GPIO_INTERRUPT 13 | ||
186 | #define DMA_D_INTERRUPT 12 | ||
187 | #define DMA_C_INTERRUPT 11 | ||
188 | #define DMA_B_INTERRUPT 10 | ||
189 | #define DMA_A_INTERRUPT 9 | ||
190 | #define EEPROM_DONE_INTERRUPT 8 | ||
191 | #define VBUS_INTERRUPT 7 | ||
192 | #define CONTROL_STATUS_INTERRUPT 6 | ||
193 | #define ROOT_PORT_RESET_INTERRUPT 4 | ||
194 | #define SUSPEND_REQUEST_INTERRUPT 3 | ||
195 | #define SUSPEND_REQUEST_CHANGE_INTERRUPT 2 | ||
196 | #define RESUME_INTERRUPT 1 | ||
197 | #define SOF_INTERRUPT 0 | ||
198 | // offset 0x0030 | ||
199 | u32 idxaddr; | ||
200 | u32 idxdata; | ||
201 | u32 fifoctl; | ||
202 | #define PCI_BASE2_RANGE 16 | ||
203 | #define IGNORE_FIFO_AVAILABILITY 3 | ||
204 | #define PCI_BASE2_SELECT 2 | ||
205 | #define FIFO_CONFIGURATION_SELECT 0 | ||
206 | u32 _unused2; | ||
207 | // offset 0x0040 | ||
208 | u32 memaddr; | ||
209 | #define START 28 | ||
210 | #define DIRECTION 27 | ||
211 | #define FIFO_DIAGNOSTIC_SELECT 24 | ||
212 | #define MEMORY_ADDRESS 0 | ||
213 | u32 memdata0; | ||
214 | u32 memdata1; | ||
215 | u32 _unused3; | ||
216 | // offset 0x0050 | ||
217 | u32 gpioctl; | ||
218 | #define GPIO3_LED_SELECT 12 | ||
219 | #define GPIO3_INTERRUPT_ENABLE 11 | ||
220 | #define GPIO2_INTERRUPT_ENABLE 10 | ||
221 | #define GPIO1_INTERRUPT_ENABLE 9 | ||
222 | #define GPIO0_INTERRUPT_ENABLE 8 | ||
223 | #define GPIO3_OUTPUT_ENABLE 7 | ||
224 | #define GPIO2_OUTPUT_ENABLE 6 | ||
225 | #define GPIO1_OUTPUT_ENABLE 5 | ||
226 | #define GPIO0_OUTPUT_ENABLE 4 | ||
227 | #define GPIO3_DATA 3 | ||
228 | #define GPIO2_DATA 2 | ||
229 | #define GPIO1_DATA 1 | ||
230 | #define GPIO0_DATA 0 | ||
231 | u32 gpiostat; | ||
232 | #define GPIO3_INTERRUPT 3 | ||
233 | #define GPIO2_INTERRUPT 2 | ||
234 | #define GPIO1_INTERRUPT 1 | ||
235 | #define GPIO0_INTERRUPT 0 | ||
236 | } __attribute__ ((packed)); | ||
237 | |||
238 | /* usb control, BAR0 + 0x0080 */ | ||
239 | struct net2280_usb_regs { | ||
240 | // offset 0x0080 | ||
241 | u32 stdrsp; | ||
242 | #define STALL_UNSUPPORTED_REQUESTS 31 | ||
243 | #define SET_TEST_MODE 16 | ||
244 | #define GET_OTHER_SPEED_CONFIGURATION 15 | ||
245 | #define GET_DEVICE_QUALIFIER 14 | ||
246 | #define SET_ADDRESS 13 | ||
247 | #define ENDPOINT_SET_CLEAR_HALT 12 | ||
248 | #define DEVICE_SET_CLEAR_DEVICE_REMOTE_WAKEUP 11 | ||
249 | #define GET_STRING_DESCRIPTOR_2 10 | ||
250 | #define GET_STRING_DESCRIPTOR_1 9 | ||
251 | #define GET_STRING_DESCRIPTOR_0 8 | ||
252 | #define GET_SET_INTERFACE 6 | ||
253 | #define GET_SET_CONFIGURATION 5 | ||
254 | #define GET_CONFIGURATION_DESCRIPTOR 4 | ||
255 | #define GET_DEVICE_DESCRIPTOR 3 | ||
256 | #define GET_ENDPOINT_STATUS 2 | ||
257 | #define GET_INTERFACE_STATUS 1 | ||
258 | #define GET_DEVICE_STATUS 0 | ||
259 | u32 prodvendid; | ||
260 | #define PRODUCT_ID 16 | ||
261 | #define VENDOR_ID 0 | ||
262 | u32 relnum; | ||
263 | u32 usbctl; | ||
264 | #define SERIAL_NUMBER_INDEX 16 | ||
265 | #define PRODUCT_ID_STRING_ENABLE 13 | ||
266 | #define VENDOR_ID_STRING_ENABLE 12 | ||
267 | #define USB_ROOT_PORT_WAKEUP_ENABLE 11 | ||
268 | #define VBUS_PIN 10 | ||
269 | #define TIMED_DISCONNECT 9 | ||
270 | #define SUSPEND_IMMEDIATELY 7 | ||
271 | #define SELF_POWERED_USB_DEVICE 6 | ||
272 | #define REMOTE_WAKEUP_SUPPORT 5 | ||
273 | #define PME_POLARITY 4 | ||
274 | #define USB_DETECT_ENABLE 3 | ||
275 | #define PME_WAKEUP_ENABLE 2 | ||
276 | #define DEVICE_REMOTE_WAKEUP_ENABLE 1 | ||
277 | #define SELF_POWERED_STATUS 0 | ||
278 | // offset 0x0090 | ||
279 | u32 usbstat; | ||
280 | #define HIGH_SPEED 7 | ||
281 | #define FULL_SPEED 6 | ||
282 | #define GENERATE_RESUME 5 | ||
283 | #define GENERATE_DEVICE_REMOTE_WAKEUP 4 | ||
284 | u32 xcvrdiag; | ||
285 | #define FORCE_HIGH_SPEED_MODE 31 | ||
286 | #define FORCE_FULL_SPEED_MODE 30 | ||
287 | #define USB_TEST_MODE 24 | ||
288 | #define LINE_STATE 16 | ||
289 | #define TRANSCEIVER_OPERATION_MODE 2 | ||
290 | #define TRANSCEIVER_SELECT 1 | ||
291 | #define TERMINATION_SELECT 0 | ||
292 | u32 setup0123; | ||
293 | u32 setup4567; | ||
294 | // offset 0x0090 | ||
295 | u32 _unused0; | ||
296 | u32 ouraddr; | ||
297 | #define FORCE_IMMEDIATE 7 | ||
298 | #define OUR_USB_ADDRESS 0 | ||
299 | u32 ourconfig; | ||
300 | } __attribute__ ((packed)); | ||
301 | |||
302 | /* pci control, BAR0 + 0x0100 */ | ||
303 | struct net2280_pci_regs { | ||
304 | // offset 0x0100 | ||
305 | u32 pcimstctl; | ||
306 | #define PCI_ARBITER_PARK_SELECT 13 | ||
307 | #define PCI_MULTI LEVEL_ARBITER 12 | ||
308 | #define PCI_RETRY_ABORT_ENABLE 11 | ||
309 | #define DMA_MEMORY_WRITE_AND_INVALIDATE_ENABLE 10 | ||
310 | #define DMA_READ_MULTIPLE_ENABLE 9 | ||
311 | #define DMA_READ_LINE_ENABLE 8 | ||
312 | #define PCI_MASTER_COMMAND_SELECT 6 | ||
313 | #define MEM_READ_OR_WRITE 0 | ||
314 | #define IO_READ_OR_WRITE 1 | ||
315 | #define CFG_READ_OR_WRITE 2 | ||
316 | #define PCI_MASTER_START 5 | ||
317 | #define PCI_MASTER_READ_WRITE 4 | ||
318 | #define PCI_MASTER_WRITE 0 | ||
319 | #define PCI_MASTER_READ 1 | ||
320 | #define PCI_MASTER_BYTE_WRITE_ENABLES 0 | ||
321 | u32 pcimstaddr; | ||
322 | u32 pcimstdata; | ||
323 | u32 pcimststat; | ||
324 | #define PCI_ARBITER_CLEAR 2 | ||
325 | #define PCI_EXTERNAL_ARBITER 1 | ||
326 | #define PCI_HOST_MODE 0 | ||
327 | } __attribute__ ((packed)); | ||
328 | |||
329 | /* dma control, BAR0 + 0x0180 ... array of four structs like this, | ||
330 | * for channels 0..3. see also struct net2280_dma: descriptor | ||
331 | * that can be loaded into some of these registers. | ||
332 | */ | ||
333 | struct net2280_dma_regs { /* [11.7] */ | ||
334 | // offset 0x0180, 0x01a0, 0x01c0, 0x01e0, | ||
335 | u32 dmactl; | ||
336 | #define DMA_SCATTER_GATHER_DONE_INTERRUPT_ENABLE 25 | ||
337 | #define DMA_CLEAR_COUNT_ENABLE 21 | ||
338 | #define DESCRIPTOR_POLLING_RATE 19 | ||
339 | #define POLL_CONTINUOUS 0 | ||
340 | #define POLL_1_USEC 1 | ||
341 | #define POLL_100_USEC 2 | ||
342 | #define POLL_1_MSEC 3 | ||
343 | #define DMA_VALID_BIT_POLLING_ENABLE 18 | ||
344 | #define DMA_VALID_BIT_ENABLE 17 | ||
345 | #define DMA_SCATTER_GATHER_ENABLE 16 | ||
346 | #define DMA_OUT_AUTO_START_ENABLE 4 | ||
347 | #define DMA_PREEMPT_ENABLE 3 | ||
348 | #define DMA_FIFO_VALIDATE 2 | ||
349 | #define DMA_ENABLE 1 | ||
350 | #define DMA_ADDRESS_HOLD 0 | ||
351 | u32 dmastat; | ||
352 | #define DMA_ABORT_DONE_INTERRUPT 27 | ||
353 | #define DMA_SCATTER_GATHER_DONE_INTERRUPT 25 | ||
354 | #define DMA_TRANSACTION_DONE_INTERRUPT 24 | ||
355 | #define DMA_ABORT 1 | ||
356 | #define DMA_START 0 | ||
357 | u32 _unused0 [2]; | ||
358 | // offset 0x0190, 0x01b0, 0x01d0, 0x01f0, | ||
359 | u32 dmacount; | ||
360 | #define VALID_BIT 31 | ||
361 | #define DMA_DIRECTION 30 | ||
362 | #define DMA_DONE_INTERRUPT_ENABLE 29 | ||
363 | #define END_OF_CHAIN 28 | ||
364 | #define DMA_BYTE_COUNT_MASK ((1<<24)-1) | ||
365 | #define DMA_BYTE_COUNT 0 | ||
366 | u32 dmaaddr; | ||
367 | u32 dmadesc; | ||
368 | u32 _unused1; | ||
369 | } __attribute__ ((packed)); | ||
370 | |||
371 | /* dedicated endpoint registers, BAR0 + 0x0200 */ | ||
372 | |||
373 | struct net2280_dep_regs { /* [11.8] */ | ||
374 | // offset 0x0200, 0x0210, 0x220, 0x230, 0x240 | ||
375 | u32 dep_cfg; | ||
376 | // offset 0x0204, 0x0214, 0x224, 0x234, 0x244 | ||
377 | u32 dep_rsp; | ||
378 | u32 _unused [2]; | ||
379 | } __attribute__ ((packed)); | ||
380 | |||
381 | /* configurable endpoint registers, BAR0 + 0x0300 ... array of seven structs | ||
382 | * like this, for ep0 then the configurable endpoints A..F | ||
383 | * ep0 reserved for control; E and F have only 64 bytes of fifo | ||
384 | */ | ||
385 | struct net2280_ep_regs { /* [11.9] */ | ||
386 | // offset 0x0300, 0x0320, 0x0340, 0x0360, 0x0380, 0x03a0, 0x03c0 | ||
387 | u32 ep_cfg; | ||
388 | #define ENDPOINT_BYTE_COUNT 16 | ||
389 | #define ENDPOINT_ENABLE 10 | ||
390 | #define ENDPOINT_TYPE 8 | ||
391 | #define ENDPOINT_DIRECTION 7 | ||
392 | #define ENDPOINT_NUMBER 0 | ||
393 | u32 ep_rsp; | ||
394 | #define SET_NAK_OUT_PACKETS 15 | ||
395 | #define SET_EP_HIDE_STATUS_PHASE 14 | ||
396 | #define SET_EP_FORCE_CRC_ERROR 13 | ||
397 | #define SET_INTERRUPT_MODE 12 | ||
398 | #define SET_CONTROL_STATUS_PHASE_HANDSHAKE 11 | ||
399 | #define SET_NAK_OUT_PACKETS_MODE 10 | ||
400 | #define SET_ENDPOINT_TOGGLE 9 | ||
401 | #define SET_ENDPOINT_HALT 8 | ||
402 | #define CLEAR_NAK_OUT_PACKETS 7 | ||
403 | #define CLEAR_EP_HIDE_STATUS_PHASE 6 | ||
404 | #define CLEAR_EP_FORCE_CRC_ERROR 5 | ||
405 | #define CLEAR_INTERRUPT_MODE 4 | ||
406 | #define CLEAR_CONTROL_STATUS_PHASE_HANDSHAKE 3 | ||
407 | #define CLEAR_NAK_OUT_PACKETS_MODE 2 | ||
408 | #define CLEAR_ENDPOINT_TOGGLE 1 | ||
409 | #define CLEAR_ENDPOINT_HALT 0 | ||
410 | u32 ep_irqenb; | ||
411 | #define SHORT_PACKET_OUT_DONE_INTERRUPT_ENABLE 6 | ||
412 | #define SHORT_PACKET_TRANSFERRED_INTERRUPT_ENABLE 5 | ||
413 | #define DATA_PACKET_RECEIVED_INTERRUPT_ENABLE 3 | ||
414 | #define DATA_PACKET_TRANSMITTED_INTERRUPT_ENABLE 2 | ||
415 | #define DATA_OUT_PING_TOKEN_INTERRUPT_ENABLE 1 | ||
416 | #define DATA_IN_TOKEN_INTERRUPT_ENABLE 0 | ||
417 | u32 ep_stat; | ||
418 | #define FIFO_VALID_COUNT 24 | ||
419 | #define HIGH_BANDWIDTH_OUT_TRANSACTION_PID 22 | ||
420 | #define TIMEOUT 21 | ||
421 | #define USB_STALL_SENT 20 | ||
422 | #define USB_IN_NAK_SENT 19 | ||
423 | #define USB_IN_ACK_RCVD 18 | ||
424 | #define USB_OUT_PING_NAK_SENT 17 | ||
425 | #define USB_OUT_ACK_SENT 16 | ||
426 | #define FIFO_OVERFLOW 13 | ||
427 | #define FIFO_UNDERFLOW 12 | ||
428 | #define FIFO_FULL 11 | ||
429 | #define FIFO_EMPTY 10 | ||
430 | #define FIFO_FLUSH 9 | ||
431 | #define SHORT_PACKET_OUT_DONE_INTERRUPT 6 | ||
432 | #define SHORT_PACKET_TRANSFERRED_INTERRUPT 5 | ||
433 | #define NAK_OUT_PACKETS 4 | ||
434 | #define DATA_PACKET_RECEIVED_INTERRUPT 3 | ||
435 | #define DATA_PACKET_TRANSMITTED_INTERRUPT 2 | ||
436 | #define DATA_OUT_PING_TOKEN_INTERRUPT 1 | ||
437 | #define DATA_IN_TOKEN_INTERRUPT 0 | ||
438 | // offset 0x0310, 0x0330, 0x0350, 0x0370, 0x0390, 0x03b0, 0x03d0 | ||
439 | u32 ep_avail; | ||
440 | u32 ep_data; | ||
441 | u32 _unused0 [2]; | ||
442 | } __attribute__ ((packed)); | ||
443 | |||
444 | #endif /* __LINUX_USB_NET2280_H */ | ||
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h index fadc535e2925..dc7c621e4647 100644 --- a/include/linux/vermagic.h +++ b/include/linux/vermagic.h | |||
@@ -12,6 +12,11 @@ | |||
12 | #else | 12 | #else |
13 | #define MODULE_VERMAGIC_PREEMPT "" | 13 | #define MODULE_VERMAGIC_PREEMPT "" |
14 | #endif | 14 | #endif |
15 | #ifdef CONFIG_MODULE_UNLOAD | ||
16 | #define MODULE_VERMAGIC_MODULE_UNLOAD "mod_unload " | ||
17 | #else | ||
18 | #define MODULE_VERMAGIC_MODULE_UNLOAD "" | ||
19 | #endif | ||
15 | #ifndef MODULE_ARCH_VERMAGIC | 20 | #ifndef MODULE_ARCH_VERMAGIC |
16 | #define MODULE_ARCH_VERMAGIC "" | 21 | #define MODULE_ARCH_VERMAGIC "" |
17 | #endif | 22 | #endif |
@@ -19,5 +24,5 @@ | |||
19 | #define VERMAGIC_STRING \ | 24 | #define VERMAGIC_STRING \ |
20 | UTS_RELEASE " " \ | 25 | UTS_RELEASE " " \ |
21 | MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ | 26 | MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ |
22 | MODULE_ARCH_VERMAGIC \ | 27 | MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC \ |
23 | "gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__) | 28 | "gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__) |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index af2d6155d3fe..d7670ec1ec1e 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -966,66 +966,17 @@ struct v4l2_sliced_vbi_format | |||
966 | 966 | ||
967 | /* Teletext World System Teletext | 967 | /* Teletext World System Teletext |
968 | (WST), defined on ITU-R BT.653-2 */ | 968 | (WST), defined on ITU-R BT.653-2 */ |
969 | #define V4L2_SLICED_TELETEXT_PAL_B (0x000001) | 969 | #define V4L2_SLICED_TELETEXT_B (0x0001) |
970 | #define V4L2_SLICED_TELETEXT_PAL_C (0x000002) | ||
971 | #define V4L2_SLICED_TELETEXT_NTSC_B (0x000010) | ||
972 | #define V4L2_SLICED_TELETEXT_SECAM (0x000020) | ||
973 | |||
974 | /* Teletext North American Broadcast Teletext Specification | ||
975 | (NABTS), defined on ITU-R BT.653-2 */ | ||
976 | #define V4L2_SLICED_TELETEXT_NTSC_C (0x000040) | ||
977 | #define V4L2_SLICED_TELETEXT_NTSC_D (0x000080) | ||
978 | |||
979 | /* Video Program System, defined on ETS 300 231*/ | 970 | /* Video Program System, defined on ETS 300 231*/ |
980 | #define V4L2_SLICED_VPS (0x000400) | 971 | #define V4L2_SLICED_VPS (0x0400) |
981 | |||
982 | /* Closed Caption, defined on EIA-608 */ | 972 | /* Closed Caption, defined on EIA-608 */ |
983 | #define V4L2_SLICED_CAPTION_525 (0x001000) | 973 | #define V4L2_SLICED_CAPTION_525 (0x1000) |
984 | #define V4L2_SLICED_CAPTION_625 (0x002000) | ||
985 | |||
986 | /* Wide Screen System, defined on ITU-R BT1119.1 */ | 974 | /* Wide Screen System, defined on ITU-R BT1119.1 */ |
987 | #define V4L2_SLICED_WSS_625 (0x004000) | 975 | #define V4L2_SLICED_WSS_625 (0x4000) |
988 | 976 | ||
989 | /* Wide Screen System, defined on IEC 61880 */ | 977 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) |
990 | #define V4L2_SLICED_WSS_525 (0x008000) | 978 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) |
991 | 979 | ||
992 | /* Vertical Interval Timecode (VITC), defined on SMPTE 12M */ | ||
993 | #define V4l2_SLICED_VITC_625 (0x010000) | ||
994 | #define V4l2_SLICED_VITC_525 (0x020000) | ||
995 | |||
996 | #define V4L2_SLICED_TELETEXT_B (V4L2_SLICED_TELETEXT_PAL_B |\ | ||
997 | V4L2_SLICED_TELETEXT_NTSC_B) | ||
998 | |||
999 | #define V4L2_SLICED_TELETEXT (V4L2_SLICED_TELETEXT_PAL_B |\ | ||
1000 | V4L2_SLICED_TELETEXT_PAL_C |\ | ||
1001 | V4L2_SLICED_TELETEXT_SECAM |\ | ||
1002 | V4L2_SLICED_TELETEXT_NTSC_B |\ | ||
1003 | V4L2_SLICED_TELETEXT_NTSC_C |\ | ||
1004 | V4L2_SLICED_TELETEXT_NTSC_D) | ||
1005 | |||
1006 | #define V4L2_SLICED_CAPTION (V4L2_SLICED_CAPTION_525 |\ | ||
1007 | V4L2_SLICED_CAPTION_625) | ||
1008 | |||
1009 | #define V4L2_SLICED_WSS (V4L2_SLICED_WSS_525 |\ | ||
1010 | V4L2_SLICED_WSS_625) | ||
1011 | |||
1012 | #define V4L2_SLICED_VITC (V4L2_SLICED_VITC_525 |\ | ||
1013 | V4L2_SLICED_VITC_625) | ||
1014 | |||
1015 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_TELETEXT_NTSC_B |\ | ||
1016 | V4L2_SLICED_TELETEXT_NTSC_C |\ | ||
1017 | V4L2_SLICED_TELETEXT_NTSC_D |\ | ||
1018 | V4L2_SLICED_CAPTION_525 |\ | ||
1019 | V4L2_SLICED_WSS_525 |\ | ||
1020 | V4l2_SLICED_VITC_525) | ||
1021 | |||
1022 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_PAL_B |\ | ||
1023 | V4L2_SLICED_TELETEXT_PAL_C |\ | ||
1024 | V4L2_SLICED_TELETEXT_SECAM |\ | ||
1025 | V4L2_SLICED_VPS |\ | ||
1026 | V4L2_SLICED_CAPTION_625 |\ | ||
1027 | V4L2_SLICED_WSS_625 |\ | ||
1028 | V4l2_SLICED_VITC_625) | ||
1029 | 980 | ||
1030 | struct v4l2_sliced_vbi_cap | 981 | struct v4l2_sliced_vbi_cap |
1031 | { | 982 | { |
diff --git a/include/linux/wanpipe.h b/include/linux/wanpipe.h deleted file mode 100644 index dae9860091dd..000000000000 --- a/include/linux/wanpipe.h +++ /dev/null | |||
@@ -1,483 +0,0 @@ | |||
1 | /***************************************************************************** | ||
2 | * wanpipe.h WANPIPE(tm) Multiprotocol WAN Link Driver. | ||
3 | * User-level API definitions. | ||
4 | * | ||
5 | * Author: Nenad Corbic <ncorbic@sangoma.com> | ||
6 | * Gideon Hack | ||
7 | * | ||
8 | * Copyright: (c) 1995-2000 Sangoma Technologies Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License | ||
12 | * as published by the Free Software Foundation; either version | ||
13 | * 2 of the License, or (at your option) any later version. | ||
14 | * ============================================================================ | ||
15 | * Nov 3, 2000 Nenad Corbic Added config_id to sdla_t structure. | ||
16 | * Used to determine the protocol running. | ||
17 | * Jul 13, 2000 Nenad Corbic Added SyncPPP Support | ||
18 | * Feb 24, 2000 Nenad Corbic Added support for x25api driver | ||
19 | * Oct 04, 1999 Nenad Corbic New CHDLC and FRAME RELAY code, SMP support | ||
20 | * Jun 02, 1999 Gideon Hack Added 'update_call_count' for Cisco HDLC | ||
21 | * support | ||
22 | * Jun 26, 1998 David Fong Added 'ip_mode' in sdla_t.u.p for dynamic IP | ||
23 | * routing mode configuration | ||
24 | * Jun 12, 1998 David Fong Added Cisco HDLC union member in sdla_t | ||
25 | * Dec 08, 1997 Jaspreet Singh Added 'authenticator' in union of 'sdla_t' | ||
26 | * Nov 26, 1997 Jaspreet Singh Added 'load_sharing' structure. Also added | ||
27 | * 'devs_struct','dev_to_devtint_next' to 'sdla_t' | ||
28 | * Nov 24, 1997 Jaspreet Singh Added 'irq_dis_if_send_count', | ||
29 | * 'irq_dis_poll_count' to 'sdla_t'. | ||
30 | * Nov 06, 1997 Jaspreet Singh Added a define called 'INTR_TEST_MODE' | ||
31 | * Oct 20, 1997 Jaspreet Singh Added 'buff_intr_mode_unbusy' and | ||
32 | * 'dlci_intr_mode_unbusy' to 'sdla_t' | ||
33 | * Oct 18, 1997 Jaspreet Singh Added structure to maintain global driver | ||
34 | * statistics. | ||
35 | * Jan 15, 1997 Gene Kozin Version 3.1.0 | ||
36 | * o added UDP management stuff | ||
37 | * Jan 02, 1997 Gene Kozin Version 3.0.0 | ||
38 | *****************************************************************************/ | ||
39 | #ifndef _WANPIPE_H | ||
40 | #define _WANPIPE_H | ||
41 | |||
42 | #include <linux/wanrouter.h> | ||
43 | |||
44 | /* Defines */ | ||
45 | |||
46 | #ifndef PACKED | ||
47 | #define PACKED __attribute__((packed)) | ||
48 | #endif | ||
49 | |||
50 | #define WANPIPE_MAGIC 0x414C4453L /* signature: 'SDLA' reversed */ | ||
51 | |||
52 | /* IOCTL numbers (up to 16) */ | ||
53 | #define WANPIPE_DUMP (ROUTER_USER+0) /* dump adapter's memory */ | ||
54 | #define WANPIPE_EXEC (ROUTER_USER+1) /* execute firmware command */ | ||
55 | |||
56 | #define TRACE_ALL 0x00 | ||
57 | #define TRACE_PROT 0x01 | ||
58 | #define TRACE_DATA 0x02 | ||
59 | |||
60 | /* values for request/reply byte */ | ||
61 | #define UDPMGMT_REQUEST 0x01 | ||
62 | #define UDPMGMT_REPLY 0x02 | ||
63 | #define UDP_OFFSET 12 | ||
64 | |||
65 | #define MAX_CMD_BUFF 10 | ||
66 | #define MAX_X25_LCN 255 /* Maximum number of x25 channels */ | ||
67 | #define MAX_LCN_NUM 4095 /* Maximum lcn number */ | ||
68 | #define MAX_FT1_RETRY 100 | ||
69 | |||
70 | #ifndef AF_WANPIPE | ||
71 | #define AF_WANPIPE 25 | ||
72 | #ifndef PF_WANPIPE | ||
73 | #define PF_WANPIPE AF_WANPIPE | ||
74 | #endif | ||
75 | #endif | ||
76 | |||
77 | |||
78 | #define TX_TIMEOUT 5*HZ | ||
79 | |||
80 | /* General Critical Flags */ | ||
81 | #define SEND_CRIT 0x00 | ||
82 | #define PERI_CRIT 0x01 | ||
83 | |||
84 | /* Chdlc and PPP polling critical flag */ | ||
85 | #define POLL_CRIT 0x03 | ||
86 | |||
87 | /* Frame Relay Tx IRQ send critical flag */ | ||
88 | #define SEND_TXIRQ_CRIT 0x02 | ||
89 | |||
90 | /* Frame Relay ARP critical flag */ | ||
91 | #define ARP_CRIT 0x03 | ||
92 | |||
93 | /* Bit maps for dynamic interface configuration | ||
94 | * DYN_OPT_ON : turns this option on/off | ||
95 | * DEV_DOWN : device was shutdown by the driver not | ||
96 | * by user | ||
97 | */ | ||
98 | #define DYN_OPT_ON 0x00 | ||
99 | #define DEV_DOWN 0x01 | ||
100 | |||
101 | /* | ||
102 | * Data structures for IOCTL calls. | ||
103 | */ | ||
104 | |||
105 | typedef struct sdla_dump /* WANPIPE_DUMP */ | ||
106 | { | ||
107 | unsigned long magic; /* for verification */ | ||
108 | unsigned long offset; /* absolute adapter memory address */ | ||
109 | unsigned long length; /* block length */ | ||
110 | void* ptr; /* -> buffer */ | ||
111 | } sdla_dump_t; | ||
112 | |||
113 | typedef struct sdla_exec /* WANPIPE_EXEC */ | ||
114 | { | ||
115 | unsigned long magic; /* for verification */ | ||
116 | void* cmd; /* -> command structure */ | ||
117 | void* data; /* -> data buffer */ | ||
118 | } sdla_exec_t; | ||
119 | |||
120 | /* UDP management stuff */ | ||
121 | |||
122 | typedef struct wum_header | ||
123 | { | ||
124 | unsigned char signature[8]; /* 00h: signature */ | ||
125 | unsigned char type; /* 08h: request/reply */ | ||
126 | unsigned char command; /* 09h: commnand */ | ||
127 | unsigned char reserved[6]; /* 0Ah: reserved */ | ||
128 | } wum_header_t; | ||
129 | |||
130 | /************************************************************************* | ||
131 | Data Structure for global statistics | ||
132 | *************************************************************************/ | ||
133 | |||
134 | typedef struct global_stats | ||
135 | { | ||
136 | unsigned long isr_entry; | ||
137 | unsigned long isr_already_critical; | ||
138 | unsigned long isr_rx; | ||
139 | unsigned long isr_tx; | ||
140 | unsigned long isr_intr_test; | ||
141 | unsigned long isr_spurious; | ||
142 | unsigned long isr_enable_tx_int; | ||
143 | unsigned long rx_intr_corrupt_rx_bfr; | ||
144 | unsigned long rx_intr_on_orphaned_DLCI; | ||
145 | unsigned long rx_intr_dev_not_started; | ||
146 | unsigned long tx_intr_dev_not_started; | ||
147 | unsigned long poll_entry; | ||
148 | unsigned long poll_already_critical; | ||
149 | unsigned long poll_processed; | ||
150 | unsigned long poll_tbusy_bad_status; | ||
151 | unsigned long poll_host_disable_irq; | ||
152 | unsigned long poll_host_enable_irq; | ||
153 | |||
154 | } global_stats_t; | ||
155 | |||
156 | |||
157 | typedef struct{ | ||
158 | unsigned short udp_src_port PACKED; | ||
159 | unsigned short udp_dst_port PACKED; | ||
160 | unsigned short udp_length PACKED; | ||
161 | unsigned short udp_checksum PACKED; | ||
162 | } udp_pkt_t; | ||
163 | |||
164 | |||
165 | typedef struct { | ||
166 | unsigned char ver_inet_hdr_length PACKED; | ||
167 | unsigned char service_type PACKED; | ||
168 | unsigned short total_length PACKED; | ||
169 | unsigned short identifier PACKED; | ||
170 | unsigned short flags_frag_offset PACKED; | ||
171 | unsigned char ttl PACKED; | ||
172 | unsigned char protocol PACKED; | ||
173 | unsigned short hdr_checksum PACKED; | ||
174 | unsigned long ip_src_address PACKED; | ||
175 | unsigned long ip_dst_address PACKED; | ||
176 | } ip_pkt_t; | ||
177 | |||
178 | |||
179 | typedef struct { | ||
180 | unsigned char signature[8] PACKED; | ||
181 | unsigned char request_reply PACKED; | ||
182 | unsigned char id PACKED; | ||
183 | unsigned char reserved[6] PACKED; | ||
184 | } wp_mgmt_t; | ||
185 | |||
186 | /************************************************************************* | ||
187 | Data Structure for if_send statistics | ||
188 | *************************************************************************/ | ||
189 | typedef struct if_send_stat{ | ||
190 | unsigned long if_send_entry; | ||
191 | unsigned long if_send_skb_null; | ||
192 | unsigned long if_send_broadcast; | ||
193 | unsigned long if_send_multicast; | ||
194 | unsigned long if_send_critical_ISR; | ||
195 | unsigned long if_send_critical_non_ISR; | ||
196 | unsigned long if_send_tbusy; | ||
197 | unsigned long if_send_tbusy_timeout; | ||
198 | unsigned long if_send_PIPE_request; | ||
199 | unsigned long if_send_wan_disconnected; | ||
200 | unsigned long if_send_dlci_disconnected; | ||
201 | unsigned long if_send_no_bfrs; | ||
202 | unsigned long if_send_adptr_bfrs_full; | ||
203 | unsigned long if_send_bfr_passed_to_adptr; | ||
204 | unsigned long if_send_protocol_error; | ||
205 | unsigned long if_send_bfr_not_passed_to_adptr; | ||
206 | unsigned long if_send_tx_int_enabled; | ||
207 | unsigned long if_send_consec_send_fail; | ||
208 | } if_send_stat_t; | ||
209 | |||
210 | typedef struct rx_intr_stat{ | ||
211 | unsigned long rx_intr_no_socket; | ||
212 | unsigned long rx_intr_dev_not_started; | ||
213 | unsigned long rx_intr_PIPE_request; | ||
214 | unsigned long rx_intr_bfr_not_passed_to_stack; | ||
215 | unsigned long rx_intr_bfr_passed_to_stack; | ||
216 | } rx_intr_stat_t; | ||
217 | |||
218 | typedef struct pipe_mgmt_stat{ | ||
219 | unsigned long UDP_PIPE_mgmt_kmalloc_err; | ||
220 | unsigned long UDP_PIPE_mgmt_direction_err; | ||
221 | unsigned long UDP_PIPE_mgmt_adptr_type_err; | ||
222 | unsigned long UDP_PIPE_mgmt_adptr_cmnd_OK; | ||
223 | unsigned long UDP_PIPE_mgmt_adptr_cmnd_timeout; | ||
224 | unsigned long UDP_PIPE_mgmt_adptr_send_passed; | ||
225 | unsigned long UDP_PIPE_mgmt_adptr_send_failed; | ||
226 | unsigned long UDP_PIPE_mgmt_not_passed_to_stack; | ||
227 | unsigned long UDP_PIPE_mgmt_passed_to_stack; | ||
228 | unsigned long UDP_PIPE_mgmt_no_socket; | ||
229 | unsigned long UDP_PIPE_mgmt_passed_to_adptr; | ||
230 | } pipe_mgmt_stat_t; | ||
231 | |||
232 | |||
233 | typedef struct { | ||
234 | struct sk_buff *skb; | ||
235 | } bh_data_t, cmd_data_t; | ||
236 | |||
237 | #define MAX_LGTH_UDP_MGNT_PKT 2000 | ||
238 | |||
239 | |||
240 | /* This is used for interrupt testing */ | ||
241 | #define INTR_TEST_MODE 0x02 | ||
242 | |||
243 | #define WUM_SIGNATURE_L 0x50495046 | ||
244 | #define WUM_SIGNATURE_H 0x444E3845 | ||
245 | |||
246 | #define WUM_KILL 0x50 | ||
247 | #define WUM_EXEC 0x51 | ||
248 | |||
249 | #define WANPIPE 0x00 | ||
250 | #define API 0x01 | ||
251 | #define BRIDGE 0x02 | ||
252 | #define BRIDGE_NODE 0x03 | ||
253 | |||
254 | #ifdef __KERNEL__ | ||
255 | /****** Kernel Interface ****************************************************/ | ||
256 | |||
257 | #include <linux/sdladrv.h> /* SDLA support module API definitions */ | ||
258 | #include <linux/sdlasfm.h> /* SDLA firmware module definitions */ | ||
259 | #include <linux/workqueue.h> | ||
260 | #include <linux/serial.h> | ||
261 | #include <linux/serialP.h> | ||
262 | #include <linux/serial_reg.h> | ||
263 | #include <asm/serial.h> | ||
264 | #include <linux/tty.h> | ||
265 | #include <linux/tty_driver.h> | ||
266 | #include <linux/tty_flip.h> | ||
267 | |||
268 | /****** Data Structures *****************************************************/ | ||
269 | |||
270 | /* Adapter Data Space. | ||
271 | * This structure is needed because we handle multiple cards, otherwise | ||
272 | * static data would do it. | ||
273 | */ | ||
274 | typedef struct sdla | ||
275 | { | ||
276 | char devname[WAN_DRVNAME_SZ+1]; /* card name */ | ||
277 | sdlahw_t hw; /* hardware configuration */ | ||
278 | struct wan_device wandev; /* WAN device data space */ | ||
279 | |||
280 | unsigned open_cnt; /* number of open interfaces */ | ||
281 | unsigned long state_tick; /* link state timestamp */ | ||
282 | unsigned intr_mode; /* Type of Interrupt Mode */ | ||
283 | char in_isr; /* interrupt-in-service flag */ | ||
284 | char buff_int_mode_unbusy; /* flag for carrying out dev_tint */ | ||
285 | char dlci_int_mode_unbusy; /* flag for carrying out dev_tint */ | ||
286 | long configured; /* flag for previous configurations */ | ||
287 | |||
288 | unsigned short irq_dis_if_send_count; /* Disabling irqs in if_send*/ | ||
289 | unsigned short irq_dis_poll_count; /* Disabling irqs in poll routine*/ | ||
290 | unsigned short force_enable_irq; | ||
291 | char TracingEnabled; /* flag for enabling trace */ | ||
292 | global_stats_t statistics; /* global statistics */ | ||
293 | void* mbox; /* -> mailbox */ | ||
294 | void* rxmb; /* -> receive mailbox */ | ||
295 | void* flags; /* -> adapter status flags */ | ||
296 | void (*isr)(struct sdla* card); /* interrupt service routine */ | ||
297 | void (*poll)(struct sdla* card); /* polling routine */ | ||
298 | int (*exec)(struct sdla* card, void* u_cmd, void* u_data); | ||
299 | /* Used by the listen() system call */ | ||
300 | /* Wanpipe Socket Interface */ | ||
301 | int (*func) (struct sk_buff *, struct sock *); | ||
302 | struct sock *sk; | ||
303 | |||
304 | /* Shutdown function */ | ||
305 | void (*disable_comm) (struct sdla *card); | ||
306 | |||
307 | /* Secondary Port Device: Piggibacking */ | ||
308 | struct sdla *next; | ||
309 | |||
310 | /* TTY driver variables */ | ||
311 | unsigned char tty_opt; | ||
312 | struct tty_struct *tty; | ||
313 | unsigned int tty_minor; | ||
314 | unsigned int tty_open; | ||
315 | unsigned char *tty_buf; | ||
316 | unsigned char *tty_rx; | ||
317 | struct work_struct tty_work; | ||
318 | |||
319 | union | ||
320 | { | ||
321 | struct | ||
322 | { /****** X.25 specific data **********/ | ||
323 | u32 lo_pvc; | ||
324 | u32 hi_pvc; | ||
325 | u32 lo_svc; | ||
326 | u32 hi_svc; | ||
327 | struct net_device *svc_to_dev_map[MAX_X25_LCN]; | ||
328 | struct net_device *pvc_to_dev_map[MAX_X25_LCN]; | ||
329 | struct net_device *tx_dev; | ||
330 | struct net_device *cmd_dev; | ||
331 | u32 no_dev; | ||
332 | volatile u8 *hdlc_buf_status; | ||
333 | u32 tx_interrupts_pending; | ||
334 | u16 timer_int_enabled; | ||
335 | struct net_device *poll_device; | ||
336 | atomic_t command_busy; | ||
337 | |||
338 | u16 udp_pkt_lgth; | ||
339 | u32 udp_type; | ||
340 | u8 udp_pkt_src; | ||
341 | u32 udp_lcn; | ||
342 | struct net_device *udp_dev; | ||
343 | s8 udp_pkt_data[MAX_LGTH_UDP_MGNT_PKT]; | ||
344 | |||
345 | u8 LAPB_hdlc; /* Option to turn off X25 and run only LAPB */ | ||
346 | u8 logging; /* Option to log call messages */ | ||
347 | u8 oob_on_modem; /* Option to send modem status to the api */ | ||
348 | u16 num_of_ch; /* Number of channels configured by the user */ | ||
349 | |||
350 | struct work_struct x25_poll_work; | ||
351 | struct timer_list x25_timer; | ||
352 | } x; | ||
353 | struct | ||
354 | { /****** frame relay specific data ***/ | ||
355 | void* rxmb_base; /* -> first Rx buffer */ | ||
356 | void* rxmb_last; /* -> last Rx buffer */ | ||
357 | unsigned rx_base; /* S508 receive buffer base */ | ||
358 | unsigned rx_top; /* S508 receive buffer end */ | ||
359 | unsigned short node_dlci[100]; | ||
360 | unsigned short dlci_num; | ||
361 | struct net_device *dlci_to_dev_map[991 + 1]; | ||
362 | unsigned tx_interrupts_pending; | ||
363 | unsigned short timer_int_enabled; | ||
364 | unsigned short udp_pkt_lgth; | ||
365 | int udp_type; | ||
366 | char udp_pkt_src; | ||
367 | unsigned udp_dlci; | ||
368 | char udp_pkt_data[MAX_LGTH_UDP_MGNT_PKT]; | ||
369 | void* trc_el_base; /* first trace element */ | ||
370 | void* trc_el_last; /* last trace element */ | ||
371 | void *curr_trc_el; /* current trace element */ | ||
372 | unsigned short trc_bfr_space; /* trace buffer space */ | ||
373 | unsigned char update_comms_stats; | ||
374 | struct net_device *arp_dev; | ||
375 | spinlock_t if_send_lock; | ||
376 | } f; | ||
377 | struct /****** PPP-specific data ***********/ | ||
378 | { | ||
379 | char if_name[WAN_IFNAME_SZ+1]; /* interface name */ | ||
380 | void* txbuf; /* -> current Tx buffer */ | ||
381 | void* txbuf_base; /* -> first Tx buffer */ | ||
382 | void* txbuf_last; /* -> last Tx buffer */ | ||
383 | void* rxbuf_base; /* -> first Rx buffer */ | ||
384 | void* rxbuf_last; /* -> last Rx buffer */ | ||
385 | unsigned rx_base; /* S508 receive buffer base */ | ||
386 | unsigned rx_top; /* S508 receive buffer end */ | ||
387 | char ip_mode; /* STATIC/HOST/PEER IP Mode */ | ||
388 | char authenticator; /* Authenticator for PAP/CHAP */ | ||
389 | unsigned char comm_enabled; /* Is comm enabled or not */ | ||
390 | unsigned char peer_route; /* Process Peer Route */ | ||
391 | unsigned long *txbuf_next; /* Next Tx buffer to use */ | ||
392 | unsigned long *rxbuf_next; /* Next Rx buffer to use */ | ||
393 | } p; | ||
394 | struct /* Cisco HDLC-specific data */ | ||
395 | { | ||
396 | char if_name[WAN_IFNAME_SZ+1]; /* interface name */ | ||
397 | unsigned char comm_port;/* Communication Port O or 1 */ | ||
398 | unsigned char usedby; /* Used by WANPIPE or API */ | ||
399 | void* rxmb; /* Receive mail box */ | ||
400 | void* flags; /* flags */ | ||
401 | void* tx_status; /* Tx status element */ | ||
402 | void* rx_status; /* Rx status element */ | ||
403 | void* txbuf; /* -> current Tx buffer */ | ||
404 | void* txbuf_base; /* -> first Tx buffer */ | ||
405 | void* txbuf_last; /* -> last Tx buffer */ | ||
406 | void* rxbuf_base; /* -> first Rx buffer */ | ||
407 | void* rxbuf_last; /* -> last Rx buffer */ | ||
408 | unsigned rx_base; /* S508 receive buffer base */ | ||
409 | unsigned rx_top; /* S508 receive buffer end */ | ||
410 | unsigned char receive_only; /* high speed receivers */ | ||
411 | unsigned short protocol_options; | ||
412 | unsigned short kpalv_tx; /* Tx kpalv timer */ | ||
413 | unsigned short kpalv_rx; /* Rx kpalv timer */ | ||
414 | unsigned short kpalv_err; /* Error tolerance */ | ||
415 | unsigned short slarp_timer; /* SLARP req timer */ | ||
416 | unsigned state; /* state of the link */ | ||
417 | unsigned char api_status; | ||
418 | unsigned char update_call_count; | ||
419 | unsigned short api_options; /* for async config */ | ||
420 | unsigned char async_mode; | ||
421 | unsigned short tx_bits_per_char; | ||
422 | unsigned short rx_bits_per_char; | ||
423 | unsigned short stop_bits; | ||
424 | unsigned short parity; | ||
425 | unsigned short break_timer; | ||
426 | unsigned short inter_char_timer; | ||
427 | unsigned short rx_complete_length; | ||
428 | unsigned short xon_char; | ||
429 | unsigned short xoff_char; | ||
430 | unsigned char comm_enabled; /* Is comm enabled or not */ | ||
431 | unsigned char backup; | ||
432 | } c; | ||
433 | struct | ||
434 | { | ||
435 | void* tx_status; /* Tx status element */ | ||
436 | void* rx_status; /* Rx status element */ | ||
437 | void* trace_status; /* Trace status element */ | ||
438 | void* txbuf; /* -> current Tx buffer */ | ||
439 | void* txbuf_base; /* -> first Tx buffer */ | ||
440 | void* txbuf_last; /* -> last Tx buffer */ | ||
441 | void* rxbuf_base; /* -> first Rx buffer */ | ||
442 | void* rxbuf_last; /* -> last Rx buffer */ | ||
443 | void* tracebuf; /* -> current Trace buffer */ | ||
444 | void* tracebuf_base; /* -> current Trace buffer */ | ||
445 | void* tracebuf_last; /* -> current Trace buffer */ | ||
446 | unsigned rx_base; /* receive buffer base */ | ||
447 | unsigned rx_end; /* receive buffer end */ | ||
448 | unsigned trace_base; /* trace buffer base */ | ||
449 | unsigned trace_end; /* trace buffer end */ | ||
450 | |||
451 | } h; | ||
452 | } u; | ||
453 | } sdla_t; | ||
454 | |||
455 | /****** Public Functions ****************************************************/ | ||
456 | |||
457 | void wanpipe_open (sdla_t* card); /* wpmain.c */ | ||
458 | void wanpipe_close (sdla_t* card); /* wpmain.c */ | ||
459 | void wanpipe_set_state (sdla_t* card, int state); /* wpmain.c */ | ||
460 | |||
461 | int wpx_init (sdla_t* card, wandev_conf_t* conf); /* wpx.c */ | ||
462 | int wpf_init (sdla_t* card, wandev_conf_t* conf); /* wpf.c */ | ||
463 | int wpp_init (sdla_t* card, wandev_conf_t* conf); /* wpp.c */ | ||
464 | int wpc_init (sdla_t* card, wandev_conf_t* conf); /* Cisco HDLC */ | ||
465 | int bsc_init (sdla_t* card, wandev_conf_t* conf); /* BSC streaming */ | ||
466 | int hdlc_init(sdla_t* card, wandev_conf_t* conf); /* HDLC support */ | ||
467 | int wpft1_init (sdla_t* card, wandev_conf_t* conf); /* FT1 Config support */ | ||
468 | int wsppp_init (sdla_t* card, wandev_conf_t* conf); /* Sync PPP on top of RAW CHDLC */ | ||
469 | |||
470 | extern sdla_t * wanpipe_find_card(char *); | ||
471 | extern sdla_t * wanpipe_find_card_num (int); | ||
472 | |||
473 | extern void wanpipe_queue_work (struct work_struct *); | ||
474 | extern void wanpipe_mark_bh (void); | ||
475 | extern void wakeup_sk_bh(struct net_device *dev); | ||
476 | extern int change_dev_flags(struct net_device *dev, unsigned flags); | ||
477 | extern unsigned long get_ip_address(struct net_device *dev, int option); | ||
478 | extern void add_gateway(sdla_t *card, struct net_device *dev); | ||
479 | |||
480 | |||
481 | #endif /* __KERNEL__ */ | ||
482 | #endif /* _WANPIPE_H */ | ||
483 | |||