diff -u --recursive --new-file v1.3.14/linux/Makefile linux/Makefile
--- v1.3.14/linux/Makefile	Mon Jul 31 15:58:59 1995
+++ linux/Makefile	Tue Aug  1 10:33:02 1995
@@ -1,6 +1,6 @@
 VERSION = 1
 PATCHLEVEL = 3
-SUBLEVEL = 14
+SUBLEVEL = 15
 
 ARCH = i386
 
diff -u --recursive --new-file v1.3.14/linux/arch/alpha/config.in linux/arch/alpha/config.in
--- v1.3.14/linux/arch/alpha/config.in	Fri Jul  7 08:54:43 1995
+++ linux/arch/alpha/config.in	Wed Aug  2 09:55:38 1995
@@ -225,8 +225,7 @@
 bool 'xiafs filesystem support' CONFIG_XIA_FS n
 bool 'msdos fs support' CONFIG_MSDOS_FS y
 if [ "$CONFIG_MSDOS_FS" = "y" ]; then
-#bool 'umsdos: Unix like fs on top of std MSDOS FAT fs' CONFIG_UMSDOS_FS n
-comment 'Umsdos is not supported in 1.3.0: wait for 1.3.1'
+bool 'umsdos: Unix like fs on top of std MSDOS FAT fs' CONFIG_UMSDOS_FS n
 fi
 bool '/proc filesystem support' CONFIG_PROC_FS y
 if [ "$CONFIG_INET" = "y" ]; then
diff -u --recursive --new-file v1.3.14/linux/arch/i386/boot/tools/build.c linux/arch/i386/boot/tools/build.c
--- v1.3.14/linux/arch/i386/boot/tools/build.c	Thu Jun 29 19:02:39 1995
+++ linux/arch/i386/boot/tools/build.c	Tue Aug  1 10:02:30 1995
@@ -76,7 +76,7 @@
 	return t.s[0];
 }
 
-void die(char * str)
+void die(const char * str)
 {
 	fprintf(stderr,"%s\n",str);
 	exit(1);
diff -u --recursive --new-file v1.3.14/linux/arch/i386/config.in linux/arch/i386/config.in
--- v1.3.14/linux/arch/i386/config.in	Thu Jul 13 16:20:19 1995
+++ linux/arch/i386/config.in	Wed Aug  2 09:41:45 1995
@@ -180,7 +180,7 @@
 	fi
 	bool 'HP PCLAN+ (27247B and 27252A) support' CONFIG_HPLAN_PLUS n
 	bool 'HP PCLAN (27245 and other 27xxx series) support' CONFIG_HPLAN n
-	bool 'HP 10/100VG PCLAN (257X series) support' CONFIG_HP100 y
+	bool 'HP 10/100VG PCLAN (ISA, EISA, PCI) support' CONFIG_HP100 y
 	bool 'NE2000/NE1000 support' CONFIG_NE2000 y
 	bool 'SK_G16 support' CONFIG_SK_G16 n
 fi
diff -u --recursive --new-file v1.3.14/linux/arch/i386/kernel/bios32.c linux/arch/i386/kernel/bios32.c
--- v1.3.14/linux/arch/i386/kernel/bios32.c	Wed Jun  7 13:10:01 1995
+++ linux/arch/i386/kernel/bios32.c	Tue Aug  1 10:02:30 1995
@@ -363,7 +363,7 @@
 	return (int) (ret & 0xff00) >> 8;
 }
 
