diff options
Diffstat (limited to 'include')
39 files changed, 1314 insertions, 788 deletions
diff --git a/include/asm-alpha/init.h b/include/asm-alpha/init.h index 7d769dfcd..9ce618965 100644 --- a/include/asm-alpha/init.h +++ b/include/asm-alpha/init.h @@ -7,6 +7,12 @@ __arginit __init; \ __arginit +#if __GNUC__ >= 2 && __GNUC_MINOR__ >= 8 +#define __initlocaldata __initdata +#else +#define __initlocaldata +#endif + /* For assembly routines */ #define __INIT .section .text.init,"ax" #define __FINIT .previous diff --git a/include/asm-alpha/unistd.h b/include/asm-alpha/unistd.h index cef856f24..64361c234 100644 --- a/include/asm-alpha/unistd.h +++ b/include/asm-alpha/unistd.h @@ -421,6 +421,12 @@ static inline int read(int fd, char * buf, int nr) return sys_read(fd, buf, nr); } +extern int sys_fork(void); +static inline int fork(void) +{ + return sys_fork(); +} + extern int __kernel_execve(char *, char **, char **, struct pt_regs *); static inline int execve(char * file, char ** argvp, char ** envp) { @@ -452,6 +458,12 @@ static inline pid_t wait(int * wait_stat) return waitpid(-1,wait_stat,0); } +extern int sys_delete_module(const char *name); +static inline int delete_module(const char *name) +{ + return sys_delete_module(name); +} + #endif #endif /* _ALPHA_UNISTD_H */ diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index 31b407dbb..9bcf62793 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h @@ -325,6 +325,7 @@ static inline _syscall3(int,open,const char *,file,int,flag,int,mode); static inline _syscall1(int,close,int,fd); static inline _syscall1(int,_exit,int,exitcode); static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options); +static inline _syscall1(int,delete_module,const char *,name) static inline pid_t wait(int * wait_stat) { diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h index a2947ce3e..5370dbb6a 100644 --- a/include/asm-i386/string.h +++ b/include/asm-i386/string.h @@ -114,7 +114,7 @@ __asm__ __volatile__( "xorl %%eax,%%eax\n\t" "jmp 3f\n" "2:\tsbbl %%eax,%%eax\n\t" - "orb $1,%%eax\n" + "orb $1,%%al\n" "3:" :"=a" (__res):"S" (cs),"D" (ct):"si","di"); return __res; diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index 53766f701..068be0f29 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h @@ -296,6 +296,7 @@ static inline _syscall3(int,open,const char *,file,int,flag,int,mode) static inline _syscall1(int,close,int,fd) static inline _syscall1(int,_exit,int,exitcode) static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) +static inline _syscall1(int,delete_module,const char *,name) static inline pid_t wait(int * wait_stat) { diff --git a/include/asm-m68k/amifd.h b/include/asm-m68k/amifd.h index 0c13747c3..ea21e69fd 100644 --- a/include/asm-m68k/amifd.h +++ b/include/asm-m68k/amifd.h @@ -5,21 +5,23 @@ #include <linux/fd.h> -#define FD_MAX_UNITS 4 +#define FD_MAX_UNITS 4 /* Max. Number of drives */ +#define FLOPPY_MAX_SECTORS 22 /* Max. Number of sectors per track */ + +#ifndef ASSEMBLER struct fd_data_type { char *name; /* description of data type */ int sects; /* sectors per track */ #ifdef __STDC__ - int (*read_fkt)(int, unsigned char *, unsigned long, int); - void (*write_fkt)(int, unsigned long, unsigned char *, int); + int (*read_fkt)(int); + void (*write_fkt)(int); #else int (*read_fkt)(); /* read whole track */ void (*write_fkt)(); /* write whole track */ #endif }; -#ifndef ASSEMBLER /* ** Floppy type descriptions */ @@ -43,13 +45,15 @@ struct amiga_floppy_struct { struct fd_drive_type *type; /* type of floppy for this unit */ struct fd_data_type *dtype; /* type of floppy for this unit */ int track; /* current track (-1 == unknown) */ + unsigned char *trackbuf; /* current track (kmaloc()'d */ int blocks; /* total # blocks on disk */ - int sects; /* number of sectors per track */ + int changed; /* true when not known */ int disk; /* disk in drive (-1 == unknown) */ int motor; /* true when motor is at speed */ int busy; /* true when drive is active */ + int dirty; /* true when trackbuf is not on disk */ int status; /* current error code for unit */ }; #endif diff --git a/include/asm-m68k/ide.h b/include/asm-m68k/ide.h index bf155740f..0a0222ac5 100644 --- a/include/asm-m68k/ide.h +++ b/include/asm-m68k/ide.h @@ -406,7 +406,7 @@ static __inline__ void ide_get_lock (int *ide_lock, void (*handler)(int, void *, #endif /* CONFIG_ATARI */ } -#define ide_ack_intr(hwif) (hwif)->ack_intr((hwif)) +#define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1) /* * On the Atari, we sometimes can't enable interrupts: diff --git a/include/asm-m68k/setup.h b/include/asm-m68k/setup.h index 0255ca97f..16cd23c12 100644 --- a/include/asm-m68k/setup.h +++ b/include/asm-m68k/setup.h @@ -131,7 +131,7 @@ extern u_long m68k_machtype; * * CPU_68020 == MMU_68851 * CPU_68030 == MMU_68030 - * CPU_68040 == FPU_68040 == MMU_68040 (not strictly, think of 68LC040!) + * CPU_68040 == FPU_68040 == MMU_68040 * CPU_68060 == FPU_68060 == MMU_68060 */ diff --git a/include/asm-m68k/signal.h b/include/asm-m68k/signal.h index 1f3466aff..5fa3fa67e 100644 --- a/include/asm-m68k/signal.h +++ b/include/asm-m68k/signal.h @@ -128,6 +128,13 @@ struct old_sigaction { void (*sa_restorer)(void); }; +struct sigaction { + __sighandler_t sa_handler; + unsigned long sa_flags; + void (*sa_restorer)(void); + sigset_t sa_mask; /* mask last for extensibility */ +}; + struct k_sigaction { struct sigaction sa; }; @@ -173,9 +180,9 @@ extern __inline__ int __const_sigismember(sigset_t *set, int _sig) extern __inline__ int __gen_sigismember(sigset_t *set, int _sig) { - char ret; - __asm__("bftst %1{%2,#1}\n\t sne %0" - : "=rm"(ret) : "m"(*set), "id"((_sig-1) ^ 31) : "cc"); + int ret; + __asm__("bfextu %1{%2,#1},%0" + : "=d"(ret) : "m"(*set), "id"((_sig-1) ^ 31)); return ret; } diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h index 7c5226b95..f82743219 100644 --- a/include/asm-m68k/unistd.h +++ b/include/asm-m68k/unistd.h @@ -316,6 +316,7 @@ static inline _syscall3(int,open,const char *,file,int,flag,int,mode) static inline _syscall1(int,close,int,fd) static inline _syscall1(int,_exit,int,exitcode) static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) +static inline _syscall1(int,delete_module,const char *,name) /* * This is the mechanism for creating a new kernel thread. diff --git a/include/asm-mips/init.h b/include/asm-mips/init.h index cd963cb98..3dd2f614d 100644 --- a/include/asm-mips/init.h +++ b/include/asm-mips/init.h @@ -1,14 +1,30 @@ -#ifndef __ASM_MIPS_INIT_H -#define __ASM_MIPS_INIT_H +/* + * include/asm-mips/init.h + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * $Id: init.h,v 1.2 1998/03/27 08:54:04 ralf Exp $ + */ +#ifndef __MIPS_INIT_H +#define __MIPS_INIT_H -/* Throwing the initialization code and data out is not supported yet... */ +#define __init __attribute__ ((__section__ (".text.init"))) +#define __initdata __attribute__ ((__section__ (".data.init"))) +#define __initfunc(__arginit) \ + __arginit __init; \ + __arginit + +#if __GNUC__ >= 2 && __GNUC_MINOR__ >= 8 +#define __initlocaldata __initdata +#else +#define __initlocaldata +#endif -#define __init -#define __initdata -#define __initfunc(__arginit) __arginit /* For assembly routines */ -#define __INIT -#define __FINIT -#define __INITDATA +#define __INIT .section .text.init,"ax" +#define __FINIT .previous +#define __INITDATA .section .data.init,"a" -#endif /* __ASM_MIPS_INIT_H */ +#endif /* __MIPS_INIT_H */ diff --git a/include/asm-mips/offset.h b/include/asm-mips/offset.h index 3c6d274ce..e211de3cc 100644 --- a/include/asm-mips/offset.h +++ b/include/asm-mips/offset.h @@ -50,7 +50,7 @@ #define TASK_PRIORITY 56 #define TASK_FLAGS 4 #define TASK_SIGPENDING 8 -#define TASK_MM 928 +#define TASK_MM 920 /* MIPS specific thread_struct offsets. */ #define THREAD_REG16 568 @@ -69,12 +69,11 @@ #define THREAD_BVADDR 880 #define THREAD_ECODE 884 #define THREAD_TRAPNO 888 -#define THREAD_KSP 892 -#define THREAD_PGDIR 896 -#define THREAD_MFLAGS 900 -#define THREAD_CURDS 904 -#define THREAD_TRAMP 908 -#define THREAD_OLDCTX 912 +#define THREAD_PGDIR 892 +#define THREAD_MFLAGS 896 +#define THREAD_CURDS 900 +#define THREAD_TRAMP 904 +#define THREAD_OLDCTX 908 /* Linux mm_struct offsets. */ #define MM_COUNT 12 diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index 84d6830a7..765208d3e 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h @@ -5,7 +5,7 @@ * written by Ralf Baechle * Modified further for R[236]000 compatibility by Paul M. Antoine * - * $Id: processor.h,v 1.11 1998/03/22 20:43:52 ralf Exp $ + * $Id: processor.h,v 1.8 1998/03/27 04:47:59 ralf Exp $ */ #ifndef __ASM_MIPS_PROCESSOR_H #define __ASM_MIPS_PROCESSOR_H @@ -104,7 +104,6 @@ struct thread_struct { unsigned long cp0_badvaddr; unsigned long error_code; unsigned long trap_no; - unsigned long ksp; /* Top of kernel stack */ unsigned long pg_dir; /* used in tlb refill */ #define MF_FIXADE 1 /* Fix address errors in software */ #define MF_LOGADE 2 /* Log address errors to syslog */ @@ -136,8 +135,7 @@ struct thread_struct { /* \ * Other stuff associated with the process \ */ \ - 0, 0, 0, (unsigned long)&init_task_union + KERNEL_STACK_SIZE - 32, \ - (unsigned long) swapper_pg_dir, \ + 0, 0, 0, (unsigned long) swapper_pg_dir, \ /* \ * For now the default is to fix address errors \ */ \ diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 91202c955..5cc743dd9 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h @@ -1427,6 +1427,7 @@ static inline _syscall3(int,open,const char *,file,int,flag,int,mode) static inline _syscall1(int,close,int,fd) static inline _syscall1(int,_exit,int,exitcode) static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) +static inline _syscall1(int,delete_module,const char *,name) static inline pid_t wait(int * wait_stat) { diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index df519f28f..f5425f51b 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h @@ -438,6 +438,7 @@ static __inline__ _syscall3(int,open,__const__ char *,file,int,flag,int,mode) static __inline__ _syscall1(int,close,int,fd) static __inline__ _syscall1(int,_exit,int,exitcode) static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) +static __inline__ _syscall1(int,delete_module,const char *,name) static __inline__ pid_t wait(int * wait_stat) { diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index 1983c79d9..67a3c4108 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h @@ -426,6 +426,7 @@ static __inline__ _syscall3(int,open,__const__ char *,file,int,flag,int,mode) static __inline__ _syscall1(int,close,int,fd) static __inline__ _syscall1(int,_exit,int,exitcode) static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) +static __inline__ _syscall1(int,delete_module,const char *,name) static __inline__ pid_t wait(int * wait_stat) { diff --git a/include/linux/fb.h b/include/linux/fb.h index 9ed7546d5..60b6b7727 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -1,16 +1,31 @@ #ifndef _LINUX_FB_H #define _LINUX_FB_H +#include <asm/types.h> + /* Definitions of frame buffers */ +#define FB_MAJOR 29 + +#define FB_MODES_SHIFT 5 /* 32 modes per framebuffer */ +#define FB_NUM_MINORS 256 /* 256 Minors */ +#define FB_MAX (FB_NUM_MINORS / (1 << FB_MODES_SHIFT)) +#define GET_FB_IDX(node) (MINOR(node) >> FB_MODES_SHIFT) + /* ioctls 0x46 is 'F' */ -#define FBIOGET_VSCREENINFO 0x4600 -#define FBIOPUT_VSCREENINFO 0x4601 -#define FBIOGET_FSCREENINFO 0x4602 +#define FBIOGET_VSCREENINFO 0x4600 +#define FBIOPUT_VSCREENINFO 0x4601 +#define FBIOGET_FSCREENINFO 0x4602 #define FBIOGETCMAP 0x4604 #define FBIOPUTCMAP 0x4605 -#define FBIOPAN_DISPLAY 0x4606 +#define FBIOPAN_DISPLAY 0x4606 +/* 0x4607-0x460B are defined below */ +/* #define FBIOGET_MONITORSPEC 0x460C */ +/* #define FBIOPUT_MONITORSPEC 0x460D */ +/* #define FBIOSWITCH_MONIBIT 0x460E */ +#define FBIOGET_CON2FBMAP 0x460F +#define FBIOPUT_CON2FBMAP 0x4610 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ @@ -26,22 +41,25 @@ struct fb_fix_screeninfo { char id[16]; /* identification string eg "TT Builtin" */ - unsigned long smem_start; /* Start of frame buffer mem */ - unsigned long smem_len; /* Length of frame buffer mem */ - int type; /* see FB_TYPE_* */ - int type_aux; /* Interleave for interleaved Planes */ - int visual; /* see FB_VISUAL_* */ - u_short xpanstep; /* zero if no hardware panning */ - u_short ypanstep; /* zero if no hardware panning */ - u_short ywrapstep; /* zero if no hardware ywrap */ - u_long line_length; /* length of a line in bytes */ - short reserved[9]; /* Reserved for future compatibility */ + char *smem_start; /* Start of frame buffer mem */ + __u32 smem_len; /* Length of frame buffer mem */ + __u32 type; /* see FB_TYPE_* */ + __u32 type_aux; /* Interleave for interleaved Planes */ + __u32 visual; /* see FB_VISUAL_* */ + __u16 xpanstep; /* zero if no hardware panning */ + __u16 ypanstep; /* zero if no hardware panning */ + __u16 ywrapstep; /* zero if no hardware ywrap */ + __u32 line_length; /* length of a line in bytes */ + unsigned char *mmio_start; /* Start of Memory Mapped I/O */ + __u32 mmio_len; /* Length of Memory Mapped I/O */ + __u32 accel; /* Type of acceleration available */ + __u16 reserved[3]; /* Reserved for future compatibility */ }; struct fb_bitfield { - int offset; /* beginning of bitfield */ - int length; /* length of bitfield */ - int msb_right; /* != 0 : Most significant bit is */ + __u32 offset; /* beginning of bitfield */ + __u32 length; /* length of bitfield */ + __u32 msb_right; /* != 0 : Most significant bit is */ /* right */ }; @@ -58,8 +76,12 @@ struct fb_bitfield { #define FB_ACCEL_NONE 0 /* no hardware accelerator */ #define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */ #define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */ -#define FB_ACCEL_CYBERVISION 3 /* Cybervision64 (S3 Trio64) */ -#define FB_ACCEL_RETINAZ3 4 /* RetinaZ3 (NCR77C32BLT) */ +#define FB_ACCEL_S3TRIO64 3 /* Cybervision64 (S3 Trio64) */ +#define FB_ACCEL_NCR77C32BLT 4 /* RetinaZ3 (NCR77C32BLT) */ +#define FB_ACCEL_S3VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */ +#define FB_ACCEL_MACH64 6 /* ATI Mach 64 */ +#define FB_ACCEL_TGA 7 /* DEC 21030 TGA */ +#define FB_ACCEL_ATY 8 /* atyfb (ATI Mach64) */ #define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */ #define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */ @@ -68,9 +90,10 @@ struct fb_bitfield { #define FB_SYNC_BROADCAST 16 /* broadcast video timings */ /* vtotal = 144d/288n/576i => PAL */ /* vtotal = 121d/242n/484i => NTSC */ +#define FB_SYNC_ON_GREEN 32 /* sync on green */ #define FB_VMODE_NONINTERLACED 0 /* non interlaced */ -#define FB_VMODE_INTERLACED 1 /* interlaced */ +#define FB_VMODE_INTERLACED 1 /* interlaced */ #define FB_VMODE_DOUBLE 2 /* double scan */ #define FB_VMODE_MASK 255 @@ -79,77 +102,107 @@ struct fb_bitfield { #define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */ struct fb_var_screeninfo { - int xres; /* visible resolution */ - int yres; - int xres_virtual; /* virtual resolution */ - int yres_virtual; - int xoffset; /* offset from virtual to visible */ - int yoffset; /* resolution */ + __u32 xres; /* visible resolution */ + __u32 yres; + __u32 xres_virtual; /* virtual resolution */ + __u32 yres_virtual; + __u32 xoffset; /* offset from virtual to visible */ + __u32 yoffset; /* resolution */ - int bits_per_pixel; /* guess what */ - int grayscale; /* != 0 Graylevels instead of colors */ + __u32 bits_per_pixel; /* guess what */ + __u32 grayscale; /* != 0 Graylevels instead of colors */ struct fb_bitfield red; /* bitfield in fb mem if true color, */ struct fb_bitfield green; /* else only length is significant */ struct fb_bitfield blue; struct fb_bitfield transp; /* transparency */ - int nonstd; /* != 0 Non standard pixel format */ + __u32 nonstd; /* != 0 Non standard pixel format */ - int activate; /* see FB_ACTIVATE_* */ + __u32 activate; /* see FB_ACTIVATE_* */ - int height; /* height of picture in mm */ - int width; /* width of picture in mm */ + __u32 height; /* height of picture in mm */ + __u32 width; /* width of picture in mm */ - int accel; /* see FB_ACCEL_* */ + __u32 accel; /* see FB_ACCEL_* */ /* Timing: All values in pixclocks, except pixclock (of course) */ - unsigned long pixclock; /* pixel clock in ps (pico seconds) */ - unsigned long left_margin; /* time from sync to picture */ - unsigned long right_margin; /* time from picture to sync */ - unsigned long upper_margin; /* time from sync to picture */ - unsigned long lower_margin; - unsigned long hsync_len; /* length of horizontal sync */ - unsigned long vsync_len; /* length of vertical sync */ - int sync; /* see FB_SYNC_* */ - int vmode; /* see FB_VMODE_* */ - int reserved[6]; /* Reserved for future compatibility */ + __u32 pixclock; /* pixel clock in ps (pico seconds) */ + __u32 left_margin; /* time from sync to picture */ + __u32 right_margin; /* time from picture to sync */ + __u32 upper_margin; /* time from sync to picture */ + __u32 lower_margin; + __u32 hsync_len; /* length of horizontal sync */ + __u32 vsync_len; /* length of vertical sync */ + __u32 sync; /* see FB_SYNC_* */ + __u32 vmode; /* see FB_VMODE_* */ + __u32 reserved[6]; /* Reserved for future compatibility */ }; struct fb_cmap { - int start; /* First entry */ - int len; /* Number of entries */ - unsigned short *red; /* Red values */ - unsigned short *green; - unsigned short *blue; - unsigned short *transp; /* transparency, can be NULL */ + __u32 start; /* First entry */ + __u32 len; /* Number of entries */ + __u16 *red; /* Red values */ + __u16 *green; + __u16 *blue; + __u16 *transp; /* transparency, can be NULL */ +}; + +struct fb_con2fbmap { + __u32 console; + __u32 framebuffer; +}; + +struct fb_monspecs { + unsigned hfmin : 20; /* hfreq lower limit (Hz) */ + unsigned hfmax : 20; /* hfreq upper limit (Hz) */ + unsigned vfmin : 10; /* vfreq lower limit (Hz) */ + unsigned vfmax : 10; /* vfreq upper limit (Hz) */ + unsigned dpms : 1; /* supports DPMS */ }; #ifdef __KERNEL__ #include <linux/fs.h> + +struct fb_info; +struct fb_info_gen; + + + /* + * Frame buffer operations + */ + struct fb_ops { - /* get non settable parameters */ - int (*fb_get_fix) (struct fb_fix_screeninfo *, int); - /* get settable parameters */ - int (*fb_get_var) (struct fb_var_screeninfo *, int); - /* set settable parameters */ - int (*fb_set_var) (struct fb_var_screeninfo *, int); - /* get colormap */ - int (*fb_get_cmap) (struct fb_cmap *, int, int); - /* set colormap */ - int (*fb_set_cmap) (struct fb_cmap *, int, int); - /* pan display */ - int (*fb_pan_display) (struct fb_var_screeninfo *, int); - /* perform fb specific ioctl */ - int (*fb_ioctl)(struct inode *, struct file *, unsigned int, - unsigned long, int); + /* open/release and usage marking */ + int (*fb_open)(struct fb_info *info); + int (*fb_release)(struct fb_info *info); + /* get non settable parameters */ + int (*fb_get_fix)(struct fb_fix_screeninfo *fix, int con, + struct fb_info *info); + /* get settable parameters */ + int (*fb_get_var)(struct fb_var_screeninfo *var, int con, + struct fb_info *info); + /* set settable parameters */ + int (*fb_set_var)(struct fb_var_screeninfo *var, int con, + struct fb_info *info); + /* get colormap */ + int (*fb_get_cmap)(struct fb_cmap *cmap, int kspc, int con, + struct fb_info *info); + /* set colormap */ + int (*fb_set_cmap)(struct fb_cmap *cmap, int kspc, int con, + struct fb_info *info); + /* pan display */ + int (*fb_pan_display)(struct fb_var_screeninfo *var, int con, + struct fb_info *info); + /* switch between text and graphics mode */ + int (*fb_set_mode)(int mode, struct fb_info *info); + /* perform fb specific ioctl */ + int (*fb_ioctl)(struct inode *inode, struct file *file, unsigned int cmd, + unsigned long arg, int con, struct fb_info *info); }; -int register_framebuffer(char *, int *, struct fb_ops *, int, - struct fb_var_screeninfo *); -int unregister_framebuffer(int); /* * This is the interface between the low-level console driver and the @@ -162,7 +215,7 @@ struct display { struct fb_var_screeninfo var; /* variable infos. yoffset and vmode */ /* are updated by fbcon.c */ struct fb_cmap cmap; /* colormap */ - u_char *screen_base; /* pointer to top of virtual screen */ + char *screen_base; /* pointer to top of virtual screen */ int visual; int type; /* see FB_TYPE_* */ int type_aux; /* Interleave for interleaved Planes */ @@ -181,6 +234,7 @@ struct display { /* Filled in by the low-level console driver */ struct vc_data *conp; /* pointer to console data */ + struct fb_info *fb_info; /* frame buffer for this console */ int vrows; /* number of virtual rows */ int cursor_x; /* current cursor position */ int cursor_y; @@ -199,22 +253,109 @@ struct display { struct fb_info { - char modename[40]; /* at boottime detected video mode */ - struct display *disp; /* pointer to display variables */ - char fontname[40]; /* default font name */ - int (*changevar)(int); /* tell console var has changed */ - int (*switch_con)(int); /* tell fb to switch consoles */ - int (*updatevar)(int); /* tell fb to update the vars */ - void (*blank)(int); /* tell fb to (un)blank the screen */ - int (*setcmap)(struct fb_cmap *, int); /* tell fb to set the colormap */ + char modename[40]; /* default video mode */ + int node; + struct fb_ops *fbops; + struct fb_monspecs monspecs; + struct display *disp; /* initial display variable */ + char fontname[40]; /* default font name */ + int (*changevar)(int); /* tell console var has changed */ + int (*switch_con)(int, struct fb_info*); + /* tell fb to switch consoles */ + int (*updatevar)(int, struct fb_info*); + /* tell fb to update the vars */ + void (*blank)(int, struct fb_info*); /* tell fb to (un)blank the screen */ + + /* From here on everything is device dependent */ +}; + + + /* + * This structure abstracts from the underlying hardware. It is not + * mandatory but used by the `generic' frame buffer operations. + * Read drivers/video/skeletonfb.c for more information. + */ + +struct fbgen_hwswitch { + void (*detect)(void); + int (*encode_fix)(struct fb_fix_screeninfo *fix, const void *par, + struct fb_info_gen *info); + int (*decode_var)(const struct fb_var_screeninfo *var, void *par, + struct fb_info_gen *info); + int (*encode_var)(struct fb_var_screeninfo *var, const void *par, + struct fb_info_gen *info); + void (*get_par)(void *par, struct fb_info_gen *info); + void (*set_par)(const void *par, struct fb_info_gen *info); + int (*getcolreg)(unsigned regno, unsigned *red, unsigned *green, + unsigned *blue, unsigned *transp, struct fb_info *info); + int (*setcolreg)(unsigned regno, unsigned red, unsigned green, + unsigned blue, unsigned transp, struct fb_info *info); + int (*pan_display)(const struct fb_var_screeninfo *var, + struct fb_info_gen *info); + int (*blank)(int blank_mode, struct fb_info_gen *info); + struct display_switch *(*get_dispsw)(const void *par, + struct fb_info_gen *info); +}; + +struct fb_info_gen { + struct fb_info info; + + /* Entries for a generic frame buffer device */ + /* Yes, this starts looking like C++ */ + u_int parsize; + struct fbgen_hwswitch *fbhw; + + /* From here on everything is device dependent */ }; + +struct fb_videomode { + const char *name; + struct fb_var_screeninfo var; +}; + + +/* prototypes */ +typedef unsigned long fb_init_func(unsigned long); + +/* drivers/char/fbmem.c */ +extern int register_framebuffer(struct fb_info *fb_info); +extern int unregister_framebuffer(const struct fb_info *fb_info); +extern unsigned long probe_framebuffers(unsigned long kmem_start); +extern int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal, + const struct fb_info *fb_info); +extern int fbmon_dpms(const struct fb_info *fb_info); + + +extern int num_registered_fb; +extern struct fb_info *registered_fb[FB_MAX]; +extern char con2fb_map[MAX_NR_CONSOLES]; + +/* drivers/video/fbcon.c */ +extern struct display fb_display[MAX_NR_CONSOLES]; + +/* drivers/video/fbcmap.c */ +extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); +extern void fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to, + int fsfromto); +extern int fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, + int kspc, int (*getcolreg)(u_int, u_int *, u_int *, + u_int *, u_int *, + struct fb_info *), + struct fb_info *fb_info); +extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, + int kspc, int (*setcolreg)(u_int, u_int, u_int, u_int, + u_int, struct fb_info *), + struct fb_info *fb_info); +extern struct fb_cmap *fb_default_cmap(int len); +extern void fb_invert_cmaps(void); + #endif /* __KERNEL__ */ #if 1 -#define FBCMD_GET_CURRENTPAR 0xDEAD0005 -#define FBCMD_SET_CURRENTPAR 0xDEAD8005 +#define FBCMD_GET_CURRENTPAR 0xDEAD0005 +#define FBCMD_SET_CURRENTPAR 0xDEAD8005 #endif @@ -233,26 +374,26 @@ struct fb_info { struct fb_fix_cursorinfo { - u_short crsr_width; /* width and height of the cursor in */ - u_short crsr_height; /* pixels (zero if no cursor) */ - u_short crsr_xsize; /* cursor size in display pixels */ - u_short crsr_ysize; - u_short crsr_color1; /* colormap entry for cursor color1 */ - u_short crsr_color2; /* colormap entry for cursor color2 */ + __u16 crsr_width; /* width and height of the cursor in */ + __u16 crsr_height; /* pixels (zero if no cursor) */ + __u16 crsr_xsize; /* cursor size in display pixels */ + __u16 crsr_ysize; + __u16 crsr_color1; /* colormap entry for cursor color1 */ + __u16 crsr_color2; /* colormap entry for cursor color2 */ }; struct fb_var_cursorinfo { - u_short width; - u_short height; - u_short xspot; - u_short yspot; - u_char data[1]; /* field with [height][width] */ + __u16 width; + __u16 height; + __u16 xspot; + __u16 yspot; + __u8 data[1]; /* field with [height][width] */ }; struct fb_cursorstate { - short xoffset; - short yoffset; - u_short mode; + __s16 xoffset; + __s16 yoffset; + __u16 mode; }; #define FB_CURSOR_OFF 0 @@ -267,24 +408,23 @@ struct fb_cursorstate { #define FB_LINE_FILLED 4 struct fb_line { - int start_x; - int start_y; - int end_x; - int end_y; - int color; - int option; + __s32 start_x; + __s32 start_y; + __s32 end_x; + __s32 end_y; + __u32 color; + __u32 option; }; struct fb_move { - int src_x; - int src_y; - int dest_x; - int dest_y; - int height; - int width; + __s32 src_x; + __s32 src_y; + __s32 dest_x; + __s32 dest_y; + __u32 height; + __u32 width; }; #endif /* Preliminary */ - #endif /* _LINUX_FB_H */ diff --git a/include/linux/file.h b/include/linux/file.h index 240a5039c..fe7ca60c9 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -9,13 +9,26 @@ extern int __fput(struct file *); extern void insert_file_free(struct file *file); /* + * Check whether the specified task has the fd open. Since the task + * may not have a files_struct, we must test for p->files != NULL. + */ +extern inline struct file * fcheck_task(struct task_struct *p, unsigned int fd) +{ + struct file * file = NULL; + + if (p->files && fd < p->files->max_fds) + file = p->files->fd[fd]; + return file; +} + +/* * Check whether the specified fd has an open file. */ extern inline struct file * fcheck(unsigned int fd) { struct file * file = NULL; - if (fd < NR_OPEN) + if (fd < current->files->max_fds) file = current->files->fd[fd]; return file; } diff --git a/include/linux/ip_fw.h b/include/linux/ip_fw.h index 6f9bc510a..0334cb4af 100644 --- a/include/linux/ip_fw.h +++ b/include/linux/ip_fw.h @@ -52,11 +52,13 @@ #ifndef _IP_FW_H #define _IP_FW_H +#ifdef __KERNEL__ #include <linux/icmp.h> #include <linux/in.h> #include <linux/ip.h> #include <linux/tcp.h> #include <linux/udp.h> +#endif struct ip_fw { diff --git a/include/linux/ipv6_route.h b/include/linux/ipv6_route.h index 41591e876..7fc11c7ce 100644 --- a/include/linux/ipv6_route.h +++ b/include/linux/ipv6_route.h @@ -28,6 +28,7 @@ enum #define RTF_LINKRT 0x00100000 /* link specific - device match */ #define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ +#define RTF_EXPIRES 0x00400000 #define RTF_CACHE 0x01000000 /* cache entry */ #define RTF_FLOW 0x02000000 /* flow significant route */ diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index c6646ddd1..e3d5f237b 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h @@ -8,7 +8,9 @@ #define AMIGAMOUSE_MINOR 4 #define ATARIMOUSE_MINOR 5 #define SUN_MOUSE_MINOR 6 +#define APOLLO_MOUSE_MINOR 7 #define PC110PAD_MINOR 9 +#define MAC_MOUSE_MINOR 10 #define WATCHDOG_MINOR 130 /* Watchdog timer */ #define TEMP_MINOR 131 /* Temperature Sensor */ #define RTC_MINOR 135 diff --git a/include/linux/mm.h b/include/linux/mm.h index 11d04d453..2140eac53 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -251,7 +251,23 @@ extern inline unsigned long get_free_page(int gfp_mask) } /* memory.c & swap.c*/ -extern int free_memory_available(void); + +/* + * This traverses "nr" memory size lists, + * and returns true if there is enough memory. + * + * For example, we want to keep on waking up + * kswapd every once in a while until the highest + * memory order has an entry (ie nr == 0), but + * we want to do it in the background. + * + * We want to do it in the foreground only if + * none of the three highest lists have enough + * memory. Random number. + */ +extern int free_memory_available(int nr); +#define kswapd_continue() (!free_memory_available(3)) +#define kswapd_wakeup() (!free_memory_available(0)) #define free_page(addr) free_pages((addr),0) extern void FASTCALL(free_pages(unsigned long addr, unsigned long order)); diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index d1c005c70..e795ccb49 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -355,7 +355,6 @@ extern __inline__ int unregister_gifconf(unsigned int family) #define HAVE_NETIF_RX 1 extern void netif_rx(struct sk_buff *skb); extern void net_bh(void); -extern void dev_tint(struct device *dev); extern int dev_get_info(char *buffer, char **start, off_t offset, int length, int dummy); extern int dev_ioctl(unsigned int cmd, void *); extern int dev_change_flags(struct device *, unsigned); diff --git a/include/linux/nubus.h b/include/linux/nubus.h new file mode 100644 index 000000000..c09b95a93 --- /dev/null +++ b/include/linux/nubus.h @@ -0,0 +1,96 @@ + +struct nubus_slot +{ + int slot_flags; +#define NUBUS_DEVICE_PRESENT 1 +#define NUBUS_DEVICE_ACTIVE 2 +#define NUBUS_DEVICE_IRQ 4 + __u32 slot_directory; + __u32 slot_dlength; + __u32 slot_crc; + __u8 slot_rev; + __u8 slot_format; + __u8 slot_lanes; + /* + * Stuff we pulled from the directory + */ + __u32 slot_dirbase; + __u32 slot_thisdir; + char slot_vendor[64]; + char slot_cardname[64]; +}; + +struct nbnamevec +{ + char *name; + int id; +}; + +struct nubus_dir +{ + unsigned char *base; + int length; + int count; + int mask; +}; + +struct nubus_dirent +{ + unsigned char type; + int value; /* Actually 24bits used */ + int mask; + int base; /* For dirptr function */ +}; + +struct nubus_type +{ + __u16 category; + __u16 type; + __u16 DrHW; + __u16 DrSW; +}; + +#define NUBUS_CAT_BOARD 0x0001 +#define NUBUS_CAT_DISPLAY 0x0003 +#define NUBUS_CAT_NETWORK 0x0004 +#define NUBUS_CAT_COMMUNICATIONS 0x0006 +#define NUBUS_CAT_FONT 0x0009 +#define NUBUS_CAT_CPU 0x000A + +#define RES_ID_TYPE 0x0001 +#define RES_ID_NAME 0x0002 +#define RES_ID_BOARD_DIR 0x0001 +#define RES_ID_FLAGS 0x0007 + +struct nubus_device_specifier +{ + int (*setup)(struct nubus_device_specifier *, int slot, struct nubus_type *); + struct nubus_device_specifier *next; +}; + + +extern void register_nubus_device(struct nubus_device_specifier *nb); +extern void unregister_nubus_device(struct nubus_device_specifier *nb); + +extern struct nubus_dir *nubus_openrootdir(int slot); +extern struct nubus_dir *nubus_opensubdir(struct nubus_dirent *d); +extern void nubus_closedir(struct nubus_dir *); +extern struct nubus_dirent *nubus_readdir(struct nubus_dir *); +extern unsigned char *nubus_dirptr(struct nubus_dirent *d); +extern void nubus_strncpy(int slot, void *to, unsigned char *p, int len); +extern void nubus_memcpy(int slot, void *to, unsigned char *p, int len); +extern void nubus_init(void); +extern void nubus_sweep_video(void); +extern int nubus_ethernet_addr(int slot, unsigned char *addr); + +extern __inline void *nubus_slot_addr(int slot) +{ + return (void *)(0xF0000000|(slot<<24)); +} + +extern int nubus_hwreg_present(volatile void *ptr); + +extern void nubus_init_via(void); +extern int nubus_free_irq(int slot); +extern int nubus_request_irq(int slot, void *dev_id, void (*handler)(int,void *,struct pt_regs *)); + diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 8c6467010..7b6b3af7e 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -5,7 +5,7 @@ #include <linux/netlink.h> #define RTNL_DEBUG 1 -#define CONFIG_RTNL_OLD_IFINFO 1 +/* #define CONFIG_RTNL_OLD_IFINFO 1 */ /**** diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index e19a95fec..d94b40bcc 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -19,9 +19,11 @@ #include <asm/atomic.h> #include <asm/types.h> +#include <asm/spinlock.h> #define HAVE_ALLOC_SKB /* For the drivers to know */ #define HAVE_ALIGNABLE_SKB /* Ditto 8) */ +#define SLAB_SKB /* Slabified skbuffs */ #define CHECKSUM_NONE 0 #define CHECKSUM_HW 1 @@ -88,27 +90,27 @@ struct sk_buff unsigned int len; /* Length of actual data */ unsigned int csum; /* Checksum */ - volatile char used; - unsigned char tries, /* Times tried */ - inclone, /* Inline clone */ + volatile char used; /* Data moved to user and not MSG_PEEK */ + unsigned char is_clone, /* We are a clone */ + cloned, /* head may be cloned (check refcnt to be sure). */ pkt_type, /* Packet class */ pkt_bridged, /* Tracker for bridging */ ip_summed; /* Driver fed us an IP checksum */ - __u32 priority; + __u32 priority; /* Packet queueing priority */ atomic_t users; /* User count - see datagram.c,tcp.c */ unsigned short protocol; /* Packet protocol from driver. */ unsigned short security; /* Security level of packet */ unsigned int truesize; /* Buffer size */ +#ifndef SLAB_SKB atomic_t count; /* reference count */ struct sk_buff *data_skb; /* Link to the actual data skb */ +#endif unsigned char *head; /* Head of buffer */ unsigned char *data; /* Data head pointer */ unsigned char *tail; /* Tail pointer */ unsigned char *end; /* End pointer */ void (*destructor)(struct sk_buff *); /* Destruct function */ -#define SKB_CLONE_ORIG 1 -#define SKB_CLONE_INLINE 2 #if defined(CONFIG_SHAPER) || defined(CONFIG_SHAPER_MODULE) __u32 shapelatency; /* Latency on frame */ @@ -163,6 +165,12 @@ extern int skb_tailroom(struct sk_buff *skb); extern void skb_reserve(struct sk_buff *skb, unsigned int len); extern void skb_trim(struct sk_buff *skb, unsigned int len); +/* Internal */ +extern __inline__ atomic_t *skb_datarefp(struct sk_buff *skb) +{ + return (atomic_t *)(skb->end); +} + extern __inline__ int skb_queue_empty(struct sk_buff_head *list) { return (list->next == (struct sk_buff *) list); @@ -174,9 +182,16 @@ extern __inline__ void kfree_skb(struct sk_buff *skb) __kfree_skb(skb); } +/* Use this if you didn't touch the skb state [for fast switching] */ +extern __inline__ void kfree_skb_fast(struct sk_buff *skb) +{ + if (atomic_dec_and_test(&skb->users)) + kfree_skbmem(skb); +} + extern __inline__ int skb_cloned(struct sk_buff *skb) { - return (atomic_read(&skb->data_skb->count) != 1); + return skb->cloned && atomic_read(skb_datarefp(skb)) != 1; } extern __inline__ int skb_shared(struct sk_buff *skb) @@ -261,14 +276,15 @@ extern __inline__ void __skb_queue_head(struct sk_buff_head *list, struct sk_buf prev->next = newsk; } +extern spinlock_t skb_queue_lock; + extern __inline__ void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk) { unsigned long flags; - save_flags(flags); - cli(); + spin_lock_irqsave(&skb_queue_lock, flags); __skb_queue_head(list, newsk); - restore_flags(flags); + spin_unlock_irqrestore(&skb_queue_lock, flags); } /* @@ -293,10 +309,9 @@ extern __inline__ void skb_queue_tail(struct sk_buff_head *list, struct sk_buff { unsigned long flags; - save_flags(flags); - cli(); + spin_lock_irqsave(&skb_queue_lock, flags); __skb_queue_tail(list, newsk); - restore_flags(flags); + spin_unlock_irqrestore(&skb_queue_lock, flags); } /* @@ -328,10 +343,9 @@ extern __inline__ struct sk_buff *skb_dequeue(struct sk_buff_head *list) long flags; struct sk_buff *result; - save_flags(flags); - cli(); + spin_lock_irqsave(&skb_queue_lock, flags); result = __skb_dequeue(list); - restore_flags(flags); + spin_unlock_irqrestore(&skb_queue_lock, flags); return result; } @@ -358,10 +372,9 @@ extern __inline__ void skb_insert(struct sk_buff *old, struct sk_buff *newsk) { unsigned long flags; - save_flags(flags); - cli(); + spin_lock_irqsave(&skb_queue_lock, flags); __skb_insert(newsk, old->prev, old, old->list); - restore_flags(flags); + spin_unlock_irqrestore(&skb_queue_lock, flags); } /* @@ -372,10 +385,9 @@ extern __inline__ void skb_append(struct sk_buff *old, struct sk_buff *newsk) { unsigned long flags; - save_flags(flags); - cli(); + spin_lock_irqsave(&skb_queue_lock, flags); __skb_insert(newsk, old, old->next, old->list); - restore_flags(flags); + spin_unlock_irqrestore(&skb_queue_lock, flags); } /* @@ -407,11 +419,10 @@ extern __inline__ void skb_unlink(struct sk_buff *skb) { unsigned long flags; - save_flags(flags); - cli(); + spin_lock_irqsave(&skb_queue_lock, flags); if(skb->list) __skb_unlink(skb, skb->list); - restore_flags(flags); + spin_unlock_irqrestore(&skb_queue_lock, flags); } /* XXX: more streamlined implementation */ @@ -428,10 +439,9 @@ extern __inline__ struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list) long flags; struct sk_buff *result; - save_flags(flags); - cli(); + spin_lock_irqsave(&skb_queue_lock, flags); result = __skb_dequeue_tail(list); - restore_flags(flags); + spin_unlock_irqrestore(&skb_queue_lock, flags); return result; } @@ -451,7 +461,12 @@ extern __inline__ unsigned char *skb_put(struct sk_buff *skb, unsigned int len) if(skb->tail>skb->end) { __label__ here; +#if 1 + printk(KERN_DEBUG "skbput: over: %p:tail=%p:end=%p:len=%u\n", + &&here, skb->tail, skb->end, len); +#else panic(skb_put_errstr,&&here,len); +#endif here: ; } return tmp; @@ -543,5 +558,8 @@ extern int skb_copy_datagram(struct sk_buff *from, int offset, char *to,int si extern int skb_copy_datagram_iovec(struct sk_buff *from, int offset, struct iovec *to,int size); extern void skb_free_datagram(struct sock * sk, struct sk_buff *skb); +extern void skb_init(void); +extern void skb_add_mtu(int mtu); + #endif /* __KERNEL__ */ #endif /* _LINUX_SKBUFF_H */ diff --git a/include/linux/socket.h b/include/linux/socket.h index afff2fd5c..eccaa2f57 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -185,6 +185,8 @@ struct ucred { #define MSG_SYN 0x400 #define MSG_URG 0x800 #define MSG_RST 0x1000 +#define MSG_ERRQUEUE 0x2000 +#define MSG_NOSIGNAL 0x4000 #define MSG_CTLIGNORE 0x80000000 diff --git a/include/linux/swap.h b/include/linux/swap.h index 494490c32..48a0ca02c 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -39,7 +39,6 @@ extern atomic_t nr_async_pages; extern struct inode swapper_inode; extern unsigned long page_cache_size; extern int buffermem; -#define BUFFER_MEM ((buffermem >> PAGE_SHIFT) + page_cache_size) /* Incomplete types for prototype declarations: */ struct task_struct; @@ -123,6 +122,21 @@ static inline int is_page_shared(struct page *page) } /* + * When we're freeing pages from a user application, we want + * to cluster swapouts too. -- Rik. + * linux/mm/page_alloc.c + */ +static inline int try_to_free_pages(int gfp_mask, int count) +{ + int retval = 0; + while (count--) { + if (try_to_free_page(gfp_mask)) + retval = 1; + } + return retval; +} + +/* * Make these inline later once they are working properly. */ extern long find_in_swap_cache(struct page *page); diff --git a/include/linux/swapctl.h b/include/linux/swapctl.h index cc169d2da..bf787614b 100644 --- a/include/linux/swapctl.h +++ b/include/linux/swapctl.h @@ -39,6 +39,7 @@ typedef struct buffer_mem_v1 } buffer_mem_v1; typedef buffer_mem_v1 buffer_mem_t; extern buffer_mem_t buffer_mem; +extern buffer_mem_t page_cache; typedef struct freepages_v1 { diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index b7550ba2c..3a8f31e77 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -84,7 +84,8 @@ enum VM_FREEPG, /* struct: Set free page thresholds */ VM_BDFLUSH, /* struct: Control buffer cache flushing */ VM_OVERCOMMIT_MEMORY, /* Turn off the virtual memory safety limit */ - VM_BUFFERMEM /* struct: Set cache memory thresholds */ + VM_BUFFERMEM, /* struct: Set buffer memory thresholds */ + VM_PAGECACHE /* struct: Set cache memory thresholds */ }; @@ -151,6 +152,7 @@ enum NET_IPV4_TCP_HOE_RETRANSMITS=32, NET_IPV4_TCP_TIMESTAMPS, NET_IPV4_TCP_WINDOW_SCALING, + NET_IPV4_TCP_SACK, NET_IPV4_TCP_VEGAS_CONG_AVOID, NET_IPV4_DEFAULT_TTL, NET_IPV4_AUTOCONFIG, @@ -196,6 +198,7 @@ enum { NET_IPV4_ROUTE_REDIRECT_SILENCE, NET_IPV4_ROUTE_ERROR_COST, NET_IPV4_ROUTE_ERROR_BURST, + NET_IPV4_ROUTE_GC_ELASTICITY, }; enum @@ -235,6 +238,7 @@ enum { NET_IPV6_ROUTE_GC_MIN_INTERVAL, NET_IPV6_ROUTE_GC_TIMEOUT, NET_IPV6_ROUTE_GC_INTERVAL, + NET_IPV6_ROUTE_GC_ELASTICITY, }; enum { diff --git a/include/linux/timer.h b/include/linux/timer.h index 7d11fd246..2649014a1 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -46,7 +46,7 @@ extern struct timer_struct timer_table[32]; * to distinguish between the different invocations. */ struct timer_list { - struct timer_list *next; + struct timer_list *next; /* MUST be first element */ struct timer_list *prev; unsigned long expires; unsigned long data; @@ -56,6 +56,13 @@ struct timer_list { extern void add_timer(struct timer_list * timer); extern int del_timer(struct timer_list * timer); +/* + * mod_timer is a more efficient way to update the expire field of an + * active timer (if the timer is inactive it will be activated) + * mod_timer(a,b) is equivalent to del_timer(a); a->expires = b; add_timer(a) + */ +void mod_timer(struct timer_list *timer, unsigned long expires); + extern void it_real_fn(unsigned long); extern inline void init_timer(struct timer_list * timer) diff --git a/include/linux/zorro.h b/include/linux/zorro.h index 95148b35d..05e62462a 100644 --- a/include/linux/zorro.h +++ b/include/linux/zorro.h @@ -1,503 +1,651 @@ /* - * linux/zorro.h -- Amiga AutoConfig (Zorro) Expansion Device Definitions + * linux/zorro.h -- Amiga AutoConfig (Zorro) Expansion Device Definitions * - * Copyright (C) 1995 Geert Uytterhoeven + * Copyright (C) 1995 Geert Uytterhoeven * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - -#ifndef __ZORRO_H -#define __ZORRO_H - -#ifndef __ASSEMBLY__ - -/* - * Defined Board Manufacturers + * Please update arch/m68k/amiga/zorro.c if you make changes here! * - * Please update arch/m68k/amiga/zorro.c if you make changes here - * Many IDs were obtained from ExpName/Identify ((C) Richard Körber) - * and by looking at the NetBSD-Amiga kernel sources + * Many IDs were obtained from ExpName/Identify ((C) Richard Körber) + * and by looking at the NetBSD-Amiga kernel sources + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive + * for more details. */ -#define MANUF_PACIFIC (0x00D3) /* Pacific Peripherals */ -#define PROD_SE_2000_A500 (0x00) /* SE 2000 A500 */ -#define PROD_PACIFIC_HD (0x0A) /* HD Controller */ - -#define MANUF_KUPKE (0x00DD) /* Kupke */ -#define PROD_GOLEM_BOX_2 (0x00) /* Golem RAM Box 2MB */ - -#define MANUF_MEMPHIS (0x0100) /* Memphis */ -#define PROD_STORMBRINGER (0x00) /* Stormbringer */ - -#define MANUF_3_STATE (0x0200) /* 3-State */ -#define PROD_MEGAMIX_2000 (0x02) /* Megamix 2000 RAM */ - -#define MANUF_COMMODORE2 (0x0201) /* Commodore Braunschweig */ -#define PROD_A2088 (0x01) /* CBM A2088 XT Bridgeboard */ -#define PROD_A2286 (0x02) /* CBM A2286 AT Bridgeboard */ -#define PROD_A4091_2 (0x54) /* CBM A4091 SCSI Controller */ -#define PROD_A2386SX (0x67) /* CBM A2386-SX Bridgeboard */ - -#define MANUF_COMMODORE (0x0202) /* Commodore West Chester */ -#define PROD_A2090A (0x01) /* CBM A2090/A2090A HD Controller */ -#define PROD_A590 (0x02) /* CBM A590 SCSI Controller */ -#define PROD_A2091 (0x03) /* CBM A2091 SCSI Controller */ -#define PROD_A2090B (0x04) /* CBM A2090B 2090 Autoboot Card */ -#define PROD_ARCNET (0x09) /* CBM A2060 Arcnet Card */ -#define PROD_CBMRAM (0x0A) /* CBM A2052/58.RAM | 590/2091.RAM */ -#define PROD_A560RAM (0x20) /* CBM A560 Memory Module */ -#define PROD_A2232PROTO (0x45) /* CBM A2232 Serial Prototype */ -#define PROD_A2232 (0x46) /* CBM A2232 Serial Production */ -#define PROD_A2620 (0x50) /* CBM A2620 68020/RAM Card */ -#define PROD_A2630 (0x51) /* CBM A2630 68030/RAM Card */ -#define PROD_A4091 (0x54) /* CBM A4091 SCSI Controller */ -#define PROD_A2065_2 (0x5A) /* A2065 Ethernet Card */ -#define PROD_ROMULATOR (0x60) /* CBM Romulator Card */ -#define PROD_A3000TESTFIX (0x61) /* CBM A3000 Test Fixture */ -#define PROD_A2386SX_2 (0x67) /* A2386-SX Bridgeboard */ -#define PROD_A2065 (0x70) /* CBM A2065 Ethernet Card */ - -#define MANUF_COMMODORE3 (0x0203) /* Commodore West Chester */ -#define PROD_A2090A_CM (0x03) /* A2090A Combitec/MacroSystem */ - -#define MANUF_KCS (0x02FF) /* Kolff Computer Supplies */ -#define PROD_POWER_BOARD (0x00) /* KCS Power PC Board */ - -#define MANUF_CARDCO (0x03EC) /* Cardco */ -#define PROD_KRONOS_2000_SCSI (0x04) /* Kronos 2000 SCSI Controller */ -#define PROD_A1000_SCSI (0x0C) /* A1000 SCSI Controller */ -#define PROD_ESCORT_SCSI (0x0E) /* Escort SCSI Controller */ -#define PROD_CC_A2410 (0xF5) /* Cardco A2410 Hires Graphics Card */ - -#define MANUF_A_SQUARED (0x03ED) /* A-Squared */ -#define PROD_LIVE_2000 (0x01) /* Live! 2000 */ - -#define MANUF_COMSPEC (0x03EE) /* ComSpec Communications */ -#define PROD_AX2000 (0x01) /* AX2000 */ - -#define MANUF_ANAKIN (0x03F1) /* Anakin */ -#define PROD_EASYL (0x01) /* Easyl Tablet */ - -#define MANUF_MICROBOTICS (0x03F2) /* MicroBotics */ -#define PROD_STARBOARD_II (0x00) /* StarBoard II */ -#define PROD_STARDRIVE (0x02) /* StarDrive */ -#define PROD_8_UP_A (0x03) /* 8-Up (Rev A) */ -#define PROD_8_UP_Z (0x04) /* 8-Up (Rev Z) */ -#define PROD_DELTA_RAM (0x20) /* Delta Card RAM */ -#define PROD_8_STAR_RAM (0x40) /* 8-Star RAM */ -#define PROD_8_STAR (0x41) /* 8-Star */ -#define PROD_VXL_RAM (0x44) /* VXL RAM */ -#define PROD_VXL_30 (0x45) /* VXL-30 Turbo Board */ -#define PROD_DELTA (0x60) /* Delta Card */ -#define PROD_MBX_1200 (0x81) /* MBX 1200 */ -#define PROD_HARDFRAME_2000 (0x9E) /* Hardframe 2000 */ -#define PROD_MBX_1200_2 (0xC1) /* MBX 1200 */ - -#define MANUF_ACCESS (0x03F4) /* Access Associates */ - -#define MANUF_EXPANSION_TECH (0x03F6) /* Expansion Technologies */ - -#define MANUF_ASDG (0x03FF) /* ASDG */ -#define PROD_ASDG_MEMORY (0x01) /* Memory Expansion */ -#define PROD_ASDG_MEMORY_2 (0x02) /* Memory Expansion */ -#define PROD_LAN_ROVER (0xFE) /* Lan Rover Ethernet */ -#define PROD_TWIN_X (0xFF) /* Twin-X Serial Card */ - -#define MANUF_IMTRONICS (0x0404) /* Imtronics */ -#define PROD_HURRICANE_2800 (0x39) /* Hurricane 2800 68030 */ -#define PROD_HURRICANE_2800_2 (0x57) /* Hurricane 2800 68030 */ - -#define MANUF_UNIV_OF_LOWELL (0x0406) /* University of Lowell */ -#define PROD_A2410 (0x00) /* CBM A2410 Hires Graphics Card */ - -#define MANUF_AMERISTAR (0x041D) /* Ameristar */ -#define PROD_AMERISTAR2065 (0x01) /* A2065 Ethernet Card */ -#define PROD_A560 (0x09) /* Arcnet Card */ -#define PROD_A4066 (0x0A) /* A4066 Ethernet Card */ - -#define MANUF_SUPRA (0x0420) /* Supra */ -#define PROD_SUPRADRIVE_4x4 (0x01) /* SupraDrive 4x4 SCSI Controller */ -#define PROD_SUPRA_2000 (0x03) /* 2000 DMA HD */ -#define PROD_SUPRA_500 (0x05) /* 500 HD/RAM */ -#define PROD_SUPRA_500XP (0x09) /* 500XP/2000 RAM */ -#define PROD_SUPRA_500RX (0x0A) /* 500RX/2000 RAM */ -#define PROD_SUPRA_2400ZI (0x0B) /* 2400zi Modem */ -#define PROD_WORDSYNC (0x0C) /* Supra Wordsync SCSI Controller */ -#define PROD_WORDSYNC_II (0x0D) /* Supra Wordsync II SCSI Controller */ -#define PROD_SUPRA_2400ZIPLUS (0x10) /* 2400zi+ Modem */ - -#define MANUF_CSA (0x0422) /* Computer Systems Ass. */ -#define PROD_MAGNUM (0x11) /* Magnum 40 SCSI Controller */ -#define PROD_12GAUGE (0x15) /* 12 Gauge SCSI Controller */ - -#define MANUF_MTEC2 (0x0502) /* M-Tech */ -#define PROD_AT500_2 (0x03) /* AT500 RAM */ - -#define MANUF_GVP3 (0x06E1) /* Great Valley Products */ -#define PROD_IMPACT (0x08) /* Impact SCSI/Memory */ - -#define MANUF_BYTEBOX (0x07DA) /* ByteBox */ -#define PROD_BYTEBOX_A500 (0x00) /* A500 */ - -#define MANUF_HACKER (0x07DB) /* Test only: no product definitions */ - -#define MANUF_POWER_COMPUTING (0x07DC) /* Power Computing (DKB) */ -#define PROD_DKB_3128 (0x0E) /* DKB 3128 RAM */ -#define PROD_RAPID_FIRE (0x0F) /* Rapid Fire SCSI Controller */ -#define PROD_DKB_1202 (0x10) /* DKB 1202 RAM */ -#define PROD_VIPER_II_COBRA (0x12) /* Viper II Turbo Board (DKB Cobra) */ -#define PROD_WILDFIRE_060 (0x17) /* WildFire 060 Turbo Board */ -#define PROD_WILDFIRE_060_2 (0xFF) /* WildFire 060 Turbo Board */ - -#define MANUF_GVP (0x07E1) /* Great Valley Products */ -#define PROD_IMPACT_I_4K (0x01) /* Impact Series-I SCSI 4K */ -#define PROD_IMPACT_I_16K_2 (0x02) /* Impact Series-I SCSI 16K/2 */ -#define PROD_IMPACT_I_16K_3 (0x03) /* Impact Series-I SCSI 16K/3 */ -#define PROD_IMPACT_3001_IDE (0x08) /* Impact 3001 IDE */ -#define PROD_IMPACT_3001_RAM (0x09) /* Impact 3001 RAM */ -#define PROD_GVPIISCSI (0x0B) /* GVP Series II SCSI Controller */ -#define PROD_GVPIISCSI_2 (0x09) /* evidence that the driver works - for this product code also */ -#define PROD_GVPIIRAM (0x0A) /* GVP Series II RAM */ -#define PROD_GVP (0x0B) /* This code is used by a wide range of - GVP products - use the epc to - identify it correctly */ -#define PROD_GVP_A2000_030 (0x0D) /* GVP A2000 68030 Turbo Board */ -#define PROD_IMPACT_3001_IDE_2 (0x0D) /* Impact 3001 IDE */ -#define PROD_GFORCE_040_SCSI (0x16) /* GForce 040 with SCSI (new) */ -#define PROD_GVPIV_24 (0x20) /* GVP IV-24 Graphics Board */ -#define PROD_GFORCE_040 (0xFF) /* GForce 040 Turbo Board */ -/* #define PROD_GVPIO_EXT (0xFF)*/ /* GVP I/O Extender */ - -#define MANUF_SYNERGY (0x07E5) /* Synergy */ - -#define MANUF_XETEC (0x07E6) /* Xetec */ -#define PROD_FASTCARD_SCSI (0x01) /* FastCard SCSI Controller */ -#define PROD_FASTCARD_RAM (0x02) /* FastCard RAM */ - -#define MANUF_PPI (0x07EA) /* Progressive Peripherals Inc. */ -#define PROD_MERCURY (0x00) /* Mercury Turbo Board */ -#define PROD_PPS_A3000_040 (0x01) /* PP&S A3000 68040 Turbo Board */ -#define PROD_PPS_A2000_040 (0x69) /* PP&S A2000 68040 Turbo Board */ -#define PROD_ZEUS (0x96) /* Zeus SCSI Controller */ -#define PROD_PPS_A500_040 (0xBB) /* PP&S A500 68040 Turbo Board */ - -#define MANUF_XEBEC (0x07EC) /* Xebec */ - -#define MANUF_SPIRIT (0x07F2) /* Spirit */ -#define PROD_HDA_506 (0x04) /* HDA 506 Harddisk */ -#define PROD_OCTABYTE_RAM (0x06) /* OctaByte RAM */ - -#define MANUF_BSC (0x07FE) /* BSC */ -#define PROD_ALF_3_SCSI (0x03) /* BSC ALF 3 SCSI Controller */ - -#define MANUF_BSC3 (0x0801) /* BSC */ -#define PROD_ALF_2_SCSI (0x01) /* ALF 2 SCSI Controller */ -#define PROD_ALF_2_SCSI_2 (0x02) /* ALF 2 SCSI Controller */ -#define PROD_ALF_3_SCSI_2 (0x03) /* ALF 3 SCSI Controller */ - -#define MANUF_C_LTD (0x0802) /* C Ltd. */ -#define PROD_KRONOS_SCSI (0x04) /* Kronos SCSI Controller */ -#define PROD_A1000_SCSI_2 (0x0C) /* A1000 SCSI Controller */ - -#define MANUF_JOCHHEIM (0x0804) /* Jochheim */ -#define PROD_JOCHHEIM_RAM (0x01) /* Jochheim RAM */ - -#define MANUF_CHECKPOINT (0x0807) /* Checkpoint Technologies */ -#define PROD_SERIAL_SOLUTION (0x00) /* Serial Solution */ - -#define MANUF_ICD (0x0817) /* ICD */ -#define PROD_ADVANTAGE_2000 (0x01) /* Advantage 2000 SCSI Controller */ - -#define MANUF_KUPKE2 (0x0819) /* Kupke */ -#define PROD_KUPKE_SCSI_II (0x02) /* Golem SCSI-II Controller */ -#define PROD_GOLEM_BOX (0x03) /* Golem Box */ -#define PROD_KUPKE_TURBO (0x04) /* 030/882 Turbo Board */ -#define PROD_KUPKE_SCSI_AT (0x05) /* SCSI/AT Controller */ - -#define MANUF_GVP4 (0x081D) /* Great Valley Products */ -#define PROD_A2000_RAM8 (0x09) /* A2000-RAM8/2 */ - -#define MANUF_INTERWORKS_NET (0x081E) /* Interworks Network */ - -#define MANUF_HARDITAL (0x0820) /* Hardital Synthesis */ -#define PROD_TQM (0x14) /* TQM 68030+68882 Turbo Board */ - -#define MANUF_BSC2 (0x082C) /* BSC */ -#define PROD_OKTAGON_SCSI (0x05) /* BSC Oktagon 2008 SCSI Controller */ -#define PROD_TANDEM (0x06) /* BSC Tandem AT-2008/508 IDE */ -#define PROD_ALPHA_RAM_1200 (0x07) /* Alpha RAM 1200 */ -#define PROD_OKTAGON_RAM (0x08) /* BSC Oktagon 2008 RAM */ -#define PROD_MULTIFACE_I (0x10) /* Alfa Data MultiFace I */ -#define PROD_MULTIFACE_II (0x11) /* Alfa Data MultiFace II */ -#define PROD_MULTIFACE_III (0x12) /* Alfa Data MultiFace III */ -#define PROD_BSC_FRAEMBUFFER (0x20) /* Framebuffer */ -#define PROD_GRAFFITI_RAM (0x21) /* Graffiti Graphics Board */ -#define PROD_GRAFFITI_REG (0x22) -#define PROD_ISDN_MASTERCARD (0x40) /* BSC ISDN MasterCard */ -#define PROD_ISDN_MASTERCARD_2 (0x41) /* BSC ISDN MasterCard II */ - -#define MANUF_ADV_SYS_SOFT (0x0836) /* Advanced Systems & Software */ -#define PROD_NEXUS_SCSI (0x01) /* Nexus SCSI Controller */ -#define PROD_NEXUS_RAM (0x08) /* Nexus RAM */ - -#define MANUF_IMPULSE (0x0838) /* Impulse */ -#define PROD_FIRECRACKER_24 (0x00) /* FireCracker 24 */ - -#define MANUF_IVS (0x0840) /* IVS */ -#define PROD_GRANDSLAM_PIC_2 (0x02) /* GrandSlam PIC 2 RAM */ -#define PROD_GRANDSLAM_PIC_1 (0x04) /* GrandSlam PIC 1 RAM */ -#define PROD_IVS_OVERDRIVE (0x10) /* OverDrive HD */ -#define PROD_TRUMPCARD_CLASSIC (0x30) /* Trumpcard Classic SCSI Controller */ -#define PROD_TRUMPCARD_PRO (0x34) /* Trumpcard Pro SCSI Controller */ -#define PROD_META_4 (0x40) /* Meta-4 RAM */ -#define PROD_WAVETOOLS (0xBF) /* Wavetools Sound Board */ -#define PROD_VECTOR (0xF3) /* Vector SCSI Controller */ -#define PROD_VECTOR_2 (0xF4) /* Vector SCSI Controller */ - -#define MANUF_VECTOR (0x0841) /* Vector */ -#define PROD_CONNECTION (0xE3) /* Connection Serial IO */ - -#define MANUF_XPERT_PRODEV (0x0845) /* XPert/ProDev */ -#define PROD_VISIONA_RAM (0x01) /* Visiona Graphics Board */ -#define PROD_VISIONA_REG (0x02) -#define PROD_MERLIN_RAM (0x03) /* Merlin Graphics Board */ -#define PROD_MERLIN_REG (0x04) -#define PROD_MERLIN_REG_2 (0xC9) - -#define MANUF_HYDRA_SYSTEMS (0x0849) /* Hydra Systems */ -#define PROD_AMIGANET (0x01) /* Amiganet Board */ - -#define MANUF_SUNRIZE (0x084F) /* Sunrize Industries */ -#define PROD_AD1012 (0x01) /* AD1012 Sound Board */ -#define PROD_AD516 (0x02) /* AD516 Sound Board */ -#define PROD_DD512 (0x03) /* DD512 Sound Board */ - -#define MANUF_TRICERATOPS (0x0850) /* Triceratops */ -#define PROD_TRICERATOPS (0x01) /* Triceratops Multi I/O Board */ - -#define MANUF_APPLIED_MAGIC (0x0851) /* Applied Magic Inc */ -#define PROD_DMI_RESOLVER (0x01) /* DMI Resolver Graphics Board */ -#define PROD_DIGITAL_BCASTER (0x06) /* Digital Broadcaster */ - -#define MANUF_GFX_BASE (0x085E) /* GFX-Base */ -#define PROD_GDA_1_RAM (0x00) /* GDA-1 Graphics Board */ -#define PROD_GDA_1_REG (0x01) - -#define MANUF_ROCTEC (0x0860) /* RocTec */ -#define PROD_RH_800C (0x01) /* RH 800C Hard Disk Controller */ -#define PROD_RH_800C_RAM (0x01) /* RH 800C RAM */ - -#define MANUF_HELFRICH1 (0x0861) /* Helfrich */ -#define PROD_RAINBOW3 (0x21) /* Rainbow3 Graphics Board */ - -#define MANUF_SW_RESULT_ENTS (0x0866) /* Software Result Enterprises */ -#define PROD_GG2PLUS (0x01) /* GG2+ Bus Converter */ - -#define MANUF_MASOBOSHI (0x086D) /* Masoboshi */ -#define PROD_MASTER_CARD_RAM (0x03) /* Master Card RAM */ -#define PROD_MASTER_CARD_SCSI (0x04) /* Master Card SCSI Controller */ -#define PROD_MVD_819 (0x07) /* MVD 819 */ - -#define MANUF_VILLAGE_TRONIC (0x0877) /* Village Tronic */ -#define PROD_DOMINO_RAM (0x01) /* Domino Graphics Board */ -#define PROD_DOMINO_REG (0x02) -#define PROD_PICASSO_II_RAM (0x0B) /* Picasso II/II+ Graphics Board */ -#define PROD_PICASSO_II_REG (0x0C) -#define PROD_PICASSO_II_SEGM (0x0D) /* Picasso II/II+ (Segmented Mode) */ -#define PROD_PICASSO_IV (0x15) /* Picassio IV Graphics Board */ -#define PROD_PICASSO_IV_2 (0x16) -#define PROD_PICASSO_IV_3 (0x17) -#define PROD_PICASSO_IV_4 (0x18) -#define PROD_ARIADNE (0xC9) /* Ariadne Ethernet */ - -#define MANUF_UTILITIES_ULTD (0x087B) /* Utilities Unlimited */ -#define PROD_EMPLANT_DELUXE (0x15) /* Emplant Deluxe SCSI Controller */ -#define PROD_EMPLANT_DELUXE2 (0x20) /* Emplant Deluxe SCSI Controller */ - -#define MANUF_AMITRIX (0x0880) /* Amitrix */ -#define PROD_AMITRIX_MULTI_IO (0x01) /* Multi-IO */ -#define PROD_AMITRIX_CD_RAM (0x02) /* CD-RAM Memory */ - -#define MANUF_ARMAX (0x0885) /* ArMax */ -#define PROD_OMNIBUS (0x00) /* OmniBus Graphics Board */ - -#define MANUF_NEWTEK (0x088F) /* NewTek */ -#define PROD_VIDEOTOASTER (0x00) /* VideoToaster */ - -#define MANUF_MTEC (0x0890) /* M-Tech Germany */ -#define PROD_AT500 (0x01) /* AT500 IDE Controller */ -#define PROD_MTEC_68030 (0x03) /* 68030 Turbo Board */ -#define PROD_MTEC_68020I (0x06) /* 68020i Turbo Board */ -#define PROD_MTEC_T1230 (0x20) /* A1200 T68030/42 RTC Turbo Board */ -#define PROD_MTEC_RAM (0x22) /* MTEC 8MB RAM */ - -#define MANUF_GVP2 (0x0891) /* Great Valley Products */ -#define PROD_SPECTRUM_RAM (0x01) /* EGS 28/24 Spectrum Graphics Board */ -#define PROD_SPECTRUM_REG (0x02) - -#define MANUF_HELFRICH2 (0x0893) /* Helfrich */ -#define PROD_PICCOLO_RAM (0x05) /* Piccolo Graphics Board */ -#define PROD_PICCOLO_REG (0x06) -#define PROD_PEGGY_PLUS (0x07) /* PeggyPlus MPEG Decoder Board */ -#define PROD_VIDEOCRUNCHER (0x08) /* VideoCruncher */ -#define PROD_SD64_RAM (0x0A) /* SD64 Graphics Board */ -#define PROD_SD64_REG (0x0B) - -#define MANUF_MACROSYSTEMS (0x089B) /* MacroSystems USA */ -#define PROD_WARP_ENGINE (0x13) /* Warp Engine 40xx SCSI Controller */ - -#define MANUF_ELBOX (0x089E) /* ElBox Computer */ -#define PROD_ELBOX_1200 (0x06) /* Elbox 1200/4 RAM */ - -#define MANUF_HARMS_PROF (0x0A00) /* Harms Professional */ -#define PROD_HARMS_030_PLUS (0x10) /* 030 plus */ -#define PROD_3500_TURBO (0xD0) /* 3500 Turbo board */ - -#define MANUF_MICRONIK (0x0A50) /* Micronik */ -#define PROD_RCA_120 (0x0A) /* RCA 120 RAM */ - -#define MANUF_MEGA_MICRO (0x1000) /* MegaMicro */ -#define PROD_SCRAM_500_SCSI (0x03) /* SCRAM 500 SCSI Controller */ -#define PROD_SCRAM_500_RAM (0x04) /* SCRAM 500 RAM */ - -#define MANUF_IMTRONICS2 (0x1028) /* Imtronics */ -#define PROD_HURRICANE_2800_3 (0x39) /* Hurricane 2800 68030 */ -#define PROD_HURRICANE_2800_4 (0x57) /* Hurricane 2800 68030 */ - -#define MANUF_KUPKE3 (0x1248) /* Kupke */ -#define PROD_GOLEM_3000 (0x01) /* Golem HD 3000 */ - -#define MANUF_ITH (0x1388) /* ITH */ -#define PROD_ISDN_MASTER_II (0x01) /* ISDN-Master II */ - -#define MANUF_VMC (0x1389) /* VMC */ -#define PROD_ISDN_BLASTER_Z2 (0x01) /* ISDN Blaster Z2 */ -#define PROD_HYPERCOM_4 (0x02) /* HyperCom 4 */ - -#define MANUF_INFORMATION (0x157C) /* Information */ -#define PROD_ISDN_ENGINE_I (0x64) /* ISDN Engine I */ - -#define MANUF_VORTEX (0x2017) /* Vortex */ -#define PROD_GOLDEN_GATE_386SX (0x07) /* Golden Gate 80386SX Board */ -#define PROD_GOLDEN_GATE_RAM (0x08) /* Golden Gate RAM */ -#define PROD_GOLDEN_GATE_486 (0x09) /* Golden Gate 80486 Board */ - -#define MANUF_DATAFLYER (0x2062) /* DataFlyer */ -#define PROD_DATAFLYER_4000SXS (0x01) /* DataFlyer 4000SX SCSI Controller */ -#define PROD_DATAFLYER_4000SXR (0x02) /* DataFlyer 4000SX RAM */ - -#define MANUF_READYSOFT (0x2100) /* ReadySoft */ -#define PROD_AMAX (0x01) /* AMax II/IV */ - -#define MANUF_PHASE5 (0x2140) /* Phase5 */ -#define PROD_BLIZZARD_RAM (0x01) /* Blizzard RAM */ -#define PROD_BLIZZARD (0x02) /* Blizzard */ -#define PROD_BLIZZARD_1220_IV (0x06) /* Blizzard 1220-IV Turbo Board */ -#define PROD_FASTLANE_RAM (0x0A) /* FastLane RAM */ -#define PROD_FASTLANE_SCSI (0x0B) /* FastLane/Blizzard 1230-II SCSI/CyberSCSI */ -#define PROD_CYBERSTORM_SCSI (0x0C) /* Blizzard 1220/CyberStorm */ -#define PROD_BLIZZARD_1230_III (0x0D) /* Blizzard 1230-III Turbo Board */ -#define PROD_BLIZZARD_1230_IV (0x11) /* Blizzard 1230-IV/1260 Turbo Board */ -#define PROD_BLIZZARD_2060SCSI (0x18) /* Blizzard 2060 SCSI Controller */ -#define PROD_CYBERSTORM_II (0x19) /* CyberStorm Mk II */ -#define PROD_CYBERVISION (0x22) /* CyberVision64 Graphics Board */ -#define PROD_CYBERVISION3D_PRT (0x32) /* CyberVision64-3D Prototype */ -#define PROD_CYBERVISION3D (0x43) /* CyberVision64-3D Graphics Board */ - -#define MANUF_DPS (0x2169) /* DPS */ -#define PROD_DPS_PAR (0x01) /* Personal Animation Recorder */ - -#define MANUF_APOLLO2 (0x2200) /* Apollo */ -#define PROD_A620 (0x00) /* A620 68020 Accelerator */ -#define PROD_A620_2 (0x01) /* A620 68020 Accelerator */ - -#define MANUF_APOLLO (0x2222) /* Apollo */ -#define PROD_AT_APOLLO (0x22) /* AT-Apollo */ -#define PROD_APOLLO_TURBO (0x23) /* Apollo Turbo Board */ - -#define MANUF_PETSOFF (0x38A5) /* Petsoff LP */ -#define PROD_DELFINA (0x00) /* Delfina DSP */ - -#define MANUF_UWE_GERLACH (0x3FF7) /* Uwe Gerlach */ -#define PROD_UG_RAM_ROM (0xd4) /* RAM/ROM */ - -#define MANUF_MACROSYSTEMS2 (0x4754) /* MacroSystems Germany */ -#define PROD_MAESTRO (0x03) /* Maestro */ -#define PROD_VLAB (0x04) /* VLab */ -#define PROD_MAESTRO_PRO (0x05) /* Maestro Pro */ -#define PROD_RETINA_Z2 (0x06) /* Retina Z2 Graphics Board */ -#define PROD_MULTI_EVOLUTION (0x08) /* MultiEvolution */ -#define PROD_TOCCATA (0x0C) /* Toccata Sound Board */ -#define PROD_RETINA_Z3 (0x10) /* Retina Z3 Graphics Board */ -#define PROD_VLAB_MOTION (0x12) /* VLab Motion */ -#define PROD_ALTAIS (0x13) /* Altais Graphics Board */ -#define PROD_FALCON_040 (0xFD) /* Falcon '040 Turbo Board */ - -#define MANUF_COMBITEC (0x6766) /* Combitec */ - -#define MANUF_SKI (0x8000) /* SKI Peripherals */ -#define PROD_MAST_FIREBALL (0x08) /* M.A.S.T. Fireball SCSI Controller */ -#define PROD_SKI_SCSI_SERIAL (0x80) /* SCSI / Dual Serial */ - -#define MANUF_CAMERON (0xAA01) /* Cameron */ -#define PROD_PERSONAL_A4 (0x10) /* Personal A4 */ - -#define MANUF_REIS_WARE (0xAA11) /* Reis-Ware */ -#define PROD_RW_HANDYSCANNER (0x11) /* Handyscanner */ +#ifndef _LINUX_ZORRO_H +#define _LINUX_ZORRO_H +#ifndef __ASSEMBLY__ -/* Illegal Manufacturer IDs. These do NOT appear in arch/m68k/amiga/zorro.c! */ - -#define MANUF_HACKER_INC (0x07DB) /* Hacker Inc. */ -#define PROD_HACKER_SCSI (0x01) /* Hacker Inc. SCSI Controller */ - -#define MANUF_RES_MNGT_FORCE (0x07DB) /* Resource Management Force */ -#define PROD_QUICKNET (0x02) /* QuickNet Ethernet */ - -#define MANUF_VECTOR2 (0x07DB) /* Vector */ -#define PROD_CONNECTION_2 (0xE0) /* Vector Connection */ -#define PROD_CONNECTION_3 (0xE1) /* Vector Connection */ -#define PROD_CONNECTION_4 (0xE2) /* Vector Connection */ -#define PROD_CONNECTION_5 (0xE3) /* Vector Connection */ - + /* + * Zorro Product Classes + * + * Make sure to keep these in sync with arch/m68k/amiga/zorro.c! + */ + +enum Zorro_Classes { + ZORRO_CLASS_UNKNOWN = 0x00, + ZORRO_CLASS_ARCNET, + ZORRO_CLASS_AUDIO, + ZORRO_CLASS_BRIDGE, + ZORRO_CLASS_DSP, + ZORRO_CLASS_ETHERNET, + ZORRO_CLASS_ETHERNET_PARALLEL, + ZORRO_CLASS_FLASHROM, + ZORRO_CLASS_FPU_RAM, + ZORRO_CLASS_GFX, + ZORRO_CLASS_GFXRAM, + ZORRO_CLASS_HD, + ZORRO_CLASS_HD_RAM, + ZORRO_CLASS_IDE, + ZORRO_CLASS_IDE_RAM, + ZORRO_CLASS_IDE_FLOPPY, + ZORRO_CLASS_ISDN, + ZORRO_CLASS_MACEMU, + ZORRO_CLASS_MISC, + ZORRO_CLASS_MODEM, + ZORRO_CLASS_MULTIIO, + ZORRO_CLASS_RAM, + ZORRO_CLASS_SCANNER, + ZORRO_CLASS_SCSI, + ZORRO_CLASS_SCSI_IDE, + ZORRO_CLASS_SCSI_RAM, + ZORRO_CLASS_SCSI_SERIAL, + ZORRO_CLASS_SERIAL, + ZORRO_CLASS_TABLET, + ZORRO_CLASS_TURBO, + ZORRO_CLASS_TURBO_RAM, + ZORRO_CLASS_TURBO_HD, + ZORRO_CLASS_TURBO_IDE, + ZORRO_CLASS_TURBO_SCSI, + ZORRO_CLASS_TURBO_SCSI_RAM, + ZORRO_CLASS_VIDEO, +}; -/* - * GVP's identifies most of their product through the 'extended - * product code' (epc). The epc has to be and'ed with the GVP_PRODMASK - * before the identification. - */ -#define GVP_PRODMASK (0xf8) -#define GVP_SCSICLKMASK (0x01) - -enum GVP_ident { - GVP_GFORCE_040 = 0x20, - GVP_GFORCE_040_SCSI = 0x30, - GVP_A1291_SCSI = 0x40, - GVP_COMBO_R4 = 0x60, - GVP_COMBO_R4_SCSI = 0x70, - GVP_PHONEPAK = 0x78, - GVP_IOEXT = 0x98, - GVP_GFORCE_030 = 0xa0, - GVP_GFORCE_030_SCSI = 0xb0, - GVP_A530 = 0xc0, - GVP_A530_SCSI = 0xd0, - GVP_COMBO_R3 = 0xe0, - GVP_COMBO_R3_SCSI = 0xf0, - GVP_SERIESII = 0xf8, -}; + /* + * Known Zorro Boards + * + * Each Zorro board has a 32-bit ID of the form + * + * mmmmmmmmmmmmmmmmppppppppeeeeeeee + * + * with + * + * mmmmmmmmmmmmmmmm 16-bit Manufacturer ID (assigned by CBM (sigh)) + * pppppppp 8-bit Product ID (assigned by manufacturer) + * eeeeeeee 8-bit Extended Product ID (currently only used + * for some GVP boards) + */ + + +#define ZORRO_MANUF(id) ((id) >> 16) +#define ZORRO_PROD(id) (((id) >> 8) & 0xff) +#define ZORRO_EPC(id) ((id) & 0xff) + +#define ZORRO_ID(manuf, prod, epc) \ + ((ZORRO_MANUF_##manuf << 16) | ((prod) << 8) | (epc)) + +typedef u32 zorro_id; + + +#define ZORRO_MANUF_PACIFIC_PERIPHERALS 0x00D3 +#define ZORRO_PROD_PACIFIC_PERIPHERALS_SE_2000_A500 ZORRO_ID(PACIFIC_PERIPHERALS, 0x00, 0) +#define ZORRO_PROD_PACIFIC_PERIPHERALS_SCSI ZORRO_ID(PACIFIC_PERIPHERALS, 0x0A, 0) + +#define ZORRO_MANUF_MACROSYSTEMS_USA_2 0x0100 +#define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE ZORRO_ID(MACROSYSTEMS_USA_2, 0x13, 0) + +#define ZORRO_MANUF_KUPKE_1 0x00DD +#define ZORRO_PROD_KUPKE_GOLEM_RAM_BOX_2MB ZORRO_ID(KUPKE_1, 0x00, 0) + +#define ZORRO_MANUF_MEMPHIS 0x0100 +#define ZORRO_PROD_MEMPHIS_STORMBRINGER ZORRO_ID(MEMPHIS, 0x00, 0) + +#define ZORRO_MANUF_3_STATE 0x0200 +#define ZORRO_PROD_3_STATE_MEGAMIX_2000 ZORRO_ID(3_STATE, 0x02, 0) + +#define ZORRO_MANUF_COMMODORE_BRAUNSCHWEIG 0x0201 +#define ZORRO_PROD_CBM_A2088_A2286 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x01, 0) +#define ZORRO_PROD_CBM_A2286 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x02, 0) +#define ZORRO_PROD_CBM_A4091_1 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x54, 0) +#define ZORRO_PROD_CBM_A2386SX_1 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x67, 0) + +#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_1 0x0202 +#define ZORRO_PROD_CBM_A2090A ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x01, 0) +#define ZORRO_PROD_CBM_A590_A2091_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x02, 0) +#define ZORRO_PROD_CBM_A590_A2091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x03, 0) +#define ZORRO_PROD_CBM_A2090B ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x04, 0) +#define ZORRO_PROD_CBM_A2060 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x09, 0) +#define ZORRO_PROD_CBM_A590_A2052_A2058_A2091 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x0A, 0) +#define ZORRO_PROD_CBM_A560_RAM ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x20, 0) +#define ZORRO_PROD_CBM_A2232_PROTOTYPE ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x45, 0) +#define ZORRO_PROD_CBM_A2232 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x46, 0) +#define ZORRO_PROD_CBM_A2620 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x50, 0) +#define ZORRO_PROD_CBM_A2630 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x51, 0) +#define ZORRO_PROD_CBM_A4091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x54, 0) +#define ZORRO_PROD_CBM_A2065_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x5A, 0) +#define ZORRO_PROD_CBM_ROMULATOR ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x60, 0) +#define ZORRO_PROD_CBM_A3000_TEST_FIXTURE ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x61, 0) +#define ZORRO_PROD_CBM_A2386SX_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x67, 0) +#define ZORRO_PROD_CBM_A2065_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x70, 0) + +#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_2 0x0203 +#define ZORRO_PROD_CBM_A2090A_CM ZORRO_ID(COMMODORE_WEST_CHESTER_2, 0x03, 0) + +#define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2 0x02F4 +#define ZORRO_PROD_PPS_EXP8000 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2, 0x02, 0) + +#define ZORRO_MANUF_KOLFF_COMPUTER_SUPPLIES 0x02FF +#define ZORRO_PROD_KCS_POWER_PC_BOARD ZORRO_ID(KOLFF_COMPUTER_SUPPLIES, 0x00, 0) + +#define ZORRO_MANUF_CARDCO_1 0x03EC +#define ZORRO_PROD_CARDCO_KRONOS_2000_1 ZORRO_ID(CARDCO_1, 0x04, 0) +#define ZORRO_PROD_CARDCO_A1000_1 ZORRO_ID(CARDCO_1, 0x0C, 0) +#define ZORRO_PROD_CARDCO_ESCORT ZORRO_ID(CARDCO_1, 0x0E, 0) +#define ZORRO_PROD_CARDCO_A2410 ZORRO_ID(CARDCO_1, 0xF5, 0) + +#define ZORRO_MANUF_A_SQUARED 0x03ED +#define ZORRO_PROD_A_SQUARED_LIVE_2000 ZORRO_ID(A_SQUARED, 0x01, 0) + +#define ZORRO_MANUF_COMSPEC_COMMUNICATIONS 0x03EE +#define ZORRO_PROD_COMSPEC_COMMUNICATIONS_AX2000 ZORRO_ID(COMSPEC_COMMUNICATIONS, 0x01, 0) + +#define ZORRO_MANUF_ANAKIN_RESEARCH 0x03F1 +#define ZORRO_PROD_ANAKIN_RESEARCH_EASYL ZORRO_ID(ANAKIN_RESEARCH, 0x01, 0) + +#define ZORRO_MANUF_MICROBOTICS 0x03F2 +#define ZORRO_PROD_MICROBOTICS_STARBOARD_II ZORRO_ID(MICROBOTICS, 0x00, 0) +#define ZORRO_PROD_MICROBOTICS_STARDRIVE ZORRO_ID(MICROBOTICS, 0x02, 0) +#define ZORRO_PROD_MICROBOTICS_8_UP_A ZORRO_ID(MICROBOTICS, 0x03, 0) +#define ZORRO_PROD_MICROBOTICS_8_UP_Z ZORRO_ID(MICROBOTICS, 0x04, 0) +#define ZORRO_PROD_MICROBOTICS_DELTA_RAM ZORRO_ID(MICROBOTICS, 0x20, 0) +#define ZORRO_PROD_MICROBOTICS_8_STAR_RAM ZORRO_ID(MICROBOTICS, 0x40, 0) +#define ZORRO_PROD_MICROBOTICS_8_STAR ZORRO_ID(MICROBOTICS, 0x41, 0) +#define ZORRO_PROD_MICROBOTICS_VXL_RAM_32 ZORRO_ID(MICROBOTICS, 0x44, 0) +#define ZORRO_PROD_MICROBOTICS_VXL_68030 ZORRO_ID(MICROBOTICS, 0x45, 0) +#define ZORRO_PROD_MICROBOTICS_DELTA ZORRO_ID(MICROBOTICS, 0x60, 0) +#define ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z_RAM ZORRO_ID(MICROBOTICS, 0x81, 0) +#define ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_1 ZORRO_ID(MICROBOTICS, 0x96, 0) +#define ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_2 ZORRO_ID(MICROBOTICS, 0x9E, 0) +#define ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z ZORRO_ID(MICROBOTICS, 0xC1, 0) + +#define ZORRO_MANUF_ACCESS_ASSOCIATES_ALEGRA 0x03F4 + +#define ZORRO_MANUF_EXPANSION_TECHNOLOGIES 0x03F6 + +#define ZORRO_MANUF_ASDG 0x03FF +#define ZORRO_PROD_ASDG_MEMORY_1 ZORRO_ID(ASDG, 0x01, 0) +#define ZORRO_PROD_ASDG_MEMORY_2 ZORRO_ID(ASDG, 0x02, 0) +#define ZORRO_PROD_ASDG_EB920_LAN_ROVER ZORRO_ID(ASDG, 0xFE, 0) +#define ZORRO_PROD_ASDG_GPIB_DUALIEEE488_TWIN_X ZORRO_ID(ASDG, 0xFF, 0) + +#define ZORRO_MANUF_IMTRONICS_1 0x0404 +#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_1 ZORRO_ID(IMTRONICS_1, 0x39, 0) +#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_2 ZORRO_ID(IMTRONICS_1, 0x57, 0) + +#define ZORRO_MANUF_CBM_UNIVERSITY_OF_LOWELL 0x0406 +#define ZORRO_PROD_CBM_A2410 ZORRO_ID(CBM_UNIVERSITY_OF_LOWELL, 0x00, 0) + +#define ZORRO_MANUF_AMERISTAR 0x041D +#define ZORRO_PROD_AMERISTAR_A2065 ZORRO_ID(AMERISTAR, 0x01, 0) +#define ZORRO_PROD_AMERISTAR_A560 ZORRO_ID(AMERISTAR, 0x09, 0) +#define ZORRO_PROD_AMERISTAR_A4066 ZORRO_ID(AMERISTAR, 0x0A, 0) + +#define ZORRO_MANUF_SUPRA 0x0420 +#define ZORRO_PROD_SUPRA_SUPRADRIVE_4x4 ZORRO_ID(SUPRA, 0x01, 0) +#define ZORRO_PROD_SUPRA_1000_RAM ZORRO_ID(SUPRA, 0x02, 0) +#define ZORRO_PROD_SUPRA_2000_DMA ZORRO_ID(SUPRA, 0x03, 0) +#define ZORRO_PROD_SUPRA_500 ZORRO_ID(SUPRA, 0x05, 0) +#define ZORRO_PROD_SUPRA_500_SCSI ZORRO_ID(SUPRA, 0x08, 0) +#define ZORRO_PROD_SUPRA_500XP_2000_RAM ZORRO_ID(SUPRA, 0x09, 0) +#define ZORRO_PROD_SUPRA_500RX_2000_RAM ZORRO_ID(SUPRA, 0x0A, 0) +#define ZORRO_PROD_SUPRA_2400ZI ZORRO_ID(SUPRA, 0x0B, 0) +#define ZORRO_PROD_SUPRA_500XP_SUPRADRIVE_WORDSYNC ZORRO_ID(SUPRA, 0x0C, 0) +#define ZORRO_PROD_SUPRA_SUPRADRIVE_WORDSYNC_II ZORRO_ID(SUPRA, 0x0D, 0) +#define ZORRO_PROD_SUPRA_2400ZIPLUS ZORRO_ID(SUPRA, 0x10, 0) + +#define ZORRO_MANUF_COMPUTER_SYSTEMS_ASSOCIATES 0x0422 +#define ZORRO_PROD_CSA_MAGNUM ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x11, 0) +#define ZORRO_PROD_CSA_12_GAUGE ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x15, 0) + +#define ZORRO_MANUF_MARC_MICHAEL_GROTH 0x0439 + +#define ZORRO_MANUF_M_TECH 0x0502 +#define ZORRO_PROD_MTEC_AT500_1 ZORRO_ID(M_TECH, 0x03, 0) + +#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_1 0x06E1 +#define ZORRO_PROD_GVP_IMPACT_SERIES_I ZORRO_ID(GREAT_VALLEY_PRODUCTS_1, 0x08, 0) + +#define ZORRO_MANUF_BYTEBOX 0x07DA +#define ZORRO_PROD_BYTEBOX_A500 ZORRO_ID(BYTEBOX, 0x00, 0) + +#define ZORRO_MANUF_DKB_POWER_COMPUTING 0x07DC +#define ZORRO_PROD_DKB_POWER_COMPUTING_SECUREKEY ZORRO_ID(DKB_POWER_COMPUTING, 0x09, 0) +#define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_3128 ZORRO_ID(DKB_POWER_COMPUTING, 0x0E, 0) +#define ZORRO_PROD_DKB_POWER_COMPUTING_RAPID_FIRE ZORRO_ID(DKB_POWER_COMPUTING, 0x0F, 0) +#define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_1202 ZORRO_ID(DKB_POWER_COMPUTING, 0x10, 0) +#define ZORRO_PROD_DKB_POWER_COMPUTING_COBRA_VIPER_II_68EC030 ZORRO_ID(DKB_POWER_COMPUTING, 0x12, 0) +#define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_1 ZORRO_ID(DKB_POWER_COMPUTING, 0x17, 0) +#define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_2 ZORRO_ID(DKB_POWER_COMPUTING, 0xFF, 0) + +#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_2 0x07E1 +#define ZORRO_PROD_GVP_IMPACT_SERIES_I_4K ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x01, 0) +#define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x02, 0) +#define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_3 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x03, 0) +#define ZORRO_PROD_GVP_IMPACT_3001_IDE_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x08, 0) +#define ZORRO_PROD_GVP_IMPACT_3001_RAM ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x09, 0) +#define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0A, 0) +#define ZORRO_PROD_GVP_EPC_BASE ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0) +#define ZORRO_PROD_GVP_GFORCE_040_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x20) +#define ZORRO_PROD_GVP_GFORCE_040_SCSI_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x30) +#define ZORRO_PROD_GVP_A1291 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x40) +#define ZORRO_PROD_GVP_COMBO_030_R4 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x60) +#define ZORRO_PROD_GVP_COMBO_030_R4_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x70) +#define ZORRO_PROD_GVP_PHONEPAK ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x78) +#define ZORRO_PROD_GVP_IO_EXTENDER ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x98) +#define ZORRO_PROD_GVP_GFORCE_030 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xa0) +#define ZORRO_PROD_GVP_GFORCE_030_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xb0) +#define ZORRO_PROD_GVP_A530 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xc0) +#define ZORRO_PROD_GVP_A530_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xd0) +#define ZORRO_PROD_GVP_COMBO_030_R3 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xe0) +#define ZORRO_PROD_GVP_COMBO_030_R3_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf0) +#define ZORRO_PROD_GVP_SERIES_II ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf8) +#define ZORRO_PROD_GVP_IMPACT_3001_IDE_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0) +/*#define ZORRO_PROD_GVP_A2000_030 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)*/ +/*#define ZORRO_PROD_GVP_GFORCE_040_SCSI_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)*/ +#define ZORRO_PROD_GVP_GFORCE_040_060 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x16, 0) +#define ZORRO_PROD_GVP_IMPACT_VISION_24 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x20, 0) +#define ZORRO_PROD_GVP_GFORCE_040_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0xFF, 0) + +#define ZORRO_MANUF_CALIFORNIA_ACCESS_SYNERGY 0x07E5 +#define ZORRO_PROD_CALIFORNIA_ACCESS_SYNERGY_MALIBU ZORRO_ID(CALIFORNIA_ACCESS_SYNERGY, 0x01, 0) + +#define ZORRO_MANUF_XETEC 0x07E6 +#define ZORRO_PROD_XETEC_FASTCARD ZORRO_ID(XETEC, 0x01, 0) +#define ZORRO_PROD_XETEC_FASTCARD_RAM ZORRO_ID(XETEC, 0x02, 0) +#define ZORRO_PROD_XETEC_FASTCARD_PLUS ZORRO_ID(XETEC, 0x03, 0) + +#define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS 0x07EA +#define ZORRO_PROD_PPS_MERCURY ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x00, 0) +#define ZORRO_PROD_PPS_A3000_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x01, 0) +#define ZORRO_PROD_PPS_A2000_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x69, 0) +#define ZORRO_PROD_PPS_ZEUS ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x96, 0) +#define ZORRO_PROD_PPS_A500_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0xBB, 0) + +#define ZORRO_MANUF_XEBEC 0x07EC + +#define ZORRO_MANUF_SPIRIT_TECHNOLOGY 0x07F2 +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN1000 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x01, 0) +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN500 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x02, 0) +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_SIN500 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x03, 0) +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_HDA_506 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x04, 0) +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_AX_S ZORRO_ID(SPIRIT_TECHNOLOGY, 0x05, 0) +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_OCTABYTE ZORRO_ID(SPIRIT_TECHNOLOGY, 0x06, 0) +#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INMATE ZORRO_ID(SPIRIT_TECHNOLOGY, 0x08, 0) + +#define ZORRO_MANUF_SPIRIT_TECHNOLOGY_2 0x07F3 + +#define ZORRO_MANUF_BSC_ALFADATA_1 0x07FE +#define ZORRO_PROD_BSC_ALF_3_1 ZORRO_ID(BSC_ALFADATA_1, 0x03, 0) + +#define ZORRO_MANUF_BSC_ALFADATA_2 0x0801 +#define ZORRO_PROD_BSC_ALF_2_1 ZORRO_ID(BSC_ALFADATA_2, 0x01, 0) +#define ZORRO_PROD_BSC_ALF_2_2 ZORRO_ID(BSC_ALFADATA_2, 0x02, 0) +#define ZORRO_PROD_BSC_ALF_3_2 ZORRO_ID(BSC_ALFADATA_2, 0x03, 0) + +#define ZORRO_MANUF_CARDCO_2 0x0802 +#define ZORRO_PROD_CARDCO_KRONOS_2000_2 ZORRO_ID(CARDCO_2, 0x04, 0) +#define ZORRO_PROD_CARDCO_A1000_2 ZORRO_ID(CARDCO_2, 0x0C, 0) + +#define ZORRO_MANUF_JOCHHEIM 0x0804 +#define ZORRO_PROD_JOCHHEIM_RAM ZORRO_ID(JOCHHEIM, 0x01, 0) + +#define ZORRO_MANUF_CHECKPOINT_TECHNOLOGIES 0x0807 +#define ZORRO_PROD_CHECKPOINT_TECHNOLOGIES_SERIAL_SOLUTION ZORRO_ID(CHECKPOINT_TECHNOLOGIES, 0x00, 0) + +#define ZORRO_MANUF_EDOTRONIK 0x0810 +#define ZORRO_PROD_EDOTRONIK_IEEE_488 ZORRO_ID(EDOTRONIK, 0x01, 0) +#define ZORRO_PROD_EDOTRONIK_8032 ZORRO_ID(EDOTRONIK, 0x02, 0) +#define ZORRO_PROD_EDOTRONIK_MULTISERIAL ZORRO_ID(EDOTRONIK, 0x03, 0) +#define ZORRO_PROD_EDOTRONIK_VIDEODIGITIZER ZORRO_ID(EDOTRONIK, 0x04, 0) +#define ZORRO_PROD_EDOTRONIK_PARALLEL_IO ZORRO_ID(EDOTRONIK, 0x05, 0) +#define ZORRO_PROD_EDOTRONIK_PIC_PROTOYPING ZORRO_ID(EDOTRONIK, 0x06, 0) +#define ZORRO_PROD_EDOTRONIK_ADC ZORRO_ID(EDOTRONIK, 0x07, 0) +#define ZORRO_PROD_EDOTRONIK_VME ZORRO_ID(EDOTRONIK, 0x08, 0) +#define ZORRO_PROD_EDOTRONIK_DSP96000 ZORRO_ID(EDOTRONIK, 0x09, 0) + +#define ZORRO_MANUF_NES_INC 0x0813 +#define ZORRO_PROD_NES_INC_RAM ZORRO_ID(NES_INC, 0x00, 0) + +#define ZORRO_MANUF_ICD 0x0817 +#define ZORRO_PROD_ICD_ADVANTAGE_2000_SCSI ZORRO_ID(ICD, 0x01, 0) +#define ZORRO_PROD_ICD_ADVANTAGE_IDE ZORRO_ID(ICD, 0x03, 0) +#define ZORRO_PROD_ICD_ADVANTAGE_2080_RAM ZORRO_ID(ICD, 0x04, 0) + +#define ZORRO_MANUF_KUPKE_2 0x0819 +#define ZORRO_PROD_KUPKE_OMTI ZORRO_ID(KUPKE_2, 0x01, 0) +#define ZORRO_PROD_KUPKE_SCSI_II ZORRO_ID(KUPKE_2, 0x02, 0) +#define ZORRO_PROD_KUPKE_GOLEM_BOX ZORRO_ID(KUPKE_2, 0x03, 0) +#define ZORRO_PROD_KUPKE_030_882 ZORRO_ID(KUPKE_2, 0x04, 0) +#define ZORRO_PROD_KUPKE_SCSI_AT ZORRO_ID(KUPKE_2, 0x05, 0) + +#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_3 0x081D +#define ZORRO_PROD_GVP_A2000_RAM8 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x09, 0) +#define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x0A, 0) + +#define ZORRO_MANUF_INTERWORKS_NETWORK 0x081E + +#define ZORRO_MANUF_HARDITAL_SYNTHESIS 0x0820 +#define ZORRO_PROD_HARDITAL_SYNTHESIS_TQM_68030_68882 ZORRO_ID(HARDITAL_SYNTHESIS, 0x14, 0) + +#define ZORRO_MANUF_APPLIED_ENGINEERING 0x0828 +#define ZORRO_PROD_APPLIED_ENGINEERING_DL2000 ZORRO_ID(APPLIED_ENGINEERING, 0x10, 0) +#define ZORRO_PROD_APPLIED_ENGINEERING_RAM_WORKS ZORRO_ID(APPLIED_ENGINEERING, 0xE0, 0) + +#define ZORRO_MANUF_BSC_ALFADATA_3 0x082C +#define ZORRO_PROD_BSC_OKTAGON_2008 ZORRO_ID(BSC_ALFADATA_3, 0x05, 0) +#define ZORRO_PROD_BSC_TANDEM_AT_2008_508 ZORRO_ID(BSC_ALFADATA_3, 0x06, 0) +#define ZORRO_PROD_BSC_ALFA_RAM_1200 ZORRO_ID(BSC_ALFADATA_3, 0x07, 0) +#define ZORRO_PROD_BSC_OKTAGON_2008_RAM ZORRO_ID(BSC_ALFADATA_3, 0x08, 0) +#define ZORRO_PROD_BSC_MULTIFACE_I ZORRO_ID(BSC_ALFADATA_3, 0x10, 0) +#define ZORRO_PROD_BSC_MULTIFACE_II ZORRO_ID(BSC_ALFADATA_3, 0x11, 0) +#define ZORRO_PROD_BSC_MULTIFACE_III ZORRO_ID(BSC_ALFADATA_3, 0x12, 0) +#define ZORRO_PROD_BSC_FRAMEBUFFER ZORRO_ID(BSC_ALFADATA_3, 0x20, 0) +#define ZORRO_PROD_BSC_GRAFFITI_RAM ZORRO_ID(BSC_ALFADATA_3, 0x21, 0) +#define ZORRO_PROD_BSC_GRAFFITI_REG ZORRO_ID(BSC_ALFADATA_3, 0x22, 0) +#define ZORRO_PROD_BSC_ISDN_MASTERCARD ZORRO_ID(BSC_ALFADATA_3, 0x40, 0) +#define ZORRO_PROD_BSC_ISDN_MASTERCARD_II ZORRO_ID(BSC_ALFADATA_3, 0x41, 0) + +#define ZORRO_MANUF_PHOENIX 0x0835 +#define ZORRO_PROD_PHOENIX_ST506 ZORRO_ID(PHOENIX, 0x21, 0) +#define ZORRO_PROD_PHOENIX_SCSI ZORRO_ID(PHOENIX, 0x22, 0) +#define ZORRO_PROD_PHOENIX_RAM ZORRO_ID(PHOENIX, 0xBE, 0) + +#define ZORRO_MANUF_ADVANCED_STORAGE_SYSTEMS 0x0836 +#define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x01, 0) +#define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS_RAM ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x08, 0) + +#define ZORRO_MANUF_IMPULSE 0x0838 +#define ZORRO_PROD_IMPULSE_FIRECRACKER_24 ZORRO_ID(IMPULSE, 0x00, 0) + +#define ZORRO_MANUF_IVS 0x0840 +#define ZORRO_PROD_IVS_GRANDSLAM_PIC_2 ZORRO_ID(IVS, 0x02, 0) +#define ZORRO_PROD_IVS_GRANDSLAM_PIC_1 ZORRO_ID(IVS, 0x04, 0) +#define ZORRO_PROD_IVS_OVERDRIVE ZORRO_ID(IVS, 0x10, 0) +#define ZORRO_PROD_IVS_TRUMPCARD_CLASSIC ZORRO_ID(IVS, 0x30, 0) +#define ZORRO_PROD_IVS_TRUMPCARD_PRO_GRANDSLAM ZORRO_ID(IVS, 0x34, 0) +#define ZORRO_PROD_IVS_META_4 ZORRO_ID(IVS, 0x40, 0) +#define ZORRO_PROD_IVS_WAVETOOLS ZORRO_ID(IVS, 0xBF, 0) +#define ZORRO_PROD_IVS_VECTOR_1 ZORRO_ID(IVS, 0xF3, 0) +#define ZORRO_PROD_IVS_VECTOR_2 ZORRO_ID(IVS, 0xF4, 0) + +#define ZORRO_MANUF_VECTOR_1 0x0841 +#define ZORRO_PROD_VECTOR_CONNECTION_1 ZORRO_ID(VECTOR_1, 0xE3, 0) + +#define ZORRO_MANUF_XPERT_PRODEV 0x0845 +#define ZORRO_PROD_XPERT_PRODEV_VISIONA_RAM ZORRO_ID(XPERT_PRODEV, 0x01, 0) +#define ZORRO_PROD_XPERT_PRODEV_VISIONA_REG ZORRO_ID(XPERT_PRODEV, 0x02, 0) +#define ZORRO_PROD_XPERT_PRODEV_MERLIN_RAM ZORRO_ID(XPERT_PRODEV, 0x03, 0) +#define ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_1 ZORRO_ID(XPERT_PRODEV, 0x04, 0) +#define ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_2 ZORRO_ID(XPERT_PRODEV, 0xC9, 0) + +#define ZORRO_MANUF_HYDRA_SYSTEMS 0x0849 +#define ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET ZORRO_ID(HYDRA_SYSTEMS, 0x01, 0) + +#define ZORRO_MANUF_SUNRIZE_INDUSTRIES 0x084F +#define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD1012 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x01, 0) +#define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD516 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x02, 0) +#define ZORRO_PROD_SUNRIZE_INDUSTRIES_DD512 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x03, 0) + +#define ZORRO_MANUF_TRICERATOPS 0x0850 +#define ZORRO_PROD_TRICERATOPS_MULTI_IO ZORRO_ID(TRICERATOPS, 0x01, 0) + +#define ZORRO_MANUF_APPLIED_MAGIC 0x0851 +#define ZORRO_PROD_APPLIED_MAGIC_DMI_RESOLVER ZORRO_ID(APPLIED_MAGIC, 0x01, 0) +#define ZORRO_PROD_APPLIED_MAGIC_DIGITAL_BROADCASTER ZORRO_ID(APPLIED_MAGIC, 0x06, 0) + +#define ZORRO_MANUF_GFX_BASE 0x085E +#define ZORRO_PROD_GFX_BASE_GDA_1_VRAM ZORRO_ID(GFX_BASE, 0x00, 0) +#define ZORRO_PROD_GFX_BASE_GDA_1 ZORRO_ID(GFX_BASE, 0x01, 0) + +#define ZORRO_MANUF_ROCTEC 0x0860 +#define ZORRO_PROD_ROCTEC_RH_800C ZORRO_ID(ROCTEC, 0x01, 0) +#define ZORRO_PROD_ROCTEC_RH_800C_RAM ZORRO_ID(ROCTEC, 0x01, 0) + +#define ZORRO_MANUF_KATO 0x0861 +#define ZORRO_PROD_KATO_MELODY ZORRO_ID(KATO, 0x80, 0) +/* ID clash!! */ +#define ZORRO_MANUF_HELFRICH_1 0x0861 +#define ZORRO_PROD_HELFRICH_RAINBOW_II ZORRO_ID(HELFRICH_1, 0x20, 0) +#define ZORRO_PROD_HELFRICH_RAINBOW_III ZORRO_ID(HELFRICH_1, 0x21, 0) + +#define ZORRO_MANUF_ATLANTIS 0x0862 + +#define ZORRO_MANUF_PROTAR 0x0864 + +#define ZORRO_MANUF_ACS 0x0865 + +#define ZORRO_MANUF_SOFTWARE_RESULTS_ENTERPRISES 0x0866 +#define ZORRO_PROD_SOFTWARE_RESULTS_ENTERPRISES_GOLDEN_GATE_2_BUS_PLUS ZORRO_ID(SOFTWARE_RESULTS_ENTERPRISES, 0x01, 0) + +#define ZORRO_MANUF_MASOBOSHI 0x086D +#define ZORRO_PROD_MASOBOSHI_MASTER_CARD_SC201 ZORRO_ID(MASOBOSHI, 0x03, 0) +#define ZORRO_PROD_MASOBOSHI_MASTER_CARD_MC702 ZORRO_ID(MASOBOSHI, 0x04, 0) +#define ZORRO_PROD_MASOBOSHI_MVD_819 ZORRO_ID(MASOBOSHI, 0x07, 0) + +#define ZORRO_MANUF_MAINHATTAN_DATA 0x086F +#define ZORRO_PROD_MAINHATTAN_DATA_IDE ZORRO_ID(MAINHATTAN_DATA, 0x01, 0) + +#define ZORRO_MANUF_VILLAGE_TRONIC 0x0877 +#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_RAM ZORRO_ID(VILLAGE_TRONIC, 0x01, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_REG ZORRO_ID(VILLAGE_TRONIC, 0x02, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_16M_PROTOTYPE ZORRO_ID(VILLAGE_TRONIC, 0x03, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM ZORRO_ID(VILLAGE_TRONIC, 0x0B, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_REG ZORRO_ID(VILLAGE_TRONIC, 0x0C, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_SEGMENTED_MODE ZORRO_ID(VILLAGE_TRONIC, 0x0D, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_MEM1 ZORRO_ID(VILLAGE_TRONIC, 0x15, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_MEM2 ZORRO_ID(VILLAGE_TRONIC, 0x16, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_REG ZORRO_ID(VILLAGE_TRONIC, 0x17, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z3 ZORRO_ID(VILLAGE_TRONIC, 0x18, 0) +#define ZORRO_PROD_VILLAGE_TRONIC_ARIADNE ZORRO_ID(VILLAGE_TRONIC, 0xC9, 0) + +#define ZORRO_MANUF_UTILITIES_UNLIMITED 0x087B +#define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE ZORRO_ID(UTILITIES_UNLIMITED, 0x15, 0) +#define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE2 ZORRO_ID(UTILITIES_UNLIMITED, 0x20, 0) + +#define ZORRO_MANUF_AMITRIX 0x0880 +#define ZORRO_PROD_AMITRIX_MULTI_IO ZORRO_ID(AMITRIX, 0x01, 0) +#define ZORRO_PROD_AMITRIX_CD_RAM ZORRO_ID(AMITRIX, 0x02, 0) + +#define ZORRO_MANUF_ARMAX 0x0885 +#define ZORRO_PROD_ARMAX_OMNIBUS ZORRO_ID(ARMAX, 0x00, 0) + +#define ZORRO_MANUF_NEWTEK 0x088F +#define ZORRO_PROD_NEWTEK_VIDEOTOASTER ZORRO_ID(NEWTEK, 0x00, 0) + +#define ZORRO_MANUF_M_TECH_GERMANY 0x0890 +#define ZORRO_PROD_MTEC_AT500_2 ZORRO_ID(M_TECH_GERMANY, 0x01, 0) +#define ZORRO_PROD_MTEC_68030 ZORRO_ID(M_TECH_GERMANY, 0x03, 0) +#define ZORRO_PROD_MTEC_68020I ZORRO_ID(M_TECH_GERMANY, 0x06, 0) +#define ZORRO_PROD_MTEC_A1200_T68030_RTC ZORRO_ID(M_TECH_GERMANY, 0x20, 0) +#define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530 ZORRO_ID(M_TECH_GERMANY, 0x21, 0) +#define ZORRO_PROD_MTEC_8_MB_RAM ZORRO_ID(M_TECH_GERMANY, 0x22, 0) +#define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530_SCSI_IDE ZORRO_ID(M_TECH_GERMANY, 0x24, 0) + +#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_4 0x0891 +#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_REG ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x01, 0) +#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x02, 0) + +#define ZORRO_MANUF_APOLLO_1 0x0892 +#define ZORRO_PROD_APOLLO_A1200 ZORRO_ID(APOLLO_1, 0x01, 0) + +#define ZORRO_MANUF_HELFRICH_2 0x0893 +#define ZORRO_PROD_HELFRICH_PICCOLO_RAM ZORRO_ID(HELFRICH_2, 0x05, 0) +#define ZORRO_PROD_HELFRICH_PICCOLO_REG ZORRO_ID(HELFRICH_2, 0x06, 0) +#define ZORRO_PROD_HELFRICH_PEGGY_PLUS_MPEG ZORRO_ID(HELFRICH_2, 0x07, 0) +#define ZORRO_PROD_HELFRICH_VIDEOCRUNCHER ZORRO_ID(HELFRICH_2, 0x08, 0) +#define ZORRO_PROD_HELFRICH_SD64_RAM ZORRO_ID(HELFRICH_2, 0x0A, 0) +#define ZORRO_PROD_HELFRICH_SD64_REG ZORRO_ID(HELFRICH_2, 0x0B, 0) + +#define ZORRO_MANUF_MACROSYSTEMS_USA 0x089B +#define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx ZORRO_ID(MACROSYSTEMS_USA, 0x13, 0) + +#define ZORRO_MANUF_ELBOX_COMPUTER 0x089E +#define ZORRO_PROD_ELBOX_COMPUTER_1200_4 ZORRO_ID(ELBOX_COMPUTER, 0x06, 0) + +#define ZORRO_MANUF_HARMS_PROFESSIONAL 0x0A00 +#define ZORRO_PROD_HARMS_PROFESSIONAL_030_PLUS ZORRO_ID(HARMS_PROFESSIONAL, 0x10, 0) +#define ZORRO_PROD_HARMS_PROFESSIONAL_3500 ZORRO_ID(HARMS_PROFESSIONAL, 0xD0, 0) + +#define ZORRO_MANUF_MICRONIK 0x0A50 +#define ZORRO_PROD_MICRONIK_RCA_120 ZORRO_ID(MICRONIK, 0x0A, 0) + +#define ZORRO_MANUF_MICRONIK2 0x0F0F +#define ZORRO_PROD_MICRONIK2_Z3I ZORRO_ID(MICRONIK2, 0x01, 0) + +#define ZORRO_MANUF_MEGAMICRO 0x1000 +#define ZORRO_PROD_MEGAMICRO_SCRAM_500 ZORRO_ID(MEGAMICRO, 0x03, 0) +#define ZORRO_PROD_MEGAMICRO_SCRAM_500_RAM ZORRO_ID(MEGAMICRO, 0x04, 0) + +#define ZORRO_MANUF_IMTRONICS_2 0x1028 +#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_3 ZORRO_ID(IMTRONICS_2, 0x39, 0) +#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_4 ZORRO_ID(IMTRONICS_2, 0x57, 0) + +/* unofficial ID */ +#define ZORRO_MANUF_INDIVIDUAL_COMPUTERS 0x1212 +#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x00, 0) +#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x2A, 0) + +#define ZORRO_MANUF_KUPKE_3 0x1248 +#define ZORRO_PROD_KUPKE_GOLEM_HD_3000 ZORRO_ID(KUPKE_3, 0x01, 0) + +#define ZORRO_MANUF_ITH 0x1388 +#define ZORRO_PROD_ITH_ISDN_MASTER_II ZORRO_ID(ITH, 0x01, 0) + +#define ZORRO_MANUF_VMC 0x1389 +#define ZORRO_PROD_VMC_ISDN_BLASTER_Z2 ZORRO_ID(VMC, 0x01, 0) +#define ZORRO_PROD_VMC_HYPERCOM_4 ZORRO_ID(VMC, 0x02, 0) + +#define ZORRO_MANUF_INFORMATION 0x157C +#define ZORRO_PROD_INFORMATION_ISDN_ENGINE_I ZORRO_ID(INFORMATION, 0x64, 0) + +#define ZORRO_MANUF_VORTEX 0x2017 +#define ZORRO_PROD_VORTEX_GOLDEN_GATE_80386SX ZORRO_ID(VORTEX, 0x07, 0) +#define ZORRO_PROD_VORTEX_GOLDEN_GATE_RAM ZORRO_ID(VORTEX, 0x08, 0) +#define ZORRO_PROD_VORTEX_GOLDEN_GATE_80486 ZORRO_ID(VORTEX, 0x09, 0) + +#define ZORRO_MANUF_EXPANSION_SYSTEMS 0x2062 +#define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX ZORRO_ID(EXPANSION_SYSTEMS, 0x01, 0) +#define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX_RAM ZORRO_ID(EXPANSION_SYSTEMS, 0x02, 0) + +#define ZORRO_MANUF_READYSOFT 0x2100 +#define ZORRO_PROD_READYSOFT_AMAX_II_IV ZORRO_ID(READYSOFT, 0x01, 0) + +#define ZORRO_MANUF_PHASE5 0x2140 +#define ZORRO_PROD_PHASE5_BLIZZARD_RAM ZORRO_ID(PHASE5, 0x01, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD ZORRO_ID(PHASE5, 0x02, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD_1220_IV ZORRO_ID(PHASE5, 0x06, 0) +#define ZORRO_PROD_PHASE5_FASTLANE_Z3_RAM ZORRO_ID(PHASE5, 0x0A, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD_1230_II_FASTLANE_Z3_CYBERSCSI_CYBERSTORM060 ZORRO_ID(PHASE5, 0x0B, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD_1220_CYBERSTORM ZORRO_ID(PHASE5, 0x0C, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD_1230 ZORRO_ID(PHASE5, 0x0D, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260 ZORRO_ID(PHASE5, 0x11, 0) +#define ZORRO_PROD_PHASE5_BLIZZARD_2060 ZORRO_ID(PHASE5, 0x18, 0) +#define ZORRO_PROD_PHASE5_CYBERSTORM_MK_II ZORRO_ID(PHASE5, 0x19, 0) +#define ZORRO_PROD_PHASE5_CYBERVISION64 ZORRO_ID(PHASE5, 0x22, 0) +#define ZORRO_PROD_PHASE5_CYBERVISION64_3D_PROTOTYPE ZORRO_ID(PHASE5, 0x32, 0) +#define ZORRO_PROD_PHASE5_CYBERVISION64_3D ZORRO_ID(PHASE5, 0x43, 0) +#define ZORRO_PROD_PHASE5_CYBERSTORM_MK_III ZORRO_ID(PHASE5, 0x64, 0) + +#define ZORRO_MANUF_DPS 0x2169 +#define ZORRO_PROD_DPS_PERSONAL_ANIMATION_RECORDER ZORRO_ID(DPS, 0x01, 0) + +#define ZORRO_MANUF_APOLLO_2 0x2200 +#define ZORRO_PROD_APOLLO_A620_68020_1 ZORRO_ID(APOLLO_2, 0x00, 0) +#define ZORRO_PROD_APOLLO_A620_68020_2 ZORRO_ID(APOLLO_2, 0x01, 0) + +#define ZORRO_MANUF_APOLLO_3 0x2222 +#define ZORRO_PROD_APOLLO_AT_APOLLO ZORRO_ID(APOLLO_3, 0x22, 0) +#define ZORRO_PROD_APOLLO_1230_1240_1260_2030_4040_4060 ZORRO_ID(APOLLO_3, 0x23, 0) + +#define ZORRO_MANUF_PETSOFF_LP 0x38A5 +#define ZORRO_PROD_PETSOFF_LP_DELFINA ZORRO_ID(PETSOFF_LP, 0x00, 0) +#define ZORRO_PROD_PETSOFF_LP_DELFINA_LITE ZORRO_ID(PETSOFF_LP, 0x01, 0) + +#define ZORRO_MANUF_UWE_GERLACH 0x3FF7 +#define ZORRO_PROD_UWE_GERLACH_RAM_ROM ZORRO_ID(UWE_GERLACH, 0xd4, 0) + +#define ZORRO_MANUF_MACROSYSTEMS_GERMANY 0x4754 +#define ZORRO_PROD_MACROSYSTEMS_MAESTRO ZORRO_ID(MACROSYSTEMS_GERMANY, 0x03, 0) +#define ZORRO_PROD_MACROSYSTEMS_VLAB ZORRO_ID(MACROSYSTEMS_GERMANY, 0x04, 0) +#define ZORRO_PROD_MACROSYSTEMS_MAESTRO_PRO ZORRO_ID(MACROSYSTEMS_GERMANY, 0x05, 0) +#define ZORRO_PROD_MACROSYSTEMS_RETINA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x06, 0) +#define ZORRO_PROD_MACROSYSTEMS_MULTI_EVOLUTION ZORRO_ID(MACROSYSTEMS_GERMANY, 0x08, 0) +#define ZORRO_PROD_MACROSYSTEMS_TOCCATA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x0C, 0) +#define ZORRO_PROD_MACROSYSTEMS_RETINA_Z3 ZORRO_ID(MACROSYSTEMS_GERMANY, 0x10, 0) +#define ZORRO_PROD_MACROSYSTEMS_VLAB_MOTION ZORRO_ID(MACROSYSTEMS_GERMANY, 0x12, 0) +#define ZORRO_PROD_MACROSYSTEMS_ALTAIS ZORRO_ID(MACROSYSTEMS_GERMANY, 0x13, 0) +#define ZORRO_PROD_MACROSYSTEMS_FALCON_040 ZORRO_ID(MACROSYSTEMS_GERMANY, 0xFD, 0) + +#define ZORRO_MANUF_COMBITEC 0x6766 + +#define ZORRO_MANUF_SKI_PERIPHERALS 0x8000 +#define ZORRO_PROD_SKI_PERIPHERALS_MAST_FIREBALL ZORRO_ID(SKI_PERIPHERALS, 0x08, 0) +#define ZORRO_PROD_SKI_PERIPHERALS_SCSI_DUAL_SERIAL ZORRO_ID(SKI_PERIPHERALS, 0x80, 0) + +#define ZORRO_MANUF_REIS_WARE_2 0xA9AD +#define ZORRO_PROD_REIS_WARE_SCAN_KING ZORRO_ID(REIS_WARE_2, 0x11, 0) + +#define ZORRO_MANUF_CAMERON 0xAA01 +#define ZORRO_PROD_CAMERON_PERSONAL_A4 ZORRO_ID(CAMERON, 0x10, 0) + +#define ZORRO_MANUF_REIS_WARE 0xAA11 +#define ZORRO_PROD_REIS_WARE_HANDYSCANNER ZORRO_ID(REIS_WARE, 0x11, 0) + +#define ZORRO_MANUF_PHOENIX_2 0xB5A8 +#define ZORRO_PROD_PHOENIX_ST506_2 ZORRO_ID(PHOENIX_2, 0x21, 0) +#define ZORRO_PROD_PHOENIX_SCSI_2 ZORRO_ID(PHOENIX_2, 0x22, 0) +#define ZORRO_PROD_PHOENIX_RAM_2 ZORRO_ID(PHOENIX_2, 0xBE, 0) + +#define ZORRO_MANUF_COMBITEC_2 0xC008 +#define ZORRO_PROD_COMBITEC_HD ZORRO_ID(COMBITEC_2, 0x2A, 0) +#define ZORRO_PROD_COMBITEC_SRAM ZORRO_ID(COMBITEC_2, 0x2B, 0) + + + /* + * Test and illegal Manufacturer IDs. + * These do NOT appear in arch/m68k/amiga/zorro.c! + */ + +#define ZORRO_MANUF_HACKER 0x07DB +#define ZORRO_PROD_GENERAL_PROTOTYPE ZORRO_ID(HACKER, 0x00, 0) +#define ZORRO_PROD_HACKER_SCSI ZORRO_ID(HACKER, 0x01, 0) +#define ZORRO_PROD_RESOURCE_MANAGEMENT_FORCE_QUICKNET_QN2000 ZORRO_ID(HACKER, 0x02, 0) +#define ZORRO_PROD_VECTOR_CONNECTION_2 ZORRO_ID(HACKER, 0xE0, 0) +#define ZORRO_PROD_VECTOR_CONNECTION_3 ZORRO_ID(HACKER, 0xE1, 0) +#define ZORRO_PROD_VECTOR_CONNECTION_4 ZORRO_ID(HACKER, 0xE2, 0) +#define ZORRO_PROD_VECTOR_CONNECTION_5 ZORRO_ID(HACKER, 0xE3, 0) + + + /* + * GVP identifies most of its products through the 'extended product code' + * (epc). The epc has to be and'ed with the GVP_PRODMASK before the + * identification. + */ + +#define GVP_PRODMASK (0xf8) +#define GVP_SCSICLKMASK (0x01) enum GVP_flags { - GVP_IO = 0x01, - GVP_ACCEL = 0x02, - GVP_SCSI = 0x04, - GVP_24BITDMA = 0x08, - GVP_25BITDMA = 0x10, - GVP_NOBANK = 0x20, - GVP_14MHZ = 0x40, + GVP_IO = 0x01, + GVP_ACCEL = 0x02, + GVP_SCSI = 0x04, + GVP_24BITDMA = 0x08, + GVP_25BITDMA = 0x10, + GVP_NOBANK = 0x20, + GVP_14MHZ = 0x40, }; @@ -515,8 +663,8 @@ struct ExpansionRom { u_char er_Product; /* Product number, assigned by manufacturer */ u_char er_Flags; /* Flags */ u_char er_Reserved03; /* Must be zero ($ff inverted) */ - u_short er_Manufacturer; /* Unique ID,ASSIGNED BY COMMODORE-AMIGA! */ - u_long er_SerialNumber; /* Available for use by manufacturer */ + u_short er_Manufacturer;/* Unique ID,ASSIGNED BY COMMODORE-AMIGA! */ + u_long er_SerialNumber;/* Available for use by manufacturer */ u_short er_InitDiagVec; /* Offset to optional "DiagArea" structure */ u_char er_Reserved0c; u_char er_Reserved0d; @@ -547,7 +695,7 @@ struct ConfigDev { u_long cd_Unused[4]; /* for whatever the driver wants */ }; -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLY__ */ LN_Succ = 0 LN_Pred = LN_Succ+4 @@ -582,7 +730,7 @@ CD_NextCD = CD_Driver+4 CD_Unused = CD_NextCD+4 CD_sizeof = CD_Unused+(4*4) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLY__ */ #ifndef __ASSEMBLY__ @@ -590,30 +738,30 @@ CD_sizeof = CD_Unused+(4*4) #ifdef __KERNEL__ -extern int zorro_num_autocon; /* # of autoconfig devices found */ +extern unsigned int zorro_num_autocon; /* # of autoconfig devices found */ extern struct ConfigDev zorro_autocon[ZORRO_NUM_AUTO]; -/* - * Zorro Functions - */ + /* + * Zorro Functions + */ -extern int zorro_find(int manuf, int prod, int part, int index); -extern struct ConfigDev *zorro_get_board(int key); -extern void zorro_config_board(int key, int part); -extern void zorro_unconfig_board(int key, int part); +extern unsigned int zorro_find(zorro_id id, unsigned int part, unsigned int index); +extern const struct ConfigDev *zorro_get_board(unsigned int key); +extern void zorro_config_board(unsigned int key, unsigned int part); +extern void zorro_unconfig_board(unsigned int key, unsigned int part); -/* - * Bitmask indicating portions of available Zorro II RAM that are unused - * by the system. Every bit represents a 64K chunk, for a maximum of 8MB - * (128 chunks, physical 0x00200000-0x009fffff). - * - * If you want to use (= allocate) portions of this RAM, you should clear - * the corresponding bits. - */ + /* + * Bitmask indicating portions of available Zorro II RAM that are unused + * by the system. Every bit represents a 64K chunk, for a maximum of 8MB + * (128 chunks, physical 0x00200000-0x009fffff). + * + * If you want to use (= allocate) portions of this RAM, you should clear + * the corresponding bits. + */ -extern u_long zorro_unused_z2ram[4]; +extern u32 zorro_unused_z2ram[4]; #define Z2RAM_START (0x00200000) #define Z2RAM_END (0x00a00000) @@ -623,14 +771,14 @@ extern u_long zorro_unused_z2ram[4]; #define Z2RAM_CHUNKSHIFT (16) -/* - * Verbose Board Identification - */ + /* + * Verbose Board Identification + */ extern void zorro_identify(void); extern int zorro_get_list(char *buffer); -#endif /* !__ASSEMBLY__ */ -#endif /* __KERNEL__ */ +#endif /* !__ASSEMBLY__ */ +#endif /* __KERNEL__ */ -#endif /* __ZORRO_H */ +#endif /* _LINUX_ZORRO_H */ diff --git a/include/net/flow.h b/include/net/flow.h index dff77fc6a..7759e506c 100644 --- a/include/net/flow.h +++ b/include/net/flow.h @@ -22,7 +22,7 @@ struct flowi { } ip6_u; } nl_u; - struct device *dev; + int oif; union { struct { diff --git a/include/net/ip.h b/include/net/ip.h index 70d22dcc5..9b536ddf7 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -85,10 +85,9 @@ extern int ip_mc_procinfo(char *, char **, off_t, int, int); */ extern int ip_ioctl(struct sock *sk, int cmd, unsigned long arg); -extern int ip_build_pkt(struct sk_buff *skb, struct sock *sk, - u32 saddr, u32 daddr, - struct ip_options *opt); -extern int ip_build_header(struct sk_buff *skb, struct sock *sk); +extern void ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk, + u32 saddr, u32 daddr, + struct ip_options *opt); extern int ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt); extern int ip_local_deliver(struct sk_buff *skb); diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 863037b23..8fb0fbed7 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h @@ -72,7 +72,7 @@ extern void rt6_sndmsg(int type, struct in6_addr *dst, extern struct rt6_info *rt6_lookup(struct in6_addr *daddr, struct in6_addr *saddr, - struct device *dev, int flags); + int oif, int flags); /* * support functions for ND diff --git a/include/net/protocol.h b/include/net/protocol.h index 3c00907ea..63d562a98 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h @@ -55,7 +55,7 @@ struct inet6_protocol unsigned short len, int redo, struct inet6_protocol *protocol); - void (*err_handler)(int type, int code, unsigned char *buff, + void (*err_handler)(struct sk_buff *skb, int type, int code, unsigned char *buff, __u32 info, struct in6_addr *saddr, struct in6_addr *daddr, struct inet6_protocol *protocol); diff --git a/include/net/sock.h b/include/net/sock.h index 589f58c7c..f06f94ea9 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -150,6 +150,7 @@ struct ipv6_pinfo __u32 flow_lbl; int hop_limit; int mcast_hops; + int mcast_oif; __u8 priority; @@ -163,10 +164,6 @@ struct ipv6_pinfo mc_loop:1, unused:2; - /* device for outgoing packets */ - - struct device *oif; - struct ipv6_mc_socklist *ipv6_mc_list; __u32 dst_cookie; @@ -188,6 +185,11 @@ struct raw_opt { }; #endif +/* This defines a selective acknowledgement block. */ +struct tcp_sack_block { + __u32 start_seq; + __u32 end_seq; +}; struct tcp_opt { @@ -259,7 +261,8 @@ struct tcp_opt * Options received (usually on last packet, some only on SYN packets). */ char tstamp_ok, /* TIMESTAMP seen on SYN packet */ - wscale_ok; /* Wscale seen on SYN packet */ + wscale_ok, /* Wscale seen on SYN packet */ + sack_ok; /* SACK seen on SYN packet */ char saw_tstamp; /* Saw TIMESTAMP on last packet */ __u16 in_mss; /* MSS option received from sender */ __u8 snd_wscale; /* Window scaling received from sender */ @@ -268,6 +271,8 @@ struct tcp_opt __u32 rcv_tsecr; /* Time stamp echo reply */ __u32 ts_recent; /* Time stamp to echo next */ __u32 ts_recent_stamp;/* Time we stored ts_recent (for aging) */ + int num_sacks; /* Number of SACK blocks */ + struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ struct timer_list probe_timer; /* Probes */ __u32 basertt; /* Vegas baseRTT */ @@ -355,7 +360,12 @@ struct sock unsigned short num; /* Local port */ volatile unsigned char state, /* Connection state */ zapped; /* In ax25 & ipx means not linked */ - struct tcphdr dummy_th; /* TCP header template */ + __u16 sport; /* Source port */ + __u16 dport; /* Destination port */ + + unsigned short family; + unsigned char reuse, + nonagle; int sock_readers; /* user count */ int rcvbuf; @@ -379,13 +389,11 @@ struct sock volatile char dead, done, urginline, - reuse, keepopen, linger, destroy, no_check, broadcast, - nonagle, bsdism; unsigned char debug; int proc; @@ -398,7 +406,6 @@ struct sock struct sk_buff_head back_log, error_queue; - unsigned short family; struct proto *prot; /* diff --git a/include/net/tcp.h b/include/net/tcp.h index cec01dfe6..84bf7f55e 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -97,7 +97,7 @@ extern struct sock *tcp_regs[TCP_NUM_REGS]; #define TCP_RHASH_FN(__fport) \ ((((__fport) >> 7) ^ (__fport)) & (TCP_NUM_REGS - 1)) #define TCP_RHASH(__fport) tcp_regs[TCP_RHASH_FN((__fport))] -#define TCP_SK_RHASH_FN(__sock) TCP_RHASH_FN((__sock)->dummy_th.dest) +#define TCP_SK_RHASH_FN(__sock) TCP_RHASH_FN((__sock)->dport) #define TCP_SK_RHASH(__sock) tcp_regs[TCP_SK_RHASH_FN((__sock))] static __inline__ void tcp_reg_zap(struct sock *sk) @@ -161,9 +161,12 @@ struct tcp_tw_bucket { int bound_dev_if; unsigned short num; unsigned char state, - family; /* sk->zapped */ - __u16 source; /* sk->dummy_th.source */ - __u16 dest; /* sk->dummy_th.dest */ + zapped; + __u16 sport; + __u16 dport; + unsigned short family; + unsigned char reuse, + nonagle; /* And these are ours. */ __u32 rcv_nxt; @@ -187,6 +190,7 @@ extern kmem_cache_t *tcp_timewait_cachep; */ extern int sysctl_tcp_timestamps; extern int sysctl_tcp_window_scaling; +extern int sysctl_tcp_sack; /* These can have wildcards, don't try too hard. */ static __inline__ int tcp_lhashfn(unsigned short num) @@ -294,15 +298,12 @@ static __inline__ int tcp_sk_listen_hashfn(struct sock *sk) #define TCPOLEN_TIMESTAMP 10 /* But this is what stacks really send out. */ -#define TCPOLEN_TSTAMP_ALIGNED 12 -#define TCPOLEN_WSCALE_ALIGNED 4 - -/* - * TCP option flags for parsed options. - */ - -#define TCPOPTF_SACK_PERM 1 -#define TCPOPTF_TIMESTAMP 2 +#define TCPOLEN_TSTAMP_ALIGNED 12 +#define TCPOLEN_WSCALE_ALIGNED 4 +#define TCPOLEN_SACKPERM_ALIGNED 4 +#define TCPOLEN_SACK_BASE 2 +#define TCPOLEN_SACK_BASE_ALIGNED 4 +#define TCPOLEN_SACK_PERBLOCK 8 /* * TCP Vegas constants @@ -331,7 +332,7 @@ struct tcp_v6_open_req { struct in6_addr loc_addr; struct in6_addr rmt_addr; struct ipv6_options *opt; - struct device *dev; + int iif; }; #endif @@ -347,6 +348,7 @@ struct open_request { unsigned snd_wscale : 4, rcv_wscale : 4, tstamp_ok : 1, + sack_ok : 1, wscale_ok : 1; /* The following two fields can be easily recomputed I think -AK */ __u32 window_clamp; /* window clamp at creation time */ @@ -378,9 +380,6 @@ extern kmem_cache_t *tcp_openreq_cachep; */ struct tcp_func { - int (*build_net_header) (struct sock *sk, - struct sk_buff *skb); - void (*queue_xmit) (struct sk_buff *skb); void (*send_check) (struct sock *sk, @@ -388,8 +387,7 @@ struct tcp_func { int len, struct sk_buff *skb); - int (*rebuild_header) (struct sock *sk, - struct sk_buff *skb); + int (*rebuild_header) (struct sock *sk); int (*conn_request) (struct sock *sk, struct sk_buff *skb, @@ -497,15 +495,14 @@ extern int tcp_recvmsg(struct sock *sk, int len, int nonblock, int flags, int *addr_len); -extern void tcp_parse_options(struct tcphdr *th, struct tcp_opt *tp, - int no_fancy); +extern void tcp_parse_options(struct sock *sk, struct tcphdr *th, + struct tcp_opt *tp, int no_fancy); /* * TCP v4 functions exported for the inet6 API */ -extern int tcp_v4_rebuild_header(struct sock *sk, - struct sk_buff *skb); +extern int tcp_v4_rebuild_header(struct sock *sk); extern int tcp_v4_build_header(struct sock *sk, struct sk_buff *skb); @@ -520,7 +517,8 @@ extern int tcp_v4_conn_request(struct sock *sk, extern struct sock * tcp_create_openreq_child(struct sock *sk, struct open_request *req, - struct sk_buff *skb); + struct sk_buff *skb, + int mss); extern struct sock * tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb, @@ -534,6 +532,16 @@ extern int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); +extern void tcp_connect(struct sock *sk, + struct sk_buff *skb, + int est_mss); + +extern struct sk_buff * tcp_make_synack(struct sock *sk, + struct dst_entry *dst, + struct open_request *req, + int mss); + + /* From syncookies.c */ extern struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, struct ip_options *opt); @@ -543,7 +551,8 @@ extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, extern void tcp_read_wakeup(struct sock *); extern void tcp_write_xmit(struct sock *); extern void tcp_time_wait(struct sock *); -extern void tcp_do_retransmit(struct sock *, int); +extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); +extern void tcp_xmit_retransmit_queue(struct sock *); extern void tcp_simple_retransmit(struct sock *); /* tcp_output.c */ @@ -554,6 +563,7 @@ extern void tcp_write_wakeup(struct sock *); extern void tcp_send_fin(struct sock *sk); extern void tcp_send_active_reset(struct sock *sk); extern int tcp_send_synack(struct sock *); +extern void tcp_transmit_skb(struct sock *, struct sk_buff *); extern void tcp_send_skb(struct sock *, struct sk_buff *, int force_queue); extern void tcp_send_ack(struct sock *sk); extern void tcp_send_delayed_ack(struct tcp_opt *tp, int max_timeout); @@ -639,6 +649,32 @@ extern __inline__ int tcp_raise_window(struct sock *sk) return (new_win && (new_win > (cur_win << 1))); } +/* This is what the send packet queueing engine uses to pass + * TCP per-packet control information to the transmission + * code. + */ +struct tcp_skb_cb { + __u8 flags; /* TCP header flags. */ + + /* NOTE: These must match up to the flags byte in a + * real TCP header. + */ +#define TCPCB_FLAG_FIN 0x01 +#define TCPCB_FLAG_SYN 0x02 +#define TCPCB_FLAG_RST 0x04 +#define TCPCB_FLAG_PSH 0x08 +#define TCPCB_FLAG_ACK 0x10 +#define TCPCB_FLAG_URG 0x20 + + __u8 sacked; /* State flags for SACK/FACK. */ +#define TCPCB_SACKED_ACKED 0x01 /* SKB ACK'd by a SACK block */ +#define TCPCB_SACKED_RETRANS 0x02 /* SKB retransmitted */ + + __u16 urg_ptr; /* Valid w/URG flags is set. */ +}; + +#define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0])) + /* This checks if the data bearing packet SKB (usually tp->send_head) * should be put on the wire right now. */ @@ -663,7 +699,7 @@ static __inline__ int tcp_snd_test(struct sock *sk, struct sk_buff *skb) */ len = skb->end_seq - skb->seq; if (!sk->nonagle && len < (sk->mss >> 1) && tp->packets_out && - !skb->h.th->urg) + !(TCP_SKB_CB(skb)->flags & TCPCB_FLAG_URG)) nagle_check = 0; return (nagle_check && tp->packets_out < tp->snd_cwnd && @@ -739,72 +775,39 @@ static __inline__ void tcp_set_state(struct sock *sk, int state) } } -static __inline__ void tcp_build_options(__u32 *ptr, struct tcp_opt *tp) -{ - if (tp->tstamp_ok) { - *ptr = __constant_htonl((TCPOPT_NOP << 24) | - (TCPOPT_NOP << 16) | - (TCPOPT_TIMESTAMP << 8) | - TCPOLEN_TIMESTAMP); - /* rest filled in by tcp_update_options */ - } -} - -static __inline__ void tcp_update_options(__u32 *ptr, struct tcp_opt *tp) -{ - if (tp->tstamp_ok) { - *++ptr = htonl(jiffies); - *++ptr = htonl(tp->ts_recent); - } -} - -static __inline__ void tcp_build_and_update_options(__u32 *ptr, struct tcp_opt *tp) +static __inline__ void tcp_build_and_update_options(__u32 *ptr, struct tcp_opt *tp, __u32 tstamp) { if (tp->tstamp_ok) { *ptr++ = __constant_htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) | (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP); - *ptr++ = htonl(jiffies); - *ptr = htonl(tp->ts_recent); + *ptr++ = htonl(tstamp); + *ptr++ = htonl(tp->ts_recent); } -} - -/* - * This routines builds a generic TCP header. - * They also build the RFC1323 Timestamp, but don't fill the - * actual timestamp in (you need to call tcp_update_options for this). - * XXX: pass tp instead of sk here. - */ - -static inline void tcp_build_header_data(struct tcphdr *th, struct sock *sk, int push) -{ - struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); + if(tp->sack_ok && tp->num_sacks) { + int this_sack; - memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); - th->seq = htonl(tp->write_seq); - if (!push) - th->psh = 1; - tcp_build_options((__u32*)(th+1), tp); + *ptr++ = __constant_htonl((TCPOPT_NOP << 24) | + (TCPOPT_NOP << 16) | + (TCPOPT_SACK << 8) | + (TCPOLEN_SACK_BASE + + (tp->num_sacks * TCPOLEN_SACK_PERBLOCK))); + for(this_sack = 0; this_sack < tp->num_sacks; this_sack++) { + *ptr++ = htonl(tp->selective_acks[this_sack].start_seq); + *ptr++ = htonl(tp->selective_acks[this_sack].end_seq); + } + } } -/* - * Construct a tcp options header for a SYN or SYN_ACK packet. +/* Construct a tcp options header for a SYN or SYN_ACK packet. * If this is every changed make sure to change the definition of * MAX_SYN_SIZE to match the new maximum number of options that you * can generate. - * FIXME: This is completely disgusting. - * This is probably a good candidate for a bit of assembly magic. - * It would be especially magical to compute the checksum for this - * stuff on the fly here. */ -extern __inline__ int tcp_syn_build_options(struct sk_buff *skb, int mss, int ts, int offer_wscale, int wscale) +extern __inline__ void tcp_syn_build_options(__u32 *ptr, int mss, int ts, int sack, + int offer_wscale, int wscale, __u32 tstamp) { - int count = 4 + (offer_wscale ? TCPOLEN_WSCALE_ALIGNED : 0) + - ((ts) ? TCPOLEN_TSTAMP_ALIGNED : 0); - unsigned char *optr = skb_put(skb,count); - __u32 *ptr = (__u32 *)optr; - /* We always get an MSS option. * The option bytes which will be seen in normal data * packets should timestamps be used, must be in the MSS @@ -815,20 +818,26 @@ extern __inline__ int tcp_syn_build_options(struct sk_buff *skb, int mss, int ts * recognize data packets as being full sized when we * should, and thus we won't abide by the delayed ACK * rules correctly. + * SACKs don't matter, we never delay an ACK when we + * have any of those going out. */ if(ts) mss += TCPOLEN_TSTAMP_ALIGNED; *ptr++ = htonl((TCPOPT_MSS << 24) | (TCPOLEN_MSS << 16) | mss); if (ts) { - *ptr++ = __constant_htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) | - (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP); - *ptr++ = htonl(jiffies); /* TSVAL */ + if(sack) + *ptr++ = __constant_htonl((TCPOPT_SACK_PERM << 24) | (TCPOLEN_SACK_PERM << 16) | + (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP); + else + *ptr++ = __constant_htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) | + (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP); + *ptr++ = htonl(tstamp); /* TSVAL */ *ptr++ = __constant_htonl(0); /* TSECR */ - } + } else if(sack) + *ptr++ = __constant_htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) | + (TCPOPT_SACK_PERM << 8) | TCPOLEN_SACK_PERM); if (offer_wscale) - *ptr++ = htonl((TCPOPT_WINDOW << 24) | (TCPOLEN_WINDOW << 16) | (wscale << 8)); - skb->csum = csum_partial(optr, count, 0); - return count; + *ptr++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_WINDOW << 16) | (TCPOLEN_WINDOW << 8) | (wscale)); } /* Determine a window scaling and initial window to offer. diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index 23ed805a0..45bdcc59d 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h @@ -26,7 +26,7 @@ extern int datagram_recv_ctl(struct sock *sk, struct sk_buff *skb); extern int datagram_send_ctl(struct msghdr *msg, - struct device **src_dev, + int *oif, struct in6_addr **src_addr, struct ipv6_options *opt, int *hlimit); |