-char *pcibios_strerror (int error)
+const char *pcibios_strerror (int error)
 {
 	static char buf[80];
 
diff -u --recursive --new-file v1.3.14/linux/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
--- v1.3.14/linux/arch/i386/kernel/setup.c	Thu Jun 29 19:02:39 1995
+++ linux/arch/i386/kernel/setup.c	Tue Aug  1 10:02:30 1995
@@ -103,7 +103,7 @@
 	init_task.mm->brk = TASK_SIZE + (unsigned long) &_end;
 
 	for (;;) {
-		if (c == ' ' && *(unsigned long *)from == *(unsigned long *)"mem=") {
+		if (c == ' ' && *(const unsigned long *)from == *(const unsigned long *)"mem=") {
 			memory_end = simple_strtoul(from+4, &from, 0);
 			if ( *from == 'K' || *from == 'k' ) {
 				memory_end = memory_end << 10;
@@ -136,7 +136,7 @@
 
 int get_cpuinfo(char * buffer)
 {
-	char *model[2][9]={{"DX","SX","DX/2","4","SX/2","6",
+	static const char *model[2][9]={{"DX","SX","DX/2","4","SX/2","6",
 				"DX/2-WB","DX/4"},
 			{"Pentium 60/66","Pentium 90/100","3",
 				"4","5","6","7","8"}};
diff -u --recursive --new-file v1.3.14/linux/arch/i386/kernel/traps.c linux/arch/i386/kernel/traps.c
--- v1.3.14/linux/arch/i386/kernel/traps.c	Thu Jun 29 19:02:39 1995
+++ linux/arch/i386/kernel/traps.c	Tue Aug  1 10:02:30 1995
@@ -93,7 +93,7 @@
 #define VMALLOC_OFFSET (8*1024*1024)
 #define MODULE_RANGE (8*1024*1024)
 
-/*static*/ void die_if_kernel(char * str, struct pt_regs * regs, long err)
+/*static*/ void die_if_kernel(const char * str, struct pt_regs * regs, long err)
 {
 	int i;
 	unsigned long esp;
diff -u --recursive --new-file v1.3.14/linux/arch/i386/lib/checksum.c linux/arch/i386/lib/checksum.c
--- v1.3.14/linux/arch/i386/lib/checksum.c	Fri Jul  7 13:42:57 1995
+++ linux/arch/i386/lib/checksum.c	Tue Aug  1 10:02:30 1995
@@ -23,7 +23,7 @@
  * computes a partial checksum, e.g. for TCP/UDP fragments
  */
 
-unsigned int csum_partial(unsigned char * buff, int len, unsigned int sum) {
+unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) {
 	  /*
 	   * Experiments with ethernet and slip connections show that buff
 	   * is aligned on either a 2-byte or 4-byte boundary.  We get at
@@ -101,7 +101,7 @@
  * copy from fs while checksumming, otherwise like csum_partial
  */
 
-unsigned int csum_partial_copy_fromuser( char *src, char *dst, 
+unsigned int csum_partial_copy_fromuser(const char *src, char *dst, 
 				  int len, int sum) {
     __asm__("
 	testl $2, %%edi		# Check alignment.
@@ -196,7 +196,7 @@
  * copy from ds while checksumming, otherwise like csum_partial
  */
 
-unsigned int csum_partial_copy( char *src, char *dst, 
+unsigned int csum_partial_copy(const char *src, char *dst, 
 				  int len, int sum) {
     __asm__("
 	testl $2, %%edi		# Check alignment.
diff -u --recursive --new-file v1.3.14/linux/arch/i386/math-emu/errors.c linux/arch/i386/math-emu/errors.c
--- v1.3.14/linux/arch/i386/math-emu/errors.c	Mon Aug  1 08:19:13 1994
+++ linux/arch/i386/math-emu/errors.c	Tue Aug  1 10:02:31 1995
@@ -85,7 +85,7 @@
 void emu_printall()
 {
   int i;
-  static char *tag_desc[] = { "Valid", "Zero", "ERROR", "ERROR",
+  static const char *tag_desc[] = { "Valid", "Zero", "ERROR", "ERROR",
                               "DeNorm", "Inf", "NaN", "Empty" };
   unsigned char byte1, FPU_modrm;
   unsigned long address = FPU_ORIG_EIP;
@@ -212,7 +212,7 @@
 
 static struct {
   int type;
-  char *name;
+  const char *name;
 } exception_names[] = {
   { EX_StackOver, "stack overflow" },
   { EX_StackUnder, "stack underflow" },
diff -u --recursive --new-file v1.3.14/linux/arch/i386/math-emu/fpu_emu.h linux/arch/i386/math-emu/fpu_emu.h
--- v1.3.14/linux/arch/i386/math-emu/fpu_emu.h	Fri Jun 30 16:22:25 1995
+++ linux/arch/i386/math-emu/fpu_emu.h	Tue Aug  1 10:02:31 1995
@@ -133,9 +133,9 @@
 
 
 #define reg_move(x, y) { \
-		 *(short *)&((y)->sign) = *(short *)&((x)->sign); \
-		 *(long *)&((y)->exp) = *(long *)&((x)->exp); \
-		 *(long long *)&((y)->sigl) = *(long long *)&((x)->sigl); }
+		 *(short *)&((y)->sign) = *(const short *)&((x)->sign); \
+		 *(long *)&((y)->exp) = *(const long *)&((x)->exp); \
+		 *(long long *)&((y)->sigl) = *(const long long *)&((x)->sigl); }
 
 #define significand(x) ( ((unsigned long long *)&((x)->sigl))[0] )
 
diff -u --recursive --new-file v1.3.14/linux/arch/i386/mm/fault.c linux/arch/i386/mm/fault.c
--- v1.3.14/linux/arch/i386/mm/fault.c	Mon Jan 30 13:08:04 1995
+++ linux/arch/i386/mm/fault.c	Tue Aug  1 10:02:31 1995
@@ -20,7 +20,7 @@
 #include <asm/segment.h>
 #include <asm/pgtable.h>
 
-extern void die_if_kernel(char *,struct pt_regs *,long);
+extern void die_if_kernel(const char *,struct pt_regs *,long);
 
 /*
  * This routine handles page faults.  It determines the address,
diff -u --recursive --new-file v1.3.14/linux/drivers/block/cdu31a.c linux/drivers/block/cdu31a.c
--- v1.3.14/linux/drivers/block/cdu31a.c	Mon Jul 31 15:58:59 1995
+++ linux/drivers/block/cdu31a.c	Wed Aug  2 09:10:40 1995
@@ -380,20 +380,6 @@
    outb(curr_control_reg, sony_cd_control_reg);
 }
 
-static void
-cdu31a_interrupt(int irq, struct pt_regs *regs)
-{
-   disable_interrupts();
-   if (cdu31a_irq_wait != NULL)
-   {
-      wake_up(&cdu31a_irq_wait);
-   }
-   else
-   {
-      printk("CDU31A: Got an interrupt but nothing was waiting\n");
-   }
-}
-
 /*
  * Wait a little while (used for polling the drive).  If in initialization,
  * setting a timeout doesn't work, so just loop for a while.
@@ -528,6 +514,50 @@
    outb(cmd, sony_cd_cmd_reg);
 }
 
+static void
+cdu31a_interrupt(int irq, struct pt_regs *regs)
+{
+   unsigned char val;
+
+   if (abort_read_started)
+   {
+      /* We might be waiting for an abort to finish.  Don't
+         disable interrupts yet, though, because we handle
+         this one here. */
+      /* Clear out the result registers. */
+      while (is_result_reg_not_empty())
+      {
+         val = read_result_register();
+      }
+      clear_data_ready();
+      clear_result_ready();
+
+      /* Clear out the data */
+      while (is_data_requested())
+      {
+         val = read_data_register();
+      }
+      abort_read_started = 0;
+
+      /* If something was waiting, wake it up now. */
+      if (cdu31a_irq_wait != NULL)
+      {
+         disable_interrupts();
+         wake_up(&cdu31a_irq_wait);
+      }
+   }
+   else if (cdu31a_irq_wait != NULL)
+   {
+      disable_interrupts();
+      wake_up(&cdu31a_irq_wait);
+   }
+   else
+   {
+      disable_interrupts();
+      printk("CDU31A: Got an interrupt but nothing was waiting\n");
+   }
+}
+
 /*
  * Set the drive parameters so the drive will auto-spin-up when a
  * disk is inserted.
@@ -2270,7 +2300,7 @@
 }
 
 static int
-do_sony_cd_cmd_chk(char *name,
+do_sony_cd_cmd_chk(const char *name,
                    unsigned char cmd,
                    unsigned char *params,
                    unsigned int num_params,
@@ -2788,7 +2818,7 @@
 
 
 /* The different types of disc loading mechanisms supported */
-static char *load_mech[] = { "caddy", "tray", "pop-up", "unknown" };
+static const char *load_mech[] = { "caddy", "tray", "pop-up", "unknown" };
 
 static void
 get_drive_configuration(unsigned short base_io,
diff -u --recursive --new-file v1.3.14/linux/drivers/block/cm206.c linux/drivers/block/cm206.c
--- v1.3.14/linux/drivers/block/cm206.c	Mon Jul 31 15:59:00 1995
+++ linux/drivers/block/cm206.c	Tue Aug  1 10:02:31 1995
@@ -1129,7 +1129,7 @@
 #define ERROR  -EIO
 
 static int cm206[2] = {0,0};	/* for compatible `insmod' parameter passing */
-void parse_options() 
+void parse_options(void) 
 {
   int i;
   for (i=0; i<2; i++) {
diff -u --recursive --new-file v1.3.14/linux/drivers/block/floppy.c linux/drivers/block/floppy.c
--- v1.3.14/linux/drivers/block/floppy.c	Mon Jul 31 15:59:00 1995
+++ linux/drivers/block/floppy.c	Tue Aug  1 10:02:31 1995
@@ -311,7 +311,7 @@
  */
 static struct {
 	struct floppy_drive_params params;
-	char *name; /* name printed while booting */
+	const char *name; /* name printed while booting */
 } default_drive_params[]= {
 /* NOTE: the time values in jiffies should be in msec!
  CMOS drive type
@@ -545,7 +545,7 @@
 #endif
 }
 
-static inline void debugt(char *message)
+static inline void debugt(const char *message)
 {
 #ifdef DEBUGT
   if ( DP->flags & DEBUGT )
@@ -557,10 +557,10 @@
 static struct timer_list fd_timeout ={ NULL, NULL, 0, 0, 
 					       (timeout_fn) floppy_shutdown };
 
-static char *timeout_message;
+static const char *timeout_message;
 
 #ifdef CONFIG_FLOPPY_SANITY
-static void is_alive(char *message)
+static void is_alive(const char *message)
 {
 	/* this routine checks whether the floppy driver is "alive" */
 	if (fdc_busy && command_status < 2 && !fd_timeout.prev){
@@ -593,7 +593,7 @@
 
 
 
-static void reschedule_timeout(int drive, char *message, int marg)
+static void reschedule_timeout(int drive, const char *message, int marg)
 {
 	if (drive == CURRENTD )
 		drive = current_drive;
@@ -2801,7 +2801,7 @@
 #define COPYOUT(x) (fd_copyout( (void *)param, &(x), sizeof(x)))
 #define COPYIN(x) (memcpy_fromfs( &(x), (void *) param, sizeof(x)),0)
 
-static char *drive_name(int type, int drive )
+static const char *drive_name(int type, int drive )
 {
 	struct floppy_struct *floppy;	
 
@@ -2924,7 +2924,7 @@
 	struct format_descr tmp_format_req;
 	int i,device,drive,type,cnt;
 	struct floppy_struct *this_floppy;
-	char *name;
+	const char *name;
 
 	device = inode->i_rdev;
 	switch (cmd) {
@@ -3151,7 +3151,7 @@
 }
 
 static int floppy_write(struct inode * inode, struct file * filp,
-			char * buf, int count)
+			const char * buf, int count)
 {
 	int block;
 	int ret;
@@ -3523,7 +3523,7 @@
 }
 		
 static struct param_table {
-	char *name;
+	const char *name;
 	void (*fn)(int *ints, int param);
 	int def_param;
 } config_params[]={
diff -u --recursive --new-file v1.3.14/linux/drivers/block/genhd.c linux/drivers/block/genhd.c
--- v1.3.14/linux/drivers/block/genhd.c	Mon Jul 31 15:59:00 1995
+++ linux/drivers/block/genhd.c	Tue Aug  1 10:02:31 1995
@@ -134,7 +134,7 @@
 	 *  Check for Disk Manager v6.0x with geometry translation
 	 */
 	if (!tested_for_dm6++) {	/* only check for DM6 *once* */
-		extern int ide_xlate_1024(dev_t, int, char *);
+		extern int ide_xlate_1024(dev_t, int, const char *);
 		/* check for DM6 with Dynamic Drive Overlay (DDO) */
 		if (p->sys_ind == DM6_PARTITION) {
 			/*
diff -u --recursive --new-file v1.3.14/linux/drivers/block/ide.c linux/drivers/block/ide.c
--- v1.3.14/linux/drivers/block/ide.c	Mon Jul 31 15:59:00 1995
+++ linux/drivers/block/ide.c	Tue Aug  1 10:02:32 1995
@@ -2178,7 +2178,7 @@
 	ide_setup (str, ints);
 }
 
-int ide_xlate_1024 (dev_t full_dev, int need_offset, char *msg)
+int ide_xlate_1024 (dev_t full_dev, int need_offset, const char *msg)
 {
 	ide_dev_t *dev;
 	byte head_vals[] = {4, 8, 16, 32, 64, 128, 255, 0}, *heads = head_vals;
diff -u --recursive --new-file v1.3.14/linux/drivers/block/sbpcd.c linux/drivers/block/sbpcd.c
--- v1.3.14/linux/drivers/block/sbpcd.c	Mon Jul 31 15:59:00 1995
+++ linux/drivers/block/sbpcd.c	Tue Aug  1 10:02:32 1995
@@ -494,24 +494,24 @@
 static unsigned char msgnum=0;
 static char msgbuf[80];
 
-static char *str_sb = "SoundBlaster";
-static char *str_sb_l = "soundblaster";
-static char *str_lm = "LaserMate";
-static char *str_sp = "SPEA";
-static char *str_sp_l = "spea";
-char *type;
+static const char *str_sb = "SoundBlaster";
+static const char *str_sb_l = "soundblaster";
+static const char *str_lm = "LaserMate";
+static const char *str_sp = "SPEA";
+static const char *str_sp_l = "spea";
+const char *type;
 
 #if !(SBPCD_ISSUE-1)
-static char *major_name="sbpcd";
+static const char *major_name="sbpcd";
 #endif
 #if !(SBPCD_ISSUE-2)
-static char *major_name="sbpcd2";
+static const char *major_name="sbpcd2";
 #endif
 #if !(SBPCD_ISSUE-3)
-static char *major_name="sbpcd3";
+static const char *major_name="sbpcd3";
 #endif
 #if !(SBPCD_ISSUE-4)
-static char *major_name="sbpcd4";
+static const char *major_name="sbpcd4";
 #endif
 
 /*==========================================================================*/
@@ -691,7 +691,7 @@
 /*
  * DDI interface
  */
-static void msg(int level, char *fmt, ...)
+static void msg(int level, const char *fmt, ...)
 {
 	char buf[256];
 	va_list args;
@@ -4983,7 +4983,7 @@
 #if (SBPCD_ISSUE-1)
 static
 #endif
-void sbpcd_setup(char *s, int *p)
+void sbpcd_setup(const char *s, int *p)
 {
 	setup_done++;
 	msg(DBG_INI,"sbpcd_setup called with %04X,%s\n",p[1], s);
diff -u --recursive --new-file v1.3.14/linux/drivers/char/atixlmouse.c linux/drivers/char/atixlmouse.c
--- v1.3.14/linux/drivers/char/atixlmouse.c	Tue Jun 27 14:11:33 1995
+++ linux/drivers/char/atixlmouse.c	Tue Aug  1 10:02:32 1995
@@ -113,7 +113,7 @@
 }
 
 
-static int write_mouse(struct inode * inode, struct file * file, char * buffer, int count)
+static int write_mouse(struct inode * inode, struct file * file, const char * buffer, int count)
 {
 	return -EINVAL;
 }
diff -u --recursive --new-file v1.3.14/linux/drivers/char/busmouse.c linux/drivers/char/busmouse.c
--- v1.3.14/linux/drivers/char/busmouse.c	Tue Jun 27 14:11:33 1995
+++ linux/drivers/char/busmouse.c	Tue Aug  1 10:02:32 1995
@@ -124,7 +124,7 @@
  * writes are disallowed
  */
 
-static int write_mouse(struct inode * inode, struct file * file, char * buffer, int count)
+static int write_mouse(struct inode * inode, struct file * file, const char * buffer, int count)
 {
 	return -EINVAL;
 }
diff -u --recursive --new-file v1.3.14/linux/drivers/char/console.c linux/drivers/char/console.c
--- v1.3.14/linux/drivers/char/console.c	Fri Jun 30 16:22:26 1995
+++ linux/drivers/char/console.c	Tue Aug  1 10:02:32 1995
@@ -1006,7 +1006,7 @@
 	update_attr(currcons);
 }
 
-static void respond_string(char * p, struct tty_struct * tty)
+static void respond_string(const char * p, struct tty_struct * tty)
 {
 	while (*p) {
 		tty_insert_flip_char(tty, *p, 0);
@@ -1409,7 +1409,7 @@
 }
 
 static int con_write(struct tty_struct * tty, int from_user,
-		     unsigned char *buf, int count)
+		     const unsigned char *buf, int count)
 {
 	int c, tc, ok, n = 0;
 	unsigned int currcons;
@@ -1991,7 +1991,7 @@
  */
 long con_init(long kmem_start)
 {
-	char *display_desc = "????";
+	const char *display_desc = "????";
 	int currcons = 0;
 	int orig_x = ORIG_X;
 	int orig_y = ORIG_Y;
diff -u --recursive --new-file v1.3.14/linux/drivers/char/cyclades.c linux/drivers/char/cyclades.c
--- v1.3.14/linux/drivers/char/cyclades.c	Tue Jun 27 14:11:34 1995
+++ linux/drivers/char/cyclades.c	Tue Aug  1 10:02:32 1995
@@ -1561,7 +1561,7 @@
  */
 static int
 cy_write(struct tty_struct * tty, int from_user,
-           unsigned char *buf, int count)
+          const unsigned char *buf, int count)
 {
   struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
   unsigned long flags;
diff -u --recursive --new-file v1.3.14/linux/drivers/char/keyboard.c linux/drivers/char/keyboard.c
--- v1.3.14/linux/drivers/char/keyboard.c	Sat Jun 10 19:13:12 1995
+++ linux/drivers/char/keyboard.c	Tue Aug  1 10:02:33 1995
@@ -856,8 +856,8 @@
 
 static void do_pad(unsigned char value, char up_flag)
 {
-	static char *pad_chars = "0123456789+-*/\015,.?";
-	static char *app_map = "pqrstuvwxylSRQMnn?";
+	static const char *pad_chars = "0123456789+-*/\015,.?";
+	static const char *app_map = "pqrstuvwxylSRQMnn?";
 
 	if (up_flag)
 		return;		/* no action, if this is a key release */
@@ -913,7 +913,7 @@
 
 static void do_cur(unsigned char value, char up_flag)
 {
-	static char *cur_chars = "BDCA";
+	static const char *cur_chars = "BDCA";
 	if (up_flag)
 		return;
 
diff -u --recursive --new-file v1.3.14/linux/drivers/char/lp.c linux/drivers/char/lp.c
--- v1.3.14/linux/drivers/char/lp.c	Mon Jul 31 15:59:01 1995
+++ linux/drivers/char/lp.c	Tue Aug  1 10:02:33 1995
@@ -157,7 +157,7 @@
 	wake_up(&lp->lp_wait_q);
 }
 
-static int lp_write_interrupt(struct inode * inode, struct file * file, char * buf, int count)
+static int lp_write_interrupt(struct inode * inode, struct file * file, const char * buf, int count)
 {
 	unsigned int minor = MINOR(inode->i_rdev);
 	unsigned long copy_size;
@@ -223,11 +223,12 @@
 }
 
 static int lp_write_polled(struct inode * inode, struct file * file,
-			   char * buf, int count)
+			   const char * buf, int count)
 {
 	int  retval;
 	unsigned int minor = MINOR(inode->i_rdev);
-	char c, *temp = buf;
+	char c;
+	const char *temp = buf;
 
 #ifdef LP_DEBUG
 	if (jiffies-lp_last_call > LP_TIME(minor)) {
@@ -296,7 +297,7 @@
 	return temp-buf;
 }
 
-static int lp_write(struct inode * inode, struct file * file, char * buf, int count)
+static int lp_write(struct inode * inode, struct file * file, const char * buf, int count)
 {
 	if (LP_IRQ(MINOR(inode->i_rdev)))
 		return lp_write_interrupt(inode, file, buf, count);
diff -u --recursive --new-file v1.3.14/linux/drivers/char/mem.c linux/drivers/char/mem.c
--- v1.3.14/linux/drivers/char/mem.c	Tue Jun 27 14:11:34 1995
+++ linux/drivers/char/mem.c	Tue Aug  1 10:02:33 1995
@@ -30,7 +30,7 @@
 	return -EIO;
 }
 
-static int write_ram(struct inode * inode, struct file * file,char * buf, int count)
+static int write_ram(struct inode * inode, struct file * file, const char * buf, int count)
 {
 	return -EIO;
 }
@@ -60,7 +60,7 @@
 	return read;
 }
 
-static int write_mem(struct inode * inode, struct file * file,char * buf, int count)
+static int write_mem(struct inode * inode, struct file * file,const char * buf, int count)
 {
 	unsigned long p = file->f_pos;
 	int written;
@@ -134,10 +134,10 @@
 	return tmp-buf;
 }
 
-static int write_port(struct inode * inode,struct file * file,char * buf, int count)
+static int write_port(struct inode * inode,struct file * file,const char * buf, int count)
 {
 	unsigned int i = file->f_pos;
-	char * tmp = buf;
+	const char * tmp = buf;
 
 	while (count-- > 0 && i < 65536) {
 		outb(get_user(tmp),i);
@@ -153,7 +153,7 @@
 	return 0;
 }
 
-static int write_null(struct inode * inode,struct file * file,char * buf, int count)
+static int write_null(struct inode * inode,struct file * file, const char * buf, int count)
 {
 	return count;
 }
@@ -183,7 +183,7 @@
 	return count;
 }
 
-static int write_full(struct inode * inode,struct file * file,char * buf, int count)
+static int write_full(struct inode * inode,struct file * file, const char * buf, int count)
 {
 	return -ENOSPC;
 }
diff -u --recursive --new-file v1.3.14/linux/drivers/char/msbusmouse.c linux/drivers/char/msbusmouse.c
--- v1.3.14/linux/drivers/char/msbusmouse.c	Tue Jun 27 14:11:34 1995
+++ linux/drivers/char/msbusmouse.c	Tue Aug  1 10:02:33 1995
@@ -96,7 +96,7 @@
 }
 
 
-static int write_mouse(struct inode * inode, struct file * file, char * buffer, int count)
+static int write_mouse(struct inode * inode, struct file * file, const char * buffer, int count)
 {
 	return -EINVAL;
 }
diff -u --recursive --new-file v1.3.14/linux/drivers/char/n_tty.c linux/drivers/char/n_tty.c
--- v1.3.14/linux/drivers/char/n_tty.c	Tue Jun 27 14:11:34 1995
+++ linux/drivers/char/n_tty.c	Tue Aug  1 10:02:33 1995
@@ -525,10 +525,10 @@
 	put_tty_queue(c, tty);
 }	
 
-static void n_tty_receive_buf(struct tty_struct *tty, unsigned char *cp,
+static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
 			      char *fp, int count)
 {
-	unsigned char *p;
+	const unsigned char *p;
 	char *f, flags = 0;
 	int	i;
 
@@ -912,11 +912,11 @@
 }
 
 static int write_chan(struct tty_struct * tty, struct file * file,
-		      unsigned char * buf, unsigned int nr)
+		      const unsigned char * buf, unsigned int nr)
 {
 	struct wait_queue wait = { current, NULL };
 	int c;
-	unsigned char *b = buf;
+	const unsigned char *b = buf;
 	int retval = 0;
 
 	/* Job control check -- must be done at start (POSIX.1 7.1.1.4). */
diff -u --recursive --new-file v1.3.14/linux/drivers/char/psaux.c linux/drivers/char/psaux.c
--- v1.3.14/linux/drivers/char/psaux.c	Mon Jul 31 15:59:01 1995
+++ linux/drivers/char/psaux.c	Tue Aug  1 10:02:33 1995
@@ -372,7 +372,7 @@
  * Write to the aux device.
  */
 
-static int write_aux(struct inode * inode, struct file * file, char * buffer, int count)
+static int write_aux(struct inode * inode, struct file * file, const char * buffer, int count)
 {
 	int i = count;
 
@@ -394,7 +394,7 @@
  * Write to the 82C710 mouse device.
  */
 
-static int write_qp(struct inode * inode, struct file * file, char * buffer, int count)
+static int write_qp(struct inode * inode, struct file * file, const char * buffer, int count)
 {
 	int i = count;
 
diff -u --recursive --new-file v1.3.14/linux/drivers/char/pty.c linux/drivers/char/pty.c
--- v1.3.14/linux/drivers/char/pty.c	Mon Apr 10 09:01:15 1995
+++ linux/drivers/char/pty.c	Tue Aug  1 10:02:33 1995
@@ -110,7 +110,7 @@
 }
 
 static int pty_write(struct tty_struct * tty, int from_user,
-		       unsigned char *buf, int count)
+		       const unsigned char *buf, int count)
 {
 	struct tty_struct *to = tty->link;
 	int	c=0, n, r;
diff -u --recursive --new-file v1.3.14/linux/drivers/char/scc.c linux/drivers/char/scc.c
--- v1.3.14/linux/drivers/char/scc.c	Tue Jul 18 16:28:57 1995
+++ linux/drivers/char/scc.c	Tue Aug  1 10:02:33 1995
@@ -98,7 +98,7 @@
 
 int scc_open(struct tty_struct *tty, struct file *filp);
 static void scc_close(struct tty_struct *tty, struct file *filp);
-int scc_write(struct tty_struct *tty, int from_user, unsigned char *buf, int count);
+int scc_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count);
 static void scc_put_char(struct tty_struct *tty, unsigned char ch);
 static void scc_flush_chars(struct tty_struct *tty);
 static int scc_write_room(struct tty_struct *tty);
@@ -1988,7 +1988,7 @@
 /* ----> tx routine: decode KISS data and scc_enqueue it <---- */
 
 /* send raw frame to SCC. used for AX.25 */
-int scc_write(struct tty_struct *tty, int from_user, unsigned char *buf, int count)
+int scc_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count)
 {
 	unsigned long flags;
 	static unsigned char *p;
diff -u --recursive --new-file v1.3.14/linux/drivers/char/serial.c linux/drivers/char/serial.c
--- v1.3.14/linux/drivers/char/serial.c	Tue Jun 27 14:11:35 1995
+++ linux/drivers/char/serial.c	Tue Aug  1 10:02:33 1995
@@ -1293,7 +1293,7 @@
 }
 
 static int rs_write(struct tty_struct * tty, int from_user,
-		    unsigned char *buf, int count)
+		    const unsigned char *buf, int count)
 {
 	int	c, total = 0;
 	struct async_struct *info = (struct async_struct *)tty->driver_data;
diff -u --recursive --new-file v1.3.14/linux/drivers/char/tpqic02.c linux/drivers/char/tpqic02.c
--- v1.3.14/linux/drivers/char/tpqic02.c	Mon Jan 23 23:04:09 1995
+++ linux/drivers/char/tpqic02.c	Tue Aug  1 10:02:34 1995
@@ -339,7 +339,7 @@
 
 
 /* This translates minor numbers to the corresponding recording format: */
-static char *format_names[] = {
+static const char *format_names[] = {
 	"not set",	/* for dumb drives unable to handle format selection */
 	"11",		/* extinct */
 	"24",
@@ -371,7 +371,7 @@
  */
 static struct exception_list_type {
 	unsigned short mask, code;
-	char *msg;
+	const char *msg;
 	/* EXC_nr attribute should match with tpqic02.h */
 } exception_list[] = {
 	{0, 0,
@@ -424,7 +424,7 @@
 
 
 
-static void tpqputs(unsigned long flags, char *s)
+static void tpqputs(unsigned long flags, const char *s)
 {
 	if ((flags & TPQD_ALWAYS) || (flags & QIC02_TAPE_DEBUG))
 		printk(TPQIC02_NAME ": %s\n", s);
@@ -2090,7 +2090,7 @@
  * tape device again. The driver will detect an exception status in (No Cartridge)
  * and force a rewind. After that tar may continue writing.
  */
-static int qic02_tape_write(struct inode * inode, struct file * filp, char * buf, int count)
+static int qic02_tape_write(struct inode * inode, struct file * filp, const char * buf, int count)
 {
 	int error;
 	dev_t dev = inode->i_rdev;
@@ -2163,7 +2163,7 @@
 
 		/* copy from user to DMA buffer and initiate transfer. */
 		if (bytes_todo>0) {
-			memcpy_fromfs( (void *) buffaddr, (void *) buf, bytes_todo);
+			memcpy_fromfs( (void *) buffaddr, (const void *) buf, bytes_todo);
 
 /****************** similar problem with read() at FM could happen here at EOT.
  ******************/
@@ -2427,14 +2427,6 @@
 } /* qic02_tape_open */
 
 
-
-static int qic02_tape_readdir(struct inode * inode, struct file * filp, struct dirent * dp, int count)
-{
-	return -ENOTDIR;	/* not supported */
-} /* qic02_tape_readdir */
-
-
-
 static void qic02_tape_release(struct inode * inode, struct file * filp)
 {
 	dev_t dev = inode->i_rdev;
@@ -2791,7 +2783,7 @@
 	qic02_tape_lseek,		/* not allowed */
 	qic02_tape_read,		/* read */
 	qic02_tape_write,		/* write */
-	qic02_tape_readdir,		/* not allowed */
+	NULL,				/* readdir not allowed */
 	NULL,				/* select ??? */
 	qic02_tape_ioctl,		/* ioctl */
 	NULL,				/* mmap not allowed */
diff -u --recursive --new-file v1.3.14/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
--- v1.3.14/linux/drivers/char/tty_io.c	Tue Jun 27 14:11:35 1995
+++ linux/drivers/char/tty_io.c	Tue Aug  1 10:02:35 1995
@@ -94,7 +94,7 @@
 static void initialize_tty_struct(struct tty_struct *tty);
 
 static int tty_read(struct inode *, struct file *, char *, int);
-static int tty_write(struct inode *, struct file *, char *, int);
+static int tty_write(struct inode *, struct file *, const char *, int);
 static int tty_select(struct inode *, struct file *, int, select_table *);
 static int tty_open(struct inode *, struct file *);
 static void tty_release(struct inode *, struct file *);
@@ -292,7 +292,7 @@
 	return 0;
 }
 
-static int hung_up_tty_write(struct inode * inode, struct file * file, char * buf, int count)
+static int hung_up_tty_write(struct inode * inode, struct file * file, const char * buf, int count)
 {
 	return -EIO;
 }
@@ -720,7 +720,7 @@
 	return i;
 }
 
-static int tty_write(struct inode * inode, struct file * file, char * buf, int count)
+static int tty_write(struct inode * inode, struct file * file, const char * buf, int count)
 {
 	int i, is_console;
 	struct tty_struct * tty;
@@ -748,7 +748,7 @@
 #endif
 	if (tty->ldisc.write)
 		/* XXX casts are for what kernel-wide prototypes should be. */
-		i = (tty->ldisc.write)(tty,file,(unsigned char *)buf,(unsigned int)count);
+		i = (tty->ldisc.write)(tty,file,(const unsigned char *)buf,(unsigned int)count);
 	else
 		i = -EIO;
 	if (i > 0)
@@ -1681,7 +1681,7 @@
 	int	retval;
 	struct tty_driver *p;
 	int	found = 0;
-	char *othername = NULL;
+	const char *othername = NULL;
 	
 	if (*driver->refcount)
 		return -EBUSY;
diff -u --recursive --new-file v1.3.14/linux/drivers/char/vc_screen.c linux/drivers/char/vc_screen.c
--- v1.3.14/linux/drivers/char/vc_screen.c	Tue Jun 27 14:11:35 1995
+++ linux/drivers/char/vc_screen.c	Tue Aug  1 10:02:35 1995
@@ -118,12 +118,12 @@
 }
 
 static int
-vcs_write(struct inode *inode, struct file *file, char *buf, int count)
+vcs_write(struct inode *inode, struct file *file, const char *buf, int count)
 {
 	unsigned long p = file->f_pos;
 	unsigned int cons = MINOR(inode->i_rdev);
 	int viewed, attr, size, written;
-	char *buf0;
+	const char *buf0;
 	unsigned short *org;
 
 	attr = (cons & 128);
@@ -169,7 +169,7 @@
 			org++;
 		}
 		while (count > 1) {
-			scr_writew(get_user((unsigned short *) buf), org++);
+			scr_writew(get_user((const unsigned short *) buf), org++);
 			buf += 2;
 			count -= 2;
 		}
diff -u --recursive --new-file v1.3.14/linux/drivers/char/vt.c linux/drivers/char/vt.c
--- v1.3.14/linux/drivers/char/vt.c	Mon Jul 31 15:59:01 1995
+++ linux/drivers/char/vt.c	Tue Aug  1 10:02:35 1995
@@ -424,7 +424,7 @@
 
 		if (!perm)
 			return -EPERM;
-		i = verify_area(VERIFY_READ, (void *)a, sizeof(struct kbentry));
+		i = verify_area(VERIFY_READ, (const void *)a, sizeof(struct kbentry));
 		if (i)
 			return i;
 		if ((i = get_user(&a->kb_index)) >= NR_KEYS)
diff -u --recursive --new-file v1.3.14/linux/drivers/net/3c501.c linux/drivers/net/3c501.c
--- v1.3.14/linux/drivers/net/3c501.c	Fri Jul  7 08:54:46 1995
+++ linux/drivers/net/3c501.c	Tue Aug  1 10:02:35 1995
@@ -75,7 +75,7 @@
     
 */
 
-static char *version =
+static const char *version =
     "3c501.c: 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov).\n";
 
 /*
@@ -223,7 +223,7 @@
 {
     #ifndef MODULE
 
-    char *mname;		/* Vendor name */
+    const char *mname;		/* Vendor name */
     unsigned char station_addr[6];
     int autoirq = 0;
     int i;
diff -u --recursive --new-file v1.3.14/linux/drivers/net/3c503.c linux/drivers/net/3c503.c
--- v1.3.14/linux/drivers/net/3c503.c	Fri Apr 28 16:56:52 1995
+++ linux/drivers/net/3c503.c	Tue Aug  1 10:02:35 1995
@@ -22,7 +22,7 @@
     The Crynwr 3c503 packet driver.
 */
 
-static char *version =
+static const char *version =
     "3c503.c:v1.10 9/23/93  Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
 #include <linux/kernel.h>
diff -u --recursive --new-file v1.3.14/linux/drivers/net/3c505.c linux/drivers/net/3c505.c
--- v1.3.14/linux/drivers/net/3c505.c	Fri Jul  7 08:54:46 1995
+++ linux/drivers/net/3c505.c	Tue Aug  1 10:02:35 1995
@@ -57,30 +57,30 @@
  *
  *********************************************************/
 
-static char * filename = __FILE__;
+static const char * filename = __FILE__;
 
-static char * null_msg = "*** NULL at %s:%s (line %d) ***\n";
+static const char * null_msg = "*** NULL at %s:%s (line %d) ***\n";
 #define CHECK_NULL(p) \
 	if (!p) printk(null_msg, filename,__FUNCTION__,__LINE__)
 
-static char * timeout_msg = "*** timeout at %s:%s (line %d) ***\n";
+static const char * timeout_msg = "*** timeout at %s:%s (line %d) ***\n";
 #define TIMEOUT_MSG(lineno) \
 	printk(timeout_msg, filename,__FUNCTION__,(lineno))
 
-static char * invalid_pcb_msg =
+static const char * invalid_pcb_msg =
 	"*** invalid pcb length %d at %s:%s (line %d) ***\n";
 #define INVALID_PCB_MSG(len) \
 	printk(invalid_pcb_msg, (len),filename,__FUNCTION__,__LINE__)
 
-static char * search_msg = "%s: Looking for 3c505 adapter at address %#x...";
+static const char * search_msg = "%s: Looking for 3c505 adapter at address %#x...";
 
-static char * stilllooking_msg = "still looking...";
+static const char * stilllooking_msg = "still looking...";
 
-static char * found_msg = "found.\n";
+static const char * found_msg = "found.\n";
 
-static char * notfound_msg = "not found (reason = %d)\n";
+static const char * notfound_msg = "not found (reason = %d)\n";
 
-static char * couldnot_msg = "%s: 3c505 not found\n";
+static const char * couldnot_msg = "%s: 3c505 not found\n";
 
 /*********************************************************
  *
@@ -1261,7 +1261,7 @@
 {
 	int timeout;
 	int addr=dev->base_addr;
-	char *name=dev->name;
+	const char *name=dev->name;
 
 	byte orig_HCR=inb_control(addr),
 		orig_HSR=inb_status(addr);
diff -u --recursive --new-file v1.3.14/linux/drivers/net/3c507.c linux/drivers/net/3c507.c
--- v1.3.14/linux/drivers/net/3c507.c	Fri Jul  7 08:54:46 1995
+++ linux/drivers/net/3c507.c	Tue Aug  1 10:02:35 1995
@@ -23,7 +23,7 @@
 	The statistics need to be updated correctly.
 */
 
-static char *version =
+static const char *version =
 	"3c507.c:v1.10 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
 #include <linux/config.h>
diff -u --recursive --new-file v1.3.14/linux/drivers/net/3c509.c linux/drivers/net/3c509.c
--- v1.3.14/linux/drivers/net/3c509.c	Fri Jul  7 08:54:46 1995
+++ linux/drivers/net/3c509.c	Tue Aug  1 10:02:35 1995
@@ -24,7 +24,7 @@
 	practice this rarely happens.
 */
 
-static char *version = "3c509.c:1.03 10/8/94 becker@cesdis.gsfc.nasa.gov\n";
+static const  char *version = "3c509.c:1.03 10/8/94 becker@cesdis.gsfc.nasa.gov\n";
 
 #include <linux/config.h>
 #ifdef MODULE
@@ -227,7 +227,7 @@
 	request_region(dev->base_addr, 16,"3c509");
 
 	{
-		char *if_names[] = {"10baseT", "AUI", "undefined", "BNC"};
+		const char *if_names[] = {"10baseT", "AUI", "undefined", "BNC"};
 		printk("%s: 3c509 at %#3.3lx tag %d, %s port, address ",
 			   dev->name, dev->base_addr, current_tag, if_names[dev->if_port]);
 	}
diff -u --recursive --new-file v1.3.14/linux/drivers/net/8390.c linux/drivers/net/8390.c
--- v1.3.14/linux/drivers/net/8390.c	Fri Jul  7 08:54:46 1995
+++ linux/drivers/net/8390.c	Tue Aug  1 10:02:35 1995
@@ -22,7 +22,7 @@
 
   */
 
-static char *version =
+static const char *version =
     "8390.c:v1.10 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
 /*
diff -u --recursive --new-file v1.3.14/linux/drivers/net/8390.h linux/drivers/net/8390.h
--- v1.3.14/linux/drivers/net/8390.h	Tue Jun 20 09:10:32 1995
+++ linux/drivers/net/8390.h	Tue Aug  1 10:02:35 1995
@@ -37,7 +37,7 @@
    things in there should be here!) */
 /* You have one of these per-board */
 struct ei_device {
-  char *name;
+  const char *name;
   void (*reset_8390)(struct device *);
   void (*block_output)(struct device *, int, const unsigned char *, int);
   int  (*block_input)(struct device *, int, char *, int);
diff -u --recursive --new-file v1.3.14/linux/drivers/net/ac3200.c linux/drivers/net/ac3200.c
--- v1.3.14/linux/drivers/net/ac3200.c	Thu Jan  5 13:55:40 1995
+++ linux/drivers/net/ac3200.c	Tue Aug  1 10:02:35 1995
@@ -14,7 +14,7 @@
 	by glee@ardnassak.math.clemson.edu.
   */
 
-static char *version =
+static const char *version =
 	"ac3200.c:v1.01 7/1/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
 #include <linux/kernel.h>
@@ -44,7 +44,7 @@
 static unsigned char config2irqmap[8] = {15, 12, 11, 10, 9, 7, 5, 3};
 static int addrmap[8] =
 {0xFF0000, 0xFE0000, 0xFD0000, 0xFFF0000, 0xFFE0000, 0xFFC0000,  0xD0000, 0 };
-static char *port_name[4] = { "10baseT", "invalid", "AUI", "10base2"};
+static const char *port_name[4] = { "10baseT", "invalid", "AUI", "10base2"};
 
 #define config2irq(configval)	config2irqmap[((configval) >> 3) & 7]
 #define config2mem(configval)	addrmap[(configval) & 7]
diff -u --recursive --new-file v1.3.14/linux/drivers/net/apricot.c linux/drivers/net/apricot.c
--- v1.3.14/linux/drivers/net/apricot.c	Fri Jun 30 16:22:26 1995
+++ linux/drivers/net/apricot.c	Tue Aug  1 10:02:35 1995
@@ -19,7 +19,7 @@
 
 */
 
-static char *version = "apricot.c:v0.2 05/12/94\n";
+static const char *version = "apricot.c:v0.2 05/12/94\n";
 
 #ifdef MODULE
 #include <linux/module.h>
diff -u --recursive --new-file v1.3.14/linux/drivers/net/arcnet.c linux/drivers/net/arcnet.c
--- v1.3.14/linux/drivers/net/arcnet.c	Thu Jul 13 16:20:20 1995
+++ linux/drivers/net/arcnet.c	Tue Aug  1 10:02:36 1995
@@ -119,7 +119,7 @@
 	 	<jojo@repas.de>
 */
 
-static char *version =
+static const char *version =
  "arcnet.c:v1.92 ALPHA 95/07/11 Avery Pennarun <apenwarr@foxnet.net>\n";
  
 /**************************************************************************/
diff -u --recursive --new-file v1.3.14/linux/drivers/net/at1700.c linux/drivers/net/at1700.c
--- v1.3.14/linux/drivers/net/at1700.c	Fri Jul  7 08:54:47 1995
+++ linux/drivers/net/at1700.c	Tue Aug  1 10:02:36 1995
@@ -28,7 +28,7 @@
 	response to inb()s from other device probes!
 */
 
-static char *version =
+static const char *version =
 	"at1700.c:v1.12 1/18/95  Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
 #include <linux/config.h>
@@ -228,7 +228,7 @@
 	   0x1800 == use coax interface
 	   */
 	{
-		char *porttype[] = {"auto-sense", "10baseT", "auto-sense", "10base2"};
+		const char *porttype[] = {"auto-sense", "10baseT", "auto-sense", "10base2"};
 		ushort setup_value = read_eeprom(ioaddr, 12);
 
 		dev->if_port = setup_value >> 8;
diff -u --recursive --new-file v1.3.14/linux/drivers/net/atp.c linux/drivers/net/atp.c
--- v1.3.14/linux/drivers/net/atp.c	Mon Jul 31 15:59:01 1995
+++ linux/drivers/net/atp.c	Tue Aug  1 10:02:36 1995
@@ -18,7 +18,7 @@
 	The timer-based reset code was written by Bill Carlson, wwc@super.org.
 */
 
-static char *version =
+static const char *version =
 	"atp.c:v1.01 1/18/95 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
 /*
diff -u --recursive --new-file v1.3.14/linux/drivers/net/de4x5.c linux/drivers/net/de4x5.c
--- v1.3.14/linux/drivers/net/de4x5.c	Tue Jul 25 18:21:21 1995
+++ linux/drivers/net/de4x5.c	Tue Aug  1 10:02:36 1995
@@ -141,7 +141,7 @@
     =========================================================================
 */
 
-static char *version = "de4x5.c:v0.32 6/26/95 davies@wanton.lkg.dec.com\n";
+static const char *version = "de4x5.c:v0.32 6/26/95 davies@wanton.lkg.dec.com\n";
 
 #include <linux/config.h>
 #ifdef MODULE
@@ -2163,7 +2163,7 @@
 static int EISA_signature(char *name, s32 eisa_id)
 {
   u_int i;
-  char *signatures[] = DE4X5_SIGNATURE;
+  const char *signatures[] = DE4X5_SIGNATURE;
   char ManCode[DE4X5_STRLEN];
   union {
     s32 ID;
diff -u --recursive --new-file v1.3.14/linux/drivers/net/de600.c linux/drivers/net/de600.c
--- v1.3.14/linux/drivers/net/de600.c	Fri Jul  7 08:54:47 1995
+++ linux/drivers/net/de600.c	Tue Aug  1 10:02:36 1995
@@ -1,4 +1,4 @@
-static char *version =
+static const char *version =
 	"de600.c: $Revision: 1.40 $,  Bjorn Ekwall (bj0rn@blox.se)\n";
 /*
  *	de600.c
diff -u --recursive --new-file v1.3.14/linux/drivers/net/de620.c linux/drivers/net/de620.c
--- v1.3.14/linux/drivers/net/de620.c	Fri Jul  7 08:54:47 1995
+++ linux/drivers/net/de620.c	Tue Aug  1 10:02:36 1995
@@ -38,7 +38,7 @@
  *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  *
  *****************************************************************************/
-static char *version =
+static const char *version =
 	"de620.c: $Revision: 1.31 $,  Bjorn Ekwall <bj0rn@blox.se>\n";
 
 /***********************************************************************
diff -u --recursive --new-file v1.3.14/linux/drivers/net/depca.c linux/drivers/net/depca.c
--- v1.3.14/linux/drivers/net/depca.c	Tue Jul 25 18:21:21 1995
+++ linux/drivers/net/depca.c	Tue Aug  1 10:02:36 1995
@@ -186,7 +186,7 @@
     =========================================================================
 */
 
-static char *version = "depca.c:v0.41 5/26/95 davies@wanton.lkg.dec.com\n";
+static const char *version = "depca.c:v0.41 5/26/95 davies@wanton.lkg.dec.com\n";
 
 #include <linux/config.h>
 #ifdef MODULE
@@ -1438,7 +1438,7 @@
 static void DepcaSignature(char *name, u_long paddr)
 {
   u_int i,j,k;
-  char *signatures[] = DEPCA_SIGNATURE;
+  const char *signatures[] = DEPCA_SIGNATURE;
   char tmpstr[16];
 
   for (i=0;i<16;i++) {                  /* copy the first 16 bytes of ROM to */
@@ -1622,7 +1622,7 @@
 static int EISA_signature(char *name, s32 eisa_id)
 {
   u_int i;
-  char *signatures[] = DEPCA_SIGNATURE;
+  const char *signatures[] = DEPCA_SIGNATURE;
   char ManCode[DEPCA_STRLEN];
   union {
     s32 ID;
diff -u --recursive --new-file v1.3.14/linux/drivers/net/e2100.c linux/drivers/net/e2100.c
--- v1.3.14/linux/drivers/net/e2100.c	Mon Jan  9 07:56:29 1995
+++ linux/drivers/net/e2100.c	Tue Aug  1 10:02:36 1995
@@ -31,7 +31,7 @@
 	If this happens, you must power down the machine for about 30 seconds.
 */
 
-static char *version =
+static const char *version =
 	"e2100.c:v1.01 7/21/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
 #include <linux/kernel.h>
diff -u --recursive --new-file v1.3.14/linux/drivers/net/eepro.c linux/drivers/net/eepro.c
--- v1.3.14/linux/drivers/net/eepro.c	Fri Jul  7 08:54:47 1995
+++ linux/drivers/net/eepro.c	Tue Aug  1 10:02:36 1995
@@ -51,7 +51,7 @@
 
 */
 
-static char *version =
+static const char *version =
 	"eepro.c: v0.07a 6/5/95 Bao C. Ha (bao@saigon.async.com)\n";
 
 /* Always include 'config.h' first in case the user wants to turn on
@@ -313,7 +313,7 @@
 	int i;
 	int eepro;	/* a flag, TRUE=1 for the EtherExpress Pro/10,
 			   FALSE = 0 for other 82595-based lan cards. */
-	char *ifmap[] = {"AUI", "10Base2", "10BaseT"};
+	const char *ifmap[] = {"AUI", "10Base2", "10BaseT"};
 	enum iftype { AUI=0, BNC=1, TPE=2 };
 
 	/* Now, we are going to check for the signature of the
diff -u --recursive --new-file v1.3.14/linux/drivers/net/eexpress.c linux/drivers/net/eexpress.c
--- v1.3.14/linux/drivers/net/eexpress.c	Fri Jul  7 08:54:47 1995
+++ linux/drivers/net/eexpress.c	Tue Aug  1 10:02:36 1995
@@ -22,7 +22,7 @@
         Changed to support io= irq= by Alan Cox <Alan.Cox@linux.org>
 */
 
-static char *version =
+static const char *version =
 	"eexpress.c:v0.07 1/19/94 Donald Becker (becker@super.org)\n";
 
 #include <linux/config.h>
@@ -375,7 +375,7 @@
 	   interface to minimize bogus bug reports. */
 	{
 		char irqmap[] = {0, 9, 3, 4, 5, 10, 11, 0};
-		char *ifmap[] = {"AUI", "BNC", "10baseT"};
+		const char *ifmap[] = {"AUI", "BNC", "10baseT"};
 		enum iftype {AUI=0, BNC=1, TP=2};
 		unsigned short setupval = read_eeprom(ioaddr, 0);
 
diff -u --recursive --new-file v1.3.14/linux/drivers/net/eql.c linux/drivers/net/eql.c
--- v1.3.14/linux/drivers/net/eql.c	Mon Jul 31 15:59:01 1995
+++ linux/drivers/net/eql.c	Tue Aug  1 10:02:36 1995
@@ -16,7 +16,7 @@
  *    Phone: 1-703-847-0040 ext 103
  */
 
-static char *version = 
+static const char *version = 
 	"Equalizer: $Revision: 3.12 $ $Date: 1995/01/19 $ Simon Janes (simon@ncm.com)\n";
 
 #include <linux/config.h>
diff -u --recursive --new-file v1.3.14/linux/drivers/net/ewrk3.c linux/drivers/net/ewrk3.c
--- v1.3.14/linux/drivers/net/ewrk3.c	Fri Jul  7 08:54:47 1995
+++ linux/drivers/net/ewrk3.c	Tue Aug  1 10:02:37 1995
@@ -126,7 +126,7 @@
     =========================================================================
 */
 
-static char *version = "ewrk3.c:v0.32 1/16/95 davies@wanton.lkg.dec.com\n";
+static const char *version = "ewrk3.c:v0.32 1/16/95 davies@wanton.lkg.dec.com\n";
 
 #ifdef MODULE
 #include <linux/module.h>
diff -u --recursive --new-file v1.3.14/linux/drivers/net/hp-plus.c linux/drivers/net/hp-plus.c
--- v1.3.14/linux/drivers/net/hp-plus.c	Mon Jan  9 07:56:29 1995
+++ linux/drivers/net/hp-plus.c	Tue Aug  1 10:02:37 1995
@@ -18,7 +18,7 @@
 	programming information.
 */
 
-static char *version =
+static const char *version =
 "hp-plus.c:v1.10 9/24/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
 #include <linux/string.h>		/* Important -- this inlines word moves. */
@@ -144,7 +144,7 @@
 {
 	int i;
 	unsigned char checksum = 0;
-	char *name = "HP-PC-LAN+";
+	const char *name = "HP-PC-LAN+";
 	int mem_start;
 
 	/* Check for the HP+ signature, 50 48 0x 53. */
diff -u --recursive --new-file v1.3.14/linux/drivers/net/hp.c linux/drivers/net/hp.c
--- v1.3.14/linux/drivers/net/hp.c	Mon Jan  9 07:56:28 1995
+++ linux/drivers/net/hp.c	Tue Aug  1 10:02:37 1995
@@ -18,7 +18,7 @@
 	  The Crynwr packet driver.
 */
 
-static char *version =
+static const char *version =
 	"hp.c:v1.10 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
 #include <linux/kernel.h>
@@ -100,7 +100,7 @@
 int hp_probe1(struct device *dev, int ioaddr)
 {
 	int i, board_id, wordmode;
-	char *name;
+	const char *name;
 
 	/* Check for the HP physical address, 08 00 09 xx xx xx. */
 	/* This really isn't good enough: we may pick up HP LANCE boards
diff -u --recursive --new-file v1.3.14/linux/drivers/net/hp100.c linux/drivers/net/hp100.c
--- v1.3.14/linux/drivers/net/hp100.c	Tue Jul 18 16:28:57 1995
+++ linux/drivers/net/hp100.c	Wed Aug  2 09:43:02 1995
@@ -10,6 +10,7 @@
  *	HP 27248B	10 only EISA card with Cascade chip
  *	HP J2577	10/100 EISA card with Cascade chip
  *	HP J2573	10/100 ISA card with Cascade chip
+ *	HP J2585	10/100 PCI card
  *
  * Other ATT2MD01 Chip based boards might be supported in the future
  * (there are some minor changes needed).
@@ -53,7 +54,8 @@
  * TO DO:
  * ======
  *       - ioctl handling - some runtime setup things
- *       - PCI card support
+ *       - high priority communications support
+ *       - memory mapped access support for PCI cards
  *
  * Revision history:
  * =================
@@ -66,6 +68,8 @@
  *			    Little bug in hp100_close function fixed.
  *                          100Mb/s connection debugged.
  *      0.12    14-Jul-95   Link down is now handled better.
+ *      0.20    01-Aug-95   Added PCI support for HP J2585A card.
+ *                          Statistics bug fixed.
  *
  */
 
@@ -81,6 +85,8 @@
 #include <linux/ioport.h>
 #include <linux/malloc.h>
 #include <linux/interrupt.h>
+#include <linux/pci.h>
+#include <linux/bios32.h>
 #include <asm/bitops.h>
 #include <asm/io.h>
 
@@ -96,6 +102,12 @@
  *  defines
  */
 
+#define HP100_BUS_ISA		0
+#define HP100_BUS_EISA		1
+#define HP100_BUS_PCI		2
+
+#define HP100_REGION_SIZE	0x20
+
 #define HP100_MAX_PACKET_SIZE	(1536+4)
 #define HP100_MIN_PACKET_SIZE	60
 
@@ -110,7 +122,8 @@
 
 struct hp100_eisa_id {
   u_int id;
-  char *name;
+  const char *name;
+  u_char bus;
 };
 
 struct hp100_private {
@@ -118,28 +131,39 @@
   u_short soft_model;
   u_int memory_size;
   u_short rx_ratio;
+  short mem_mapped;		    /* memory mapped access */
+  u_char *mem_ptr;		    /* pointer to memory mapped area */
   short lan_type;		    /* 10Mb/s, 100Mb/s or -1 (error) */
-  int hub_status;		    /* login to hub successfull? */
+  int hub_status;		    /* login to hub was successfull? */
   u_char mac1_mode;
   u_char mac2_mode;
   struct enet_statistics stats;
 };
 
-struct hp100_rx_look {
-  struct hp100_rx_header header;
-  char something[ 24 ];		    /* 2 * MAC @6 + protocol @2+8 + pad to 4 byte */
-};
-
 /*
  *  variables
  */
  
 static struct hp100_eisa_id hp100_eisa_ids[] = {
-  { 0x080F1F022, "HP J2577 rev A" }, /* 10/100 EISA card with REVA Cascade chip */
-  { 0x050F1F022, "HP J2573 rev A" }, /* 10/100 ISA card with REVA Cascade chip */
-  { 0x02019F022, "HP 27248B" },	     /* 10 only EISA card with Cascade chip */
-  { 0x04019F022, "HP J2577" },	     /* 10/100 EISA card with Cascade chip */
-  { 0x05019F022, "HP J2573" }	     /* 10/100 ISA card with Cascade chip */
+
+  /* 10/100 EISA card with REVA Cascade chip */
+  { 0x080F1F022, "HP J2577 rev A", HP100_BUS_EISA }, 
+
+  /* 10/100 ISA card with REVA Cascade chip */
+  { 0x050F1F022, "HP J2573 rev A", HP100_BUS_ISA },
+
+  /* 10 only EISA card with Cascade chip */
+  { 0x02019F022, "HP 27248B",      HP100_BUS_EISA }, 
+
+  /* 10/100 EISA card with Cascade chip */
+  { 0x04019F022, "HP J2577",       HP100_BUS_EISA },
+
+  /* 10/100 ISA card with Cascade chip */
+  { 0x05019F022, "HP J2573",       HP100_BUS_ISA },
+
+  /* 10/100 PCI card */
+  /* Note: ID for this card is same as PCI vendor/device numbers. */
+  { 0x01030103c, "HP J2585", 	   HP100_BUS_PCI },
 };
 
 #ifdef MODULE
@@ -150,21 +174,18 @@
  *  prototypes
  */
 
-static int hp100_probe1( struct device *dev, int ioaddr );
+static int hp100_probe1( struct device *dev, int ioaddr, int bus );
 static int hp100_open( struct device *dev );
 static int hp100_close( struct device *dev );
 static int hp100_start_xmit( struct sk_buff *skb, struct device *dev );
 static void hp100_rx( struct device *dev );
 static struct enet_statistics *hp100_get_stats( struct device *dev );
 static void hp100_update_stats( struct device *dev );
+static void hp100_clear_stats( int ioaddr );
 #ifdef HAVE_MULTICAST
 static void hp100_set_multicast_list( struct device *dev, int num_addrs, void *addrs );
 #endif
-#ifndef LINUX_1_1_52
 static void hp100_interrupt( int irq, struct pt_regs *regs );
-#else
-static void hp100_interrupt( int irq );
-#endif
 
 static void hp100_start_interface( struct device *dev );
 static void hp100_stop_interface( struct device *dev );
@@ -181,36 +202,97 @@
 {
   int base_addr = dev ? dev -> base_addr : 0;
   int ioaddr;
-        
+#ifdef CONFIG_PCI
+  int pci_start_index = 0;
+#endif
+
   if ( base_addr > 0xff )	/* Check a single specified location. */
-    return hp100_probe1(dev, base_addr);
+    {
+      if ( check_region( base_addr, HP100_REGION_SIZE ) ) return -EINVAL;
+      if ( base_addr < 0x400 )
+        return hp100_probe1( dev, base_addr, HP100_BUS_ISA );
+       else
+        return hp100_probe1( dev, base_addr, HP100_BUS_EISA );
+    }
    else 
+#ifdef CONFIG_PCI
+  if ( base_addr > 0 && base_addr < 8 + 1 )
+    pci_start_index = 0x100 | ( base_addr - 1 );
+   else
+#endif
     if ( base_addr != 0 ) return -ENXIO;
+
+  /* at first - scan PCI bus(es) */
+  
+#ifdef CONFIG_PCI
+  if ( pcibios_present() )
+    {
+      int pci_index;
+      
+#ifdef HP100_DEBUG_PCI
+      printk( "hp100: PCI BIOS is present, checking for devices..\n" );
+#endif
+      for ( pci_index = pci_start_index & 7; pci_index < 8; pci_index++ )
+        {
+          u_char pci_bus, pci_device_fn;
+          u_short pci_command;
+          
+          if ( pcibios_find_device( PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2585A,
+          			    pci_index, &pci_bus,
+          			    &pci_device_fn ) != 0 ) break;
+          pcibios_read_config_dword( pci_bus, pci_device_fn,
+              		             PCI_BASE_ADDRESS_0, &ioaddr );
+              				 
+          ioaddr &= ~3;		/* remove I/O space marker in bit 0. */
+              
+          if ( check_region( ioaddr, HP100_REGION_SIZE ) ) continue;
+              
+          pcibios_read_config_word( pci_bus, pci_device_fn,
+              			    PCI_COMMAND, &pci_command );
+          if ( !( pci_command & PCI_COMMAND_MASTER ) )
+            {
+#ifdef HP100_DEBUG_PCI
+              printk( "hp100: PCI Master Bit has not been set. Setting...\n" );
+#endif
+              pci_command |= PCI_COMMAND_MASTER;
+              pcibios_write_config_word( pci_bus, pci_device_fn,
+                  			 PCI_COMMAND, pci_command );
+            }
+#ifdef HP100_DEBUG_PCI
+          printk( "hp100: PCI adapter found at 0x%x\n", ioaddr );
+#endif
+       	  if ( hp100_probe1( dev, ioaddr, HP100_BUS_PCI ) == 0 ) return 0;
+        }
+    }
+  if ( pci_start_index > 0 ) return -ENODEV;
+#endif /* CONFIG_PCI */
          
-  /* at first - probe all EISA possible port regions (if EISA bus present) */
+  /* at second - probe all EISA possible port regions (if EISA bus present) */
   
   for ( ioaddr = 0x1c38; EISA_bus && ioaddr < 0x10000; ioaddr += 0x400 )
     {
-      if ( check_region( ioaddr, 0x20 ) ) continue;
-      if ( hp100_probe1( dev, ioaddr ) == 0 ) return 0;
+      if ( check_region( ioaddr, HP100_REGION_SIZE ) ) continue;
+      if ( hp100_probe1( dev, ioaddr, HP100_BUS_EISA ) == 0 ) return 0;
     }
          
-  /* at second - probe all ISA possible port regions */
+  /* at third - probe all ISA possible port regions */
          
   for ( ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x20 )
     {
-      if ( check_region( ioaddr, 0x20 ) ) continue;
-      if ( hp100_probe1( dev, ioaddr ) == 0 ) return 0;
+      if ( check_region( ioaddr, HP100_REGION_SIZE ) ) continue;
+      if ( hp100_probe1( dev, ioaddr, HP100_BUS_ISA ) == 0 ) return 0;
     }
                                                                             
   return -ENODEV;
 }
 
-static int hp100_probe1( struct device *dev, int ioaddr )
+static int hp100_probe1( struct device *dev, int ioaddr, int bus )
 {
   int i;
-  u_char uc;
+  u_char uc, uc_1;
   u_int eisa_id;
+  short mem_mapped;
+  u_char *mem_ptr;
   struct hp100_private *lp;
   struct hp100_eisa_id *eid;
 
@@ -222,11 +304,12 @@
       return EIO;
     }
 
-  if ( inb( ioaddr + 0 ) != HP100_HW_ID_0 ||
-       inb( ioaddr + 1 ) != HP100_HW_ID_1 ||
-       ( inb( ioaddr + 2 ) & 0xf0 ) != HP100_HW_ID_2_REVA ||
-       inb( ioaddr + 3 ) != HP100_HW_ID_3 ) 
-     return -ENODEV;
+  if ( bus != HP100_BUS_PCI )		/* don't check PCI cards again */
+    if ( inb( ioaddr + 0 ) != HP100_HW_ID_0 ||
+         inb( ioaddr + 1 ) != HP100_HW_ID_1 ||
+         ( inb( ioaddr + 2 ) & 0xf0 ) != HP100_HW_ID_2_REVA ||
+         inb( ioaddr + 3 ) != HP100_HW_ID_3 ) 
+       return -ENODEV;
 
   dev -> base_addr = ioaddr;
 
@@ -238,8 +321,9 @@
   for ( i = uc = eisa_id = 0; i < 4; i++ )
     {
       eisa_id >>= 8;
-      eisa_id |= ( hp100_inb( BOARD_ID + i ) ) << 24;
-      uc += eisa_id >> 24;
+      uc_1 = hp100_inb( BOARD_ID + i );
+      eisa_id |= uc_1 << 24;
+      uc += uc_1;
     }
   uc += hp100_inb( BOARD_ID + 4 );
 
@@ -258,7 +342,7 @@
       break;
   if ( i >= sizeof( hp100_eisa_ids ) / sizeof( struct hp100_eisa_id ) )
     {
-      printk( "hp100_probe1: card at port 0x%x isn't known\n", ioaddr );
+      printk( "hp100_probe1: card at port 0x%x isn't known (id = 0x%x)\n", ioaddr, eisa_id );
       return -ENODEV;
     }
   eid = &hp100_eisa_ids[ i ];
@@ -278,13 +362,35 @@
       return -EIO;
     }
 
+#ifndef HP100_IO_MAPPED
   hp100_page( HW_MAP );
-  if ( hp100_inw( OPTION_LSW ) & ( HP100_MEM_EN | HP100_BM_WRITE | HP100_BM_READ ) )
-    {
-      printk( "hp100_probe1: memory mapped io isn't supported (card %s at port 0x%x)\n",
-      	eid -> name, ioaddr );
-      return -EIO;
+  mem_mapped = ( hp100_inw( OPTION_LSW ) & 
+                 ( HP100_MEM_EN | HP100_BM_WRITE | HP100_BM_READ ) ) != 0;
+  mem_ptr = NULL;
+  if ( mem_mapped )
+    {
+      mem_ptr = (u_char *)( hp100_inw( MEM_MAP_LSW ) | 
+                            ( hp100_inw( MEM_MAP_MSW ) << 16 ) );
+      (u_int)mem_ptr &= ~0x1fff;	/* 8k aligment */
+      if ( bus == HP100_BUS_ISA && ( (u_int)mem_ptr & ~0xfffff ) != 0 )
+        {
+          mem_ptr = NULL;
+          mem_mapped = 0;
+        }
+      if ( mem_mapped && bus == HP100_BUS_PCI )
+        {
+#if 0
+          printk( "writeb !!!\n" );
+          writeb( 0, mem_ptr );
+#endif
+          mem_ptr = NULL;
+          mem_mapped = 0;
+        }
     }
+#else
+  mem_mapped = 0;
+  mem_ptr = NULL;
+#endif
 
   if ( ( dev -> priv = kmalloc( sizeof( struct hp100_private ), GFP_KERNEL ) ) == NULL )
     return -ENOMEM;
@@ -292,6 +398,8 @@
 
   lp = (struct hp100_private *)dev -> priv;
   lp -> id = eid;
+  lp -> mem_mapped = mem_mapped;
+  lp -> mem_ptr = mem_ptr;
   hp100_page( ID_MAC_ADDR );
   lp -> soft_model = hp100_inb( SOFT_MODEL );
   lp -> mac1_mode = HP100_MAC1MODE3;
@@ -316,28 +424,46 @@
   dev -> set_multicast_list = &hp100_set_multicast_list;
 #endif
 
-#ifndef LINUX_1_1_52
-  request_region( dev -> base_addr, 0x20, eid -> name );
-#endif
+  request_region( dev -> base_addr, HP100_REGION_SIZE, eid -> name );
 
   hp100_page( ID_MAC_ADDR );
   for ( i = uc = 0; i < 6; i++ )
     dev -> dev_addr[ i ] = hp100_inb( LAN_ADDR + i );
 
+  hp100_clear_stats( ioaddr );
+
   ether_setup( dev );
 
   lp -> lan_type = hp100_sense_lan( dev );
      
-  printk( "%s: %s at 0x%x, IRQ %d, %dkB SRAM (rx/tx %d%%), ",
-    dev -> name, lp -> id -> name, ioaddr, dev -> irq, 
+  printk( "%s: %s at 0x%x, IRQ %d, ",
+    dev -> name, lp -> id -> name, ioaddr, dev -> irq );
+  switch ( bus ) {
+    case HP100_BUS_EISA: printk( "EISA" ); break;
+    case HP100_BUS_PCI:  printk( "PCI" );  break;
+    default:		 printk( "ISA" );  break;
+  }
+  printk( " bus, %dk SRAM (rx/tx %d%%).\n",
     lp -> memory_size >> ( 10 - 4 ), lp -> rx_ratio );
+  if ( mem_mapped )
+    printk( "%s: Memory mapped access used at 0x%x-0x%x.\n", 
+		dev -> name, (u_int)mem_ptr, (u_int)mem_ptr + 0x1fff );
+  printk( "%s: ", dev -> name );
+  if ( lp -> lan_type != HP100_LAN_ERR )
+    printk( "Adapter is attached to " );
   switch ( lp -> lan_type ) {
-    case HP100_LAN_100: printk( "100Mb/s VG TP" ); break;
-    case HP100_LAN_10:  printk( "10Mb/s TP" );     break;
-    default:	        printk( "link down" );     break;
+    case HP100_LAN_100:
+      printk( "100Mb/s Voice Grade AnyLAN network.\n" );
+      break;
+    case HP100_LAN_10:
+      printk( "10Mb/s network.\n" );
+      break;
+    default:
+      printk( "Warning! Link down.\n" );
   }
-  printk( ".\n" );
-
+		
+  hp100_stop_interface( dev );
+  
   return 0;
 }
 
@@ -372,10 +498,9 @@
   lp -> mac2_mode = HP100_MAC2MODE3;
   
   hp100_page( MAC_CTRL );
-  hp100_orw( HP100_LINK_BEAT_DIS, LAN_CFG_10 );
+  hp100_orw( HP100_LINK_BEAT_DIS | HP100_RESET_LB, LAN_CFG_10 );
 
   hp100_stop_interface( dev );
-  hp100_reset_card();
   hp100_load_eeprom( dev );
 
   hp100_outw( HP100_MMAP_DIS | HP100_SET_HB | 
@@ -388,7 +513,7 @@
 #else
   hp100_outw( HP100_ADV_NXT_PKT | HP100_TX_CMD | HP100_RESET_LB, OPTION_MSW );
 #endif
-
+              				
   hp100_page( MAC_ADDRESS );
   for ( i = 0; i < 6; i++ )
     hp100_outb( dev -> dev_addr[ i ], MAC_ADDR + i );
@@ -396,7 +521,7 @@
     hp100_outb( 0xff, HASH_BYTE0 + i );
   hp100_page( PERFORMANCE );
   hp100_outw( 0xfefe, IRQ_MASK );	/* mask off all ints */
-  hp100_outw( 0xffff, IRQ_STATUS );	/* ack */
+  hp100_outw( 0xffff, IRQ_STATUS );	/* ack IRQ */
   hp100_outw( (HP100_RX_PACKET | HP100_RX_ERROR | HP100_SET_HB) |
               (HP100_TX_ERROR | HP100_SET_LB ), IRQ_MASK );
               				/* and enable few */
@@ -521,30 +646,48 @@
       printk( "hp100_start_xmit: busy\n" );
 #endif    
     }
-    
+
   hp100_ints_off();
   val = hp100_inw( IRQ_STATUS );
   hp100_outw( val & HP100_TX_COMPLETE, IRQ_STATUS );
 #ifdef HP100_DEBUG_TX
   printk( "hp100_start_xmit: irq_status = 0x%x, len = %d\n", val, (int)skb -> len );
 #endif
-  if ( skb -> len >= HP100_MIN_PACKET_SIZE )
+  if ( lp -> mem_mapped )
     {
-      hp100_outw( skb -> len, DATA32 );		/* length to memory manager */
-      hp100_outw( skb -> len, FRAGMENT_LEN );
-      outsl( ioaddr + HP100_REG_DATA32, skb -> data, ( skb -> len + 3 ) >> 2 );
-      hp100_outw( HP100_TX_CMD | HP100_SET_LB, OPTION_MSW ); /* send packet */
+      if ( skb -> len >= HP100_MIN_PACKET_SIZE )
+        {
+          hp100_outw( skb -> len, DATA32 );	/* length to memory manager */
+          hp100_outw( skb -> len, FRAGMENT_LEN );
+          memcpy_toio( lp -> mem_ptr, skb -> data, skb -> len );
+        }
+       else
+        {
+          hp100_outw( HP100_MIN_PACKET_SIZE, DATA32 ); /* length to memory manager */
+          hp100_outw( HP100_MIN_PACKET_SIZE, FRAGMENT_LEN );
+          memcpy_toio( lp -> mem_ptr, skb -> data, skb -> len );
+          memset_io( lp -> mem_ptr, 0, HP100_MIN_PACKET_SIZE - skb -> len );
+        }
     }
    else
     {
-      hp100_outw( HP100_MIN_PACKET_SIZE, DATA32 ); /* length to memory manager */
-      hp100_outw( HP100_MIN_PACKET_SIZE, FRAGMENT_LEN );
-      i = skb -> len + 3;
-      outsl( ioaddr + HP100_REG_DATA32, skb -> data, i >> 2 );
-      for ( i &= ~3; i < HP100_MIN_PACKET_SIZE; i += 4 ) 
-        hp100_outl( 0, DATA32 );
-      hp100_outw( HP100_TX_CMD | HP100_SET_LB, OPTION_MSW ); /* send packet */
+      if ( skb -> len >= HP100_MIN_PACKET_SIZE )
+        {
+          hp100_outw( skb -> len, DATA32 );	/* length to memory manager */
+          hp100_outw( skb -> len, FRAGMENT_LEN );
+          outsl( ioaddr + HP100_REG_DATA32, skb -> data, ( skb -> len + 3 ) >> 2 );
+        }
+       else
+        {
+          hp100_outw( HP100_MIN_PACKET_SIZE, DATA32 ); /* length to memory manager */
+          hp100_outw( HP100_MIN_PACKET_SIZE, FRAGMENT_LEN );
+          i = skb -> len + 3;
+          outsl( ioaddr + HP100_REG_DATA32, skb -> data, i >> 2 );
+          for ( i &= ~3; i < HP100_MIN_PACKET_SIZE; i += 4 ) 
+            hp100_outl( 0, DATA32 );
+        }
     }
+  hp100_outw( HP100_TX_CMD | HP100_SET_LB, OPTION_MSW ); /* send packet */
   lp -> stats.tx_packets++;
   dev -> trans_start = jiffies;
   hp100_ints_on();
@@ -592,7 +735,7 @@
           printk( "hp100_rx: busy, remaining packets = %d\n", packets );
 #endif    
         }
-      header = hp100_inl( DATA32 );
+      header = lp -> mem_mapped ? readl( lp -> mem_ptr ) : hp100_inl( DATA32 );
       pkt_len = header & HP100_PKT_LEN_MASK;
 #ifdef HP100_DEBUG_RX
       printk( "hp100_rx: new packet - length = %d, errors = 0x%x, dest = 0x%x\n",
@@ -603,7 +746,7 @@
        * allocating more than asked (notably, aligning the request up to
        * the next 16-byte length).
        */
-      skb = dev_alloc_skb(pkt_len);
+      skb = dev_alloc_skb( pkt_len );
       if ( skb == NULL )
         {
 #ifdef HP100_DEBUG
@@ -613,11 +756,22 @@
         }
        else
         {
+          u_char *ptr;
+        
           skb -> dev = dev;
-          insl( ioaddr + HP100_REG_DATA32, skb_put(skb, pkt_len), ( pkt_len + 3 ) >> 2 );
-          skb->protocol=eth_type_trans(skb,dev);
+          ptr = (u_char *)skb_put( skb, pkt_len );
+          if ( lp -> mem_mapped )
+            memcpy_fromio( ptr, lp -> mem_ptr, ( pkt_len + 3 ) & ~3 );
+           else
+            insl( ioaddr + HP100_REG_DATA32, ptr, ( pkt_len + 3 ) >> 2 );
+          skb -> protocol = eth_type_trans( skb, dev );
           netif_rx( skb );
           lp -> stats.rx_packets++;
+#ifdef HP100_DEBUG_RX
+          printk( "rx: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
+		ptr[ 0 ], ptr[ 1 ], ptr[ 2 ], ptr[ 3 ], ptr[ 4 ], ptr[ 5 ],
+		ptr[ 6 ], ptr[ 7 ], ptr[ 8 ], ptr[ 9 ], ptr[ 10 ], ptr[ 11 ] );
+#endif
         }
       hp100_outw( HP100_ADV_NXT_PKT | HP100_SET_LB, OPTION_MSW );
       switch ( header & 0x00070000 ) {
@@ -664,6 +818,17 @@
   hp100_page( PERFORMANCE );
 }
 
+static void hp100_clear_stats( int ioaddr )
+{
+  cli();
+  hp100_page( MAC_CTRL );		/* get all statistics bytes */
+  hp100_inw( DROPPED );
+  hp100_inb( CRC );
+  hp100_inb( ABORT );
+  hp100_page( PERFORMANCE );
+  sti();
+}
+
 /*
  *  multicast setup
  */
@@ -687,8 +852,8 @@
 #ifdef HP100_DEBUG_MULTI
   printk( "hp100_set_multicast_list: num_addrs = %d\n", num_addrs );
 #endif
-  hp100_ints_off();
   cli();
+  hp100_ints_off();
   hp100_page( MAC_CTRL );
   hp100_andb( ~(HP100_RX_EN | HP100_TX_EN), MAC_CFG_1 );	/* stop rx/tx */
 
@@ -711,13 +876,12 @@
 
   hp100_outb( lp -> mac2_mode, MAC_CFG_2 );
   hp100_andb( HP100_MAC1MODEMASK, MAC_CFG_1 );
-  hp100_orb( lp -> mac1_mode, MAC_CFG_1 );
-
-  hp100_orb( HP100_RX_EN | HP100_RX_IDLE, MAC_CFG_1 );		/* enable rx */
-  hp100_orb( HP100_TX_EN | HP100_TX_IDLE, MAC_CFG_1 );		/* enable tx */
+  hp100_orb( lp -> mac1_mode |
+  	     HP100_RX_EN | HP100_RX_IDLE |		/* enable rx */
+  	     HP100_TX_EN | HP100_TX_IDLE, MAC_CFG_1 );	/* enable tx */
   hp100_page( PERFORMANCE );
-  sti();
   hp100_ints_on();
+  sti();
 }
 
 #endif /* HAVE_MULTICAST */
@@ -726,11 +890,7 @@
  *  hardware interrupt handling
  */
 
-#ifndef LINUX_1_1_52
 static void hp100_interrupt( int irq, struct pt_regs *regs )
-#else
-static void hp100_interrupt( int irq )
-#endif
 {
   struct device *dev = (struct device *)irq2dev_map[ irq ];
   struct hp100_private *lp;
@@ -779,17 +939,22 @@
   int ioaddr = dev -> base_addr;
   struct hp100_private *lp = (struct hp100_private *)dev -> priv;
 
-  hp100_unreset_card();
   cli();
+  hp100_unreset_card();
   hp100_page( MAC_CTRL );
   hp100_outb( lp -> mac2_mode, MAC_CFG_2 );
   hp100_andb( HP100_MAC1MODEMASK, MAC_CFG_1 );
-  hp100_orb( lp -> mac1_mode, MAC_CFG_1 );
-  hp100_orb( HP100_RX_EN | HP100_RX_IDLE, MAC_CFG_1 );
-  hp100_orb( HP100_TX_EN | HP100_TX_IDLE, MAC_CFG_1 );
+  hp100_orb( lp -> mac1_mode |
+             HP100_RX_EN | HP100_RX_IDLE |
+             HP100_TX_EN | HP100_TX_IDLE, MAC_CFG_1 );
   hp100_page( PERFORMANCE );
   hp100_outw( HP100_INT_EN | HP100_SET_LB, OPTION_LSW );
   hp100_outw( HP100_TRI_INT | HP100_RESET_HB, OPTION_LSW );
+  if ( lp -> mem_mapped )
+    {
+      /* enable memory mapping */
+      hp100_outw( HP100_MMAP_DIS | HP100_RESET_HB, OPTION_LSW );
+    }
   sti();
 } 
 
@@ -799,7 +964,7 @@
   u_short val;
 
   hp100_outw( HP100_INT_EN | HP100_RESET_LB | 
-              HP100_TRI_INT | HP100_SET_HB, OPTION_LSW );
+              HP100_TRI_INT | HP100_MMAP_DIS | HP100_SET_HB, OPTION_LSW );
   val = hp100_inw( OPTION_LSW );
   hp100_page( HW_MAP );
   hp100_andb( HP100_BM_SLAVE, BM );
@@ -959,7 +1124,7 @@
 void cleanup_module( void )
 {
   unregister_netdev( &dev_hp100 );
-  release_region( dev_hp100.base_addr, 0x20 );
+  release_region( dev_hp100.base_addr, HP100_REGION_SIZE );
   kfree_s( dev_hp100.priv, sizeof( struct hp100_private ) );
   dev_hp100.priv = NULL;
 }
diff -u --recursive --new-file v1.3.14/linux/drivers/net/ibmtr.c linux/drivers/net/ibmtr.c
--- v1.3.14/linux/drivers/net/ibmtr.c	Mon Jul 31 15:59:01 1995
+++ linux/drivers/net/ibmtr.c	Wed Aug  2 09:13:50 1995
@@ -12,7 +12,7 @@
 */
 
 /*
-   Changes by Peter De Schrijver (stud11@cc4.kuleuven.ac.be) :
+   Changes by Peter De Schrijver (Peter.Deschrijver@linux.cc.kuleuven.ac.be) :
 	
 	+ changed name to ibmtr.c in anticipation of other tr boards.
 	+ changed reset code and adapter open code.
@@ -37,7 +37,7 @@
 #define FALSE 0
 #define TRUE (!FALSE)
 
-static char *version = "ibmtr.c:v1.1.48 8/7/94 Peter De Schrijver and Mark Swanson\n"
+static const char *version = "ibmtr.c:v1.1.48 8/7/94 Peter De Schrijver and Mark Swanson\n"
                        "           modified 10/3/94 David W. Morris\n";
 
 static char pcchannelid[]={0x05, 0x00, 0x04, 0x09,
@@ -120,7 +120,7 @@
 /*  This routine combined with the #DEFINE DPRINTD serves
     to workaround the gcc apparent bug.   in tr_tx() */
 
-static void DummyCall(char * fmt,...) {DummyCallCount++;return;}
+static void DummyCall(const char * fmt,...) {DummyCallCount++;return;}
 
 static void PrtChanID(char *pcid, short stride) {
   short i, j;
diff -u --recursive --new-file v1.3.14/linux/drivers/net/lance.c linux/drivers/net/lance.c
--- v1.3.14/linux/drivers/net/lance.c	Tue Jul 11 10:02:49 1995
+++ linux/drivers/net/lance.c	Tue Aug  1 10:02:37 1995
@@ -15,7 +15,7 @@
 	   Code 930.5, Goddard Space Flight Center, Greenbelt MD 20771
 */
 
-static char *version = "lance.c:v1.08 4/10/95 dplatt@3do.com\n";
+static const char *version = "lance.c:v1.08 4/10/95 dplatt@3do.com\n";
 
 #include <linux/config.h>
 #include <linux/kernel.h>
@@ -194,7 +194,7 @@
 	struct lance_rx_head rx_ring[RX_RING_SIZE];
 	struct lance_tx_head tx_ring[TX_RING_SIZE];
 	struct lance_init_block		init_block;
-	char *name;
+	const char *name;
 	/* The saved address of a sent-in-place packet/buffer, for skfree(). */
 	struct sk_buff* tx_skbuff[TX_RING_SIZE];
 	long rx_buffs;				/* Address of Rx and Tx buffers. */
@@ -220,7 +220,7 @@
    reportedly has the same ID as the '965. */
 static struct lance_chip_type {
 	int id_number;
-	char *name;
+	const char *name;
 	int flags;
 } chip_table[] = {
 	{0x0000, "LANCE 7990",				/* Ancient lance chip.  */
@@ -337,7 +337,7 @@
 	struct lance_private *lp;
 	short dma_channels;					/* Mark spuriously-busy DMA channels */
 	int i, reset_val, lance_version;
-	char *chipname;
+	const char *chipname;
 	/* Flags for specific chips or boards. */
 	unsigned char hpJ2405A = 0;						/* HP ISA adaptor */
 	int hp_builtin = 0;					/* HP on-board ethernet. */
diff -u --recursive --new-file v1.3.14/linux/drivers/net/ne.c linux/drivers/net/ne.c
--- v1.3.14/linux/drivers/net/ne.c	Fri Jul  7 08:54:47 1995
+++ linux/drivers/net/ne.c	Tue Aug  1 10:02:37 1995
@@ -26,7 +26,7 @@
 
 /* Routines for the NatSemi-based designs (NE[12]000). */
 
-static char *version =
+static const char *version =
     "ne.c:v1.10 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
 #include <linux/kernel.h>
@@ -61,7 +61,7 @@
 
 #ifdef CONFIG_NE_BAD_CLONES
 /* A list of bad clones that we none-the-less recognize. */
-static struct { char *name8, *name16; unsigned char SAprefix[4];}
+static struct { const char *name8, *name16; unsigned char SAprefix[4];}
 bad_clone_list[] = {
     {"DE100", "DE200", {0x00, 0xDE, 0x01,}},
     {"DE120", "DE220", {0x00, 0x80, 0xc8,}},
@@ -148,7 +148,7 @@
     int i;
     unsigned char SA_prom[32];
     int wordlength = 2;
-    char *name = NULL;
+    const char *name = NULL;
     int start_page, stop_page;
     int neX000, ctron;
     int reg0 = inb_p(ioaddr);
diff -u --recursive --new-file v1.3.14/linux/drivers/net/pi2.c linux/drivers/net/pi2.c
--- v1.3.14/linux/drivers/net/pi2.c	Tue Jul 18 16:28:57 1995
+++ linux/drivers/net/pi2.c	Tue Aug  1 10:02:38 1995
@@ -82,7 +82,7 @@
 struct device *init_etherdev(struct device *dev, int sizeof_private,
 			     unsigned long *mem_startp);
 
-static char *version =
+static const char *version =
 "PI: V0.8 ALPHA April 23 1995 David Perry (dp@hydra.carleton.ca)\n";
 
 /* The following #define is only really required for the PI card, not
diff -u --recursive --new-file v1.3.14/linux/drivers/net/plip.c linux/drivers/net/plip.c
--- v1.3.14/linux/drivers/net/plip.c	Fri Jun 30 16:22:28 1995
+++ linux/drivers/net/plip.c	Tue Aug  1 10:02:38 1995
@@ -32,7 +32,7 @@
  *     So, this PLIP can't communicate the PLIP of Linux v1.0.
  */
 
-static char *version = "NET3 PLIP version 2.0 gniibe@mri.co.jp\n";
+static const char *version = "NET3 PLIP version 2.0 gniibe@mri.co.jp\n";
 
 /*
   Sources:
diff -u --recursive --new-file v1.3.14/linux/drivers/net/ppp.c linux/drivers/net/ppp.c
--- v1.3.14/linux/drivers/net/ppp.c	Thu Jul 27 10:13:16 1995
+++ linux/drivers/net/ppp.c	Tue Aug  1 10:02:38 1995
@@ -136,11 +136,11 @@
 static void ppp_unlock(struct ppp *);
 static void ppp_add_fcs(struct ppp *);
 static int ppp_check_fcs(struct ppp *);
-static void ppp_print_buffer(const char *,char *,int,int);
+static void ppp_print_buffer(const char *,const char *,int,int);
 
 static int ppp_read(struct tty_struct *, struct file *, unsigned char *,
 		    unsigned int);
-static int ppp_write(struct tty_struct *, struct file *, unsigned char *,
+static int ppp_write(struct tty_struct *, struct file *, const unsigned char *,
 		     unsigned int);
 static int ppp_ioctl(struct tty_struct *, struct file *, unsigned int,
 		     unsigned long);
@@ -151,7 +151,7 @@
 
 #ifdef NEW_TTY_DRIVERS
 static int ppp_receive_room(struct tty_struct *tty);
-static void ppp_receive_buf(struct tty_struct *tty, unsigned char *cp,
+static void ppp_receive_buf(struct tty_struct *tty, const unsigned char *cp,
 			    char *fp, int count);
 static void ppp_write_wakeup(struct tty_struct *tty);
 #else
@@ -918,7 +918,7 @@
 }
 
 
-static void ppp_receive_buf(struct tty_struct *tty, unsigned char *cp,
+static void ppp_receive_buf(struct tty_struct *tty, const unsigned char *cp,
 			    char *fp, int count)
 {
   register struct ppp *ppp = ppp_find (tty);
@@ -1350,7 +1350,7 @@
 */
 
 static int
-ppp_write(struct tty_struct *tty, struct file *file, unsigned char *buf, unsigned int nr)
+ppp_write(struct tty_struct *tty, struct file *file, const unsigned char *buf, unsigned int nr)
 {
   struct ppp *ppp = ppp_find(tty);
   int i;
@@ -2021,7 +2021,7 @@
 
 static char hex[] = "0123456789ABCDEF";
 
-static inline void ppp_print_hex (register char *out, char *in, int count)
+static inline void ppp_print_hex (register char *out, const char *in, int count)
 {
   register unsigned char next_ch;
 
@@ -2035,7 +2035,7 @@
   }
 }
 
-static inline void ppp_print_char (register char *out, char *in, int count)
+static inline void ppp_print_char (register char *out, const char *in, int count)
 {
   register unsigned char next_ch;
 
@@ -2054,7 +2054,7 @@
   *out = '\0';
 }
 
-static void ppp_print_buffer(const char *name, char *buf, int count, int seg)
+static void ppp_print_buffer(const char *name, const char *buf, int count, int seg)
 {
   char line [44];
   int  old_fs = get_fs();
diff -u --recursive --new-file v1.3.14/linux/drivers/net/seeq8005.c linux/drivers/net/seeq8005.c
--- v1.3.14/linux/drivers/net/seeq8005.c	Tue Jul 11 10:02:49 1995
+++ linux/drivers/net/seeq8005.c	Tue Aug  1 10:02:38 1995
@@ -14,7 +14,7 @@
 
 */
 
-static char *version =
+static const char *version =
 	"seeq8005.c:v1.00 8/07/95 Hamish Coleman (hamish@zot.apana.org.au)\n";
 
 /* Always include 'config.h' first in case the user wants to turn on
diff -u --recursive --new-file v1.3.14/linux/drivers/net/sk_g16.c linux/drivers/net/sk_g16.c
--- v1.3.14/linux/drivers/net/sk_g16.c	Fri Jul  7 08:54:48 1995
+++ linux/drivers/net/sk_g16.c	Tue Aug  1 10:02:38 1995
@@ -19,7 +19,7 @@
  *
 -*/
 
-static char *rcsid = "$Id: sk_g16.c,v 1.1 1994/06/30 16:25:15 root Exp $";
+static const char *rcsid = "$Id: sk_g16.c,v 1.1 1994/06/30 16:25:15 root Exp $";
 
 /*
  * The Schneider & Koch (SK) G16 Network device driver is based
diff -u --recursive --new-file v1.3.14/linux/drivers/net/slhc.c linux/drivers/net/slhc.c
--- v1.3.14/linux/drivers/net/slhc.c	Tue Jul 25 18:21:21 1995
+++ linux/drivers/net/slhc.c	Mon Jul 31 18:51:57 1995
@@ -42,6 +42,8 @@
  *                      Modularization.
  *	- Jan 1995	Bjorn Ekwall
  *			Use ip_fast_csum from ip.h
+ *	- July 1995	Christos A. Polyzols 
+ *			Spotted bug in tcp option checking
  *
  *
  *	This module is a difficult issue. It's clearly inet code but it's also clearly
@@ -355,7 +357,7 @@
 	 || ip->ttl != cs->cs_ip.ttl
 	 || th->doff != cs->cs_tcp.doff
 	 || (ip->ihl > 5 && memcmp(ip+1,cs->cs_ipopt,((ip->ihl)-5)*4) != 0)
-	 || (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4 != 0))){
+	 || (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4) != 0)){
 		goto uncompressed;
 	}
 
diff -u --recursive --new-file v1.3.14/linux/drivers/net/slip.c linux/drivers/net/slip.c
--- v1.3.14/linux/drivers/net/slip.c	Tue Jul 18 16:28:57 1995
+++ linux/drivers/net/slip.c	Tue Aug  1 10:02:38 1995
@@ -617,7 +617,7 @@
  * and sent on to some IP layer for further processing.
  */
 static void
-slip_receive_buf(struct tty_struct *tty, unsigned char *cp, char *fp, int count)
+slip_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count)
 {
 	struct slip *sl = (struct slip *) tty->disc_data;
 
diff -u --recursive --new-file v1.3.14/linux/drivers/net/smc-ultra.c linux/drivers/net/smc-ultra.c
--- v1.3.14/linux/drivers/net/smc-ultra.c	Fri Jan 20 11:34:39 1995
+++ linux/drivers/net/smc-ultra.c	Tue Aug  1 10:02:38 1995
@@ -37,7 +37,7 @@
 	use the non-8390-compatible "Altego" mode. (No support currently planned.)
 */
 
-static char *version =
+static const char *version =
 	"smc-ultra.c:v1.12 1/18/95 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
 #include <linux/kernel.h>
@@ -111,7 +111,7 @@
 {
 	int i;
 	int checksum = 0;
-	char *model_name;
+	const char *model_name;
 	unsigned char eeprom_irq = 0;
 	/* Values from various config regs. */
 	unsigned char num_pages, irqreg, addr;
diff -u --recursive --new-file v1.3.14/linux/drivers/net/wavelan.c linux/drivers/net/wavelan.c
--- v1.3.14/linux/drivers/net/wavelan.c	Mon Jul 31 15:59:01 1995
+++ linux/drivers/net/wavelan.c	Tue Aug  1 10:02:38 1995
@@ -72,7 +72,7 @@
 
 extern int		wavelan_probe(device *);	/* See Space.c */
 
-static char		*version	= "wavelan.c:v7 95/4/8\n";
+static const char	*version	= "wavelan.c:v7 95/4/8\n";
 
 /*
  * Entry point forward declarations.
@@ -494,7 +494,7 @@
  */
 static
 int
-wavelan_synchronous_cmd(device *dev, char *str)
+wavelan_synchronous_cmd(device *dev, const char *str)
 {
 	unsigned short	ioaddr;
 	net_local	*lp;
@@ -749,7 +749,7 @@
 #if	STRUCT_CHECK == 1
 
 static
-char	*
+const char	*
 wavelan_struct_check(void)
 {
 #define	SC(t,s,n)	if (sizeof(t) != s) return n
@@ -2447,7 +2447,7 @@
 {
 	printk("dev:");
 	printk(" start=%d,", dev->start);
-	printk(" tbusy=%d,", dev->tbusy);
+	printk(" tbusy=%ld,", dev->tbusy);
 	printk(" interrupt=%d,", dev->interrupt);
 	printk(" trans_start=%ld,", dev->trans_start);
 	printk(" flags=0x%x,", dev->flags);
diff -u --recursive --new-file v1.3.14/linux/drivers/net/wd.c linux/drivers/net/wd.c
--- v1.3.14/linux/drivers/net/wd.c	Fri Apr 28 16:56:53 1995
+++ linux/drivers/net/wd.c	Tue Aug  1 10:02:38 1995
@@ -17,7 +17,7 @@
 	Thanks to Russ Nelson (nelson@crnwyr.com) for loaning me a WD8013.
 */
 
-static char *version =
+static const char *version =
 	"wd.c:v1.10 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
 
 #include <linux/kernel.h>
@@ -103,7 +103,7 @@
 	int checksum = 0;
 	int ancient = 0;			/* An old card without config registers. */
 	int word16 = 0;				/* 0 = 8 bit, 1 = 16 bit */
-	char *model_name;
+	const char *model_name;
 
 	for (i = 0; i < 8; i++)
 		checksum += inb(ioaddr + 8 + i);
diff -u --recursive --new-file v1.3.14/linux/drivers/net/znet.c linux/drivers/net/znet.c
--- v1.3.14/linux/drivers/net/znet.c	Fri Jul  7 08:54:48 1995
+++ linux/drivers/net/znet.c	Tue Aug  1 10:02:38 1995
@@ -1,6 +1,6 @@
 /* znet.c: An Zenith Z-Note ethernet driver for linux. */
 
-static char *version = "znet.c:v1.02 9/23/94 becker@cesdis.gsfc.nasa.gov\n";
+static const char *version = "znet.c:v1.02 9/23/94 becker@cesdis.gsfc.nasa.gov\n";
 
 /*
 	Written by Donald Becker.
diff -u --recursive --new-file v1.3.14/linux/drivers/pci/pci.c linux/drivers/pci/pci.c
--- v1.3.14/linux/drivers/pci/pci.c	Tue Jul 11 10:02:50 1995
+++ linux/drivers/pci/pci.c	Wed Aug  2 09:41:45 1995
@@ -135,7 +135,8 @@
 	DEVICE( QLOGIC,		QLOGIC_ISP1020,	"ISP1020"),
 	DEVICE( QLOGIC,		QLOGIC_ISP1022,	"ISP1022"),
 	DEVICE( X,		X_AGX016,	"ITT AGX016"),
-	DEVICE( VORTEX,		VORTEX_GDT,	"GDT 6000b")
+	DEVICE( VORTEX,		VORTEX_GDT,	"GDT 6000b"),
+	DEVICE( HP,		HP_J2585A,	"J2585A")
 };
 
 
@@ -157,9 +158,9 @@
  * optimizations...
  */
 struct optimization_type {
-	char	*type;
-	char	*off;
-	char	*on;
+	const char	*type;
+	const char	*off;
+	const char	*on;
 } bridge_optimization[] = {
 	{"Cache L2",			"write trough",	"write back"},
 	{"CPU-PCI posted write",	"off",		"on"},
@@ -233,7 +234,7 @@
 }
 
 
-char *pci_strbioserr (int error)
+const char *pci_strbioserr (int error)
 {
 	switch (error) {
 	      case PCIBIOS_SUCCESSFUL:		return "SUCCESSFUL";
@@ -337,6 +338,7 @@
 	      case PCI_VENDOR_ID_X:		return "X TECHNOLOGY";
 	      case PCI_VENDOR_ID_ACC:		return "ACC MICROELECTRONICS";
 	      case PCI_VENDOR_ID_VORTEX:	return "VORTEX";
+	      case PCI_VENDOR_ID_HP:		return "Hewlett Packard";
 	      default:				return "Unknown vendor";
 	}
 }
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/53c7,8xx.c linux/drivers/scsi/53c7,8xx.c
--- v1.3.14/linux/drivers/scsi/53c7,8xx.c	Thu Jun 29 19:02:42 1995
+++ linux/drivers/scsi/53c7,8xx.c	Tue Aug  1 10:02:39 1995
@@ -189,7 +189,7 @@
 static void intr_dma (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd);
 static void print_dsa (struct Scsi_Host *host, u32 *dsa);
 static int print_insn (struct Scsi_Host *host, u32 *insn,
-    char *prefix, int kernel);
+    const char *prefix, int kernel);
 
 static void NCR53c8xx_dsa_fixup (struct NCR53c7x0_cmd *cmd);
 static void NCR53c8x0_init_fixup (struct Scsi_Host *host);
@@ -3344,7 +3344,7 @@
     unsigned char dcmd, sbcl;
     struct NCR53c7x0_hostdata *hostdata = (struct NCR53c7x0_hostdata *)
     	host->hostdata;
-    char *phase;
+    const char *phase;
     NCR53c7x0_local_setup(host);
 
     if (!cmd) {
@@ -3712,7 +3712,7 @@
  */
 
 static int print_insn (struct Scsi_Host *host, u32 *insn,
-    char *prefix, int kernel) {
+    const char *prefix, int kernel) {
     char buf[80], 		/* Temporary buffer and pointer */
 	*tmp;			
     unsigned char dcmd;		/* dcmd register for *insn */
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/NCR5380.c linux/drivers/scsi/NCR5380.c
--- v1.3.14/linux/drivers/scsi/NCR5380.c	Thu Jun 29 19:02:47 1995
+++ linux/drivers/scsi/NCR5380.c	Tue Aug  1 10:02:39 1995
@@ -320,7 +320,7 @@
 #ifdef NDEBUG
 static struct {
     unsigned char mask;
-    char * name;} 
+    const char * name;} 
 signals[] = {{ SR_DBP, "PARITY"}, { SR_RST, "RST" }, { SR_BSY, "BSY" }, 
     { SR_REQ, "REQ" }, { SR_MSG, "MSG" }, { SR_CD,  "CD" }, { SR_IO, "IO" }, 
     { SR_SEL, "SEL" }, {0, NULL}}, 
@@ -371,7 +371,7 @@
 
 static struct {
     unsigned char value;
-    char *name;
+    const char *name;
 } phases[] = {
 {PHASE_DATAOUT, "DATAOUT"}, {PHASE_DATAIN, "DATAIN"}, {PHASE_CMDOUT, "CMDOUT"},
 {PHASE_STATIN, "STATIN"}, {PHASE_MSGOUT, "MSGOUT"}, {PHASE_MSGIN, "MSGIN"},
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/aha152x.c linux/drivers/scsi/aha152x.c
--- v1.3.14/linux/drivers/scsi/aha152x.c	Thu Jun 29 19:02:47 1995
+++ linux/drivers/scsi/aha152x.c	Tue Aug  1 10:02:39 1995
@@ -338,7 +338,7 @@
 void aha152x_setup( char *str, int *ints );
 
 static void aha152x_reset_ports(void);
-static void aha152x_panic(char *msg);
+static void aha152x_panic(const char *msg);
 
 static void disp_ports(void);
 static void show_command(Scsi_Cmnd *ptr);
@@ -2274,7 +2274,7 @@
 /* 
  * Dump the current driver status and panic...
  */
-static void aha152x_panic(char *msg)
+static void aha152x_panic(const char *msg)
 {
   printk("\naha152x_panic: %s\n", msg);
   show_queues();
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/aha1542.c linux/drivers/scsi/aha1542.c
--- v1.3.14/linux/drivers/scsi/aha1542.c	Fri Jul  7 08:54:49 1995
+++ linux/drivers/scsi/aha1542.c	Tue Aug  1 10:02:39 1995
@@ -713,7 +713,7 @@
     aha1542_intr_reset(bse);
 }
 
-static int aha1542_getconfig(int base_io, unsigned char * irq_level, unsigned char * dma_chan)
+static int aha1542_getconfig(int base_io, unsigned char * irq_level, unsigned char * dma_chan, unsigned char * scsi_id)
 {
   unchar inquiry_cmd[] = {CMD_RETCONF };
   unchar inquiry_result[3];
@@ -775,6 +775,7 @@
     printk("Unable to determine Adaptec IRQ level.  Disabling board\n");
     return -1;
   };
+  *scsi_id=inquiry_result[2] & 7;
   return 0;
 }
 
@@ -855,7 +856,7 @@
 /* called from init/main.c */
 void aha1542_setup( char *str, int *ints)
 {
-    char *ahausage = "aha1542: usage: aha1542=<PORTBASE>[,<BUSON>,<BUSOFF>[,<DMASPEED>]]\n";
+    const char *ahausage = "aha1542: usage: aha1542=<PORTBASE>[,<BUSON>,<BUSOFF>[,<DMASPEED>]]\n";
     static int setup_idx = 0;
     int setup_portbase;
 
@@ -918,6 +919,7 @@
 {
     unsigned char dma_chan;
     unsigned char irq_level;
+    unsigned char scsi_id;
     unsigned long flags;
     unsigned int base_io;
     int trans;
@@ -977,9 +979,9 @@
 	    }
 		    if(aha1542_query(base_io, &trans))  goto unregister;
 		    
-		    if (aha1542_getconfig(base_io, &irq_level, &dma_chan) == -1)  goto unregister;
+		    if (aha1542_getconfig(base_io, &irq_level, &dma_chan, &scsi_id) == -1)  goto unregister;
 		    
-		    printk("Configuring Adaptec at IO:%x, IRQ %d",base_io, irq_level);
+		    printk("Configuring Adaptec (SCSI-ID %d) at IO:%x, IRQ %d", scsi_id, base_io, irq_level);
 		    if (dma_chan != 0xFF)
 			    printk(", DMA priority %d", dma_chan);
 		    printk("\n");
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/aic7xxx.c linux/drivers/scsi/aic7xxx.c
--- v1.3.14/linux/drivers/scsi/aic7xxx.c	Tue Jul 25 18:21:22 1995
+++ linux/drivers/scsi/aic7xxx.c	Wed Aug  2 08:50:21 1995
@@ -41,7 +41,7 @@
  *
  *    -- Daniel M. Eischen, deischen@iworks.InterWorks.org, 04/03/95
  *
- *  $Id: aic7xxx.c,v 1.49 1995/06/28 05:41:09 deang Exp $
+ *  $Id: aic7xxx.c,v 2.0 1995/08/02 05:28:42 deang Exp $
  *-M*************************************************************************/
 
 #ifdef MODULE
@@ -51,6 +51,7 @@
 #include <stdarg.h>
 #include <asm/io.h>
 #include <linux/string.h>
+#include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/ioport.h>
 #include <linux/bios32.h>
@@ -64,10 +65,16 @@
 #include "hosts.h"
 #include "aic7xxx.h"
 
-#define AIC7XXX_C_VERSION  "$Revision: 1.49 $"
+#define AIC7XXX_C_VERSION  "$Revision: 2.0 $"
 
 #define NUMBER(arr)     (sizeof(arr) / sizeof(arr[0]))
-#define MIN(a,b) ((a < b) ? a : b)
+#define MIN(a,b)        ((a < b) ? a : b)
+#ifndef TRUE
+#  define TRUE 1
+#endif
+#ifndef FALSE
+#  define FALSE 0
+#endif
 
 /*
  * Defines for PCI bus support, testing twin bus support, DMAing of
@@ -395,13 +402,26 @@
 /*
  * Board Control (p. 3-43)
  */
-#define BCTL(x)		((x) + 0xC84ul)
+#define BCTL(x)			((x) + 0xC84ul)
 /*   RSVD			0xF0 */
 #define		ACE		0x08	/* Support for external processors */
 /*   RSVD			0x06 */
 #define		ENABLE		0x01
 
-#define BUSSPD(x)		((x) + 0xC86ul)	/* FIFO threshold bits ? */
+/*
+ * Bus On/Off Time (p. 3-44)
+ */
+#define BUSTIME(x)		((x) + 0xC85ul)
+#define		BOFF		0xF0
+#define		BON		0x0F
+
+/*
+ * Bus Speed (p. 3-45)
+ */
+#define	BUSSPD(x)		((x) + 0xC86ul)
+#define		DFTHRSH		0xC0
+#define		STBOFF		0x38
+#define		STBON		0x07
 
 /*
  * Host Control (p. 3-47) R/W
@@ -719,13 +739,45 @@
  * to zero inside the kernel - we have to initialize them all
  * explicitly.
  *
- * We support a maximum of one adapter card per IRQ level (see the
- * rationale for this above). On an interrupt, use the IRQ as an
- * index into aic7xxx_boards[] to locate the card information.
+ * We support multiple adapter cards per interrupt, but keep a
+ * linked list of Scsi_Host structures for each IRQ.  On an interrupt,
+ * use the IRQ as an index into aic7xxx_boards[] to locate the card
+ * information.
  */
 static struct Scsi_Host *aic7xxx_boards[MAXIRQ + 1];
 
 /*
+ * When we detect and register the card, it is possible to
+ * have the card raise a spurious interrupt.  Because we need
+ * to support multiple cards, we cannot tell which card caused
+ * the spurious interrupt.  And, we might not even have added
+ * the card info to the linked list at the time the spurious
+ * interrupt gets raised.  This variable is suppose to keep track
+ * of when we are registering a card and how many spurious
+ * interrupts we have encountered.
+ *
+ *   0 - do not allow spurious interrupts.
+ *   1 - allow 1 spurious interrupt
+ *   2 - have 1 spurious interrupt, do not allow any more.
+ *
+ * I've made it an integer instead of a boolean in case we
+ * want to allow more than one spurious interrupt for debugging
+ * purposes.  Otherwise, it could just go from true to false to
+ * true (or something like that).
+ *
+ * When the driver detects the cards, we'll set the count to 1
+ * for each card detection and registration.  After the registration
+ * of a card completes, we'll set the count back to 0.  So far, it
+ * seems to be enough to allow a spurious interrupt only during
+ * card registration; if a spurious interrupt is going to occur,
+ * this is where it happens.
+ *
+ * We should be able to find a way to avoid getting the spurious
+ * interrupt.  But until we do, we have to keep this ugly code.
+ */
+static int aic7xxx_spurious_count;
+
+/*
  * The driver keeps up to four scb structures per card in memory. Only the
  * first 26 bytes of the structure are valid for the hardware, the rest used
  * for driver level bookeeping. The driver is further optimized
@@ -801,7 +853,7 @@
 
 static struct {
   unsigned char errno;
-  char *errmesg;
+  const char *errmesg;
 } hard_error[] = {
   { ILLHADDR,  "Illegal Host Access" },
   { ILLSADDR,  "Illegal Sequencer Address referrenced" },
@@ -872,7 +924,7 @@
 static struct {
   short period;
   short rate;
-  char *english;
+  const char *english;
 } aic7xxx_syncrates[] = {
   { 100,   0,  "10.0" },
   { 125,   1,  "8.0"  },
@@ -911,7 +963,7 @@
 
   static int DFT[] = { 0, 50, 75, 100 };
   static int SST[] = { 256, 128, 64, 32 };
-  static char *BUSW[] = { "", "-TWIN", "-WIDE" };
+  static const char *BUSW[] = { "", "-TWIN", "-WIDE" };
 
   host_conf = inb(HA_HOSTCONF(p->base));
   scsi_conf = inb(HA_SCSICONF(p->base));
@@ -925,14 +977,14 @@
    */
   if ((p->type == AIC_274x) || (p->type == AIC_284x))
   {
-    brelease = scsi_conf & 0x3F;
     dfthresh = host_conf >> 6;
   }
   else
   {
-    brelease = p->busrtime;
     dfthresh = scsi_conf >> 6;
   }
+
+  brelease = p->busrtime;
   if (brelease == 0)
   {
     brelease = 2;
@@ -1031,7 +1083,7 @@
   char *p;
 
   static struct {
-    char *name;
+    const char *name;
     int *flag;
   } options[] = {
     { "extended",    &aic7xxx_extended },
@@ -1124,7 +1176,7 @@
 {
   unsigned long i;
 
-  i = jiffies + (seconds * 100);  /* compute time to stop */
+  i = jiffies + (seconds * HZ);  /* compute time to stop */
 
   while (jiffies < i)
   {
@@ -1327,7 +1379,7 @@
     length = cmd->request_bufflen;
   }
 
-  return(length);
+  return (length);
 }
 
 /*+F*************************************************************************
@@ -1380,7 +1432,7 @@
   unsigned char active, ha_flags, transfer;
   unsigned char scsi_id, bus_width;
   unsigned char offset, rate, scratch;
-  unsigned char max_offset;
+  unsigned char max_offset, rej_byte;
   unsigned char head, tail;
   unsigned short target_mask;
   long flags;
@@ -1389,40 +1441,58 @@
   int target, tcl;
   int scbptr;
   Scsi_Cmnd *cmd;
-#if 0
-static int_count = 0;
-#endif
 
   p = (struct aic7xxx_host *) aic7xxx_boards[irq]->hostdata;
-#ifdef AIC7XXX_SHARE_IRQS
+
   /*
-   * Search for the host with a pending interrupt.
+   * Search for the host with a pending interrupt.  If we can't find
+   * one, then we've encountered a spurious interrupt.
    */
   while ((p != NULL) && !(inb(INTSTAT(p->base)) & INT_PEND))
   {
-    p = (struct aic7xxx_host *) p->next->hostdata;
+    if (p->next == NULL)
+    {
+      p = NULL;
+    }
+    else
+    {
+      p = (struct aic7xxx_host *) p->next->hostdata;
+    }
   }
+
   if (p == NULL)
   {
-    printk("aic7xxx_isr: Encountered spurious interrupt.\n");
-    return;
-  }
-#endif
-  base = p->base;
-  if (p->isr_count == 0xffffffff)
-  {
-    p->isr_count = 0;
-  }
-  else
-  {
-    p->isr_count = p->isr_count + 1;
+    if (aic7xxx_spurious_count == 1)
+    {
+      aic7xxx_spurious_count = 2;
+      printk("aic7xxx_isr: Encountered spurious interrupt.\n");
+      return;
+    }
+    else
+    {
+      /*
+       * The best we can do is to set p back to head of list and process
+       * the erroneous interrupt - most likely a BRKADRINT.
+       */
+      p = (struct aic7xxx_host *) aic7xxx_boards[irq]->hostdata;
+    }
   }
+
+  p->isr_count++; /* Keep track of interrupts for /proc/scsi */
+
   if ((p->a_scanned == 0) && (p->isr_count == 1))
   {
-    /* Allow for one interrupt when the card is enabled. */
+    /*
+     * We must only have one card at this IRQ and it must have been
+     * added to the board data before the spurious interrupt occurred.
+     * It is sufficient that we check isr_count and not the spurious
+     * interrupt count.
+     */
+    printk("aic7xxx_isr: Encountered spurious interrupt.\n");
     return;
   }
 
+  base = p->base;
   /*
    * Handle all the interrupt sources - especially for SCSI
    * interrupts, we won't get a second chance at them.
@@ -1462,10 +1532,26 @@
     {
       case BAD_PHASE:
 	panic("aic7xxx_isr: unknown scsi bus phase\n");
+	break;
 
       case SEND_REJECT:
-	debug("aic7xxx_isr warning: issuing message reject, 1st byte 0x%x\n",
-	      inb(HA_REJBYTE(base)));
+        rej_byte = inb(HA_REJBYTE(base));
+        scsi_id = inb(SCSIID(base)) >> 0x04;
+        scbptr = inb(SCBPTR(base));
+        scb = &(p->scb_array[scbptr]);
+        if (rej_byte != 0x20)
+        {
+          debug("aic7xxx_isr warning: issuing message reject, 1st byte 0x%x\n",
+                rej_byte);
+        }
+        else
+        {
+          printk("aic7xxx_isr warning: Tagged message rejected for target %d,"
+                 " channel %c.\n",
+                 scsi_id, (inb(SBLKCTL(base)) & SELBUSB ? 'B': 'A'));
+          scb->cmd->device->tagged_supported = 0;
+          scb->cmd->device->tagged_queue = 0;
+        }
 	break;
 
       case NO_IDENT:
@@ -1572,7 +1658,7 @@
 	    /*
 	     * Send our own SDTR in reply.
 	     */
-	    printk("Sending SDTR!!\n");
+	    printk("aic7xxx_isr: Sending SDTR!!\n");
 	    outb(SEND_SDTR, HA_RETURN_1(base));
 	  }
 	}
@@ -1591,7 +1677,7 @@
 	{
 	  scsi_id = scsi_id + 8;  /* B channel */
 	}
-	printk("Received MSG_WDTR, scsi_id = %d, "
+	printk("aic7xxx_isr: Received MSG_WDTR, scsi_id = %d, "
 	       "needwdtr = 0x%x\n", scsi_id, p->needwdtr);
 	scratch = inb(HA_TARG_SCRATCH(base) + scsi_id);
 
@@ -1620,7 +1706,7 @@
 	  /*
 	   * Send our own WDTR in reply.
 	   */
-	  printk("Will send WDTR!!\n");
+	  printk("aic7xxx_isr: Will send WDTR!!\n");
 	  switch (bus_width)
 	  {
 	    case BUS_8_BIT:
@@ -1769,13 +1855,13 @@
 		       sizeof(scb->SCSI_cmd_pointer));
 #ifdef AIC7XXX_USE_SG
 		scb->SG_segment_count = 1;
-		memcpy (scb->SG_list_pointer, &req_buf,
+		memcpy(scb->SG_list_pointer, &req_buf,
 			sizeof(scb->SG_list_pointer));
 #else
 		scb->SG_segment_count = 0;
-		memcpy (scb->data_pointer, &req_buf,
+		memcpy(scb->data_pointer, &req_buf,
 			sizeof(scb->data_pointer));
-		memcpy (scb->data_count, &req_buflen, 3);
+		memcpy(scb->data_count, &req_buflen, 3);
 #endif
 
 		outb(SCBAUTO, SCBCNT(base));
@@ -1935,7 +2021,7 @@
 	  scb->next = p->free_scb;      /* preserve next pointer */
 	  p->free_scb = scb;            /* add at head of list */
 
-	  restore_flags (flags);
+	  restore_flags(flags);
 	  cmd->result = (DID_RETRY_COMMAND << 16);
 	  cmd->scsi_done(cmd);
 	}
@@ -1964,8 +2050,8 @@
 	   }
 	   else
 	   {
-	     panic ("aic7xxx_isr: AWAITING_SCB for an SCB that does "
-		    "not have a waiting message");
+	     panic("aic7xxx_isr: AWAITING_SCB for an SCB that does "
+		   "not have a waiting message");
 	   }
 	}
 	break;
@@ -2121,7 +2207,7 @@
 	}
 	else
 	{
-	  if (! (status & BUSFREE))
+	  if (!(status & BUSFREE))
 	  {
 	     /*
 	      * We don't know what's going on. Turn off the
@@ -2268,14 +2354,14 @@
     {
       if (inb(base + 4) & 1)
       {
-	return(AIC7xxx[i].type);
+	return (AIC7xxx[i].type);
       }
 
       printk("aic7xxx disabled at slot %d, ignored\n", slot);
     }
   }
 
-  return(AIC_NONE);
+  return (AIC_NONE);
 }
 
 /*+F*************************************************************************
@@ -2362,7 +2448,7 @@
   }
   if ((inb(SEECTL(base)) & SEERDY) == 0)
   {
-    outb (0, SEECTL(base));
+    outb(0, SEECTL(base));
     return (0);
   }
 
@@ -2372,7 +2458,7 @@
    * but only the first 32 are used by Adaptec BIOS.  The loop
    * will range from 0 to 31.
    */
-  for (k = 0; k < (sizeof(*sc) / 2); k = k + 1)
+  for (k = 0; k < (sizeof(*sc) / 2); k++)
   {
     /* Send chip select for one clock cycle. */
     outb(SEEMS | SEECK | SEECS, SEECTL(base));
@@ -2382,7 +2468,7 @@
      * Now we're ready to send the read command followed by the
      * address of the 16-bit register we want to read.
      */
-    for (i = 0; i < seeprom_read.len; i = i + 1)
+    for (i = 0; i < seeprom_read.len; i++)
     {
       temp = SEEMS | SEECS | (seeprom_read.bits[i] << 1);
       outb(temp, SEECTL(base));
@@ -2392,7 +2478,7 @@
       CLOCK_PULSE(base);
     }
     /* Send the 6 bit address (MSB first, LSB last). */
-    for (i = 5; i >= 0; i = i - 1)
+    for (i = 5; i >= 0; i--)
     {
       temp = k;
       temp = (temp >> i) & 1;  /* Mask out all but lower bit. */
@@ -2410,7 +2496,7 @@
      * with bit 0 (LSB).  The initial 0 will be shifted off the
      * top of our word as we let the loop run from 0 to 16.
      */
-    for (i = 0; i <= 16; i = i + 1)
+    for (i = 0; i <= 16; i++)
     {
       temp = SEEMS | SEECS;
       outb(temp, SEECTL(base));
@@ -2443,22 +2529,22 @@
 
   if (checksum != sc->checksum)
   {
-    printk ("aic7xxx : SEEPROM checksum error, ignoring SEEPROM settings.\n");
+    printk("aic7xxx: SEEPROM checksum error, ignoring SEEPROM settings.\n");
     return (0);
   }
 
 #if 0
-  printk ("Computed checksum 0x%x, checksum read 0x%x\n", checksum, sc->checksum);
-  printk ("Serial EEPROM:");
-  for (k = 0; k < (sizeof(*sc) / 2); k = k + 1)
+  printk("Computed checksum 0x%x, checksum read 0x%x\n", checksum, sc->checksum);
+  printk("Serial EEPROM:");
+  for (k = 0; k < (sizeof(*sc) / 2); k++)
   {
     if (((k % 8) == 0) && (k != 0))
     {
-      printk ("\n              ");
+      printk("\n              ");
     }
-    printk (" 0x%x", seeprom[k]);
+    printk(" 0x%x", seeprom[k]);
   }
-  printk ("\n");
+  printk("\n");
 #endif
 
   /* Release access to the memory port and the serial EEPROM. */
@@ -2531,7 +2617,7 @@
       break;
   }
 
-  return(maxscb);
+  return (maxscb);
 }
 
 /*+F*************************************************************************
@@ -2545,13 +2631,13 @@
 aic7xxx_register(Scsi_Host_Template *template, aha_type type,
 		 int base, unsigned char irq)
 {
-  static char * board_name[] = {"", "274x", "284x", "7870", "7850", "7872"};
+  static const char * board_name[] = {"", "274x", "284x", "7870", "7850", "7872"};
   int i;
   unsigned char sblkctl;
   int max_targets;
   int found = 1;
   unsigned char target_settings;
-  unsigned char scsi_conf;
+  unsigned char scsi_conf, host_conf;
   int have_seeprom = 0;
   struct Scsi_Host *host;
   struct aic7xxx_host *p;
@@ -2574,7 +2660,7 @@
   switch (type)
   {
     case AIC_274x:
-#if 1
+#if 0
       printk("aha274x: aic7770 hcntrl=0x%x\n", inb(HCNTRL(config.base)));
 #endif
       /*
@@ -2622,7 +2708,12 @@
        * since there was some issue about reseting the board.
        */
       config.irq = inb(HA_INTDEF(config.base)) & 0x0F;
-      config.busrtime = inb(HA_SCSICONF(config.base)) & 0x3C;
+      host_conf = inb(HA_HOSTCONF(config.base));
+      config.busrtime = host_conf & 0x3C;
+      /* XXX Is this valid for motherboard based controllers? */
+      /* Setup the FIFO threshold and the bus off time */
+      outb(host_conf & DFTHRSH, BUSSPD(config.base));
+      outb((host_conf << 2) & BOFF, BUSTIME(config.base));
 
       /*
        * A reminder until this can be detected automatically.
@@ -2632,7 +2723,7 @@
       break;
 
     case AIC_284x:
-#if 1
+#if 0
       printk("aha284x: aic7770 hcntrl=0x%x\n", inb(HCNTRL(config.base)));
 #endif
       outb(CHIPRST, HCNTRL(config.base));
@@ -2640,6 +2731,12 @@
       config.pause = REQ_PAUSE; /* DWG would like to be like the rest */
       config.extended = aic7xxx_extended;
       config.irq = inb(HA_INTDEF(config.base)) & 0x0F;
+      host_conf = inb(HA_HOSTCONF(config.base));
+      config.busrtime = host_conf & 0x3C;
+      /* XXX Is this valid for motherboard based controllers? */
+      /* Setup the FIFO threshold and the bus off time */
+      outb(host_conf & DFTHRSH, BUSSPD(config.base));
+      outb((host_conf << 2) & BOFF, BUSTIME(config.base));
 
       /*
        * A reminder until this can be detected automatically.
@@ -2651,7 +2748,7 @@
     case AIC_7850:
     case AIC_7870:
     case AIC_7872:
-#if 1
+#if 0
       printk("aic%s hcntrl=0x%x\n", board_name[type], inb(HCNTRL(config.base)));
 #endif
 
@@ -2661,15 +2758,15 @@
       config.extended = aic7xxx_extended;
       config.scsi_id = 7;
 
-      printk ("aic78xx: Reading SEEPROM... ");
+      printk("aic78xx: Reading SEEPROM... ");
       have_seeprom = read_seeprom(base, &sc);
-      if (! have_seeprom)
+      if (!have_seeprom)
       {
-	printk ("Unable to read SEEPROM\n");
+	printk("aic78xx: unable to read SEEPROM\n");
       }
       else
       {
-	printk ("done\n");
+	printk("done\n");
 	config.extended = (sc.bios_control & CFEXTEND) >> 7;
 	config.scsi_id = (sc.brtime_id & CFSCSIID);
 	config.parity = (sc.adapter_control & CFSPARITY) ?
@@ -2734,7 +2831,7 @@
     case 2:     /* Wide bus */
       config.scsi_id = inb(HA_SCSICONF(base) + 1) & 0x0F;
       config.bus_type = AIC_WIDE;
-      printk("aic7xxx : Enabling wide channel of %s-Wide\n",
+      printk("aic7xxx: Enabling wide channel of %s-Wide\n",
 	     board_name[config.type]);
       outb(WIDE_BUS, HA_FLAGS(base));
       break;
@@ -2744,12 +2841,12 @@
 #ifdef AIC7XXX_TWIN_SUPPORT
       config.scsi_id_b = inb(HA_SCSICONF(base) + 1) & 0x07;
       config.bus_type = AIC_TWIN;
-      printk("aic7xxx : Enabled channel B of %s-Twin\n",
+      printk("aic7xxx: Enabled channel B of %s-Twin\n",
 	     board_name[config.type]);
       outb(TWIN_BUS, HA_FLAGS(base));
 #else
       config.bus_type = AIC_SINGLE;
-      printk("aic7xxx : Channel B of %s-Twin will be ignored\n",
+      printk("aic7xxx: Channel B of %s-Twin will be ignored\n",
 	     board_name[config.type]);
       outb(0, HA_FLAGS(base));
 #endif
@@ -2759,7 +2856,7 @@
       printk("aic7xxx is an unsupported type 0x%x, please "
 	     "mail deang@ims.com\n", inb(SBLKCTL(base)));
       outb(0, HA_FLAGS(base));
-      return(0);
+      return (0);
   }
 
   /*
@@ -2784,7 +2881,7 @@
       && (config.irq < 9 || config.irq > 15))
   {
     printk("aic7xxx uses unsupported IRQ level, ignoring\n");
-    return(0);
+    return (0);
   }
 
   /*
@@ -2798,7 +2895,7 @@
    if (aic7xxx_boards[config.irq] != NULL)
    {
      printk("aic7xxx_register: Sharing of IRQs is not configured.\n");
-     return(0);
+     return (0);
    }
 #endif
 
@@ -2857,7 +2954,7 @@
   p = (struct aic7xxx_host *) host->hostdata;
 
   /* Initialize the scb array by setting the state to free. */
-  for (i = 0; i < AIC7XXX_MAXSCB; i = i + 1)
+  for (i = 0; i < AIC7XXX_MAXSCB; i++)
   {
     p->scb_array[i].state = SCB_FREE;
     p->scb_array[i].next = NULL;
@@ -2884,14 +2981,23 @@
   if (aic7xxx_boards[config.irq] == NULL)
   {
     /*
+     * Warning! This must be done before requesting the irq.  It is
+     * possible for some boards to raise an interrupt as soon as
+     * they are enabled.  So when we request the irq from the Linux
+     * kernel, an interrupt is triggered immediately.  Therefore, we
+     * must ensure the board data is correctly set before the request.
+     */
+    aic7xxx_boards[config.irq] = host;
+
+    /*
      * Register IRQ with the kernel.
      */
     if (request_irq(config.irq, aic7xxx_isr, SA_INTERRUPT, "aic7xxx"))
     {
       printk("aic7xxx couldn't register irq %d, ignoring\n", config.irq);
-      return(0);
+      aic7xxx_boards[config.irq] = NULL;
+      return (0);
     }
-    aic7xxx_boards[config.irq] = host;
   }
   else
   {
@@ -2966,7 +3072,7 @@
     max_targets = 16;
   }
 
-  for (i = 0; i < max_targets; i = i + 1)
+  for (i = 0; i < max_targets; i++)
   {
     if (have_seeprom)
     {
@@ -3007,14 +3113,16 @@
 
   p->needsdtr = p->needsdtr_copy;
   p->needwdtr = p->needwdtr_copy;
+#if 0
   printk("NeedSdtr = 0x%x, 0x%x\n", p->needsdtr_copy, p->needsdtr);
   printk("NeedWdtr = 0x%x, 0x%x\n", p->needwdtr_copy, p->needwdtr);
+#endif 0
 
-  /* 
+  /*
    * Clear the control byte for every SCB so that the sequencer
    * doesn't get confused and think that one of them is valid
    */
-  for (i = 0; i < config.maxscb; i = i + 1)
+  for (i = 0; i < config.maxscb; i++)
   {
     outb(i, SCBPTR(base));
     outb(0, SCBARRAY(base));
@@ -3052,6 +3160,21 @@
   if (!aic7xxx_no_reset)
   {
     printk("Resetting the SCSI bus...\n");
+    if (p->bus_type == AIC_TWIN)
+    {
+      /*
+       * Select channel B.
+       */
+      outb(2, SBLKCTL(base));
+      outb(SCSIRSTO, SCSISEQ(base));
+      udelay(1000);
+      outb(0, SCSISEQ(base));
+      /*
+       * Select channel A.
+       */
+      outb(0, SBLKCTL(base));
+    }
+
     outb(SCSIRSTO, SCSISEQ(base));
     udelay(1000);
     outb(0, SCSISEQ(base));
@@ -3064,7 +3187,7 @@
    * command is sent to us by the high-level SCSI code.
    */
   UNPAUSE_SEQUENCER(p);
-  return(found);
+  return (found);
 }
 
 /*+F*************************************************************************
@@ -3095,6 +3218,11 @@
   }
 
   /*
+   * Initialize the spurious count to 0.
+   */
+  aic7xxx_spurious_count = 0;
+
+  /*
    * EISA/VL-bus card signature probe.
    */
   for (slot = MINSLOT; slot <= MAXSLOT; slot++)
@@ -3113,8 +3241,13 @@
     type = aic7xxx_probe(slot, HID0(base));
     if (type != AIC_NONE)
     {
-      printk("aic7xxx: hcntrl=0x%x\n", inb(HCNTRL(base)));
+      /*
+       * We found a card, allow 1 spurious interrupt.
+       */
+      aic7xxx_spurious_count = 1;
+
 #if 0
+      printk("aic7xxx: hcntrl=0x%x\n", inb(HCNTRL(base)));
       outb(inb(HCNTRL(base)) | CHIPRST, HCNTRL(base));
       irq = inb(HA_INTDEF(base)) & 0x0F;
 #endif
@@ -3125,6 +3258,11 @@
        * it with the kernel without incident.
        */
       found += aic7xxx_register(template, type, base, irq);
+
+      /*
+       * Disallow spurious interrupts.
+       */
+      aic7xxx_spurious_count = 0;
     }
   }
 
@@ -3135,10 +3273,6 @@
 #define DEVSTATUS 0x41
 #define RAMPSM    0x02
 
-/* This should be defined in pci.h */
-#define PCI_DEVICE_ID_ADAPTEC_7850	0x5078
-#define PCI_DEVICE_ID_ADAPTEC_7872	0x7278
-
   /*
    * PCI-bus probe.
    */
@@ -3212,36 +3346,51 @@
 	 */
 	base = io_port - 0xC01;
 
+	/*
+	 * I don't think we need to bother with allowing
+	 * spurious interrupts for the 787x/7850, but what
+	 * the hey.
+	 */
+	aic7xxx_spurious_count = 1;
+
+#if 0
 	printk("aic7xxx: hcntrl=0x%x\n", inb(HCNTRL(base)));
+#endif
 	outb(inb(HCNTRL(base)) | CHIPRST, HCNTRL(base));
 
 	error = pcibios_read_config_byte(pci_bus, pci_device_fn,
 					 DEVREVID, &devrevid);
 	if (devrevid < 3)
 	{
-	  printk ("aic7xxx_detect: AIC-7870 Rev %c\n", rev_id[devrevid]);
+	  printk("aic7xxx_detect: AIC-7870 Rev %c\n", rev_id[devrevid]);
 	}
 	error = pcibios_read_config_byte(pci_bus, pci_device_fn,
 					 DEVCONFIG, &devconfig);
 	error = pcibios_read_config_byte(pci_bus, pci_device_fn,
 					 DEVSTATUS, &devstatus);
-	printk ("aic7xxx_detect: devconfig 0x%x, devstatus 0x%x\n",
-		devconfig, devstatus);
+	printk("aic7xxx_detect: devconfig 0x%x, devstatus 0x%x\n",
+	       devconfig, devstatus);
 	if (devstatus & RAMPSM)
 	{
-	  printk ("aic7xxx_detect: detected external SCB RAM, "
-		  "mail deang@ims.com for test patch");
+	  printk("aic7xxx_detect: detected external SCB RAM, "
+		 "mail deang@ims.com for test patch");
 	}
 
 	found += aic7xxx_register(template, type, base, irq);
+
+	/*
+	 * Disable spurious interrupts.
+	 */
+	aic7xxx_spurious_count = 0;
+
 	index += 1;
       }
     }
   }
 #endif CONFIG_PCI
 
-  template->name = (char *) aic7xxx_info(NULL);
-  return(found);
+  template->name = aic7xxx_info(NULL);
+  return (found);
 }
 
 
@@ -3270,8 +3419,8 @@
   {
     if (cmd->device->tagged_queue == 0)
     {
-      printk ("aic7xxx_buildscb: Enabling tagged queuing for target %d, "
-	      "channel %d\n", cmd->target, cmd->channel);
+      printk("aic7xxx_buildscb: Enabling tagged queuing for target %d, "
+	     "channel %d\n", cmd->target, cmd->channel);
       cmd->device->tagged_queue = 1;
       cmd->device->current_tag = 1;  /* enable tagging */
     }
@@ -3346,8 +3495,8 @@
   else
   {
 #if 0
-    debug ("aic7xxx_buildscb: Creating scatterlist, addr=0x%lx, length=%d.\n",
-	   (unsigned long) cmd->request_buffer, cmd->request_bufflen);
+    debug("aic7xxx_buildscb: Creating scatterlist, addr=0x%lx, length=%d.\n",
+	  (unsigned long) cmd->request_buffer, cmd->request_bufflen);
 #endif
 #ifdef AIC7XXX_USE_SG
     scb->SG_segment_count = 1;
@@ -3455,7 +3604,7 @@
       memset(scb, 0, sizeof(*scb));
 
       scb->position = p->numscb;
-      p->numscb = p->numscb + 1;
+      p->numscb++;
       scb->state = SCB_ACTIVE;
       scb->next_waiting = SCB_LIST_NULL;
       memcpy(scb->host_scb, &scb, sizeof(scb));
@@ -3526,11 +3675,11 @@
   aic7xxx_status(cmd) = 0;
 
   cmd->result = 0;
-  memset (&cmd->sense_buffer, 0, sizeof (cmd->sense_buffer));
+  memset(&cmd->sense_buffer, 0, sizeof(cmd->sense_buffer));
 
   UNPAUSE_SEQUENCER(p);
   restore_flags(flags);
-  return(0);
+  return (0);
 }
 
 /* return values from aic7xxx_kill */
@@ -3597,7 +3746,7 @@
     if (scbsave[i] == scb->position)
     {
       found = 1;
-      i = i - 1;
+      i--;
     }
   }
 
@@ -3722,7 +3871,7 @@
   p->free_scb = scb;              /* add at head of free list */
   cmd->result = cmd->result << 16;
   cmd->scsi_done(cmd);
-  return(status);
+  return (status);
 }
 
 /*+F*************************************************************************
@@ -3751,7 +3900,7 @@
   }
 
   restore_flags(flags);
-  return(rv);
+  return (rv);
 }
 
 /*+F*************************************************************************
@@ -3836,7 +3985,7 @@
   }
 
   restore_flags(flags);
-  return(SCSI_RESET_SUCCESS);
+  return (SCSI_RESET_SUCCESS);
 }
 
 /*+F*************************************************************************
@@ -3874,7 +4023,7 @@
   geom[1] = sectors;
   geom[2] = cylinders;
 
-  return(0);
+  return (0);
 }
 
 #ifdef MODULE
@@ -3884,3 +4033,21 @@
 #include "scsi_module.c"
 #endif
 
+/*
+ * Overrides for Emacs so that we almost follow Linus's tabbing style.
+ * Emacs will notice this stuff at the end of the file and automatically
+ * adjust the settings for this buffer only.  This must remain at the end
+ * of the file.
+ * ---------------------------------------------------------------------------
+ * Local variables:
+ * c-indent-level: 2
+ * c-brace-imaginary-offset: 0
+ * c-brace-offset: -2
+ * c-argdecl-indent: 2
+ * c-label-offset: -2
+ * c-continued-statement-offset: 2
+ * c-continued-brace-offset: 0
+ * indent-tabs-mode: nil
+ * tab-width: 8
+ * End:
+ */
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/aic7xxx.h linux/drivers/scsi/aic7xxx.h
--- v1.3.14/linux/drivers/scsi/aic7xxx.h	Tue Jul 25 18:21:22 1995
+++ linux/drivers/scsi/aic7xxx.h	Wed Aug  2 08:48:07 1995
@@ -18,12 +18,12 @@
  * along with this program; see the file COPYING.  If not, write to
  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  * 
- * $Id: aic7xxx.h,v 1.18 1995/06/22 04:17:56 deang Exp $
+ * $Id: aic7xxx.h,v 2.0 1995/08/02 05:28:42 deang Exp $
  *-M*************************************************************************/
 #ifndef _aic7xxx_h
 #define _aic7xxx_h
 
-#define AIC7XXX_H_VERSION  "$Revision: 1.18 $"
+#define AIC7XXX_H_VERSION  "$Revision: 2.0 $"
 
 /*
  * Scsi_Host_Template (see hosts.h) for AIC-7770/AIC-7870 - some fields
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/aic7xxx.seq linux/drivers/scsi/aic7xxx.seq
--- v1.3.14/linux/drivers/scsi/aic7xxx.seq	Thu Jun 29 19:02:48 1995
+++ linux/drivers/scsi/aic7xxx.seq	Wed Aug  2 08:48:07 1995
@@ -3,45 +3,29 @@
 #
 # Copyright (c) 1994 John Aycock
 #   The University of Calgary Department of Computer Science.
-#   All rights reserved.
 #
 # Modifications/enhancements:
 #   Copyright (c) 1994, 1995 Justin Gibbs. All rights reserved.
 #
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions, and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#      This product includes software developed by the University of Calgary
-#      Department of Computer Science and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
-#    may be used to endorse or promote products derived from this software
-#    without specific prior written permission.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
 #
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING.  If not, write to
+# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 # 
 # FreeBSD, Twin, Wide, 2 command per target support, tagged queuing and other 
 # optimizations provided by Justin T. Gibbs (gibbs@FreeBSD.org)
-#
 ##-M#########################################################################
 
-VERSION AIC7XXX_SEQ_VER "$Id: aic7xxx.seq,v 1.19 1995/06/05 06:11:41 deang Exp $"
+VERSION AIC7XXX_SEQ_VER "$Id: aic7xxx.seq,v 2.0 1995/08/02 05:28:42 deang Exp $"
 
 SCBMASK		= 0x1f
 
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/aic7xxx_asm.c linux/drivers/scsi/aic7xxx_asm.c
--- v1.3.14/linux/drivers/scsi/aic7xxx_asm.c	Tue Jul 25 18:21:22 1995
+++ linux/drivers/scsi/aic7xxx_asm.c	Wed Aug  2 08:48:07 1995
@@ -26,9 +26,8 @@
  *
  * A <label> is an <undef-sym> ending in a colon.  Spaces, tabs, and commas
  * are token separators.
- *
  *-M*************************************************************************/
-static char id[] = "$Id: aic7xxx_asm.c,v 1.8 1995/05/25 06:25:36 root Exp $";
+static char id[] = "$Id: aic7xxx_asm.c,v 2.0 1995/08/02 05:28:42 deang Exp $";
 #include <ctype.h>
 #include <stdio.h>
 #include <string.h>
@@ -56,7 +55,7 @@
 unsigned char M[MEMORY][4];
 
 void 
-error(char *s)
+error(const char *s)
 {
 	fprintf(stderr, "%s: %s at line %d\n", filename, s, lineno);
 	exit(EXIT_FAILURE);
@@ -262,7 +261,7 @@
 #define NA	-1		/* not applicable */
 
 struct {
-	char *name;
+	const char *name;
 	int n;			/* number of operands, including opcode */
 	unsigned int op;	/* immediate or L?|pos_from_0 */
 	unsigned int dest;	/* NA, pos_from_0, or I|immediate */
@@ -329,7 +328,7 @@
 
 	static struct {
 		unsigned int what;
-		char *name;
+		const char *name;
 		int value;
 	} jmptab[] = {
 		{ LO,	"jmp",		8  },
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/constants.c linux/drivers/scsi/constants.c
--- v1.3.14/linux/drivers/scsi/constants.c	Fri Jul  7 08:54:50 1995
+++ linux/drivers/scsi/constants.c	Tue Aug  1 10:02:40 1995
@@ -154,13 +154,13 @@
 struct error_info{
     unsigned char code1, code2;
     unsigned short int devices;
-    char * text;
+    const char * text;
 };
 
 struct error_info2{
     unsigned char code1, code2_min, code2_max;
     unsigned short int devices;
-    char * text;
+    const char * text;
 };
 
 static struct error_info2 additional2[] =
@@ -367,7 +367,7 @@
 #endif
 
 #if (CONSTANTS & CONST_SENSE)
-static char *snstext[] = {
+static const char *snstext[] = {
     "None","Recovered Error","Not Ready","Medium Error","Hardware Error",
     "Illegal Request","Unit Attention","Data Protect","Blank Check",
     "Key=9","Copy Aborted","Aborted Command","End-Of-Medium",
@@ -376,12 +376,12 @@
 
 
 /* Print sense information */
-void print_sense(char * devclass, Scsi_Cmnd * SCpnt)
+void print_sense(const char * devclass, Scsi_Cmnd * SCpnt)
 {
     int i, s;
     int sense_class, valid, code;
     unsigned char * sense_buffer = SCpnt->sense_buffer;
-    char * error = NULL;
+    const char * error = NULL;
     int dev = SCpnt->request.dev;
     
     sense_class = (sense_buffer[0] >> 4) & 0x07;
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/constants.h linux/drivers/scsi/constants.h
--- v1.3.14/linux/drivers/scsi/constants.h	Sun Aug 21 15:52:01 1994
+++ linux/drivers/scsi/constants.h	Tue Aug  1 10:02:40 1995
@@ -2,7 +2,7 @@
 #define _CONSTANTS_H
 extern void print_command(unsigned char *);
 extern int print_msg(unsigned char *);
-extern void print_sense(char *,  Scsi_Cmnd *);
+/* extern void print_sense(const char *,  Scsi_Cmnd *); */
 extern void print_status(int);
 extern void print_Scsi_Cmnd (Scsi_Cmnd *);
 #endif /* def _CONSTANTS_H */
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/eata.c linux/drivers/scsi/eata.c
--- v1.3.14/linux/drivers/scsi/eata.c	Fri Jul  7 13:42:57 1995
+++ linux/drivers/scsi/eata.c	Tue Aug  1 10:02:40 1995
@@ -310,7 +310,7 @@
    };
 
 static struct Scsi_Host * sh[MAX_BOARDS + 1];
-static char* driver_name = "EATA";
+static const char* driver_name = "EATA";
 static unsigned int irqlist[MAX_IRQ], calls[MAX_IRQ];
 
 #define HD(board) ((struct hostdata *) &sh[board]->hostdata)
@@ -364,7 +364,7 @@
    unsigned char irq, dma_channel, subversion;
    unsigned char protocol_rev;
    struct eata_info info;
-   char *board_status;
+   const char *board_status;
 
    /* Allowed DMA channels for ISA (0 indicates reserved) */
    unsigned char dma_channel_table[4] = { 5, 6, 7, 0 };
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/eata_pio.c linux/drivers/scsi/eata_pio.c
--- v1.3.14/linux/drivers/scsi/eata_pio.c	Tue Jul 18 16:28:58 1995
+++ linux/drivers/scsi/eata_pio.c	Tue Aug  1 10:02:40 1995
@@ -76,7 +76,7 @@
 static ulong int_counter = 0;
 static ulong queue_counter = 0;
 
-void hprint(char *str)
+void hprint(const char *str)
 {
     char *hptr =(char *) 0x000b0000;
     char *hptr2=(char *) 0x000b00a0; 
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/fdomain.c linux/drivers/scsi/fdomain.c
--- v1.3.14/linux/drivers/scsi/fdomain.c	Fri Jul  7 08:54:50 1995
+++ linux/drivers/scsi/fdomain.c	Tue Aug  1 10:02:40 1995
@@ -368,7 +368,7 @@
 */
 
 struct signature {
-   char *signature;
+   const char *signature;
    int  sig_offset;
    int  sig_length;
    int  major_bios_version;
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/hosts.h linux/drivers/scsi/hosts.h
--- v1.3.14/linux/drivers/scsi/hosts.h	Fri Jun 30 16:22:29 1995
+++ linux/drivers/scsi/hosts.h	Tue Aug  1 10:02:40 1995
@@ -64,7 +64,7 @@
     int (*proc_info)(char *, char **, off_t, int, int, int);
     
     /* driver name that will appear in the /proc/scsi directory */
-    char *procname;
+    const char *procname;
     
     /* low_ino of the drivers /proc/scsi entry. Defined in proc_fs.h */
     unsigned short low_ino;
@@ -73,7 +73,7 @@
      * The name pointer is a pointer to the name of the SCSI
      * device detected.
      */
-    char *name;
+    const char *name;
     
     /*
      * The detect function shall return non zero on detection,
@@ -335,8 +335,8 @@
 struct Scsi_Device_Template
 {
     struct Scsi_Device_Template * next;
-    char * name;
-    char * tag;
+    const char * name;
+    const char * tag;
     int * usage_count;		  /* Used for loadable modules */
     unsigned char scsi_type;
     unsigned char major;
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/scsi.c linux/drivers/scsi/scsi.c
--- v1.3.14/linux/drivers/scsi/scsi.c	Thu Jul 27 10:13:17 1995
+++ linux/drivers/scsi/scsi.c	Tue Aug  1 10:02:41 1995
@@ -175,9 +175,9 @@
 #define BLIST_SINGLELUN 0x10
 
 struct dev_info{
-    char * vendor;
-    char * model;
-    char * revision; /* Latest revision known to be bad.  Not used yet */
+    const char * vendor;
+    const char * model;
+    const char * revision; /* Latest revision known to be bad.  Not used yet */
     unsigned flags;
 };
 
@@ -1267,7 +1267,7 @@
      * the completion function for the high level driver.
      */
     
-    memcpy ((void *) SCpnt->data_cmnd , (void *) cmnd, 12);
+    memcpy ((void *) SCpnt->data_cmnd , (const void *) cmnd, 12);
 #if 0
     SCpnt->host = host;
     SCpnt->channel = channel;
@@ -1282,7 +1282,7 @@
     SCpnt->done = done;
     SCpnt->timeout_per_command = timeout;
 
-    memcpy ((void *) SCpnt->cmnd , (void *) cmnd, 12);
+    memcpy ((void *) SCpnt->cmnd , (const void *) cmnd, 12);
     /* Zero the sense buffer.  Some host adapters automatically request
      * sense on error.  0 is not a valid sense code.  
      */
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/scsi.h linux/drivers/scsi/scsi.h
--- v1.3.14/linux/drivers/scsi/scsi.h	Thu Jul 27 10:13:17 1995
+++ linux/drivers/scsi/scsi.h	Tue Aug  1 10:02:41 1995
@@ -558,7 +558,7 @@
 extern int kernel_scsi_ioctl (Scsi_Device *dev, int cmd, void *arg);
 extern int	  scsi_ioctl (Scsi_Device *dev, int cmd, void *arg);
 extern void print_command(unsigned char *);
-extern void print_sense(char *,	 Scsi_Cmnd *);
+extern void print_sense(const char *,	 Scsi_Cmnd *);
 
 
 #if defined(MAJOR_NR) && (MAJOR_NR != SCSI_TAPE_MAJOR)
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/seagate.c linux/drivers/scsi/seagate.c
--- v1.3.14/linux/drivers/scsi/seagate.c	Thu Jun 29 19:02:53 1995
+++ linux/drivers/scsi/seagate.c	Tue Aug  1 10:02:41 1995
@@ -95,7 +95,7 @@
 						in some command phase.
 					*/
 
-static void *base_address = NULL;	/*
+static const void *base_address = NULL;	/*
 						Where the card ROM starts,
 						used to calculate memory mapped
 						register location.
@@ -153,7 +153,7 @@
 };
 
 typedef struct {
-	char *signature ;
+	const char *signature ;
 	unsigned offset;
 	unsigned length;
 	unsigned char type;
@@ -327,10 +327,10 @@
 
 	for (i = 0; i < (sizeof (seagate_bases) / sizeof (char  * )); ++i)
 		for (j = 0; !base_address && j < NUM_SIGNATURES; ++j)
-		if (!memcmp ((void *) (seagate_bases[i] +
-		    signatures[j].offset), (void *) signatures[j].signature,
+		if (!memcmp ((const void *) (seagate_bases[i] +
+		    signatures[j].offset), (const void *) signatures[j].signature,
 		    signatures[j].length)) {
-			base_address = (void *) seagate_bases[i];
+			base_address = (const void *) seagate_bases[i];
 			controller_type = signatures[j].type;
 		}
 #endif /* OVERRIDE */
@@ -341,8 +341,8 @@
 
 	if (base_address)
 		{
-		st0x_cr_sr =(void *) (((unsigned char *) base_address) + (controller_type == SEAGATE ? 0x1a00 : 0x1c00)); 
-		st0x_dr = (void *) (((unsigned char *) base_address ) + (controller_type == SEAGATE ? 0x1c00 : 0x1e00));
+		st0x_cr_sr =(void *) (((const unsigned char *) base_address) + (controller_type == SEAGATE ? 0x1a00 : 0x1c00)); 
+		st0x_dr = (void *) (((const unsigned char *) base_address ) + (controller_type == SEAGATE ? 0x1c00 : 0x1e00));
 #ifdef DEBUG
 		printk("%s detected. Base address = %x, cr = %x, dr = %x\n", tpnt->name, base_address, st0x_cr_sr, st0x_dr);
 #endif
@@ -1307,8 +1307,8 @@
 			while (((status_read = STATUS) & STAT_BSY) && 
 			       ((status_read & REQ_MASK) == REQ_CMDOUT))
 				if (status_read & STAT_REQ) {
-					DATA = *(unsigned char *) cmnd;
-					cmnd = 1+(unsigned char *) cmnd;
+					DATA = *(const unsigned char *) cmnd;
+					cmnd = 1+(const unsigned char *) cmnd;
 #ifdef SLOW_HANDSHAKE
 					if (borken) 
 						borken_wait();
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/sg.c linux/drivers/scsi/sg.c
--- v1.3.14/linux/drivers/scsi/sg.c	Tue Jul 25 18:21:22 1995
+++ linux/drivers/scsi/sg.c	Tue Aug  1 10:02:41 1995
@@ -289,7 +289,7 @@
 #define SG_SEND 0
 #define SG_REC  1
 
-static int sg_write(struct inode *inode,struct file *filp,char *buf,int count)
+static int sg_write(struct inode *inode,struct file *filp,const char *buf,int count)
 {
     int			  bsize,size,amt,i;
     unsigned char	  cmnd[MAX_COMMAND_SIZE];
@@ -298,7 +298,6 @@
     int			  direction;
     unsigned char	  opcode;
     Scsi_Cmnd		* SCpnt;
-    int			  sgcnt;
     
     if ((i=verify_area(VERIFY_READ,buf,count)))
 	return i;
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/sr.c linux/drivers/scsi/sr.c
--- v1.3.14/linux/drivers/scsi/sr.c	Tue Jul 11 10:02:51 1995
+++ linux/drivers/scsi/sr.c	Tue Aug  1 10:02:41 1995
@@ -1131,8 +1131,6 @@
 
 void cleanup_module( void) 
 {
-    int i;
-    
     if (MOD_IN_USE) {
 	printk(KERN_INFO __FILE__ ": module is in use, remove rejected\n");
 	return;
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/st.c linux/drivers/scsi/st.c
--- v1.3.14/linux/drivers/scsi/st.c	Tue Jul 11 10:02:51 1995
+++ linux/drivers/scsi/st.c	Tue Aug  1 10:02:41 1995
@@ -117,7 +117,7 @@
   int dev = SCpnt->request.dev;
   int result = SCpnt->result;
   unsigned char * sense = SCpnt->sense_buffer, scode;
-  char *stp;
+  const char *stp;
 
   if (!result /* && SCpnt->sense_buffer[0] == 0 */ )
     return 0;
@@ -753,14 +753,14 @@
 
 /* Write command */
 	static int
-st_write(struct inode * inode, struct file * filp, char * buf, int count)
+st_write(struct inode * inode, struct file * filp, const char * buf, int count)
 {
     int dev;
     int total, do_count, blks, retval, transfer;
     int write_threshold;
     int doing_write = 0;
     static unsigned char cmd[10];
-    char *b_point;
+    const char *b_point;
     Scsi_Cmnd * SCpnt;
     Scsi_Tape * STp;
     unsigned int flags;
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/u14-34f.c linux/drivers/scsi/u14-34f.c
--- v1.3.14/linux/drivers/scsi/u14-34f.c	Thu Jun 29 19:02:54 1995
+++ linux/drivers/scsi/u14-34f.c	Tue Aug  1 10:02:41 1995
@@ -275,7 +275,7 @@
    };
 
 static struct Scsi_Host * sh[MAX_BOARDS + 1];
-static char* driver_name = "Ux4F";
+static const char* driver_name = "Ux4F";
 static unsigned int irqlist[MAX_IRQ], calls[MAX_IRQ];
 
 #define HD(board) ((struct hostdata *) &sh[board]->hostdata)
diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/wd7000.c linux/drivers/scsi/wd7000.c
--- v1.3.14/linux/drivers/scsi/wd7000.c	Thu Jun 29 19:02:54 1995
+++ linux/drivers/scsi/wd7000.c	Tue Aug  1 10:02:41 1995
@@ -204,9 +204,9 @@
  *  added for the Future Domain version.
  */
 typedef struct signature {
-    void    *sig;           /* String to look for */
-    unsigned ofs;           /* offset from BIOS base address */
-    unsigned len;           /* length of string */
+    const void *sig;           /* String to look for */
+    unsigned    ofs;           /* offset from BIOS base address */
+    unsigned    len;           /* length of string */
 } Signature;
 
 static const Signature signatures[] = {
diff -u --recursive --new-file v1.3.14/linux/drivers/sound/pss.c linux/drivers/sound/pss.c
--- v1.3.14/linux/drivers/sound/pss.c	Tue Jul 11 10:02:54 1995
+++ linux/drivers/sound/pss.c	Wed Aug  2 09:36:37 1995
@@ -396,7 +396,7 @@
     }
 
 #ifdef EXCLUDE_MIDI
-  return 0
+  return 0;
 #else
   return probe_mpu401 (hw_config);
 #endif
diff -u --recursive --new-file v1.3.14/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
--- v1.3.14/linux/fs/binfmt_elf.c	Tue Jul 11 10:02:55 1995
+++ linux/fs/binfmt_elf.c	Tue Aug  1 10:02:41 1995
@@ -780,7 +780,7 @@
  * These are the only things you should do on a core-file: use only these
  * functions to write out all the necessary info.
  */
-static int dump_write(struct file *file, void *addr, int nr)
+static int dump_write(struct file *file, const void *addr, int nr)
 {
 	return file->f_op->write(file->f_inode, file, addr, nr) == nr;
 }
@@ -818,7 +818,7 @@
 /* An ELF note in memory */
 struct memelfnote
 {
-	char *name;
+	const char *name;
 	int type;
 	unsigned int datasz;
 	void *data;
diff -u --recursive --new-file v1.3.14/linux/fs/block_dev.c linux/fs/block_dev.c
--- v1.3.14/linux/fs/block_dev.c	Tue Jun 27 14:11:38 1995
+++ linux/fs/block_dev.c	Tue Aug  1 10:05:54 1995
@@ -20,7 +20,7 @@
 #define MAX_BUF_PER_PAGE (PAGE_SIZE / 512)
 #define NBUF 64
 
-int block_write(struct inode * inode, struct file * filp, char * buf, int count)
+int block_write(struct inode * inode, struct file * filp, const char * buf, int count)
 {
 	int blocksize, blocksize_bits, i, j, buffercount,write_error;
 	int block, blocks;
@@ -197,6 +197,9 @@
 
 	if (offset > size)
 		left = 0;
+	/* size - offset might not fit into left, so check explicitly. */
+	else if (size - offset > INT_MAX)
+		left = INT_MAX;
 	else
 		left = size - offset;
 	if (left > count)
diff -u --recursive --new-file v1.3.14/linux/fs/dcache.c linux/fs/dcache.c
--- v1.3.14/linux/fs/dcache.c	Wed Dec 28 10:43:49 1994
+++ linux/fs/dcache.c	Tue Aug  1 10:02:42 1995
@@ -104,7 +104,7 @@
  */
 static inline unsigned long namehash(const char * name, int len)
 {
-	return len * *(unsigned char *) name;
+	return len * *(const unsigned char *) name;
 }
 
 /*
diff -u --recursive --new-file v1.3.14/linux/fs/ext/file.c linux/fs/ext/file.c
--- v1.3.14/linux/fs/ext/file.c	Tue Jun 27 14:11:39 1995
+++ linux/fs/ext/file.c	Tue Aug  1 10:02:42 1995
@@ -32,7 +32,7 @@
 #include <linux/ext_fs.h>
 
 static int ext_file_read(struct inode *, struct file *, char *, int);
-static int ext_file_write(struct inode *, struct file *, char *, int);
+static int ext_file_write(struct inode *, struct file *, const char *, int);
 
 /*
  * We have mostly NULL's here: the current defaults are ok for
@@ -194,7 +194,7 @@
 	return read;
 }
 
-static int ext_file_write(struct inode * inode, struct file * filp, char * buf, int count)
+static int ext_file_write(struct inode * inode, struct file * filp, const char * buf, int count)
 {
 	off_t pos;
 	int written,c;
diff -u --recursive --new-file v1.3.14/linux/fs/ext2/dir.c linux/fs/ext2/dir.c
--- v1.3.14/linux/fs/ext2/dir.c	Tue Jul 11 10:02:57 1995
+++ linux/fs/ext2/dir.c	Tue Aug  1 10:02:42 1995
@@ -69,11 +69,11 @@
 	NULL			/* smap */
 };
 
-int ext2_check_dir_entry (char * function, struct inode * dir,
+int ext2_check_dir_entry (const char * function, struct inode * dir,
 			  struct ext2_dir_entry * de, struct buffer_head * bh,
 			  unsigned long offset)
 {
-	char * error_msg = NULL;
+	const char * error_msg = NULL;
 
 	if (de->rec_len < EXT2_DIR_REC_LEN(1))
 		error_msg = "rec_len is smaller than minimal";
diff -u --recursive --new-file v1.3.14/linux/fs/ext2/file.c linux/fs/ext2/file.c
--- v1.3.14/linux/fs/ext2/file.c	Tue Jul 11 10:02:57 1995
+++ linux/fs/ext2/file.c	Tue Aug  1 10:02:42 1995
@@ -35,7 +35,7 @@
 #include <linux/ext2_fs.h>
 
 static int ext2_file_read (struct inode *, struct file *, char *, int);
-static int ext2_file_write (struct inode *, struct file *, char *, int);
+static int ext2_file_write (struct inode *, struct file *, const char *, int);
 static void ext2_release_file (struct inode *, struct file *);
 
 /*
@@ -229,7 +229,7 @@
 }
 
 static int ext2_file_write (struct inode * inode, struct file * filp,
-			    char * buf, int count)
+			    const char * buf, int count)
 {
 	const loff_t two_gb = 2147483647;
 	loff_t pos;
diff -u --recursive --new-file v1.3.14/linux/fs/isofs/namei.c linux/fs/isofs/namei.c
--- v1.3.14/linux/fs/isofs/namei.c	Tue Jul 11 10:02:58 1995
+++ linux/fs/isofs/namei.c	Tue Aug  1 10:02:42 1995
@@ -28,7 +28,7 @@
  *
  * NOTE! unlike strncmp, isofs_match returns 1 for success, 0 for failure.
  */
-static int isofs_match(int len,const char * name, char * compare, int dlen)
+static int isofs_match(int len,const char * name, const char * compare, int dlen)
 {
 	if (!compare)
 		return 0;
diff -u --recursive --new-file v1.3.14/linux/fs/minix/file.c linux/fs/minix/file.c
--- v1.3.14/linux/fs/minix/file.c	Tue Jun 27 14:11:43 1995
+++ linux/fs/minix/file.c	Tue Aug  1 10:02:42 1995
@@ -30,7 +30,7 @@
 #include <linux/minix_fs.h>
 
 static int minix_file_read(struct inode *, struct file *, char *, int);
-static int minix_file_write(struct inode *, struct file *, char *, int);
+static int minix_file_write(struct inode *, struct file *, const char *, int);
 
 /*
  * We have mostly NULL's here: the current defaults are ok for
@@ -190,7 +190,7 @@
 	return read;
 }
 
-static int minix_file_write(struct inode * inode, struct file * filp, char * buf, int count)
+static int minix_file_write(struct inode * inode, struct file * filp, const char * buf, int count)
 {
 	off_t pos;
 	int written,c;
diff -u --recursive --new-file v1.3.14/linux/fs/msdos/file.c linux/fs/msdos/file.c
--- v1.3.14/linux/fs/msdos/file.c	Tue Jun 27 14:11:43 1995
+++ linux/fs/msdos/file.c	Tue Aug  1 10:02:42 1995
@@ -267,13 +267,14 @@
 int msdos_file_write(
 	struct inode *inode,
 	struct file *filp,
-	char *buf,
+	const char *buf,
 	int count)
 {
 	struct super_block *sb = inode->i_sb;
 	int sector,offset,size,left,written;
 	int error,carry;
-	char *start,*to,ch;
+	const char *start;
+	char *to,ch;
 	struct buffer_head *bh;
 	int binary_mode = MSDOS_I(inode)->i_binary;
 
diff -u --recursive --new-file v1.3.14/linux/fs/msdos/misc.c linux/fs/msdos/misc.c
--- v1.3.14/linux/fs/msdos/misc.c	Wed Mar 22 10:31:42 1995
+++ linux/fs/msdos/misc.c	Tue Aug  1 10:02:43 1995
@@ -36,7 +36,7 @@
  * read-only. The file system can be made writable again by remounting it.
  */
 
-void fs_panic(struct super_block *s,char *msg)
+void fs_panic(struct super_block *s,const char *msg)
 {
 	int not_ro;
 
@@ -365,7 +365,7 @@
 	    (*number)++; \
     }
 
-static int raw_scan_sector(struct super_block *sb,int sector,char *name,
+static int raw_scan_sector(struct super_block *sb,int sector,const char *name,
     int *number,int *ino,struct buffer_head **res_bh,
     struct msdos_dir_entry **res_de)
 {
@@ -406,7 +406,7 @@
  * requested entry is found or the end of the directory is reached.
  */
 
-static int raw_scan_root(struct super_block *sb,char *name,int *number,int *ino,
+static int raw_scan_root(struct super_block *sb,const char *name,int *number,int *ino,
     struct buffer_head **res_bh,struct msdos_dir_entry **res_de)
 {
 	int count,cluster;
@@ -424,7 +424,7 @@
  * requested entry is found or the end of the directory is reached.
  */
 
-static int raw_scan_nonroot(struct super_block *sb,int start,char *name,
+static int raw_scan_nonroot(struct super_block *sb,int start,const char *name,
     int *number,int *ino,struct buffer_head **res_bh,struct msdos_dir_entry
     **res_de)
 {
@@ -460,7 +460,7 @@
  *       being created.
  */
 
-static int raw_scan(struct super_block *sb,int start,char *name,int *number,
+static int raw_scan(struct super_block *sb,int start,const char *name,int *number,
     int *ino,struct buffer_head **res_bh,struct msdos_dir_entry **res_de)
 {
 	if (start)
@@ -532,7 +532,7 @@
  * for an empty directory slot (name is NULL). Returns an error code or zero.
  */
 
-int msdos_scan(struct inode *dir,char *name,struct buffer_head **res_bh,
+int msdos_scan(struct inode *dir,const char *name,struct buffer_head **res_bh,
     struct msdos_dir_entry **res_de,int *ino)
 {
 	int res;
diff -u --recursive --new-file v1.3.14/linux/fs/msdos/namei.c linux/fs/msdos/namei.c
--- v1.3.14/linux/fs/msdos/namei.c	Mon Jan 23 10:38:29 1995
+++ linux/fs/msdos/namei.c	Tue Aug  1 10:02:43 1995
@@ -23,7 +23,7 @@
 
 /* MS-DOS "device special files" */
 
-static char *reserved_names[] = {
+static const char *reserved_names[] = {
     "CON     ","PRN     ","NUL     ","AUX     ",
     "LPT1    ","LPT2    ","LPT3    ","LPT4    ",
     "COM1    ","COM2    ","COM3    ","COM4    ",
@@ -41,7 +41,8 @@
 static int msdos_format_name(char conv,const char *name,int len,char *res,
   int dot_dirs)
 {
-	char *walk,**reserved;
+	char *walk;
+	const char **reserved;
 	unsigned char c;
 	int space;
 
@@ -177,7 +178,7 @@
 
 /* Creates a directory entry (name is already formatted). */
 
-static int msdos_create_entry(struct inode *dir,char *name,int is_dir,
+static int msdos_create_entry(struct inode *dir,const char *name,int is_dir,
     struct inode **result)
 {
 	struct super_block *sb = dir->i_sb;
diff -u --recursive --new-file v1.3.14/linux/fs/nfs/dir.c linux/fs/nfs/dir.c
--- v1.3.14/linux/fs/nfs/dir.c	Fri Jun  9 13:03:02 1995
+++ linux/fs/nfs/dir.c	Wed Aug  2 09:51:31 1995
@@ -253,7 +253,7 @@
 	entry->fhandle = *fhandle;
 	entry->fattr = *fattr;
 	entry->expiration_date = jiffies + (S_ISDIR(fattr->mode)
-		? NFS_SERVER(dir)->acdirmax : NFS_SERVER(dir)->acregmax);
+		? NFS_SERVER(dir)->acdirmin : NFS_SERVER(dir)->acregmin);
 }
 
 static void nfs_lookup_cache_remove(struct inode *dir, struct inode *inode,
diff -u --recursive --new-file v1.3.14/linux/fs/nfs/file.c linux/fs/nfs/file.c
--- v1.3.14/linux/fs/nfs/file.c	Mon Apr 17 13:41:26 1995
+++ linux/fs/nfs/file.c	Tue Aug  1 10:02:43 1995
@@ -31,7 +31,7 @@
 #include <linux/malloc.h>
 
 static int nfs_file_read(struct inode *, struct file *, char *, int);
-static int nfs_file_write(struct inode *, struct file *, char *, int);
+static int nfs_file_write(struct inode *, struct file *, const char *, int);
 static int nfs_fsync(struct inode *, struct file *);
 
 static struct file_operations nfs_file_operations = {
@@ -190,7 +190,7 @@
 	return i + hunk;
 }
 
-static int nfs_file_write(struct inode *inode, struct file *file, char *buf,
+static int nfs_file_write(struct inode *inode, struct file *file, const char *buf,
 			  int count)
 {
 	int result, hunk, i, n, pos;
diff -u --recursive --new-file v1.3.14/linux/fs/nfs/proc.c linux/fs/nfs/proc.c
--- v1.3.14/linux/fs/nfs/proc.c	Mon Jan 30 06:51:02 1995
+++ linux/fs/nfs/proc.c	Tue Aug  1 10:02:43 1995
@@ -144,7 +144,7 @@
 }
 
 
-static inline int *xdr_encode_data(int *p, char *data, int len)
+static inline int *xdr_encode_data(int *p, const char *data, int len)
 {
 	int quadlen = QUADLEN(len);
 	
@@ -423,7 +423,7 @@
 }
 
 int nfs_proc_write(struct nfs_server *server, struct nfs_fh *fhandle,
-		   int offset, int count, char *data, struct nfs_fattr *fattr)
+		   int offset, int count, const char *data, struct nfs_fattr *fattr)
 {
 	int *p, *p0;
 	int status;
diff -u --recursive --new-file v1.3.14/linux/fs/pipe.c linux/fs/pipe.c
--- v1.3.14/linux/fs/pipe.c	Tue Jun 27 14:11:43 1995
+++ linux/fs/pipe.c	Tue Aug  1 10:02:43 1995
@@ -69,7 +69,7 @@
 	return 0;
 }
 	
-static int pipe_write(struct inode * inode, struct file * filp, char * buf, int count)
+static int pipe_write(struct inode * inode, struct file * filp, const char * buf, int count)
 {
 	int chars = 0, free = 0, written = 0;
 	char *pipebuf;
@@ -121,7 +121,12 @@
 	return -ESPIPE;
 }
 
-static int bad_pipe_rw(struct inode * inode, struct file * filp, char * buf, int count)
+static int bad_pipe_r(struct inode * inode, struct file * filp, char * buf, int count)
+{
+	return -EBADF;
+}
+
+static int bad_pipe_w(struct inode * inode, struct file * filp, const char * buf, int count)
 {
 	return -EBADF;
 }
@@ -265,7 +270,7 @@
 struct file_operations connecting_fifo_fops = {
 	pipe_lseek,
 	connect_read,
-	bad_pipe_rw,
+	bad_pipe_w,
 	NULL,		/* no readdir */
 	connect_select,
 	pipe_ioctl,
@@ -278,7 +283,7 @@
 struct file_operations read_fifo_fops = {
 	pipe_lseek,
 	pipe_read,
-	bad_pipe_rw,
+	bad_pipe_w,
 	NULL,		/* no readdir */
 	fifo_select,
 	pipe_ioctl,
@@ -290,7 +295,7 @@
 
 struct file_operations write_fifo_fops = {
 	pipe_lseek,
-	bad_pipe_rw,
+	bad_pipe_r,
 	pipe_write,
 	NULL,		/* no readdir */
 	fifo_select,
@@ -317,7 +322,7 @@
 struct file_operations read_pipe_fops = {
 	pipe_lseek,
 	pipe_read,
-	bad_pipe_rw,
+	bad_pipe_w,
 	NULL,		/* no readdir */
 	pipe_select,
 	pipe_ioctl,
@@ -329,7 +334,7 @@
 
 struct file_operations write_pipe_fops = {
 	pipe_lseek,
-	bad_pipe_rw,
+	bad_pipe_r,
 	pipe_write,
 	NULL,		/* no readdir */
 	pipe_select,
diff -u --recursive --new-file v1.3.14/linux/fs/proc/array.c linux/fs/proc/array.c
--- v1.3.14/linux/fs/proc/array.c	Tue Jun 27 14:11:43 1995
+++ linux/fs/proc/array.c	Tue Aug  1 10:02:43 1995
@@ -146,7 +146,7 @@
 }
 
 /* Writing to /proc/profile resets the counters */
-static int write_profile(struct inode * inode, struct file * file, char * buf, int count)
+static int write_profile(struct inode * inode, struct file * file, const char * buf, int count)
 {
     int i=prof_len;
 
diff -u --recursive --new-file v1.3.14/linux/fs/proc/inode.c linux/fs/proc/inode.c
--- v1.3.14/linux/fs/proc/inode.c	Thu Jul 27 10:13:17 1995
+++ linux/fs/proc/inode.c	Tue Aug  1 13:06:31 1995
@@ -230,10 +230,9 @@
 		return;
 	}
 	ino &= 0x0000ffff;
-	if (ino == PROC_PID_INO ||
-	    (p->dumpable && p->uid == p->euid && p->gid == p->egid)) {
-		inode->i_uid = p->uid;
-		inode->i_gid = p->gid;
+	if (ino == PROC_PID_INO || p->dumpable) {
+		inode->i_uid = p->euid;
+		inode->i_gid = p->egid;
 	}
 	switch (ino) {
 		case PROC_PID_INO:
diff -u --recursive --new-file v1.3.14/linux/fs/proc/scsi.c linux/fs/proc/scsi.c
--- v1.3.14/linux/fs/proc/scsi.c	Tue Jul 11 10:02:58 1995
+++ linux/fs/proc/scsi.c	Tue Aug  1 10:02:43 1995
@@ -33,7 +33,7 @@
 static int proc_readscsi(struct inode * inode, struct file * file,
 			 char * buf, int count);
 static int proc_writescsi(struct inode * inode, struct file * file,
-			 char * buf, int count);
+			 const char * buf, int count);
 static int proc_readscsidir(struct inode *, struct file *, 
 			    void *, filldir_t filldir);
 static int proc_lookupscsi(struct inode *,const char *,int,struct inode **);
@@ -282,7 +282,7 @@
 
 
 static int proc_writescsi(struct inode * inode, struct file * file,
-			 char * buf, int count)
+			 const char * buf, int count)
 {
     int ret = 0;
     char * page;
diff -u --recursive --new-file v1.3.14/linux/fs/smbfs/file.c linux/fs/smbfs/file.c
--- v1.3.14/linux/fs/smbfs/file.c	Tue Jul 11 10:02:58 1995
+++ linux/fs/smbfs/file.c	Tue Aug  1 10:02:43 1995
@@ -128,7 +128,7 @@
 }
 
 static int 
-smb_file_write(struct inode *inode, struct file *file, char *buf, int count)
+smb_file_write(struct inode *inode, struct file *file, const char *buf, int count)
 {
 	int result, bufsize, to_write, already_written;
         off_t pos;
diff -u --recursive --new-file v1.3.14/linux/fs/smbfs/proc.c linux/fs/smbfs/proc.c
--- v1.3.14/linux/fs/smbfs/proc.c	Fri Jul  7 08:54:52 1995
+++ linux/fs/smbfs/proc.c	Tue Aug  1 10:02:43 1995
@@ -658,7 +658,7 @@
 
 int
 smb_proc_write(struct smb_server *server, struct smb_dirent *finfo,
-               off_t offset, int count, char *data)
+               off_t offset, int count, const char *data)
 {
         int res = 0;
         char *buf = server->packet;
@@ -1513,7 +1513,7 @@
 
 struct smb_prots {
 	enum smb_protocol prot;
-	char *name;
+	const char *name;
 };
 
 /* smb_proc_reconnect: We expect the server to be locked, so that you
diff -u --recursive --new-file v1.3.14/linux/fs/super.c linux/fs/super.c
--- v1.3.14/linux/fs/super.c	Wed Jan 18 09:31:40 1995
+++ linux/fs/super.c	Tue Aug  1 10:02:43 1995
@@ -168,7 +168,7 @@
 	return len;
 }
 
-struct file_system_type *get_fs_type(char *name)
+struct file_system_type *get_fs_type(const char *name)
 {
 	struct file_system_type * fs = file_systems;
 	
@@ -254,7 +254,7 @@
 		sb->s_op->put_super(sb);
 }
 
-static struct super_block * read_super(dev_t dev,char *name,int flags,
+static struct super_block * read_super(dev_t dev,const char *name,int flags,
 				       void *data, int silent)
 {
 	struct super_block * s;
@@ -428,7 +428,7 @@
  * We also have to flush all inode-data for this device, as the new mount
  * might need new info.
  */
-static int do_mount(dev_t dev, const char * dir, char * type, int flags, void * data)
+static int do_mount(dev_t dev, const char * dir, const char * type, int flags, void * data)
 {
 	struct inode * dir_i;
 	struct super_block * sb;
@@ -554,7 +554,7 @@
 	struct file_operations * fops;
 	dev_t dev;
 	int retval;
-	char * t;
+	const char * t;
 	unsigned long flags = 0;
 	unsigned long page = 0;
 
diff -u --recursive --new-file v1.3.14/linux/fs/sysv/file.c linux/fs/sysv/file.c
--- v1.3.14/linux/fs/sysv/file.c	Tue Jun 27 14:11:44 1995
+++ linux/fs/sysv/file.c	Tue Aug  1 10:02:43 1995
@@ -36,7 +36,7 @@
 #include <linux/fs.h>
 #include <linux/sysv_fs.h>
 
-static int sysv_file_write(struct inode *, struct file *, char *, int);
+static int sysv_file_write(struct inode *, struct file *, const char *, int);
 
 /*
  * We have mostly NULL's here: the current defaults are ok for
@@ -200,7 +200,7 @@
 	return read;
 }
 
-static int sysv_file_write(struct inode * inode, struct file * filp, char * buf, int count)
+static int sysv_file_write(struct inode * inode, struct file * filp, const char * buf, int count)
 {
 	struct super_block * sb = inode->i_sb;
 	off_t pos;
diff -u --recursive --new-file v1.3.14/linux/fs/umsdos/emd.c linux/fs/umsdos/emd.c
--- v1.3.14/linux/fs/umsdos/emd.c	Fri Jul  7 08:54:52 1995
+++ linux/fs/umsdos/emd.c	Tue Aug  1 10:02:43 1995
@@ -44,7 +44,7 @@
 int umsdos_file_write_kmem(
 	struct inode *inode,
 	struct file *filp,
-	char *buf,
+	const char *buf,
 	int count)
 {
 	int ret;
diff -u --recursive --new-file v1.3.14/linux/fs/umsdos/file.c linux/fs/umsdos/file.c
--- v1.3.14/linux/fs/umsdos/file.c	Wed Jan 25 09:25:39 1995
+++ linux/fs/umsdos/file.c	Tue Aug  1 10:02:43 1995
@@ -49,7 +49,7 @@
 static int UMSDOS_file_write(
 	struct inode *inode,
 	struct file *filp,
-	char *buf,
+	const char *buf,
     int count)
 {
 	return msdos_file_write(inode,filp,buf,count);
diff -u --recursive --new-file v1.3.14/linux/fs/umsdos/mangle.c linux/fs/umsdos/mangle.c
--- v1.3.14/linux/fs/umsdos/mangle.c	Wed Jan 25 09:25:39 1995
+++ linux/fs/umsdos/mangle.c	Tue Aug  1 10:02:44 1995
@@ -175,7 +175,7 @@
 				like this.
 			*/
 			int i;
-			static char *spc = "\"*+,/:;<=>?[\\]|~";
+			static const char *spc = "\"*+,/:;<=>?[\\]|~";
 			is_init = 1;
 			for (i=0; i<=32; i++) lkp[i] = '#';
 			for (i=33; i<'A'; i++) lkp[i] = (char)i;
diff -u --recursive --new-file v1.3.14/linux/fs/umsdos/namei.c linux/fs/umsdos/namei.c
--- v1.3.14/linux/fs/umsdos/namei.c	Wed Jan 25 09:25:39 1995
+++ linux/fs/umsdos/namei.c	Tue Aug  1 10:02:44 1995
@@ -450,7 +450,7 @@
 		struct file filp;
 		filp.f_pos = 0;
 		/* Make the inode acceptable to MSDOS */
-		ret = umsdos_file_write_kmem (inode,&filp,(char*)symname,len);
+		ret = umsdos_file_write_kmem (inode,&filp,symname,len);
 		iput (inode);
 		if (ret >= 0){
 			if (ret != len){
diff -u --recursive --new-file v1.3.14/linux/fs/xiafs/file.c linux/fs/xiafs/file.c
--- v1.3.14/linux/fs/xiafs/file.c	Tue Jun 27 14:11:44 1995
+++ linux/fs/xiafs/file.c	Tue Aug  1 10:02:44 1995
@@ -33,7 +33,7 @@
 #define MAX(a,b) (((a)>(b))?(a):(b))
 
 static int xiafs_file_read(struct inode *, struct file *, char *, int);
-static int xiafs_file_write(struct inode *, struct file *, char *, int);
+static int xiafs_file_write(struct inode *, struct file *, const char *, int);
 
 /*
  * We have mostly NULL's here: the current defaults are ok for
@@ -191,7 +191,7 @@
 }
 
 static int 
-xiafs_file_write(struct inode * inode, struct file * filp, char * buf, int count)
+xiafs_file_write(struct inode * inode, struct file * filp, const char * buf, int count)
 {
     off_t pos;
     int written, c;
diff -u --recursive --new-file v1.3.14/linux/include/asm-alpha/checksum.h linux/include/asm-alpha/checksum.h
--- v1.3.14/linux/include/asm-alpha/checksum.h	Fri Jul  7 08:54:53 1995
+++ linux/include/asm-alpha/checksum.h	Tue Aug  1 10:02:44 1995
@@ -30,7 +30,7 @@
  *
  * it's best to have buff aligned on a 32-bit boundary
  */
-extern unsigned int csum_partial(unsigned char * buff, int len, unsigned int sum);
+extern unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum);
 
 /*
  * the same as csum_partial, but copies from src while it
@@ -39,7 +39,7 @@
  * here even more important to align src and dst on a 32-bit (or even
  * better 64-bit) boundary
  */
-unsigned int csum_partial_copy( char *src, char *dst, int len, int sum);
+unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum);
 
 /*
  * the same as csum_partial, but copies from user space (but on the alpha
diff -u --recursive --new-file v1.3.14/linux/include/asm-alpha/dma.h linux/include/asm-alpha/dma.h
--- v1.3.14/linux/include/asm-alpha/dma.h	Tue Jun 27 14:11:44 1995
+++ linux/include/asm-alpha/dma.h	Tue Aug  1 10:02:44 1995
@@ -294,7 +294,7 @@
 
 
 /* These are in kernel/dma.c: */
-extern int request_dma(unsigned int dmanr, char * device_id);	/* reserve a DMA channel */
+extern int request_dma(unsigned int dmanr, const char * device_id);	/* reserve a DMA channel */
 extern void free_dma(unsigned int dmanr);	/* release it again */
 
 
diff -u --recursive --new-file v1.3.14/linux/include/asm-i386/checksum.h linux/include/asm-i386/checksum.h
--- v1.3.14/linux/include/asm-i386/checksum.h	Fri Jul  7 08:54:53 1995
+++ linux/include/asm-i386/checksum.h	Tue Aug  1 10:02:44 1995
@@ -13,7 +13,7 @@
  *
  * it's best to have buff aligned on a 32-bit boundary
  */
-unsigned int csum_partial(unsigned char * buff, int len, unsigned int sum);
+unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum);
 
 /*
  * the same as csum_partial, but copies from src while it
@@ -23,7 +23,7 @@
  * better 64-bit) boundary
  */
 
-unsigned int csum_partial_copy( char *src, char *dst, int len, int sum);
+unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum);
 
 
 /*
@@ -33,7 +33,7 @@
  * better 64-bit) boundary
  */
 
-unsigned int csum_partial_copy_fromuser( char *src, char *dst, int len, int sum);
+unsigned int csum_partial_copy_fromuser(const char *src, char *dst, int len, int sum);
 
 /*
  *	This is a version of ip_compute_csum() optimized for IP headers,
diff -u --recursive --new-file v1.3.14/linux/include/asm-i386/dma.h linux/include/asm-i386/dma.h
--- v1.3.14/linux/include/asm-i386/dma.h	Sun Jan  1 19:49:18 1995
+++ linux/include/asm-i386/dma.h	Tue Aug  1 10:02:44 1995
@@ -264,7 +264,7 @@
 
 
 /* These are in kernel/dma.c: */
-extern int request_dma(unsigned int dmanr, char * device_id);	/* reserve a DMA channel */
+extern int request_dma(unsigned int dmanr, const char * device_id);	/* reserve a DMA channel */
 extern void free_dma(unsigned int dmanr);	/* release it again */
 
 
diff -u --recursive --new-file v1.3.14/linux/include/asm-mips/dma.h linux/include/asm-mips/dma.h
--- v1.3.14/linux/include/asm-mips/dma.h	Sun Jan 15 22:26:01 1995
+++ linux/include/asm-mips/dma.h	Tue Aug  1 10:02:44 1995
@@ -267,7 +267,7 @@
 
 
 /* These are in kernel/dma.c: */
-extern int request_dma(unsigned int dmanr, char * device_id);	/* reserve a DMA channel */
+extern int request_dma(unsigned int dmanr, const char * device_id);	/* reserve a DMA channel */
 extern void free_dma(unsigned int dmanr);	/* release it again */
 
 
diff -u --recursive --new-file v1.3.14/linux/include/linux/bios32.h linux/include/linux/bios32.h
--- v1.3.14/linux/include/linux/bios32.h	Fri Jun 16 22:02:55 1995
+++ linux/include/linux/bios32.h	Tue Aug  1 10:02:44 1995
@@ -56,6 +56,6 @@
 				      unsigned char where, unsigned short val);
 extern pcibios_write_config_dword (unsigned char bus, unsigned char dev_fn,
 				   unsigned char where, unsigned int val);
-extern char *pcibios_strerror (int error);
+extern const char *pcibios_strerror (int error);
 
 #endif /* BIOS32_H */
diff -u --recursive --new-file v1.3.14/linux/include/linux/ext2_fs.h linux/include/linux/ext2_fs.h
--- v1.3.14/linux/include/linux/ext2_fs.h	Tue Jul 11 10:02:59 1995
+++ linux/include/linux/ext2_fs.h	Tue Aug  1 10:02:44 1995
@@ -427,7 +427,7 @@
 extern unsigned long ext2_count_free (struct buffer_head *, unsigned);
 
 /* dir.c */
-extern int ext2_check_dir_entry (char *, struct inode *,
+extern int ext2_check_dir_entry (const char *, struct inode *,
 				 struct ext2_dir_entry *, struct buffer_head *,
 				 unsigned long);
 
diff -u --recursive --new-file v1.3.14/linux/include/linux/fd.h linux/include/linux/fd.h
--- v1.3.14/linux/include/linux/fd.h	Tue Jun 27 14:11:46 1995
+++ linux/include/linux/fd.h	Tue Aug  1 10:02:44 1995
@@ -69,7 +69,7 @@
 			rate,		/* data rate. |= 0x40 for perpendicular */
 			spec1,		/* stepping rate, head unload time */
 			fmt_gap;	/* gap2 size */
-	char 	      * name; /* used only for predefined formats */
+	const char    * name;		/* used only for predefined formats */
 };
 
 struct format_descr {
diff -u --recursive --new-file v1.3.14/linux/include/linux/fs.h linux/include/linux/fs.h
--- v1.3.14/linux/include/linux/fs.h	Tue Jun 27 14:11:46 1995
+++ linux/include/linux/fs.h	Tue Aug  1 10:02:44 1995
@@ -336,7 +336,7 @@
 struct file_operations {
 	int (*lseek) (struct inode *, struct file *, off_t, int);
 	int (*read) (struct inode *, struct file *, char *, int);
-	int (*write) (struct inode *, struct file *, char *, int);
+	int (*write) (struct inode *, struct file *, const char *, int);
 	int (*readdir) (struct inode *, struct file *, void *, filldir_t);
 	int (*select) (struct inode *, struct file *, int, select_table *);
 	int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
@@ -381,7 +381,7 @@
 
 struct file_system_type {
 	struct super_block *(*read_super) (struct super_block *, void *, int);
-	char *name;
+	const char *name;
 	int requires_dev;
 	struct file_system_type * next;
 };
@@ -419,7 +419,7 @@
 extern struct file_operations write_pipe_fops;
 extern struct file_operations rdwr_pipe_fops;
 
-extern struct file_system_type *get_fs_type(char *name);
+extern struct file_system_type *get_fs_type(const char *name);
 
 extern int fs_may_mount(dev_t dev);
 extern int fs_may_umount(dev_t dev, struct inode * mount_root);
@@ -515,8 +515,8 @@
 extern int block_read(struct inode *, struct file *, char *, int);
 extern int read_ahead[];
 
-extern int char_write(struct inode *, struct file *, char *, int);
-extern int block_write(struct inode *, struct file *, char *, int);
+extern int char_write(struct inode *, struct file *, const char *, int);
+extern int block_write(struct inode *, struct file *, const char *, int);
 
 extern int generic_mmap(struct inode *, struct file *, struct vm_area_struct *);
 
diff -u --recursive --new-file v1.3.14/linux/include/linux/genhd.h linux/include/linux/genhd.h
--- v1.3.14/linux/include/linux/genhd.h	Mon Jul 31 15:59:02 1995
+++ linux/include/linux/genhd.h	Tue Aug  1 10:02:44 1995
@@ -41,7 +41,7 @@
 
 struct gendisk {
 	int major;			/* major number of driver */
-	char *major_name;		/* name of major driver */
+	const char *major_name;		/* name of major driver */
 	int minor_shift;		/* number of times minor is shifted to
 					   get real minor */
 	int max_p;			/* maximum partitions per device */
diff -u --recursive --new-file v1.3.14/linux/include/linux/inet.h linux/include/linux/inet.h
--- v1.3.14/linux/include/linux/inet.h	Fri Jan 27 12:17:02 1995
+++ linux/include/linux/inet.h	Tue Aug  1 10:02:46 1995
@@ -46,7 +46,7 @@
 
 extern void		inet_proto_init(struct net_proto *pro);
 extern char		*in_ntoa(unsigned long in);
-extern unsigned long	in_aton(char *str);
+extern unsigned long	in_aton(const char *str);
 
 #endif
 #endif	/* _LINUX_INET_H */
diff -u --recursive --new-file v1.3.14/linux/include/linux/module.h linux/include/linux/module.h
--- v1.3.14/linux/include/linux/module.h	Tue Jun 27 14:11:46 1995
+++ linux/include/linux/module.h	Tue Aug  1 10:02:46 1995
@@ -46,7 +46,7 @@
 
 struct internal_symbol {
 	void *addr;
-	char *name;
+	const char *name;
 	};
 
 struct symbol_table { /* received from "insmod" */
@@ -64,7 +64,7 @@
 	struct module *next;
 	struct module_ref *ref;	/* the list of modules that refer to me */
 	struct symbol_table *symtab;
-	char *name;
+	const char *name;
 	int size;			/* size of module in pages */
 	void* addr;			/* address of module */
 	int state;
diff -u --recursive --new-file v1.3.14/linux/include/linux/msdos_fs.h linux/include/linux/msdos_fs.h
--- v1.3.14/linux/include/linux/msdos_fs.h	Mon Jun 12 16:49:42 1995
+++ linux/include/linux/msdos_fs.h	Tue Aug  1 10:02:46 1995
@@ -33,8 +33,8 @@
 	/* attribute bits that are copied "as is" */
 
 #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */
-#define IS_FREE(n) (!*(n) || *(unsigned char *) (n) == DELETED_FLAG || \
-  *(unsigned char *) (n) == FD_FILL_BYTE)
+#define IS_FREE(n) (!*(n) || *(const unsigned char *) (n) == DELETED_FLAG || \
+  *(const unsigned char *) (n) == FD_FILL_BYTE)
 
 #define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)
 	/* valid file mode bits */
@@ -112,7 +112,7 @@
 
 /* misc.c */
 
-extern void fs_panic(struct super_block *s,char *msg);
+extern void fs_panic(struct super_block *s,const char *msg);
 extern int is_binary(char conversion,char *extension);
 extern void lock_creation(void);
 extern void unlock_creation(void);
@@ -123,7 +123,7 @@
 extern void date_unix2dos(int unix_date,__u16 *time, __u16 *date);
 extern int msdos_get_entry(struct inode *dir,loff_t *pos,struct buffer_head **bh,
     struct msdos_dir_entry **de);
-extern int msdos_scan(struct inode *dir,char *name,struct buffer_head **res_bh,
+extern int msdos_scan(struct inode *dir,const char *name,struct buffer_head **res_bh,
     struct msdos_dir_entry **res_de,int *ino);
 extern int msdos_parent_ino(struct inode *dir,int locked);
 extern int msdos_subdirs(struct inode *dir);
@@ -175,7 +175,7 @@
 extern struct inode_operations msdos_file_inode_operations;
 extern struct inode_operations msdos_file_inode_operations_1024;
 extern int msdos_file_read(struct inode *, struct file *, char *, int);
-extern int msdos_file_write(struct inode *, struct file *, char *, int);
+extern int msdos_file_write(struct inode *, struct file *, const char *, int);
 extern struct inode_operations msdos_file_inode_operations_no_bmap;
 
 extern void msdos_truncate(struct inode *inode);
diff -u --recursive --new-file v1.3.14/linux/include/linux/net.h linux/include/linux/net.h
--- v1.3.14/linux/include/linux/net.h	Thu Feb 23 13:26:54 1995
+++ linux/include/linux/net.h	Tue Aug  1 10:02:46 1995
@@ -102,18 +102,18 @@
 			 int *usockaddr_len, int peer);
   int	(*read)		(struct socket *sock, char *ubuf, int size,
 			 int nonblock);
-  int	(*write)	(struct socket *sock, char *ubuf, int size,
+  int	(*write)	(struct socket *sock, const char *ubuf, int size,
 			 int nonblock);
   int	(*select)	(struct socket *sock, int sel_type,
 			 select_table *wait);
   int	(*ioctl)	(struct socket *sock, unsigned int cmd,
 			 unsigned long arg);
   int	(*listen)	(struct socket *sock, int len);
-  int	(*send)		(struct socket *sock, void *buff, int len, int nonblock,
+  int	(*send)		(struct socket *sock, const void *buff, int len, int nonblock,
 			 unsigned flags);
   int	(*recv)		(struct socket *sock, void *buff, int len, int nonblock,
 			 unsigned flags);
-  int	(*sendto)	(struct socket *sock, void *buff, int len, int nonblock,
+  int	(*sendto)	(struct socket *sock, const void *buff, int len, int nonblock,
 			 unsigned flags, struct sockaddr *, int addr_len);
   int	(*recvfrom)	(struct socket *sock, void *buff, int len, int nonblock,
 			 unsigned flags, struct sockaddr *, int *addr_len);
@@ -127,7 +127,7 @@
 };
 
 struct net_proto {
-	char *name;		/* Protocol name */
+	const char *name;		/* Protocol name */
 	void (*init_func)(struct net_proto *);	/* Bootstrap */
 };
 
diff -u --recursive --new-file v1.3.14/linux/include/linux/netdevice.h linux/include/linux/netdevice.h
--- v1.3.14/linux/include/linux/netdevice.h	Tue Jul 18 16:28:58 1995
+++ linux/include/linux/netdevice.h	Tue Aug  1 11:31:37 1995
@@ -196,7 +196,7 @@
 
 extern void		dev_add_pack(struct packet_type *pt);
 extern void		dev_remove_pack(struct packet_type *pt);
-extern struct device	*dev_get(char *name);
+extern struct device	*dev_get(const char *name);
 extern int		dev_open(struct device *dev);
 extern int		dev_close(struct device *dev);
 extern void		dev_queue_xmit(struct sk_buff *skb, struct device *dev,
diff -u --recursive --new-file v1.3.14/linux/include/linux/nfs_fs.h linux/include/linux/nfs_fs.h
--- v1.3.14/linux/include/linux/nfs_fs.h	Thu Oct  6 08:28:18 1994
+++ linux/include/linux/nfs_fs.h	Tue Aug  1 10:02:47 1995
@@ -63,7 +63,7 @@
 			 int offset, int count, char *data,
 			 struct nfs_fattr *fattr, int fs);
 extern int nfs_proc_write(struct nfs_server *server, struct nfs_fh *fhandle,
-			  int offset, int count, char *data,
+			  int offset, int count, const char *data,
 			  struct nfs_fattr *fattr);
 extern int nfs_proc_create(struct nfs_server *server, struct nfs_fh *dir,
 			   const char *name, struct nfs_sattr *sattr,
diff -u --recursive --new-file v1.3.14/linux/include/linux/pci.h linux/include/linux/pci.h
--- v1.3.14/linux/include/linux/pci.h	Tue Jul 11 10:02:59 1995
+++ linux/include/linux/pci.h	Wed Aug  2 09:41:45 1995
@@ -172,6 +172,7 @@
 #define PCI_DEVICE_ID_ADAPTEC_2940	0x7178
 #define PCI_DEVICE_ID_ADAPTEC_294x	0x7078
 #define PCI_DEVICE_ID_ADAPTEC_7850	0x5078
+#define PCI_DEVICE_ID_ADAPTEC_7872	0x7278
 
 #define PCI_VENDOR_ID_DPT               0x1044   
 #define PCI_DEVICE_ID_DPT               0xa400  
@@ -351,6 +352,8 @@
 #define PCI_VENDOR_ID_VORTEX		0x1119
 #define PCI_DEVICE_ID_VORTEX_GDT	0x0001
 
+#define PCI_VENDOR_ID_HP		0x103c
+#define PCI_DEVICE_ID_HP_J2585A		0x1030
 
 /*
  * The PCI interface treats multi-function devices as independent
@@ -430,7 +433,7 @@
 
 extern struct pci_dev_info *pci_lookup_dev (unsigned int vendor,
 					    unsigned int dev);
-extern char *pci_strbioserr (int error);
+extern const char *pci_strbioserr (int error);
 extern const char *pci_strclass (unsigned int class);
 extern const char *pci_strvendor (unsigned int vendor);
 extern const char *pci_strdev (unsigned int vendor, unsigned int device);
diff -u --recursive --new-file v1.3.14/linux/include/linux/personality.h linux/include/linux/personality.h
--- v1.3.14/linux/include/linux/personality.h	Sun Jan 29 12:58:46 1995
+++ linux/include/linux/personality.h	Tue Aug  1 10:02:47 1995
@@ -32,7 +32,7 @@
  * offset of the handler is hard coded in kernel/sys_call.S.
  */
 struct exec_domain {
-	char *name;
+	const char *name;
 	lcall7_func handler;
 	unsigned char pers_low, pers_high;
 	unsigned long * signal_map;
diff -u --recursive --new-file v1.3.14/linux/include/linux/proc_fs.h linux/include/linux/proc_fs.h
--- v1.3.14/linux/include/linux/proc_fs.h	Fri Jul  7 13:42:58 1995
+++ linux/include/linux/proc_fs.h	Tue Aug  1 10:02:47 1995
@@ -139,7 +139,7 @@
 struct proc_dir_entry {
 	unsigned short low_ino;
 	unsigned short namelen;
-	char * name;
+	const char * name;
 };
 
 extern struct super_block *proc_read_super(struct super_block *,void *,int);
diff -u --recursive --new-file v1.3.14/linux/include/linux/smb_fs.h linux/include/linux/smb_fs.h
--- v1.3.14/linux/include/linux/smb_fs.h	Tue Jul 11 10:02:59 1995
+++ linux/include/linux/smb_fs.h	Tue Aug  1 10:02:47 1995
@@ -130,7 +130,7 @@
 int smb_proc_read(struct smb_server *server, struct smb_dirent *finfo, 
 		  off_t offset, long count, char *data, int fs);
 int smb_proc_write(struct smb_server *server, struct smb_dirent *finfo,
-		   off_t offset, int count, char *data);
+		   off_t offset, int count, const char *data);
 int smb_proc_create(struct smb_server *server, const char *path,
                     int len, struct smb_dirent *entry);
 int smb_proc_mknew(struct smb_server *server, const char *path, int len,
diff -u --recursive --new-file v1.3.14/linux/include/linux/tty_driver.h linux/include/linux/tty_driver.h
--- v1.3.14/linux/include/linux/tty_driver.h	Tue Jun  6 11:22:13 1995
+++ linux/include/linux/tty_driver.h	Tue Aug  1 10:02:47 1995
@@ -98,7 +98,7 @@
 
 struct tty_driver {
 	int	magic;		/* magic number for this structure */
-	char	*name;
+	const char	*name;
 	int	name_base;	/* offset of printed name */
 	short	major;		/* major device number */
 	short	minor_start;	/* start of minor device number*/
@@ -124,7 +124,7 @@
 	int  (*open)(struct tty_struct * tty, struct file * filp);
 	void (*close)(struct tty_struct * tty, struct file * filp);
 	int  (*write)(struct tty_struct * tty, int from_user,
-		      unsigned char *buf, int count);
+		      const unsigned char *buf, int count);
 	void (*put_char)(struct tty_struct *tty, unsigned char ch);
 	void (*flush_chars)(struct tty_struct *tty);
 	int  (*write_room)(struct tty_struct *tty);
diff -u --recursive --new-file v1.3.14/linux/include/linux/tty_ldisc.h linux/include/linux/tty_ldisc.h
--- v1.3.14/linux/include/linux/tty_ldisc.h	Fri May 27 10:47:29 1994
+++ linux/include/linux/tty_ldisc.h	Tue Aug  1 10:02:47 1995
@@ -22,7 +22,7 @@
 	int	(*read)(struct tty_struct * tty, struct file * file,
 			unsigned char * buf, unsigned int nr);
 	int	(*write)(struct tty_struct * tty, struct file * file,
-			 unsigned char * buf, unsigned int nr);	
+			 const unsigned char * buf, unsigned int nr);	
 	int	(*ioctl)(struct tty_struct * tty, struct file * file,
 			 unsigned int cmd, unsigned long arg);
 	void	(*set_termios)(struct tty_struct *tty, struct termios * old);
@@ -33,7 +33,7 @@
 	/*
 	 * The following routines are called from below.
 	 */
-	void	(*receive_buf)(struct tty_struct *, unsigned char *cp,
+	void	(*receive_buf)(struct tty_struct *, const unsigned char *cp,
 			       char *fp, int count);
 	int	(*receive_room)(struct tty_struct *);
 	void	(*write_wakeup)(struct tty_struct *);
diff -u --recursive --new-file v1.3.14/linux/include/linux/umsdos_fs.p linux/include/linux/umsdos_fs.p
--- v1.3.14/linux/include/linux/umsdos_fs.p	Tue Jun 27 14:11:46 1995
+++ linux/include/linux/umsdos_fs.p	Tue Aug  1 10:02:47 1995
@@ -26,7 +26,7 @@
 	 int count);
 int umsdos_file_write_kmem (struct inode *inode,
 	 struct file *filp,
-	 char *buf,
+	 const char *buf,
 	 int count);
 int umsdos_emd_dir_write (struct inode *emd_dir,
 	 struct file *filp,
diff -u --recursive --new-file v1.3.14/linux/include/linux/xd.h linux/include/linux/xd.h
--- v1.3.14/linux/include/linux/xd.h	Sun Jan 22 00:02:55 1995
+++ linux/include/linux/xd.h	Tue Aug  1 10:02:47 1995
@@ -98,10 +98,10 @@
 /* this structure defines a ROM BIOS signature */
 typedef struct {
 	u_long offset;
-	char *string;
+	const char *string;
 	void (*init_controller)(u_char *address);
 	void (*init_drive)(u_char drive);
-	char *name;
+	const char *name;
 } XD_SIGNATURE;
 
 u_long xd_init (u_long mem_start,u_long mem_end);
diff -u --recursive --new-file v1.3.14/linux/include/net/datalink.h linux/include/net/datalink.h
--- v1.3.14/linux/include/net/datalink.h	Tue Jun  6 11:22:17 1995
+++ linux/include/net/datalink.h	Tue Aug  1 10:02:47 1995
@@ -4,7 +4,7 @@
 struct datalink_proto {
 	unsigned short	type_len;
 	unsigned char	type[8];
-	char		*string_name;
+	const char	*string_name;
 	unsigned short	header_length;
 	int	(*rcvfunc)(struct sk_buff *, struct device *, 
 				struct packet_type *);
diff -u --recursive --new-file v1.3.14/linux/include/net/ip.h linux/include/net/ip.h
--- v1.3.14/linux/include/net/ip.h	Thu Jul 13 16:20:21 1995
+++ linux/include/net/ip.h	Tue Aug  1 10:02:47 1995
@@ -98,12 +98,12 @@
 extern int 		ip_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen);
 extern void		ip_init(void);
 extern int		ip_build_xmit(struct sock *sk,
-				      void getfrag (void *,
+				      void getfrag (const void *,
 						    int,
 						    char *,
 						    unsigned int,
 						    unsigned int),
-				      void *frag,
+				      const void *frag,
 				      unsigned short int length,
 				      int daddr,
 				      int flags,
diff -u --recursive --new-file v1.3.14/linux/include/net/protocol.h linux/include/net/protocol.h
--- v1.3.14/linux/include/net/protocol.h	Tue Jun  6 11:22:17 1995
+++ linux/include/net/protocol.h	Tue Aug  1 10:02:47 1995
@@ -44,7 +44,7 @@
   unsigned char		protocol;
   unsigned char		copy:1;
   void			*data;
-  char 			*name;
+  const char		*name;
 };
 
 
diff -u --recursive --new-file v1.3.14/linux/include/net/sock.h linux/include/net/sock.h
--- v1.3.14/linux/include/net/sock.h	Fri Jul  7 08:54:55 1995
+++ linux/include/net/sock.h	Tue Aug  1 10:02:47 1995
@@ -220,10 +220,10 @@
   void			(*close)(struct sock *sk, int timeout);
   int			(*read)(struct sock *sk, unsigned char *to,
 				int len, int nonblock, unsigned flags);
-  int			(*write)(struct sock *sk, unsigned char *to,
+  int			(*write)(struct sock *sk, const unsigned char *to,
 				 int len, int nonblock, unsigned flags);
   int			(*sendto)(struct sock *sk,
-				  unsigned char *from, int len, int noblock,
+				  const unsigned char *from, int len, int noblock,
 				  unsigned flags, struct sockaddr_in *usin,
 				  int addr_len);
   int			(*recvfrom)(struct sock *sk,
diff -u --recursive --new-file v1.3.14/linux/init/main.c linux/init/main.c
--- v1.3.14/linux/init/main.c	Fri Jul  7 08:54:55 1995
+++ linux/init/main.c	Tue Aug  1 10:02:47 1995
@@ -145,7 +145,7 @@
 }
 
 struct {
-	char *str;
+	const char *str;
 	void (*setup_func)(char *, int *);
 } bootsetups[] = {
 	{ "reserve=", reserve_setup },
@@ -305,7 +305,7 @@
 static void parse_options(char *line)
 {
 	char *next;
-	static char *devnames[] = { "hda", "hdb", "hdc", "hdd", "sda", "sdb", "sdc", "sdd", "sde", "fd", "xda", "xdb", NULL };
+	static const char *devnames[] = { "hda", "hdb", "hdc", "hdd", "sda", "sdb", "sdc", "sdd", "sde", "fd", "xda", "xdb", NULL };
 	static int devnums[]    = { 0x300, 0x340, 0x1600, 0x1640, 0x800, 0x810, 0x820, 0x830, 0x840, 0x200, 0xD00, 0xD40, 0};
 	int args, envs;
 
diff -u --recursive --new-file v1.3.14/linux/init/version.c linux/init/version.c
--- v1.3.14/linux/init/version.c	Thu Jan  5 13:55:40 1995
+++ linux/init/version.c	Tue Aug  1 10:02:47 1995
@@ -15,6 +15,6 @@
 	UTS_MACHINE, UTS_DOMAINNAME
 };
 
-char *linux_banner = 
+const char *linux_banner = 
 	"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
 	LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
diff -u --recursive --new-file v1.3.14/linux/kernel/dma.c linux/kernel/dma.c
--- v1.3.14/linux/kernel/dma.c	Tue Jul 18 16:28:59 1995
+++ linux/kernel/dma.c	Tue Aug  1 10:02:47 1995
@@ -40,7 +40,7 @@
 
 struct dma_chan {
 	int  lock;
-	char *device_id;
+	const char *device_id;
 };
 
 static struct dma_chan dma_chan_busy[MAX_DMA_CHANNELS] = {
@@ -69,7 +69,7 @@
 } /* get_dma_list */
 
 
-int request_dma(unsigned int dmanr, char * device_id)
+int request_dma(unsigned int dmanr, const char * device_id)
 {
 	if (dmanr >= MAX_DMA_CHANNELS)
 		return -EINVAL;
diff -u --recursive --new-file v1.3.14/linux/kernel/itimer.c linux/kernel/itimer.c
--- v1.3.14/linux/kernel/itimer.c	Mon Jul 31 15:59:03 1995
+++ linux/kernel/itimer.c	Tue Aug  1 10:56:13 1995
@@ -15,11 +15,26 @@
 
 #include <asm/segment.h>
 
+/*
+ * change timeval to jiffies, trying to avoid the 
+ * most obvious overflows..
+ *
+ * The tv_*sec values are signed, but nothing seems to 
+ * indicate whether we really should use them as signed values
+ * when doing itimers. POSIX doesn't mention this (but if
+ * alarm() uses itimers without checking, we have to use unsigned
+ * arithmetic).
+ */
 static unsigned long tvtojiffies(struct timeval *value)
 {
-	return((unsigned long )value->tv_sec * HZ +
-		(unsigned long )(value->tv_usec + (1000000 / HZ - 1)) /
-		(1000000 / HZ));
+	unsigned long sec = (unsigned) value->tv_sec;
+	unsigned long usec = (unsigned) value->tv_usec;
+
+	if (sec > (unsigned) (LONG_MAX / HZ))
+		return LONG_MAX;
+	usec += 1000000 / HZ - 1;
+	usec /= 1000000 / HZ;
+	return HZ*sec+usec;
 }
 
 static void jiffiestotv(unsigned long jiffies, struct timeval *value)
diff -u --recursive --new-file v1.3.14/linux/kernel/module.c linux/kernel/module.c
--- v1.3.14/linux/kernel/module.c	Tue Jun 27 14:11:47 1995
+++ linux/kernel/module.c	Tue Aug  1 10:02:47 1995
@@ -512,7 +512,7 @@
 int get_module_list(char *buf)
 {
 	char *p;
-	char *q;
+	const char *q;
 	int i;
 	struct module *mp;
 	struct module_ref *ref;
diff -u --recursive --new-file v1.3.14/linux/kernel/sched.c linux/kernel/sched.c
--- v1.3.14/linux/kernel/sched.c	Mon Jul 31 15:59:03 1995
+++ linux/kernel/sched.c	Tue Aug  1 10:37:50 1995
@@ -713,7 +713,7 @@
 	sti();
 }
 
-asmlinkage int sys_alarm(long seconds)
+asmlinkage unsigned int sys_alarm(unsigned int seconds)
 {
 	struct itimerval it_new, it_old;
 
@@ -772,7 +772,7 @@
 static void show_task(int nr,struct task_struct * p)
 {
 	unsigned long free;
-	static char * stat_nam[] = { "R", "S", "D", "Z", "T", "W" };
+	static const char * stat_nam[] = { "R", "S", "D", "Z", "T", "W" };
 
 	printk("%-8s %3d ", p->comm, (p == current) ? -nr : nr);
 	if (((unsigned) p->state) < sizeof(stat_nam)/sizeof(char *))
diff -u --recursive --new-file v1.3.14/linux/lib/vsprintf.c linux/lib/vsprintf.c
--- v1.3.14/linux/lib/vsprintf.c	Thu Mar  2 09:04:40 1995
+++ linux/lib/vsprintf.c	Tue Aug  1 10:02:48 1995
@@ -137,7 +137,7 @@
 	unsigned long num;
 	int i, base;
 	char * str;
-	char *s;
+	const char *s;
 
 	int flags;		/* flags to number() */
 
diff -u --recursive --new-file v1.3.14/linux/net/Changes linux/net/Changes
--- v1.3.14/linux/net/Changes	Thu Jul 13 16:20:21 1995
+++ linux/net/Changes	Mon Jul 31 18:51:45 1995
@@ -138,8 +138,19 @@
 o	Fixed multicast					[IN]
 o	TCP does rerouting for most cases		[NOT WORKING YET]
 
-------->>>>>    1.3.?  <<<<<----------
+------->>>>>    1.3.14  <<<<<----------
 
+o	IPX works					[IN]
+o	NetROM works					[IN]
+o	AX.25 works					[IN]
+o	Most modules need recompiling even though they
+	load OK 					[BLAME LINUS]
+
+------->>>>>   1.3.15  <<<<<---------
+o	Mike Shaver has started RFC1122 verification	[IN PROGRESS]
+o	Minor bug fixes					[IN]
+
+------->>>> ???? <<<--------
 o	Finish merging the bridge code
 o	Device locking
 o	SIOCSLEEPRT patch
diff -u --recursive --new-file v1.3.14/linux/net/appletalk/ddp.c linux/net/appletalk/ddp.c
--- v1.3.14/linux/net/appletalk/ddp.c	Mon Jul 31 15:59:03 1995
+++ linux/net/appletalk/ddp.c	Tue Aug  1 10:02:48 1995
@@ -1457,7 +1457,7 @@
 	return(0);
 }
 
-static int atalk_sendto(struct socket *sock, void *ubuf, int len, int noblock,
+static int atalk_sendto(struct socket *sock, const void *ubuf, int len, int noblock,
 	unsigned flags, struct sockaddr *sat, int addr_len)
 {
 	atalk_socket *sk=(atalk_socket *)sock->data;
@@ -1634,7 +1634,7 @@
 	return len;
 }
 
-static int atalk_send(struct socket *sock, void *ubuf, int size, int noblock, unsigned flags)
+static int atalk_send(struct socket *sock, const void *ubuf, int size, int noblock, unsigned flags)
 {
 	return atalk_sendto(sock,ubuf,size,noblock,flags,NULL,0);
 }
@@ -1690,7 +1690,7 @@
 }		
 
 
-static int atalk_write(struct socket *sock, char *ubuf, int size, int noblock)
+static int atalk_write(struct socket *sock, const char *ubuf, int size, int noblock)
 {
 	return atalk_send(sock,ubuf,size,noblock,0);
 }
diff -u --recursive --new-file v1.3.14/linux/net/ax25/af_ax25.c linux/net/ax25/af_ax25.c
--- v1.3.14/linux/net/ax25/af_ax25.c	Mon Jul 31 15:59:03 1995
+++ linux/net/ax25/af_ax25.c	Tue Aug  1 10:02:48 1995
@@ -1566,7 +1566,7 @@
 	return ax25_rcv(skb, dev, &port_call, ptype);
 }
 
-static int ax25_sendto(struct socket *sock, void *ubuf, int len, int noblock,
+static int ax25_sendto(struct socket *sock, const void *ubuf, int len, int noblock,
 	unsigned flags, struct sockaddr *usip, int addr_len)
 {
 	struct sock *sk = (struct sock *)sock->data;
@@ -1716,12 +1716,12 @@
 		
 }
 
-static int ax25_send(struct socket *sock, void *ubuf, int size, int noblock, unsigned flags)
+static int ax25_send(struct socket *sock, const void *ubuf, int size, int noblock, unsigned flags)
 {
 	return ax25_sendto(sock, ubuf, size, noblock, flags, NULL, 0);
 }
 
-static int ax25_write(struct socket *sock, char *ubuf, int size, int noblock)
+static int ax25_write(struct socket *sock, const char *ubuf, int size, int noblock)
 {
 	return ax25_send(sock, ubuf, size, noblock, 0);
 }
@@ -1910,7 +1910,7 @@
 {
 	ax25_cb *ax25;
 	struct device *dev;
-	char *devname;
+	const char *devname;
 	int len = 0;
 	off_t pos = 0;
 	off_t begin = 0;
diff -u --recursive --new-file v1.3.14/linux/net/core/dev.c linux/net/core/dev.c
--- v1.3.14/linux/net/core/dev.c	Tue Jul 25 18:21:24 1995
+++ linux/net/core/dev.c	Tue Aug  1 10:02:48 1995
@@ -185,7 +185,7 @@
  *	Find an interface by name.
  */
  
-struct device *dev_get(char *name)
+struct device *dev_get(const char *name)
 {
 	struct device *dev;
 
diff -u --recursive --new-file v1.3.14/linux/net/ipv4/af_inet.c linux/net/ipv4/af_inet.c
--- v1.3.14/linux/net/ipv4/af_inet.c	Thu Jul 13 16:20:21 1995
+++ linux/net/ipv4/af_inet.c	Tue Aug  1 10:02:48 1995
@@ -1194,7 +1194,7 @@
 	return(sk->prot->read(sk, (unsigned char *) ubuf, size, noblock, 0));
 }
 
-static int inet_send(struct socket *sock, void *ubuf, int size, int noblock, 
+static int inet_send(struct socket *sock, const void *ubuf, int size, int noblock, 
 	       unsigned flags)
 {
 	struct sock *sk = (struct sock *) sock->data;
@@ -1208,15 +1208,15 @@
 	/* We may need to bind the socket. */
 	if(inet_autobind(sk)!=0)
 		return(-EAGAIN);
-	return(sk->prot->write(sk, (unsigned char *) ubuf, size, noblock, flags));
+	return(sk->prot->write(sk, (const unsigned char *) ubuf, size, noblock, flags));
 }
 
-static int inet_write(struct socket *sock, char *ubuf, int size, int noblock)
+static int inet_write(struct socket *sock, const char *ubuf, int size, int noblock)
 {
 	return inet_send(sock,ubuf,size,noblock,0);
 }
 
-static int inet_sendto(struct socket *sock, void *ubuf, int size, int noblock, 
+static int inet_sendto(struct socket *sock, const void *ubuf, int size, int noblock, 
 	    unsigned flags, struct sockaddr *sin, int addr_len)
 {
 	struct sock *sk = (struct sock *) sock->data;
@@ -1232,7 +1232,7 @@
 	/* We may need to bind the socket. */
 	if(inet_autobind(sk)!=0)
 		return -EAGAIN;
-	return(sk->prot->sendto(sk, (unsigned char *) ubuf, size, noblock, flags, 
+	return(sk->prot->sendto(sk, (const unsigned char *) ubuf, size, noblock, flags, 
 			   (struct sockaddr_in *)sin, addr_len));
 }
 
diff -u --recursive --new-file v1.3.14/linux/net/ipv4/arp.c linux/net/ipv4/arp.c
--- v1.3.14/linux/net/ipv4/arp.c	Mon Jul 31 15:59:04 1995
+++ linux/net/ipv4/arp.c	Mon Jul 31 19:17:33 1995
@@ -25,7 +25,7 @@
  *		Alan Cox	:	Allow >4K in /proc
  *		Alan Cox	:	Make ARP add its own protocol entry
  *
- *              Ross Martin     :       Rewrote arp_rcv() and arp_get_info()
+ *		Ross Martin     :       Rewrote arp_rcv() and arp_get_info()
  *		Stephen Henson	:	Add AX25 support to arp_get_info()
  *		Alan Cox	:	Drop data when a device is downed.
  *		Alan Cox	:	Use init_timer().
@@ -33,14 +33,26 @@
  *		Martin Seine	:	Move the arphdr structure
  *					to if_arp.h for compatibility.
  *					with BSD based programs.
- *              Andrew Tridgell :       Added ARP netmask code and
- *                                      re-arranged proxy handling.
+ *		Andrew Tridgell :       Added ARP netmask code and
+ *					re-arranged proxy handling.
  *		Alan Cox	:	Changed to use notifiers.
  *		Niibe Yutaka	:	Reply for this device or proxies only.
  *		Alan Cox	:	Don't proxy across hardware types!
  *		Jonathan Naylor :	Added support for NET/ROM.
+ *		Mike Shaver     :       RFC1122 checks.
  */
 
+/* RFC1122 Status:
+   2.3.2.1 (ARP Cache Validation):
+     MUST provide mechanism to flush stale cache entries (OK)
+     SHOULD be able to configure cache timeout (NOT YET)
+     MUST throttle ARP retransmits (OK)
+   2.3.2.2 (ARP Packet Queue):
+     SHOULD save at least one packet from each "conversation" with an
+       unresolved IP address.  (OK)
+   950727 -- MS
+*/
+      
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
@@ -112,6 +124,10 @@
  *	next request is send.
  */
 
+/* RFC1122: OK.  Throttles ARPing, as per 2.3.2.1. (MUST) */
+/* The recommended minimum timeout is 1 second per destination. */
+/* Is this a per-destination timeout? -- MS [YES AC]*/
+
 #define ARP_RES_TIME		(250*(HZ/10))
 
 /*
@@ -184,7 +200,7 @@
 
 /*
  *	The last bits in the IP address are used for the cache lookup.
- *      A special entry is used for proxy arp entries
+ *	A special entry is used for proxy arp entries
  */
 
 #define HASH(paddr) 		(htonl(paddr) & (ARP_TABLE_SIZE - 1))
@@ -198,6 +214,8 @@
  *	ARP_MAX_TRIES*ARP_RES_TIME.
  */
 
+/* RFC1122: Looks good.  Prevents stale ARP entries, as per 2.3.2.1. (MUST) */
+
 static void arp_check_expire(unsigned long dummy)
 {
 	int i;
@@ -219,7 +237,9 @@
 				*pentry = entry->next;	/* remove from list */
 				arp_cache_stamp++;
 				del_timer(&entry->timer);	/* Paranoia */
-				kfree_s(entry, sizeof(struct arp_table));
+				kfree_s(entry, sizeof(struct arp_table)); 
+				/* Don't have to remove packets in entry->skb. */
+				/* See comments above. */
 			}
 			else
 				pentry = &entry->next;	/* go to next entry */
@@ -431,6 +451,11 @@
 	/* proxy entries shouldn't really time out so this is really
 	   only here for completeness
 	*/
+
+	/* RFC1122: They *can* be timed out, according to 2.3.2.1. */
+	/* They recommend a minute. -- MS */
+	/* The world doesn't work this way -- AC */
+
 	if (entry->flags & ATF_PUBL)
 	  pentry = &arp_tables[PROXY_HASH];
 	else
@@ -453,6 +478,10 @@
 	/*
 	 *	We should never arrive here.
 	 */
+
+	/* Should we perhaps flush the ARP table (except the ones we're */
+	/* publishing, if we can trust the queue that much) at this */
+	/* point? -- MS */
 }
 
 
@@ -474,6 +503,10 @@
 	{
 		printk("arp_send_q: incomplete entry for %s\n",
 				in_ntoa(entry->ip));
+		/* Can't flush the skb, because RFC1122 says to hang on to */
+		/* at least one from any unresolved entry.  --MS */
+		/* Whats happened is that someone has 'unresolved' the entry
+		   as we got to use it - this 'can't happen' -- AC */
 		return;
 	}
 
@@ -580,6 +613,8 @@
 	{
 		kfree_skb(skb, FREE_READ);
 		return 0;
+		/* Should this be an error/printk?  Seems like something */
+		/* you'd want to know about. Unless it's just !IFF_NOARP. -- MS */
 	}
 
 /*
@@ -588,6 +623,8 @@
  *	match the protocol the device speaks.  If it doesn't, there is a
  *	problem, so toss the packet.
  */
+/* Again, should this be an error/printk? -- MS */
+
   	switch(dev->type)
   	{
 #ifdef CONFIG_AX25
@@ -681,6 +718,10 @@
 /* 
  *	Replies to other machines get tossed. 
  */
+
+ /* Should we reset the expiry timers for an entry that isn't for us, if we */
+ /* have it in the cache? RFC1122 suggests it. -- MS */
+
 			kfree_skb(skb, FREE_READ);
 			return 0;
 		}
@@ -882,6 +923,7 @@
 		case IS_MULTICAST:
 			if(dev->type==ARPHRD_ETHER || dev->type==ARPHRD_IEEE802)
 			{
+				/* What exactly does this do? -- MS */
 				haddr[0]=0x01;
 				haddr[1]=0x00;
 				haddr[2]=0x5e;
@@ -914,8 +956,8 @@
 
 	if (entry != NULL) 	/* It exists */
 	{
-	        if (!(entry->flags & ATF_COM))
-	        {
+		if (!(entry->flags & ATF_COM))
+		{
 			/*
 			 *	A request was already send, but no reply yet. Thus
 			 *	queue the packet with the previous attempt
@@ -954,7 +996,7 @@
 		entry->last_used = jiffies;
 		entry->flags = 0;
 		entry->ip = paddr;
-	        entry->mask = DEF_ARP_NETMASK;
+		entry->mask = DEF_ARP_NETMASK;
 		memset(entry->ha, 0, dev->addr_len);
 		entry->hlen = dev->addr_len;
 		entry->htype = dev->type;
@@ -1072,15 +1114,15 @@
 	*start=buffer+(offset-begin);	/* Start of wanted data */
 	len-=(offset-begin);		/* Start slop */
 	if(len>length)
-		len=length;		        /* Ending slop */
+		len=length;			/* Ending slop */
 	return len;
 }
 
 
 /*
  *	This will find an entry in the ARP table by looking at the IP address.
- *      If proxy is PROXY_EXACT then only exact IP matches will be allowed
- *      for proxy entries, otherwise the netmask will be used
+ *	If proxy is PROXY_EXACT then only exact IP matches will be allowed
+ *	for proxy entries, otherwise the netmask will be used
  */
 
 static struct arp_table *arp_lookup(u32 paddr, enum proxy proxy)
@@ -1095,7 +1137,7 @@
 	if (!entry && proxy != PROXY_NONE)
 	for (entry=arp_tables[PROXY_HASH]; entry != NULL; entry = entry->next)
 	  if ((proxy==PROXY_EXACT) ? (entry->ip==paddr)
-	                           : !((entry->ip^paddr)&entry->mask)) 
+				   : !((entry->ip^paddr)&entry->mask)) 
 	    break;	  
 
 	return entry;
@@ -1249,7 +1291,7 @@
 	
 	if (entry == NULL)
 	{
-	        unsigned long hash = HASH(ip);
+		unsigned long hash = HASH(ip);
 		if (r.arp_flags & ATF_PUBL)
 		  hash = PROXY_HASH;
 
diff -u --recursive --new-file v1.3.14/linux/net/ipv4/icmp.c linux/net/ipv4/icmp.c
--- v1.3.14/linux/net/ipv4/icmp.c	Thu Jul 13 16:20:21 1995
+++ linux/net/ipv4/icmp.c	Mon Jul 31 18:51:58 1995
@@ -34,6 +34,7 @@
  *		Alan Cox	:	Tightened even more.
  *		Arnt Gulbrandsen:	Misplaced #endif with net redirect and break
  *		A.N.Kuznetsov	:	ICMP timestamp still used skb+1
+ *		Mike Shaver	:	RFC1122 checks.
  * 
  *
  *		This program is free software; you can redistribute it and/or
@@ -41,6 +42,69 @@
  *		as published by the Free Software Foundation; either version
  *		2 of the License, or (at your option) any later version.
  */
+
+/* RFC1122 Status: (boy, are there a lot of rules for ICMP)
+   3.2.2 (Generic ICMP stuff)
+     MUST discard messages of unknown type. (OK)
+     MUST copy at least the first 8 bytes from the offending packet
+       when sending ICMP errors. (OK)
+     MUST pass received ICMP errors up to protocol level. (OK)
+     SHOULD send ICMP errors with TOS == 0. (OK)
+     MUST NOT send ICMP errors in reply to:
+       ICMP errors (OK)
+       Broadcast/multicast datagrams (OK)
+       MAC broadcasts (OK)
+       Non-initial fragments (OK)
+       Datagram with a source address that isn't a single host. (OK)
+  3.2.2.1 (Destination Unreachable)
+    All the rules govern the IP layer, and are dealt with in ip.c, not here.
+  3.2.2.2 (Redirect)
+    Host SHOULD NOT send ICMP_REDIRECTs.  (OK)
+    MUST update routing table in response to host or network redirects. 
+      (host OK, network NOT YET) [Intentionally -- AC]
+    SHOULD drop redirects if they're not from directly connected gateway
+      (OK -- we drop it if it's not from our old gateway, which is close
+       enough)
+  3.2.2.3 (Source Quench)
+    MUST pass incoming SOURCE_QUENCHs to transport layer (OK)
+    Other requirements are dealt with at the transport layer.
+  3.2.2.4 (Time Exceeded)
+    MUST pass TIME_EXCEEDED to transport layer (OK)
+    Other requirements dealt with at IP (generating TIME_EXCEEDED).
+  3.2.2.5 (Parameter Problem)
+    SHOULD generate these, but it doesn't say for what.  So we're OK. =)
+    MUST pass received PARAMPROBLEM to transport layer (NOT YET)
+    	[Solaris 2.X seems to assert EPROTO when this occurs] -- AC
+  3.2.2.6 (Echo Request/Reply)
+    MUST reply to ECHO_REQUEST, and give app to do ECHO stuff (OK, OK)
+    MAY discard broadcast ECHO_REQUESTs. (We don't, but that's OK.)
+    MUST reply using same source address as the request was sent to.
+      We're OK for unicast ECHOs, and it doesn't say anything about
+      how to handle broadcast ones, since it's optional.
+    MUST copy data from REQUEST to REPLY (OK)
+      unless it would require illegal fragmentation (MUST) (NOT YET)
+    MUST pass REPLYs to transport/user layer (OK)
+    MUST use any provided source route (reversed) for REPLY. (NOT YET)
+ 3.2.2.7 (Information Request/Reply)
+   MUST NOT implement this. (I guess that means silently discard...?) (OK)
+ 3.2.2.8 (Timestamp Request/Reply)
+   MAY implement (OK)
+   SHOULD be in-kernel for "minimum variability" (OK)
+   MAY discard broadcast REQUESTs.  (OK, but see source for inconsistency)
+   MUST reply using same source address as the request was sent to. (OK)
+   MUST reverse source route, as per ECHO (NOT YET)
+   MUST pass REPLYs to transport/user layer (requires RAW, just like ECHO) (OK)
+   MUST update clock for timestamp at least 15 times/sec (OK)
+   MUST be "correct within a few minutes" (OK)
+ 3.2.2.9 (Address Mask Request/Reply)
+   MAY implement (OK)
+   MUST send a broadcast REQUEST if using this system to set netmask
+     (OK... we don't use it)
+   MUST discard received REPLYs if not using this system (OK)
+   MUST NOT send replies unless specifically made agent for this sort
+     of thing. (NOT YET)
+*/
+
 #include <linux/types.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -180,6 +244,9 @@
 			icmp_statistics.IcmpOutSrcQuenchs++;
 			break;
 		case ICMP_REDIRECT:
+		/* RFC1122: (3.2.2.2) Sorta bad.  SHOULDN'T send */
+		/* ICMP_REDIRECTs unless we're a gateway. -- MS */
+		/* We don't .. this path isnt invoked -- AC */
 			icmp_statistics.IcmpOutRedirects++;
 			break;
 		case ICMP_ECHO:
@@ -227,6 +294,11 @@
 	 */
 
 	our_addr = dev->pa_addr;
+
+	/* RFC1122: (3.2.2).  MUST NOT send ICMP in reply to */
+	/* packet with a source IP address that doesn't define a single */
+	/* host. -- MS.  Checked higher up -- AC */
+
 	if (iph->daddr != our_addr && ip_chk_addr(iph->daddr) == IS_MYADDR)
 		our_addr = iph->daddr;
 	offset = ip_build_header(skb, our_addr, iph->saddr,
@@ -250,6 +322,9 @@
 	 *	Fill in the frame
 	 */
 	 
+	/* RFC1122: SHOULD send with TOS == 0, and I guess this does. */
+	/* Perhaps it should be explicit? -- MS */
+
 	icmph = (struct icmphdr *) (skb->data + offset);
 	icmph->type = type;
 	icmph->code = code;
@@ -257,6 +332,9 @@
 	icmph->un.gateway = info;	/* This might not be meant for 
 					   this form of the union but it will
 					   be right anyway */
+
+	/* RFC1122: OK. Copies the minimum 8 bytes unchanged from the offending */
+	/* packet (MUST) as per 3.2.2. -- MS */
 	memcpy(icmph + 1, iph, sizeof(struct iphdr) + 8);
 
 	icmph->checksum = ip_compute_csum((unsigned char *)icmph,
@@ -332,6 +410,10 @@
 		/* 
 		 *	Pass it off to everyone who wants it. 
 		 */
+
+		/* RFC1122: OK. Passes appropriate ICMP errors to the */
+		/* appropriate protocol layer (MUST), as per 3.2.2. */
+
 		if (iph->protocol == ipprot->protocol && ipprot->err_handler) 
 		{
 			ipprot->err_handler(err, (unsigned char *)(icmph + 1),
@@ -469,6 +551,12 @@
 	 */
 	icmphr = (struct icmphdr *) (skb2->data + offset);
 	memcpy((char *) icmphr, (char *) icmph, len);
+
+	/* Are we copying the data from the ECHO datagram? */
+	/* We're supposed to, and it looks like we are. -- MS */
+	/* We're also supposed to truncate it if it would force */
+	/* illegal fragmentation. *sigh*  */
+
 	icmphr->type = ICMP_ECHOREPLY;
 	icmphr->code = 0;
 	icmphr->checksum = 0;
@@ -587,11 +675,20 @@
 /* 
  *	Handle ICMP_ADDRESS_MASK requests. 
  */
+
+/* RFC1122 (3.2.2.9).  A host MUST only send replies to */
+/* ADDRESS_MASK requests if it's been configured as an address mask */
+/* agent.  Receiving a request doesn't constitute implicit permission to */
+/* act as one. Of course, implementing this correctly requires (SHOULD) */
+/* a way to turn the functionality on and off.  Another one for sysctl(), */
+/* I guess. -- MS */
+/* Botched with a CONFIG option for now - Linus add scts sysctl please.. */
  
 static void icmp_address(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev,
 	  unsigned long saddr, unsigned long daddr, int len,
 	  struct options *opt)
 {
+#ifdef CONFIG_IP_ADDR_AGENT
 	struct icmphdr *icmphr;
 	struct sk_buff *skb2;
 	int size, offset;
@@ -647,7 +744,7 @@
 
 	/* Ship it out - free it when done */
 	ip_queue_xmit((struct sock *)NULL, ndev, skb2, 1);
-
+#endif
 	skb->sk = NULL;
 	kfree_skb(skb, FREE_READ);
 }
@@ -699,6 +796,11 @@
 	if (ip_chk_addr(daddr) != IS_MYADDR)
 	{
 		if (icmph->type != ICMP_ECHO) 
+		/* RFC1122: We're allowed to reply to ICMP_TIMESTAMP */
+		/* requests in the same manner as ICMP_ECHO (optionally */
+		/* drop those to a bcast/mcast), so perhaps we should be */
+		/* consistent? -- MS */
+
 		{
 			icmp_statistics.IcmpInErrors++;
 			kfree_skb(skb1, FREE_READ);
@@ -738,6 +840,9 @@
 			icmp_timestamp(icmph, skb1, dev, saddr, daddr, len, opt);
 			return 0;
 		case ICMP_TIMESTAMPREPLY:
+		/* RFC1122: MUST pass TIMESTAMPREPLY messages up to app layer, */
+		/* just as with ECHOREPLY.  You have to use raw to get that */
+		/* functionality, just as with ECHOREPLY. Close enough. -- MS */
 			icmp_statistics.IcmpInTimestampReps++;
 			kfree_skb(skb1,FREE_READ);
 			return 0;
@@ -762,6 +867,8 @@
 			kfree_skb(skb1, FREE_READ);
 			return(0);
 		default:
+			/* RFC1122: OK.  Silently discarding weird ICMP (MUST), */
+			/* as per 3.2.2. -- MS */
 			icmp_statistics.IcmpInErrors++;
 			kfree_skb(skb1, FREE_READ);
 			return(0);
diff -u --recursive --new-file v1.3.14/linux/net/ipv4/ip.c linux/net/ipv4/ip.c
--- v1.3.14/linux/net/ipv4/ip.c	Mon Jul 31 15:59:04 1995
+++ linux/net/ipv4/ip.c	Tue Aug  1 10:02:49 1995
@@ -2346,12 +2346,12 @@
  */
 
 int ip_build_xmit(struct sock *sk,
-		   void getfrag (void *,
+		   void getfrag (const void *,
 				 int,
 				 char *,
 				 unsigned int,
 				 unsigned int),
-		   void *frag,
+		   const void *frag,
 		   unsigned short int length,
 		   int daddr,
 		   int flags,
diff -u --recursive --new-file v1.3.14/linux/net/ipv4/ip_fw.c linux/net/ipv4/ip_fw.c
--- v1.3.14/linux/net/ipv4/ip_fw.c	Mon Jul 31 15:59:04 1995
+++ linux/net/ipv4/ip_fw.c	Tue Aug  1 10:02:49 1995
@@ -128,7 +128,7 @@
  */
 
 static unsigned short masq_port = PORT_MASQ_BEGIN;
-static char *strProt[] = {"UDP","TCP"};
+static const char *strProt[] = {"UDP","TCP"};
 struct ip_masq *ip_msq_hosts;
 
 #endif
diff -u --recursive --new-file v1.3.14/linux/net/ipv4/packet.c linux/net/ipv4/packet.c
--- v1.3.14/linux/net/ipv4/packet.c	Fri Jul  7 08:54:57 1995
+++ linux/net/ipv4/packet.c	Tue Aug  1 10:02:49 1995
@@ -141,7 +141,7 @@
  *	protocol layers and you must therefore supply it with a complete frame
  */
  
-static int packet_sendto(struct sock *sk, unsigned char *from, int len,
+static int packet_sendto(struct sock *sk, const unsigned char *from, int len,
 	      int noblock, unsigned flags, struct sockaddr_in *usin,
 	      int addr_len)
 {
@@ -224,7 +224,7 @@
  *	always fail but we include it for completeness and future expansion.
  */
 
-static int packet_write(struct sock *sk, unsigned char *buff, 
+static int packet_write(struct sock *sk, const unsigned char *buff, 
 	     int len, int noblock,  unsigned flags)
 {
 	return(packet_sendto(sk, buff, len, noblock, flags, NULL, 0));
diff -u --recursive --new-file v1.3.14/linux/net/ipv4/raw.c linux/net/ipv4/raw.c
--- v1.3.14/linux/net/ipv4/raw.c	Fri Jun 30 16:22:32 1995
+++ linux/net/ipv4/raw.c	Tue Aug  1 10:02:49 1995
@@ -127,18 +127,18 @@
  *	Callback support is trivial for SOCK_RAW
  */
   
-static void raw_getfrag(void *p, int saddr, char *to, unsigned int offset, unsigned int fraglen)
+static void raw_getfrag(const void *p, int saddr, char *to, unsigned int offset, unsigned int fraglen)
 {
-	memcpy_fromfs(to, (unsigned char *)p+offset, fraglen);
+	memcpy_fromfs(to, (const unsigned char *)p+offset, fraglen);
 }
 
 /*
  *	IPPROTO_RAW needs extra work.
  */
  
-static void raw_getrawfrag(void *p, int saddr, char *to, unsigned int offset, unsigned int fraglen)
+static void raw_getrawfrag(const void *p, int saddr, char *to, unsigned int offset, unsigned int fraglen)
 {
-	memcpy_fromfs(to, (unsigned char *)p+offset, fraglen);
+	memcpy_fromfs(to, (const unsigned char *)p+offset, fraglen);
 	if(offset==0)
 	{
 		struct iphdr *iph=(struct iphdr *)to;
@@ -155,7 +155,7 @@
 	}
 }
 
-static int raw_sendto(struct sock *sk, unsigned char *from, 
+static int raw_sendto(struct sock *sk, const unsigned char *from, 
 	int len, int noblock, unsigned flags, struct sockaddr_in *usin, int addr_len)
 {
 	int err;
@@ -207,7 +207,7 @@
 }
 
 
-static int raw_write(struct sock *sk, unsigned char *buff, int len, int noblock,
+static int raw_write(struct sock *sk, const unsigned char *buff, int len, int noblock,
 	   unsigned flags)
 {
 	return(raw_sendto(sk, buff, len, noblock, flags, NULL, 0));
diff -u --recursive --new-file v1.3.14/linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
--- v1.3.14/linux/net/ipv4/tcp.c	Mon Jul 31 15:59:04 1995
+++ linux/net/ipv4/tcp.c	Tue Aug  1 10:02:49 1995
@@ -336,7 +336,7 @@
  *	of two things. Firstly we will bin packets even within the window
  *	in order to get the data we are waiting for into the memory limit.
  *	Secondly we bin common duplicate forms at receive time
- *      Better heuristics welcome
+ *	Better heuristics welcome
  */
    
 int tcp_select_window(struct sock *sk)
@@ -1456,7 +1456,7 @@
  *	and starts the transmit system.
  */
 
-static int tcp_write(struct sock *sk, unsigned char *from,
+static int tcp_write(struct sock *sk, const unsigned char *from,
 	  int len, int nonblock, unsigned flags)
 {
 	int copied = 0;
@@ -1576,11 +1576,11 @@
 
 		if ((skb = tcp_dequeue_partial(sk)) != NULL) 
 		{
-		        int hdrlen;
+			int hdrlen;
 
-		         /* IP header + TCP header */
+			 /* IP header + TCP header */
 			hdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data)
-			         + sizeof(struct tcphdr);
+				 + sizeof(struct tcphdr);
 	
 			/* Add more stuff to the end of skb->len */
 			if (!(flags & MSG_OOB)) 
@@ -1777,7 +1777,7 @@
  *	This is just a wrapper. 
  */
 
-static int tcp_sendto(struct sock *sk, unsigned char *from,
+static int tcp_sendto(struct sock *sk, const unsigned char *from,
 	   int len, int nonblock, unsigned flags,
 	   struct sockaddr_in *addr, int addr_len)
 {
@@ -2586,10 +2586,10 @@
 
 /*
  *	Look for tcp options. Parses everything but only knows about MSS.
- *      This routine is always called with the packet containing the SYN.
- *      However it may also be called with the ack to the SYN.  So you
- *      can't assume this is always the SYN.  It's always called after
- *      we have set up sk->mtu to our own MTU.
+ *	This routine is always called with the packet containing the SYN.
+ *	However it may also be called with the ack to the SYN.  So you
+ *	can't assume this is always the SYN.  It's always called after
+ *	we have set up sk->mtu to our own MTU.
  *
  *	We need at minimum to add PAWS support here. Possibly large windows
  *	as Linux gets deployed on 100Mb/sec networks.
@@ -3452,7 +3452,7 @@
 				sk->backoff = 0;
 			}
 			flag |= (2|4);	/* 2 is really more like 'don't adjust the rtt 
-			                   In this case as we just set it up */
+					   In this case as we just set it up */
 			cli();
 			oskb = sk->send_head;
 			IS_SKB(oskb);
@@ -3495,7 +3495,7 @@
 	if (skb_peek(&sk->write_queue) != NULL) 
 	{
 		if (after (sk->window_seq+1, sk->write_queue.next->h.seq) &&
-		        (sk->retransmits == 0 || 
+			(sk->retransmits == 0 || 
 			 sk->ip_xmit_timeout != TIME_WRITE ||
 			 before(sk->write_queue.next->h.seq, sk->rcv_ack_seq + 1))
 			&& sk->packets_out < sk->cong_window) 
@@ -3514,7 +3514,7 @@
  			/*
  			 *	Data to queue but no room.
  			 */
- 	        	reset_xmit_timer(sk, TIME_PROBE0, sk->rto);
+ 			reset_xmit_timer(sk, TIME_PROBE0, sk->rto);
  		}		
 	}
 	else
diff -u --recursive --new-file v1.3.14/linux/net/ipv4/udp.c linux/net/ipv4/udp.c
--- v1.3.14/linux/net/ipv4/udp.c	Tue Jul 18 16:29:00 1995
+++ linux/net/ipv4/udp.c	Tue Aug  1 10:02:49 1995
@@ -46,6 +46,7 @@
  *		Alan Cox	:	Cache last socket
  *		Alan Cox	:	Route cache
  *		Jon Peatfield	:	Minor efficientcy fix to sendto().
+ *		Mike Shaver	:	RFC1122 checks.
  *
  *
  *		This program is free software; you can redistribute it and/or
@@ -54,6 +55,32 @@
  *		2 of the License, or (at your option) any later version.
  */
  
+/* RFC1122 Status:
+   4.1.3.1 (Ports):
+     SHOULD send ICMP_PORT_UNREACHABLE in reponse to datagrams to 
+       an un-listened port. (OK)
+   4.1.3.2 (IP Options)
+     MUST pass IP options from IP -> application (OK)
+     MUST allow application to specify IP options (OK)
+   4.1.3.3 (ICMP Messages)
+     MUST pass ICMP error messages to application (OK)
+   4.1.3.4 (UDP Checksums)
+     MUST provide facility for checksumming (OK)
+     MAY allow application to control checksumming (OK)
+     MUST default to checksumming on (OK)
+     MUST discard silently datagrams with bad csums (OK)
+   4.1.3.5 (UDP Multihoming)
+     MUST allow application to specify source address (OK)
+     SHOULD be able to communicate the chosen src addr up to application
+       when application doesn't choose (NOT YET - doesnt seem to be in the BSD API)
+       [Does opening a SOCK_PACKET and snooping your output count 8)]
+   4.1.3.6 (Invalid Addresses)
+     MUST discard invalid source addresses (NOT YET -- will be implemented
+       in IP, so UDP will eventually be OK.  Right now it's a violation.)
+     MUST only send datagrams with one of our addresses (NOT YET - ought to be OK )
+   950728 -- MS
+*/
+
 #include <asm/system.h>
 #include <asm/segment.h>
 #include <linux/types.h>
@@ -81,7 +108,7 @@
 #include <net/checksum.h>
 
 /*
- *	SNMP MIB for the UDP layer
+ *	Snmp MIB for the UDP layer
  */
 
 struct udp_mib		udp_statistics;
@@ -158,6 +185,10 @@
 	 *	client code people.
 	 */
 	 
+	/* RFC1122: OK.  Passes ICMP errors back to application, as per */
+	/* 4.1.3.3. */
+	/* After the comment above, that should be no surprise. */
+
 	if (icmp_err_convert[err & 0xff].fatal)
 	{
 		sk->err = icmp_err_convert[err & 0xff].errno;
@@ -176,7 +207,7 @@
 	struct udphdr uh;
 	int daddr;
 	int other;
-	char *from;
+	const char *from;
 	int wcheck;
 };
 
@@ -186,10 +217,11 @@
  *	for direct user->board I/O transfers. That one will be fun.
  */
  
-static void udp_getfrag(void *p, int saddr, char * to, unsigned int offset, unsigned int fraglen) 
+static void udp_getfrag(const void *p, int saddr, char * to, unsigned int offset, unsigned int fraglen) 
 {
 	struct udpfakehdr *ufh = (struct udpfakehdr *)p;
-	char *src, *dst;
+	const char *src;
+	char *dst;
 	unsigned int len;
 
 	if (offset) 
@@ -225,10 +257,11 @@
  *	this is a valid decision.
  */
  
-static void udp_getfrag_nosum(void *p, int saddr, char * to, unsigned int offset, unsigned int fraglen) 
+static void udp_getfrag_nosum(const void *p, int saddr, char * to, unsigned int offset, unsigned int fraglen) 
 {
 	struct udpfakehdr *ufh = (struct udpfakehdr *)p;
-	char *src, *dst;
+	const char *src;
+	char *dst;
 	unsigned int len;
 
 	if (offset) 
@@ -254,7 +287,7 @@
  */
  
 static int udp_send(struct sock *sk, struct sockaddr_in *sin,
-		      unsigned char *from, int len, int rt) 
+		      const unsigned char *from, int len, int rt) 
 {
 	int ulen = len + sizeof(struct udphdr);
 	int a;
@@ -268,6 +301,17 @@
 	ufh.other = (htons(ulen) << 16) + IPPROTO_UDP*256;
 	ufh.from = from;
 	ufh.wcheck = 0;
+
+	/* RFC1122 Violation: there is no provision for passing IP options */
+	/* from the application layer to the IP one.  It's a MUST (4.1.3.2), */
+	/* but it looks like it'd require some work on ip_build_xmit. */
+	/* Alan says he's got a Cunning Plan. -- MS */
+
+	/* RFC1122: OK.  Provides the checksumming facility (MUST) as per */
+	/* 4.1.3.4. It's configurable by the application via setsockopt() */
+	/* (MAY) and it defaults to on (MUST).  Almost makes up for the */
+	/* violation above. -- MS */
+
 	if(sk->no_check)
 		a = ip_build_xmit(sk, udp_getfrag_nosum, &ufh, ulen, 
 			sin->sin_addr.s_addr, rt, IPPROTO_UDP);
@@ -281,7 +325,7 @@
 }
 
 
-static int udp_sendto(struct sock *sk, unsigned char *from, int len, int noblock,
+static int udp_sendto(struct sock *sk, const unsigned char *from, int len, int noblock,
 	   unsigned flags, struct sockaddr_in *usin, int addr_len)
 {
 	struct sockaddr_in sin;
@@ -320,6 +364,16 @@
   	 *	broadcasting of data.
   	 */
   	 
+	/* RFC1122: OK.  Allows the application to select the specific */
+	/* source address for an outgoing packet (MUST) as per 4.1.3.5. */
+	/* Optional addition: a mechanism for telling the application what */
+	/* address was used. (4.1.3.5, MAY) -- MS */
+
+	/* RFC1122: MUST ensure that all outgoing packets have one */
+	/* of this host's addresses as a source addr.(4.1.3.6) - bind in  */
+	/* af_inet.c checks these. It does need work to allow BSD style */
+	/* bind to multicast as is done by xntpd		*/
+
   	if(usin->sin_addr.s_addr==INADDR_ANY)
   		usin->sin_addr.s_addr=ip_my_addr();
   		
@@ -340,7 +394,7 @@
  *	In BSD SOCK_DGRAM a write is just like a send.
  */
 
-static int udp_write(struct sock *sk, unsigned char *buff, int len, int noblock,
+static int udp_write(struct sock *sk, const unsigned char *buff, int len, int noblock,
 	  unsigned flags)
 {
 	return(udp_sendto(sk, buff, len, noblock, flags, NULL, 0));
@@ -545,6 +599,13 @@
 		return(0);
 	}
 
+	/* RFC1122 warning: According to 4.1.3.6, we MUST discard any */
+	/* datagram which has an invalid source address, either here or */
+	/* in IP. */
+	/* Right now, IP isn't doing it, and neither is UDP. It's on the */
+	/* FIXME list for IP, though, so I wouldn't worry about it. */
+	/* (That's the Right Place to do it, IMHO.) -- MS */
+
 	if (uh->check && (
 		( skb->ip_summed && udp_check(uh, len, saddr, daddr, skb->csum ) ) ||
 		( !skb->ip_summed && udp_check(uh, len, saddr, daddr,csum_partial((char*)uh, len, 0)))
@@ -553,6 +614,10 @@
 	{
 		/* <mea@utu.fi> wants to know, who sent it, to
 		   go and stomp on the garbage sender... */
+
+	  /* RFC1122: OK.  Discards the bad packet silently (as far as */
+	  /* the network is concered, anyway) as per 4.1.3.4 (MUST). */
+
 		NETDEBUG(printk("UDP: bad checksum. From %08lX:%d to %08lX:%d ulen %d\n",
 		       ntohl(saddr),ntohs(uh->source),
 		       ntohl(daddr),ntohs(uh->dest),
@@ -644,6 +709,9 @@
 	 *	Charge it to the socket, dropping if the queue is full.
 	 */
 
+	/* I assume this includes the IP options, as per RFC1122 (4.1.3.2). */
+	/* If not, please let me know. -- MS */
+
 	if (sock_queue_rcv_skb(sk,skb)<0) 
 	{
 		udp_statistics.UdpInErrors++;
@@ -692,4 +760,3 @@
 	0, 0,
 	{NULL,}
 };
-
diff -u --recursive --new-file v1.3.14/linux/net/ipv4/utils.c linux/net/ipv4/utils.c
--- v1.3.14/linux/net/ipv4/utils.c	Tue Jun  6 12:16:44 1995
+++ linux/net/ipv4/utils.c	Tue Aug  1 10:02:49 1995
@@ -62,7 +62,7 @@
  *	Convert an ASCII string to binary IP. 
  */
  
-unsigned long in_aton(char *str)
+unsigned long in_aton(const char *str)
 {
 	unsigned long l;
 	unsigned int val;
diff -u --recursive --new-file v1.3.14/linux/net/ipx/af_ipx.c linux/net/ipx/af_ipx.c
--- v1.3.14/linux/net/ipx/af_ipx.c	Mon Jul 31 15:59:05 1995
+++ linux/net/ipx/af_ipx.c	Tue Aug  1 10:02:49 1995
@@ -553,8 +553,8 @@
 	return ipxrtr_add_route(intrfc->if_netnum, intrfc, NULL);
 }
 
-static char * ipx_frame_name(unsigned short);
-static char * ipx_device_name(ipx_interface *);
+static const char * ipx_frame_name(unsigned short);
+static const char * ipx_device_name(ipx_interface *);
 static int ipxrtr_route_skb(struct sk_buff *);
 
 static int 
@@ -986,7 +986,7 @@
 }
 
 static int
-ipxrtr_route_packet(ipx_socket *sk, struct sockaddr_ipx *usipx, void *ubuf, int len)
+ipxrtr_route_packet(ipx_socket *sk, struct sockaddr_ipx *usipx, const void *ubuf, int len)
 {
 	struct sk_buff *skb;
 	ipx_interface *intrfc;
@@ -1103,7 +1103,7 @@
 	}
 }
 
-static char *
+static const char *
 ipx_frame_name(unsigned short frame)
 {
 	switch (ntohs(frame)) {
@@ -1115,7 +1115,7 @@
 	}
 }
 
-static char *
+static const char *
 ipx_device_name(ipx_interface *intrfc)
 {
 	return (intrfc->if_internal ? "Internal" :
@@ -1687,7 +1687,7 @@
 	return ipxitf_rcv(intrfc, skb);
 }
 
-static int ipx_sendto(struct socket *sock, void *ubuf, int len, int noblock,
+static int ipx_sendto(struct socket *sock, const void *ubuf, int len, int noblock,
 	unsigned flags, struct sockaddr *usip, int addr_len)
 {
 	ipx_socket *sk=(ipx_socket *)sock->data;
@@ -1730,7 +1730,7 @@
 	return len;
 }
 
-static int ipx_send(struct socket *sock, void *ubuf, int size, int noblock, unsigned flags)
+static int ipx_send(struct socket *sock, const void *ubuf, int size, int noblock, unsigned flags)
 {
 	return ipx_sendto(sock,ubuf,size,noblock,flags,NULL,0);
 }
@@ -1780,7 +1780,7 @@
 	return(truesize);
 }		
 
-static int ipx_write(struct socket *sock, char *ubuf, int size, int noblock)
+static int ipx_write(struct socket *sock, const char *ubuf, int size, int noblock)
 {
 	return ipx_send(sock,ubuf,size,noblock,0);
 }
diff -u --recursive --new-file v1.3.14/linux/net/netrom/af_netrom.c linux/net/netrom/af_netrom.c
--- v1.3.14/linux/net/netrom/af_netrom.c	Mon Jul 31 15:59:05 1995
+++ linux/net/netrom/af_netrom.c	Tue Aug  1 10:02:50 1995
@@ -1006,7 +1006,7 @@
 	return 1;
 }
 
-static int nr_sendto(struct socket *sock, void *ubuf, int len, int noblock,
+static int nr_sendto(struct socket *sock, const void *ubuf, int len, int noblock,
 	unsigned flags, struct sockaddr *usip, int addr_len)
 {
 	struct sock *sk = (struct sock *)sock->data;
@@ -1112,12 +1112,12 @@
 	return len;
 }
 
-static int nr_send(struct socket *sock, void *ubuf, int size, int noblock, unsigned flags)
+static int nr_send(struct socket *sock, const void *ubuf, int size, int noblock, unsigned flags)
 {
 	return nr_sendto(sock, ubuf, size, noblock, flags, NULL, 0);
 }
 
-static int nr_write(struct socket *sock, char *ubuf, int size, int noblock)
+static int nr_write(struct socket *sock, const char *ubuf, int size, int noblock)
 {
 	return nr_send(sock, ubuf, size, noblock, 0);
 }
@@ -1288,7 +1288,7 @@
 {
 	struct sock *s;
 	struct device *dev;
-	char *devname;
+	const char *devname;
 	int len = 0;
 	off_t pos = 0;
 	off_t begin = 0;
diff -u --recursive --new-file v1.3.14/linux/net/netrom/nr_route.c linux/net/netrom/nr_route.c
--- v1.3.14/linux/net/netrom/nr_route.c	Mon Jul 31 15:59:05 1995
+++ linux/net/netrom/nr_route.c	Tue Aug  1 10:02:50 1995
@@ -62,7 +62,7 @@
  *	Add a new route to a node, and in the process add the node and the
  *	neighbour if it is new.
  */
-static int nr_add_node(ax25_address *nr, char *mnemonic, ax25_address *ax25,
+static int nr_add_node(ax25_address *nr, const char *mnemonic, ax25_address *ax25,
 	ax25_digi *ax25_digi, struct device *dev, int quality, int obs_count)
 {
 	struct nr_node  *nr_node;
diff -u --recursive --new-file v1.3.14/linux/net/socket.c linux/net/socket.c
--- v1.3.14/linux/net/socket.c	Fri Jun 30 16:22:34 1995
+++ linux/net/socket.c	Tue Aug  1 10:02:50 1995
@@ -69,7 +69,7 @@
 		      int whence);
 static int sock_read(struct inode *inode, struct file *file, char *buf,
 		     int size);
-static int sock_write(struct inode *inode, struct file *file, char *buf,
+static int sock_write(struct inode *inode, struct file *file, const char *buf,
 		      int size);
 
 static void sock_close(struct inode *inode, struct file *file);
@@ -337,7 +337,7 @@
  *	readable by the user process.
  */
 
-static int sock_write(struct inode *inode, struct file *file, char *ubuf, int size)
+static int sock_write(struct inode *inode, struct file *file, const char *ubuf, int size)
 {
 	struct socket *sock;
 	int err;
diff -u --recursive --new-file v1.3.14/linux/net/unix/sock.c linux/net/unix/sock.c
--- v1.3.14/linux/net/unix/sock.c	Tue Jun  6 12:16:42 1995
+++ linux/net/unix/sock.c	Tue Aug  1 10:02:50 1995
@@ -71,17 +71,17 @@
 			      int *usockaddr_len, int peer);
 static int unix_proto_read(struct socket *sock, char *ubuf, int size,
 			   int nonblock);
-static int unix_proto_write(struct socket *sock, char *ubuf, int size,
+static int unix_proto_write(struct socket *sock, const char *ubuf, int size,
 			    int nonblock);
 static int unix_proto_select(struct socket *sock, int sel_type, select_table * wait);
 static int unix_proto_ioctl(struct socket *sock, unsigned int cmd,
 			    unsigned long arg);
 static int unix_proto_listen(struct socket *sock, int backlog);
-static int unix_proto_send(struct socket *sock, void *buff, int len,
+static int unix_proto_send(struct socket *sock, const void *buff, int len,
 			    int nonblock, unsigned flags);
 static int unix_proto_recv(struct socket *sock, void *buff, int len,
 			    int nonblock, unsigned flags);
-static int unix_proto_sendto(struct socket *sock, void *buff, int len,
+static int unix_proto_sendto(struct socket *sock, const void *buff, int len,
 			      int nonblock, unsigned flags,
 			      struct sockaddr *addr, int addr_len);
 static int unix_proto_recvfrom(struct socket *sock, void *buff, int len,
@@ -160,7 +160,7 @@
  *	SendTo() doesn't matter as we also have no Datagram support!
  */
 
-static int unix_proto_sendto(struct socket *sock, void *buff, int len, int nonblock, 
+static int unix_proto_sendto(struct socket *sock, const void *buff, int len, int nonblock, 
 		  unsigned flags,  struct sockaddr *addr, int addr_len)
 {
 	return(-EOPNOTSUPP);
@@ -186,12 +186,12 @@
  *	Send data to a unix socket.
  */
  
-static int unix_proto_send(struct socket *sock, void *buff, int len, int nonblock,
+static int unix_proto_send(struct socket *sock, const void *buff, int len, int nonblock,
 		unsigned flags)
 {
 	if (flags != 0) 
 		return(-EINVAL);
-	return(unix_proto_write(sock, (char *) buff, len, nonblock));
+	return(unix_proto_write(sock, (const char *) buff, len, nonblock));
 }
 
 
@@ -676,7 +676,7 @@
  *	peer has disconnected, which we check other ways.
  */
  
-static int unix_proto_write(struct socket *sock, char *ubuf, int size, int nonblock)
+static int unix_proto_write(struct socket *sock, const char *ubuf, int size, int nonblock)
 {
 	struct unix_proto_data *pupd;
 	int todo, space;
